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

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

bug#11795: 24.1.50; wdired: C-c C-c loses marks and positions of renamed


From: martin rudalics
Subject: bug#11795: 24.1.50; wdired: C-c C-c loses marks and positions of renamed files
Date: Fri, 05 Oct 2012 09:05:10 +0200

> Martin, I would rather like to discuss first what we do with bug#12394.
> Can you please have a look?  It would be good to know what we want to
> change for that bug before applying a patch for this.

IIRC `wdired' is full of such niceties.  Here the problem is that
`dired-move-to-filename' moves to the start of the old filename,
skipping the prepended string.  Maybe it's sufficient to remove that
call as in the patch below since the subsequent

(search-forward (wdired-get-filename t) nil t)

should move to the right position anyway.  If not, we'll have to rewrite
this function from scratch.

martin

*** lisp/wdired.el      2012-08-05 04:19:21 +0000
--- lisp/wdired.el      2012-10-05 06:36:43 +0000
***************
*** 506,512 ****
              (progn
                (setq done t)
                (let ((inhibit-read-only t))
!                 (dired-move-to-filename)
                  (search-forward (wdired-get-filename t) nil t)
                  (replace-match (file-name-nondirectory filename-ori) t t))
                (dired-do-create-files-regexp
--- 506,512 ----
              (progn
                (setq done t)
                (let ((inhibit-read-only t))
! ;;                 (dired-move-to-filename)
                  (search-forward (wdired-get-filename t) nil t)
                  (replace-match (file-name-nondirectory filename-ori) t t))
                (dired-do-create-files-regexp






reply via email to

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