From: Drew Adams <drew.adams@oracle.com>
To: Harry Putnam <reader@newsguy.com>, help-gnu-emacs@gnu.org
Subject: RE: dired listg & dired-sort-menu.el
Date: Fri, 21 Jun 2013 14:08:56 -0700 (PDT) [thread overview]
Message-ID: <55519210-5f13-43b5-b6ff-396fd1f4769c@default> (raw)
In-Reply-To: <87bo6zqmwf.fsf@newsguy.com>
> 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.
That menu item is from dired-sort-menu+.el, which is an add-on to dired-sort-menu.el. Both files are available on Emacs Wiki:
http://www.emacswiki.org/emacs-en/download/dired-sort-menu.el
http://www.emacswiki.org/emacs-en/download/dired-sort-menu%2b.el
> I had already googled up code to hide dot files
Yes, Dired Omit is good for that. But `dired-omit-mode' is the supported name now, instead of `dired-omit-files-p'. It is probably better to use this to turn it on, instead of just setting the mode variable:
(dired-omit-mode 1)
You can also toggle omit mode interactively, using `M-o'.
> and a setq to list dirs first
You don't need that if you use dired-sort-menu[+].el.
> but with them both in ~/.emacs the hiding dot files part gets canceled
> out...
It shouldn't.
> 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'
See above - you need (require 'dired-sort-menu+)
> 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.
Should just work. You toggle omit mode with `M-o'.
> Hide dot files
> (require 'dired-x)
> (setq-default dired-omit-files-p t)
> (setq dired-omit-files (concat dired-omit-files "\\|^\\..+$"))
OK.
> Sort directories first
> (setq dired-listing-switches "-lXGh --group-directories-first")
Not needed, but might also work (depending on your platform etc.), as an alternative to Dired Sort Menu. (FWIW, it doesn't work for me, on Windows with Cygwin.)
next prev parent reply other threads:[~2013-06-21 21:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-17 13:24 dired listg & dired-sort-menu.el Harry Putnam
2013-06-17 14:25 ` Drew Adams
2013-06-21 19:33 ` Harry Putnam
2013-06-21 21:08 ` Drew Adams [this message]
2013-06-29 1:51 ` Harry Putnam
2013-06-29 3:02 ` Drew Adams
2013-06-29 16:16 ` Harry Putnam
2013-06-29 2:09 ` Harry Putnam
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=55519210-5f13-43b5-b6ff-396fd1f4769c@default \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=reader@newsguy.com \
/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.
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).