From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Reverting *Locate* buffers. Date: Sun, 02 Jul 2006 22:52:05 +0200 Message-ID: <873bdjwwzu.fsf@gmx.de> References: <200606260327.k5Q3Rfpd013691@jane.dms.auburn.edu> <853bdsmkey.fsf@lola.goethe.zz> <200606280158.k5S1wJCu004606@jane.dms.auburn.edu> <17569.64920.191861.355581@localhost.localdomain> <200606290313.k5T3DwTj002620@jane.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1151873546 18034 80.91.229.2 (2 Jul 2006 20:52:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 Jul 2006 20:52:26 +0000 (UTC) Cc: pbreton@cs.umb.edu, tramp-devel@gnu.org, emacs-devel@gnu.org, raman@users.sourceforge.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 02 22:52:25 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fx8vY-0004us-LW for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2006 22:52:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fx8vY-00052w-5v for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2006 16:52:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fx8vK-000527-8E for emacs-devel@gnu.org; Sun, 02 Jul 2006 16:52:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fx8vJ-000517-3F for emacs-devel@gnu.org; Sun, 02 Jul 2006 16:52:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fx8vI-00050x-SY for emacs-devel@gnu.org; Sun, 02 Jul 2006 16:52:08 -0400 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Fx98b-0000Ui-8I for emacs-devel@gnu.org; Sun, 02 Jul 2006 17:05:53 -0400 Original-Received: (qmail invoked by alias); 02 Jul 2006 20:52:07 -0000 Original-Received: from p54BD818C.dip0.t-ipconnect.de (EHLO localhost.local) [84.189.129.140] by mail.gmx.net (mp019) with SMTP; 02 Jul 2006 22:52:07 +0200 X-Authenticated: #3708877 Original-To: Luc Teirlinck In-Reply-To: <200606290313.k5T3DwTj002620@jane.dms.auburn.edu> (Luc Teirlinck's message of "Wed, 28 Jun 2006 22:13:58 -0500 (CDT)") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56382 Archived-At: --=-=-= Luc Teirlinck writes: > Just as a general question to everybody interested (not just to the > person in the "To" field): > > Where do we stand now in this thread? Obviously, I can not implement > David's suggestion as long as there is this error message (assuming it > would not give other problems, even without that message, which I can > not test). I believe I understand what happens when the "Recursive load" message for Tramp appears. We have the following situation: - Tramp is not loaded yet. - default-directory is set to "/su::". - shell-command is called. The Tramp handler of shell-command must be applied. Therefore, due to the autoload definitions, Tramp must be loaded. Loading tramp.el itself causes new remote file operations (due to default-directory). And so on. The solution would be to set temporarily default-directory to "/" or whatover local during loading of Tramp. But I have no idea how to say it, I don't know of any before-load-hook where I could apply such a setting. Does anybody has an idea how to do this? For your patch, it would work with the small change that you arrange the loading of Tramp yourself (a working version of the patch is appended). But I don't like this solution too much, I'ld prefer that Tramp could handle it itself. > Sincerely, > > Luc. Best regards, Michael. --=-=-= Content-Disposition: attachment *** /home/albinus/src/emacs/lisp/locate.el Sun Jul 2 21:46:24 2006 --- /home/albinus/src/emacs/lisp/locate.el.~1.36.~ Sat Mar 18 17:17:04 2006 *************** *** 191,215 **** :group 'locate :version "22.1") - (defcustom locate-update-when-revert nil - "This option affects how the *Locate* buffer gets reverted. - If non-nil, offer to update the locate database when reverting that buffer. - \(Normally, you need to have root privileges for this to work.) - If nil, reverting does not update the locate database." - :type 'boolean - :group 'locate - :version "22.1") - - (defcustom locate-update-path "/su::" - "The default directory from where `locate-update-command' is called. - Usually, root permissions are required running the command. This - can be achieved by setting this option to \"/su::\" or \"/sudo::\". - If your current user permissions are sufficient to run the command, - you shall set this option to \"/\"." - :type 'string - :group 'locate - :version "22.1") - (defcustom locate-update-command "updatedb" "The executable program used to update the locate database." :type 'string --- 191,196 ---- *************** *** 576,591 **** ;; From Stephen Eglen (defun locate-update (ignore1 ignore2) ! "Revert the *Locate* buffer. ! If `locate-update-when-revert' is non-nil, offer to update the ! locate database using the shell command in `locate-update-command'." (let ((str (car locate-history-list))) ! (and locate-update-when-revert ! (yes-or-no-p "Update locate database (may take a few seconds)? ") ! (require 'tramp) ! (let ((default-directory locate-update-path)) ! (shell-command locate-update-command))) ! (locate str))) ;;; Modified three functions from `dired.el': ;;; dired-find-directory, --- 557,568 ---- ;; From Stephen Eglen (defun locate-update (ignore1 ignore2) ! "Update the locate database. ! Database is updated using the shell command in `locate-update-command'." (let ((str (car locate-history-list))) ! (cond ((yes-or-no-p "Update locate database (may take a few seconds)? ") ! (shell-command locate-update-command) ! (locate str))))) ;;; Modified three functions from `dired.el': ;;; dired-find-directory, --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--