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

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

Re: Using dired-sort-menu with ang-ftp


From: martin
Subject: Re: Using dired-sort-menu with ang-ftp
Date: Tue, 07 Feb 2006 19:15:32 +0100
User-agent: Emacs Gnus

"JB" == Jay Bingham <b.jc-emacs@netzero.com> writes:
 JB> Newsgroups: gnu.emacs.help
 JB> Date: Wed, 1 Feb 2006 00:12:02 GMT
 JB> To: help-gnu-emacs@gnu.org
 JB> 
 JB> About a year ago I discovered an anomaly with Dr. Francis Wright's
 JB> dired-sort-menu when requesting a directory via dired on a remote
 JB> system using ange-ftp before first obtaining a directory on the local
 JB> machine.  When I did this I would get an error similar to the
 JB> following:
 JB> 
 JB> dired-sort-menu-remote-p: Args out of range: 1, 5
 JB> 
 JB> I have just found time to investigate this and have discovered that
 JB> the cause of this was the suggestion in the comments of
 JB> dired-sort-menu that the following statement be placed in the init
 JB> file:
 JB> 
 JB> (add-hook 'dired-mode-hook
 JB>         (lambda () (require 'dired-sort-menu)))
 JB> 
 JB> This is not correct for two reasons: First, the dired-sort-menu will
 JB> not be required until the end of running the dired-mode function.
 JB> Second, the require will be run each time that the dired-mode function
 JB> is run, that is every time a dired buffer is created (it will only be
 JB> loaded once).
 JB> 
 JB> The correct way to include dired-sort-menu is to place one of the
 JB> following in your init file:
 JB> 
 JB> (require 'dired-sort-menu)
 JB> 
 JB> (load "dired-sort-menu")
 JB> 
 JB> (add-hook 'dired-load-hook
 JB>         (lambda () (require 'dired-sort-menu)))
 JB> 
 JB> (add-hook 'dired-load-hook
 JB>         (lambda () (load "dired-sort-menu")))
 JB> 

Hi,

look at http://centaur.maths.qmw.ac.uk/Emacs/files/dired-sort-menu.el.

It seems to be correct there.

Martin

 JB> The first two always load dired-sort-menu, the third and forth load it
 JB> only when dired mode is loaded.
 JB> 
 JB> Happy Emacsing y'all __ J_) C_)ingham
 JB> 
 JB> 
 JB> _____________________________________________________________________
 JB> Call Anyone, Anytime, Anywhere in the World - FREE!  Free Internet
 JB> calling from NetZero Voice Visit http://www.netzerovoice.com today!
 JB> 
 JB> 
 JB> 
 JB> 
 JB> 
-- 
parozusa at web dot de


reply via email to

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