unofficial mirror of emacs-devel@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).