logo       

Re: How to have Emacs ignore Case and list Dirs first with dired-sort-menu: msg#00935

emacs.help

Subject: Re: How to have Emacs ignore Case and list Dirs first with dired-sort-menu

On Thu, 26 Dec 2002 21:46:28 +0100, Uwe Ziegenhagen
<isestd14@xxxxxxxxxxxxxxxxx> wrote:
>
> I even set (setq ls-lisp-dirs-first t) and (setq ls-lisp-ignore-case t),
> but this is ignored.
>
>
> (add-hook 'dired-load-hook
> (lambda () (load-library "ls-lisp")))
>
> [snip]
>
> ; this should do it, but somehow doesn't work
> ;
> (setq ls-lisp-dirs-first t)
> (setq ls-lisp-ignore-case t)

You are setting the variables before their package is loaded. (when
`ls-lisp' is loaded they get default values according to your OS).

Do something like this:

(defun my-dired-changes ()
"Set my preferences for dired"
(require 'ls-lisp)
(require 'dired-explore) ;I don't find these
(require 'dired-sort-menu) ;packages in 21.2
(setq ls-lisp-dirs-first t)
(setq ls-lisp-ignore-case t))

(add-hook 'dired-load-hook 'my-dired-changes)

That will load the packages after the `dired' is loaded and THEN set
the needed variables.

Ehud.


--
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:ehud@xxxxxxxxxxxxxx Better Safe Than Sorry


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise