Luc Teirlinck <[EMAIL PROTECTED]> 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.
*** /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 <[EMAIL PROTECTED]>
(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 <[EMAIL PROTECTED]>
(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,
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel