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

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

RE: dired listg & dired-sort-menu.el


From: Drew Adams
Subject: RE: dired listg & dired-sort-menu.el
Date: Fri, 28 Jun 2013 20:02:03 -0700 (PDT)

> >> 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+)
> 
> I must be having some other problem here.
> With this in emacs:
>  (require 'dired-x)
>  (require 'dired-sort-menu)
>  (require 'dired-sort-menu+)

You don't need to require `dired-sort-menu'; that is done by
`dired-sort-menu+'.  (But it doesn't hurt anything to do so.)

> I should see 'Dirs first' as part of the menu right?
> But what I see when pressing S-mouse-2 is this (No 'Dirs First' is listed):

Right.  It depends on your setup.  In what I see, I do not see the
`Time Accessed' menu item (which you see), for instance.

If you check the Lisp code you will see that `Dirs First' and
`Ignore Case' are supported only if (ls-lisp-var-p 'ls-lisp-dirs-first)
and (ls-lisp-var-p 'ls-lisp-ignore-case) return non-nil.
`C-h f ls-lisp-var-p' says this:

 Return non-nil if ls-lisp variable VAR should be used.

And in this case the VAR is `ls-lisp-dirs-first'.  The Commentary in
dired-sort-menu.el says this:

;; The menu also supports two Emacs 21 `ls-lisp' switches:
;; `ls-lisp-ignore-case' ignores case in alphanumeric sorts and
;; `ls-lisp-dirs-first' lists all directories first.  (These latter
;; two switches improve compatibility with Microsoft Windows
;; Explorer.)

Bottom line: those two `lisp-var-p' sexps that guard those menu items
return nil for you but non-nil for me.  Those two variables (user
options, actually) are provided by library `ls-lisp.el'.

If your Emacs does not use library ls-lisp.el then you will not have
those menu items.  You can try loading ls-lisp.el, but that will likely
change some other things that you might not like (dunno).

ls-lisp.el is an emulation library: it emulates Unix command `ls' using
Lisp.

HTH.





reply via email to

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