all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using dired-sort-menu with ang-ftp
@ 2006-02-01  0:12 Jay Bingham
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Bingham @ 2006-02-01  0:12 UTC (permalink / raw)


About a year ago I discovered an anomaly with Dr. Francis Wright's dired-sort-menu when requesting a directory via dired on a remote system using ange-ftp before first obtaining a directory on the local machine.  When I did this I would get an error similar to the following:

dired-sort-menu-remote-p: Args out of range: 1, 5

I have just found time to investigate this and have discovered that the cause of this was the suggestion in the comments of dired-sort-menu that the following statement be placed in the init file:

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

This is not correct for two reasons:
First, the dired-sort-menu will not be required until the end of running the dired-mode function.
Second, the require will be run each time that the dired-mode function is run, that is every time a dired buffer is created (it will only be loaded once).

The correct way to include dired-sort-menu is to place one of the following in your init file:

(require 'dired-sort-menu)

(load "dired-sort-menu")

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

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

The first two always load dired-sort-menu, the third and forth load it only when dired mode is loaded.

Happy Emacsing y'all
__
J_)
C_)ingham 


_____________________________________________________________________
Call Anyone, Anytime, Anywhere in the World - FREE!
Free Internet calling from NetZero Voice
Visit http://www.netzerovoice.com today!

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

* Re: Using dired-sort-menu with ang-ftp
       [not found] <mailman.455.1138753010.3044.help-gnu-emacs@gnu.org>
@ 2006-02-07 18:15 ` martin
  0 siblings, 0 replies; 2+ messages in thread
From: martin @ 2006-02-07 18:15 UTC (permalink / raw)



"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

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

end of thread, other threads:[~2006-02-07 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.455.1138753010.3044.help-gnu-emacs@gnu.org>
2006-02-07 18:15 ` Using dired-sort-menu with ang-ftp martin
2006-02-01  0:12 Jay Bingham

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.