From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jay Bingham" Newsgroups: gmane.emacs.help Subject: Using dired-sort-menu with ang-ftp Date: Wed, 1 Feb 2006 00:12:02 GMT Message-ID: <20060131.161206.29964.160433@webmail57.nyc.untd.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1138753179 6601 80.91.229.2 (1 Feb 2006 00:19:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2006 00:19:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 01 01:19:36 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F45iP-0007zv-RB for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Feb 2006 01:19:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F45lR-0002My-Bj for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Jan 2006 19:22:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F45fz-0000u3-8v for help-gnu-emacs@gnu.org; Tue, 31 Jan 2006 19:16:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F45fw-0000pE-Km for help-gnu-emacs@gnu.org; Tue, 31 Jan 2006 19:16:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F45fv-0000oG-JT for help-gnu-emacs@gnu.org; Tue, 31 Jan 2006 19:16:43 -0500 Original-Received: from [64.136.20.164] (helo=outbound-mail.nyc.untd.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1F45eU-0005Yn-Kt for help-gnu-emacs@gnu.org; Tue, 31 Jan 2006 19:15:14 -0500 Original-Received: from webmail57.nyc.untd.com (webmail57.nyc.untd.com [10.141.27.197]) by smtpout04.nyc.untd.com with SMTP id AABB799JLARVZ6HS for (sender ); Tue, 31 Jan 2006 16:12:58 -0800 (PST) Original-Received: (from b.jc-emacs@netzero.com) by webmail57.nyc.untd.com (jqueuemail) id LF36ANYV; Tue, 31 Jan 2006 16:12:06 PST Original-Received: from [15.235.153.104] by webmail57.nyc.untd.com with HTTP: Wed, 1 Feb 2006 00:12:02 GMT X-Originating-IP: [15.235.153.104] Original-To: help-gnu-emacs@gnu.org X-Mailer: Webmail Version 4.0 Content-Disposition: inline X-ContentStamp: 8:4:454927838 X-MAIL-INFO: 1a6df4d49444b99484fd447d557d1124a1f99d098950d439a4f9d4a41db591ad91d4d1 X-UNTD-OriginStamp: 9wMZ3l1+FG1mkmIQefRR9m5aYb8QGUX93N/Y0ujYWdY9gbFeT8XjBzyD/CXxO5Pa X-UNTD-Peer-Info: 10.141.27.197|webmail57.nyc.untd.com|webmail57.nyc.untd.com|b.jc-emacs@netzero.com X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32936 Archived-At: 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 usin= g ange-ftp before first obtaining a directory on the local machine. Whe= n 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 i= s run, that is every time a dired buffer is created (it will only be loa= ded once). The correct way to include dired-sort-menu is to place one of the follow= ing 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 o= nly 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!