unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexander Klimov <alserkli@inbox.ru>
To: emacs-devel@gnu.org
Subject: global dired-hide-details-mode
Date: Mon, 7 Nov 2016 10:17:52 +0200	[thread overview]
Message-ID: <TheMailAgent.5c3a402f@61f81390> (raw)

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



             reply	other threads:[~2016-11-07  8:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07  8:17 Alexander Klimov [this message]
2016-11-07 13:45 ` global dired-hide-details-mode Michael Heerdegen
2016-11-07 14:11   ` Alexander Klimov
2016-11-07 15:22     ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TheMailAgent.5c3a402f@61f81390 \
    --to=alserkli@inbox.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).