[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired listg & dired-sort-menu.el
From: |
Harry Putnam |
Subject: |
Re: dired listg & dired-sort-menu.el |
Date: |
Fri, 21 Jun 2013 15:33:36 -0400 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.0.92 (gnu/linux) |
Drew Adams <drew.adams@oracle.com> writes:
>> Running
>> Emacs 24.0.92.1 on Debian (testing)
>>
>> Just tinkering with the sorting in dired and ran across Francis J
>> Wright's 'dired-sort-menu.el' (and menu+)... The following site shows
>> the menu that is produced:
>> o
>> http://www.emacswiki.org/emacs/DiredSortMenu
>>
>> But when I load the library and press 'M-x dired-sort-dialogue' I get
>> a less extensive menu and wondered if this is a result of the library
>> being quite old (or possibly changes in the gnu 'ls' command..)
[...]
> You do not say what the differences are between what you see and what is
> shown on wiki page DiredSortMenu.
I left out quite a bit I should have included... trying to correct
that below.
Thank you for taking time to coach me along on this.
> That page shows a popup menu initiated via `S-mouse-2' (in Dired).
> You used `M-x dired-sort-dialogue' instead, which does not provide submenu
> Configuration and provides a `Reverse' checkbox instead of a `Reversed Sort
> By' submenu. If this is the difference you are seeing then it is expected.
I probably should start from the top as this may not even be the way
to do what I'm after. But first:
I did try `S-mouse-2'. But somehow a veil of shear idiocy fell over
me and I was reading it <shift>+S+mouse+2, so naturally emacs started
the `symlink' dialog... I then assumed things had changes since the
dired-sort-menu was written.
Once I managed to use S-mouse-2 correctly I noticed there are a couple
things missing still.
What I'm really after is a way to have 2 things extra going on in the
regular dired buffer.
1) hide dot files
2) sort directories first.
The menu on your pages on the wiki
http://www.emacswiki.org/emacs/DrewsEmacsDiredSortMenu
show a menu with an item
"Dirs first (W)"
so that is what got me looking at that program.
I had already googled up code to hide dot files and a setq to list
dirs first
(I've lost track of the exact sources online, the code is included
inline at the end),
but with them both in ~/.emacs the hiding dot files part gets canceled
out... so I was thinking maybe getting your program in there might
solve that.
Getting back to subject. I've posted three images, now that I broke
out of the idiocy veil.
1) menu produced by S-Mouse-2
2) Menu produced by Menu / Immediate / Sort by
3) Menu posted on webpages.
You'll see that even though the first two pop up with a little
different look, they seem to contain the same items.
Whereas, the menu from your wikipages (The bottom image), have two
different items.... `Ignore Case' and `Dirs First'
www.jtan.com/~reader/vu1/disp.cgi
(Should produce 3 stacked images in the order shown above)
But to repeat my reason for query... In my default dired view I want
to have dot files hidden and Dirs sorted first... but be able to
toggle dot files.
------- --------- ---=--- --------- --------
------- --------- ---=--- --------- --------
Hide dot files
,----
| (require 'dired-x)
|
| (setq-default dired-omit-files-p t) ; this is buffer-local variable
|
| (setq dired-omit-files
| (concat dired-omit-files "\\|^\\..+$"))
`----
Sort directories first
,----
| (setq dired-listing-switches "-lXGh --group-directories-first")
`----