help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: in reply to my other just-now post about dired which hasn't appeared


From: Emanuel Berg
Subject: Re: in reply to my other just-now post about dired which hasn't appeared FWR
Date: Sun, 04 Oct 2015 02:15:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

John Mastro <john.b.mastro@gmail.com> writes:

> You may already know this, but I'll mention it
> anyway, since it took me quite a while to notice, so
> maybe others haven't found it yet either: With `C-u
> s' (that's `dired-sort-toggle-or-edit') you can edit
> the listing switches however you like. The change
> affects only the current buffer.
>
> I previously used a custom command to select
> a sorting method via `ido' but since discovering
> `C-u s' I've found it's more general and just
> as convenient.

Here, the best of both worlds - and I'm not talking
Captain Picard against the Borg Queen here!

;; dired ls
(defvar dired-ls-human nil)
(defvar dired-base-ls-options "-AGlX --group-directories-first")
(setq dired-listing-switches dired-base-ls-options)

(defun dired-toggle-human ()
  (interactive)
  (if (setq dired-ls-human (not dired-ls-human))
      (dired-sort-other (format "%s -h" dired-base-ls-options))
    (dired-sort-other dired-base-ls-options) ))

I've written one interface for each day of the year by
now. I would have that psycho-analyzed, if only I did
trust and respect psychoanalysis. But I will arrive at
something new or die trying. Or die writing
interfaces, I should say! If I never do, the old
theory of doing new things eventually by doing old
things better, is ready for the dust bin of history...

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]