From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.tramp,gmane.emacs.devel Subject: Re: Reverting *Locate* buffers. Date: Thu, 29 Jun 2006 23:52:10 +0200 Message-ID: <87irmj8wad.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 1151617951 17800 80.91.229.2 (29 Jun 2006 21:52:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2006 21:52:31 +0000 (UTC) Cc: pbreton@cs.umb.edu, tramp-devel@gnu.org, emacs-devel@gnu.org, raman@users.sourceforge.net Original-X-From: tramp-devel-bounces+tramp=quimby.gnus.org@gnu.org Thu Jun 29 23:52:29 2006 Return-path: Envelope-to: tramp@deer.gmane.org Original-Received: from quimby.gnus.org ([80.91.224.244]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fw4R2-0002oD-BS for tramp@deer.gmane.org; Thu, 29 Jun 2006 23:52:28 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Fw4R1-0007bG-00 for ; Thu, 29 Jun 2006 23:52:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fw4Qw-0001M0-UZ for tramp@quimby.gnus.org; Thu, 29 Jun 2006 17:52:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fw4Qr-0001Lv-TX for tramp-devel@gnu.org; Thu, 29 Jun 2006 17:52:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fw4Qp-0001LU-Pe for tramp-devel@gnu.org; Thu, 29 Jun 2006 17:52:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fw4Qp-0001LR-Ka for tramp-devel@gnu.org; Thu, 29 Jun 2006 17:52:15 -0400 Original-Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Fw4dS-0000Xo-MD for tramp-devel@gnu.org; Thu, 29 Jun 2006 18:05:19 -0400 Original-Received: (qmail invoked by alias); 29 Jun 2006 21:52:13 -0000 Original-Received: from p54BDBE53.dip0.t-ipconnect.de (EHLO localhost.local) [84.189.190.83] by mail.gmx.net (mp028) with SMTP; 29 Jun 2006 23:52:13 +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: tramp-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: tramp-devel.gnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: tramp-devel-bounces+tramp=quimby.gnus.org@gnu.org Errors-To: tramp-devel-bounces+tramp=quimby.gnus.org@gnu.org Xref: news.gmane.org gmane.emacs.tramp:4994 gmane.emacs.devel:56308 Archived-At: --=-=-= Luc Teirlinck writes: > 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). After playing a while, I could reproduce the same error here. In my environment, I needed to recompile everything (make bootfast) and start emacs without any preloaded Tramp (emacs -q). This should be the default for most of the people except me ... > Do I just commit my previously sent patch, or do we have the feeling > that there are bugs in Tramp which should be reported? There is a bug in Tramp. And you did sufficient reporting already, thank you. I don't believe I'll catch the bug tonight; it is some nasty autoloading cycle I guess. But I'll do it next days. When Tramp is preloaded (require 'tramp), your patch works fine. I've enhanced it a little bit according to David's recommendations: a custom option locate-update-path should provide enough freedom for calling updatedb sufficiently. From my point of view you could commit your patch in this (or your) version. > Sincerely, > > Luc. Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment *** /home/albinus/src/emacs/lisp/locate.el.~1.36.~ Sat Mar 18 17:17:04 2006 --- /home/albinus/src/emacs/lisp/locate.el Thu Jun 29 23:06:57 2006 *************** *** 191,196 **** --- 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 *************** *** 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, --- 576,590 ---- ;; 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)? ") ! (let ((default-directory locate-update-path)) ! (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 _______________________________________________ Tramp-devel mailing list Tramp-devel@gnu.org http://lists.gnu.org/mailman/listinfo/tramp-devel --=-=-=--