* in reply to my other just-now post about dired which hasn't appeared FWR
@ 2015-10-01 1:42 Emanuel Berg
2015-10-01 22:06 ` John Mastro
0 siblings, 1 reply; 5+ messages in thread
From: Emanuel Berg @ 2015-10-01 1:42 UTC (permalink / raw)
To: help-gnu-emacs
I found an in-house solution, namely calling `dired'
with, as arguments - now just hear :) - calling dired
with `dired-directory' and `dired-listing-switches' as
arguments :) :)
Will wonders never cease? I hope not!
Here is the modified code:
;; 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))
(setq dired-listing-switches (format "%s -h" dired-base-ls-options))
(setq dired-listing-switches dired-base-ls-options) )
(dired dired-directory dired-listing-switches) )
Full source:
http://user.it.uu.se/~embe8573/conf/emacs-init/dired-my.el
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: in reply to my other just-now post about dired which hasn't appeared FWR
2015-10-01 1:42 in reply to my other just-now post about dired which hasn't appeared FWR Emanuel Berg
@ 2015-10-01 22:06 ` John Mastro
2015-10-02 0:03 ` Emanuel Berg
2015-10-04 0:15 ` Emanuel Berg
0 siblings, 2 replies; 5+ messages in thread
From: John Mastro @ 2015-10-01 22:06 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
Emanuel Berg <embe8573@student.uu.se> wrote:
> I found an in-house solution, namely calling `dired'
> with, as arguments - now just hear :) - calling dired
> with `dired-directory' and `dired-listing-switches' as
> arguments :) :)
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.
--
john
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: in reply to my other just-now post about dired which hasn't appeared FWR
2015-10-01 22:06 ` John Mastro
@ 2015-10-02 0:03 ` Emanuel Berg
2015-10-03 1:21 ` Emanuel Berg
2015-10-04 0:15 ` Emanuel Berg
1 sibling, 1 reply; 5+ messages in thread
From: Emanuel Berg @ 2015-10-02 0:03 UTC (permalink / raw)
To: help-gnu-emacs
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.
Right, that is good because it is more general but it
is bad because it is less specific :)
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: in reply to my other just-now post about dired which hasn't appeared FWR
2015-10-02 0:03 ` Emanuel Berg
@ 2015-10-03 1:21 ` Emanuel Berg
0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2015-10-03 1:21 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg <embe8573@student.uu.se> 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.
>
> Right, that is good because it is more general but
> it is bad because it is less specific :)
`dired-sort-toggle-or-edit' is the way to do it,
probably one should do as I did only as an interface
to that instead. But what I have is also an interface
and in a way more clear as it does that and only that.
But `dired-sort-toggle-or-edit' is better because it
only affects the current buffer, as you say.
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: in reply to my other just-now post about dired which hasn't appeared FWR
2015-10-01 22:06 ` John Mastro
2015-10-02 0:03 ` Emanuel Berg
@ 2015-10-04 0:15 ` Emanuel Berg
1 sibling, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2015-10-04 0:15 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-04 0:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 1:42 in reply to my other just-now post about dired which hasn't appeared FWR Emanuel Berg
2015-10-01 22:06 ` John Mastro
2015-10-02 0:03 ` Emanuel Berg
2015-10-03 1:21 ` Emanuel Berg
2015-10-04 0:15 ` Emanuel Berg
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.