all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
Cc: pbreton@cs.umb.edu, tramp-devel@gnu.org, emacs-devel@gnu.org,
	raman@users.sourceforge.net
Subject: Re: Reverting *Locate* buffers.
Date: Thu, 29 Jun 2006 23:52:10 +0200	[thread overview]
Message-ID: <87irmj8wad.fsf@gmx.de> (raw)
In-Reply-To: <200606290313.k5T3DwTj002620@jane.dms.auburn.edu> (Luc Teirlinck's message of "Wed, 28 Jun 2006 22:13:58 -0500 (CDT)")

[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

Luc Teirlinck <teirllm@dms.auburn.edu> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2285 bytes --]

*** /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 <stephen@cns.ed.ac.uk>
  (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 <stephen@cns.ed.ac.uk>
  (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,

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Tramp-devel mailing list
Tramp-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/tramp-devel

  parent reply	other threads:[~2006-06-29 21:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26  3:27 Reverting *Locate* buffers Luc Teirlinck
2006-06-26  7:43 ` David Kastrup
2006-06-28  1:58   ` Luc Teirlinck
2006-06-28  3:55     ` T. V. Raman
2006-06-29  3:13       ` Luc Teirlinck
2006-06-29  6:27         ` David Kastrup
2006-06-29 21:52         ` Michael Albinus [this message]
2006-06-30  1:55           ` Luc Teirlinck
2006-07-02 20:39             ` Michael Albinus
2006-07-02 20:52         ` Michael Albinus
2006-07-03  2:51           ` Luc Teirlinck
2006-07-03 13:43             ` Michael Albinus
2006-07-03 23:21               ` Richard Stallman
2006-07-04  0:14               ` Luc Teirlinck
2006-07-03 15:05           ` Richard Stallman
2006-07-03 15:37             ` Michael Albinus
2006-07-03 15:41               ` David Kastrup
2006-07-04 15:42           ` Stefan Monnier
2006-06-29 21:58       ` Michael Albinus
2006-06-26 13:15 ` Peter Breton
2006-06-27  1:55   ` Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87irmj8wad.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=pbreton@cs.umb.edu \
    --cc=raman@users.sourceforge.net \
    --cc=tramp-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.