[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using dired-sort-menu with ang-ftp
From: |
Jay Bingham |
Subject: |
Using dired-sort-menu with ang-ftp |
Date: |
Wed, 1 Feb 2006 00:12:02 GMT |
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!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Using dired-sort-menu with ang-ftp,
Jay Bingham <=