Browse Source

always ls-lisp for dired, update dired-display-all

pull/1/head
10sr 13 years ago
parent
commit
46a07aa969
1 changed files with 26 additions and 8 deletions
  1. +26
    -8
      emacs.el

+ 26
- 8
emacs.el View File

@@ -895,6 +895,8 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB."
(add-hook 'bs-mode-hook (add-hook 'bs-mode-hook
(lambda () (lambda ()
(setq bs-default-configuration "this-frame") (setq bs-default-configuration "this-frame")
;; (and bs--show-all
;; (call-interactively 'bs-toggle-show-all))
(set (make-variable-buffer-local 'scroll-margin) 0) (set (make-variable-buffer-local 'scroll-margin) 0)
)) ))


@@ -1333,29 +1335,45 @@ otherwise, use `pack-default-extension' for pack."
(setq dired-listing-switches "-lhFG") (setq dired-listing-switches "-lhFG")
(setq dired-listing-switches "-lhFG --time-style=long-iso") (setq dired-listing-switches "-lhFG --time-style=long-iso")
) )
(setq dired-listing-switches "-lhFG")

(define-minor-mode my-dired-display-all-mode (define-minor-mode my-dired-display-all-mode
"" ""
:init-value nil :init-value nil
:global t
(my-dired-display-all-set)
:global nil
:lighter " ALL"
(when (eq major-mode 'dired-mode) (when (eq major-mode 'dired-mode)
(my-dired-display-all-set)
(revert-buffer))) (revert-buffer)))
(defun my-dired-display-all-set () (defun my-dired-display-all-set ()
"" ""
(if my-dired-display-all-mode (if my-dired-display-all-mode
(setq dired-actual-switches
(concat "-A "
dired-actual-switches))
(or (string-match-p my-dired-display-all-switch
dired-actual-switches)
(setq dired-actual-switches
(concat my-dired-display-all-switch
" "
dired-actual-switches)))
(setq dired-actual-switches (setq dired-actual-switches
(replace-regexp-in-string "-A " "" dired-actual-switches))))
(replace-regexp-in-string (concat my-dired-display-all-switch
" ")
""
dired-actual-switches))))
(defvar my-dired-display-all-switch "-A")
(add-hook 'dired-mode-hook (add-hook 'dired-mode-hook
'my-dired-display-all-set) 'my-dired-display-all-set)


(put 'dired-find-alternate-file 'disabled nil) (put 'dired-find-alternate-file 'disabled nil)
(setq dired-ls-F-marks-symlinks t)

(require 'ls-lisp) (require 'ls-lisp)
;; (setq ls-lisp-use-insert-directory-program nil)
(setq ls-lisp-use-insert-directory-program nil)
(setq ls-lisp-dirs-first t) (setq ls-lisp-dirs-first t)
(setq dired-ls-F-marks-symlinks t)
(setq ls-lisp-use-localized-time-format t)
(setq ls-lisp-format-time-list
'("%Y-%m-%d %H:%M"
"%Y-%m-%d "))

(setq dired-dwim-target t) (setq dired-dwim-target t)


;; (add-hook 'dired-after-readin-hook ;; (add-hook 'dired-after-readin-hook


Loading…
Cancel
Save