all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* global dired-hide-details-mode
@ 2016-11-07  8:17 Alexander Klimov
  2016-11-07 13:45 ` Michael Heerdegen
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Klimov @ 2016-11-07  8:17 UTC (permalink / raw)
  To: emacs-devel

Hi.

Looks like there is no way to customize Emacs so that every 
new dired buffer starts with dired-hide-details-mode, but g 
(that is revert-buffer) keeps the details state.

My current approach is to add 
 dired-hide-details-unless-reverting-in-progress
into
 dired-before-readin-hook

(defvar dired-reverting-in-progress nil)
(defun dired-reverting-in-progress-advice (orig-fun &rest args)
  (let ((dired-reverting-in-progress t))
    (apply orig-fun args)))
(advice-add 'dired-revert :around #'dired-reverting-in-progress-advice)

(defun dired-hide-details-unless-reverting-in-progress ()
  (unless dired-reverting-in-progress
    (dired-hide-details-mode)))

It would be nice to create a more direct way to achieve this 
functionality.

-- 
Regards,
ASK



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-07 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07  8:17 global dired-hide-details-mode Alexander Klimov
2016-11-07 13:45 ` Michael Heerdegen
2016-11-07 14:11   ` Alexander Klimov
2016-11-07 15:22     ` Michael Heerdegen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.