emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "M-x locate" regression


From: Nick Roberts
Subject: Re: "M-x locate" regression
Date: Wed, 9 Nov 2005 08:55:06 +1300

 > Can you answer Richard's question, since you are the one proposing the
 > revert?
 > 
 >    Could you provide a self-contained description of what the issue is?

I don't know what's to cover that hasn't already been said:

If you delete a file with D, or m (dired-mark) in a *Locate* buffer or a
*Find* buffer then the buffer does not automatically update in 22.0.50 whereas
it did in 21.3.

The patch below seems to fix this.  The change for find-dired.el is for *Find*
and that for dired.el is for *Locate*.  However, find-dired deliberately
shadowed the variable dired-buffers so I am uneasy about reverting that
change.

Actually, as Luc says, eventually it would probably be best to use
dired-mode for *Locate*.

Nick


*** find-dired.el       03 Sep 2005 14:05:24 +1200      1.51
--- find-dired.el       09 Nov 2005 08:15:12 +1300      
***************
*** 97,103 ****
    (interactive (list (read-file-name "Run find in directory: " nil "" t)
                     (read-string "Run find (with args): " find-args
                                  '(find-args-history . 1))))
-   (let ((dired-buffers dired-buffers))
      ;; Expand DIR ("" means default-directory), and make sure it has a
      ;; trailing slash.
      (setq dir (file-name-as-directory (expand-file-name dir)))
--- 97,102 ----
***************
*** 167,173 ****
        (set-process-sentinel proc (function find-dired-sentinel))
        ;; Initialize the process marker; it is used by the filter.
        (move-marker (process-mark proc) 1 (current-buffer)))
!     (setq mode-line-process '(":%s"))))
  
  (defun kill-find ()
    "Kill the `find' process running in the current buffer."
--- 166,172 ----
        (set-process-sentinel proc (function find-dired-sentinel))
        ;; Initialize the process marker; it is used by the filter.
        (move-marker (process-mark proc) 1 (current-buffer)))
!     (setq mode-line-process '(":%s")))
  
  (defun kill-find ()
    "Kill the `find' process running in the current buffer."

*** dired.el    24 Oct 2005 20:21:15 +1300      1.329
--- dired.el    09 Nov 2005 08:21:09 +1300      
***************
*** 2403,2408 ****
--- 2403,2412 ----
                      ;; if we get here, removing worked
                      (setq succ (1+ succ))
                      (message "%s of %s deletions" succ count)
+                     (if (eq major-mode 'locate-mode)
+                         (delete-region (progn (beginning-of-line) (point))
+                                        (progn (forward-line 1) (point)))
+                       (dired-clean-up-after-deletion fn))
                      (dired-fun-in-all-buffers
                       (file-name-directory fn) (file-name-nondirectory fn)
                       (function dired-delete-entry) fn))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]