unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to have Emacs ignore Case and list Dirs first with dired-sort-menu
@ 2002-12-26 20:46 Uwe Ziegenhagen
  2002-12-29 17:34 ` Ehud Karni
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Ziegenhagen @ 2002-12-26 20:46 UTC (permalink / raw)


Hello, i use the foolwing line in my .emacs to have Emacs ignore Case 
and list directories first when in the dir mode.

The options are saved but not laoded by default, so i have to toggle 
between saved and actual each time. How can i have Emacs (or load these 
options when starting)

I even set (setq ls-lisp-dirs-first t) and (setq ls-lisp-ignore-case t), 
but this is ignored.


Uwe

; http://centaur.maths.qmw.ac.uk/Emacs/

(add-hook 'dired-load-hook
(lambda () (load-library "ls-lisp")))

(add-hook 'dired-load-hook
(lambda () (require 'dired-explore)))

(add-hook 'dired-load-hook
(lambda () (require 'dired-sort-menu)))

; this should do it, but somehow doesn't work
;
(setq ls-lisp-dirs-first t)
(setq ls-lisp-ignore-case t)

  '(dired-sort-menu-saved-config (quote ((dired-actual-switches . "-al") 
(ls-lisp-ignore-case . t) (ls-lisp-dirs-first . t))))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to have Emacs ignore Case and list Dirs first with dired-sort-menu
  2002-12-26 20:46 How to have Emacs ignore Case and list Dirs first with dired-sort-menu Uwe Ziegenhagen
@ 2002-12-29 17:34 ` Ehud Karni
  0 siblings, 0 replies; 2+ messages in thread
From: Ehud Karni @ 2002-12-29 17:34 UTC (permalink / raw)
  Cc: help-gnu-emacs

On Thu, 26 Dec 2002 21:46:28 +0100, Uwe Ziegenhagen <isestd14@wiwi.hu-berlin.de> 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@unix.mvs.co.il                  Better  Safe  Than  Sorry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-29 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-26 20:46 How to have Emacs ignore Case and list Dirs first with dired-sort-menu Uwe Ziegenhagen
2002-12-29 17:34 ` Ehud Karni

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).