*** /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,