[Top][All Lists]
[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: |
Mon, 7 Nov 2005 21:45:55 +1300 |
> The following small patch to dired.el seems to fix both the locate and
> the find{-grep}-dired problems you reported. I will still do some
> further checking. Maybe there are better solutions than the one below
> (but the one below does seem to work).
>
> ===File ~/dired.el-diff=====================================
> *** dired.el 23 Oct 2005 10:06:08 -0500 1.329
> --- dired.el 06 Nov 2005 22:29:27 -0600
> ***************
> *** 2403,2408 ****
> --- 2403,2410 ----
> ;; if we get here, removing worked
> (setq succ (1+ succ))
> (message "%s of %s deletions" succ count)
> + (delete-region (progn (beginning-of-line) (point))
> + (progn (forward-line 1) (point)))
> (dired-fun-in-all-buffers
> (file-name-directory fn) (file-name-nondirectory fn)
> (function dired-delete-entry) fn))
> ============================================================
You appear to have just put back the lines removed from 21.3 and left those
added for 22.0.50. I think the idea of dired-fun-in-all-buffers is to update
correctly when there is more than one dired buffer. So, for example, I don't
think your patch will work if one buffer uses find-dired and another normal
dired, and you delete a file present in both buffers, from the normal dired
buffer. For this reason, I think its important that find-dired can add to
dired-buffers.
delete-region could be used for locate, of course, possibly
conditioned on major-mode not being dired-mode to make sure nothing gets
deleted twice.
Nick
- "M-x locate" regression, Nick Roberts, 2005/11/06
- Re: "M-x locate" regression, Nick Roberts, 2005/11/06
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/07
- Re: "M-x locate" regression,
Nick Roberts <=
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/07
- Re: "M-x locate" regression, Richard M. Stallman, 2005/11/08
- Re: "M-x locate" regression, Nick Roberts, 2005/11/08
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/08
- Re: "M-x locate" regression, Nick Roberts, 2005/11/08
- Re: "M-x locate" regression, Richard M. Stallman, 2005/11/08
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/08
- Re: "M-x locate" regression, Nick Roberts, 2005/11/09
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/09
- Re: "M-x locate" regression, Nick Roberts, 2005/11/09