From: Juri Linkov <juri@jurta.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 11795@debbugs.gnu.org
Subject: bug#11795: 24.1.50; wdired: C-c C-c loses marks and positions of renamed files
Date: Sat, 27 Oct 2012 12:18:34 +0300 [thread overview]
Message-ID: <87a9v85l3p.fsf@mail.jurta.org> (raw)
In-Reply-To: <87vce0xah6.fsf@web.de> (Michael Heerdegen's message of "Wed, 24 Oct 2012 15:31:33 +0200")
> So, introducing an new option `wdired-keep-marker-rename' would IMHO make
> sense. The default value could be t, at least that's what I think would
> be most intuitive.
I fixed this regression by adding `wdired-keep-marker-rename'.
Thanks for the suggestion.
When testing it, I noticed a random behavior of `wdired-do-renames' when
the marker is customized to a character. The decision what character to put
depends on the position of point. When point is at the top of the Dired
buffer, it uses a customized marker character. When point is at the bottom,
it restores an old marker character.
The problem is that `dired-remove-file' doesn't remove file entries
(and neither `dired-rename-file') because files already have new renamed names
in the Dired buffer. Whereas `dired-add-entry' adds duplicated file entries.
Fortunately, `revert-buffer' (called at the end of `wdired-finish-edit')
sorts out this mess caused by `dired-add-entry'. But in `dired-revert'
it uses `dired-remember-marks' and `dired-restore-positions' to restore
markers. So when duplicated file entries were added by `dired-add-entry'
at the top of the Dired buffer (in front of file entries edited by WDired),
it uses a customized marker character. When duplicated file entries
were added at the bottom, it restores an old marker character because
`dired-restore-positions' in `dired-revert' gets markers from the
first duplicated file entry.
Do you have an idea how to fix this problem? One way would be
instead of using `dired-add-file' to change markers in the remembered
variable `wdired-old-marks' and just call `dired-mark-remembered'
(before `revert-buffer' in `wdired-finish-edit') with the modified
list of markers for renamed files.
next prev parent reply other threads:[~2012-10-27 9:18 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 23:53 bug#11795: 24.1.50; wdired: C-c C-c loses marks and positions of renamed files Michael Heerdegen
2012-06-27 0:57 ` Drew Adams
2012-06-27 1:27 ` Christopher Schmidt
2012-06-27 14:20 ` Drew Adams
2012-06-27 14:47 ` Christopher Schmidt
2012-06-27 14:59 ` Drew Adams
2012-06-27 17:39 ` Michael Heerdegen
2012-06-27 18:02 ` Christopher Schmidt
2012-06-27 21:05 ` Michael Heerdegen
2012-07-04 4:02 ` Michael Heerdegen
2012-07-04 9:18 ` martin rudalics
2012-07-04 12:29 ` Stefan Monnier
2012-08-22 4:44 ` Michael Heerdegen
2012-08-22 7:08 ` martin rudalics
2012-08-29 15:19 ` Christopher Schmidt
2012-08-29 16:15 ` Michael Heerdegen
2012-08-29 17:22 ` martin rudalics
2012-10-03 9:14 ` martin rudalics
2012-10-04 23:52 ` Michael Heerdegen
2012-10-05 7:05 ` martin rudalics
2012-10-09 0:41 ` Michael Heerdegen
2012-10-15 23:01 ` Michael Heerdegen
2012-10-16 9:39 ` martin rudalics
2012-10-17 9:37 ` martin rudalics
2012-10-17 9:51 ` Christopher Schmidt
2012-10-18 9:15 ` martin rudalics
2012-10-23 8:05 ` Juri Linkov
2012-10-24 13:31 ` Michael Heerdegen
2012-10-25 9:03 ` Juri Linkov
2012-10-27 9:18 ` Juri Linkov [this message]
2012-10-27 12:55 ` Michael Heerdegen
2012-10-27 14:38 ` Juri Linkov
2012-11-22 9:12 ` Juri Linkov
2012-11-22 15:28 ` Stefan Monnier
2012-11-23 7:29 ` Juri Linkov
2012-11-23 0:04 ` Michael Heerdegen
2012-11-23 7:30 ` Juri Linkov
2012-11-25 9:12 ` Juri Linkov
2013-01-19 6:32 ` Michael Heerdegen
2013-01-19 10:37 ` Juri Linkov
2013-01-20 5:15 ` Michael Heerdegen
2020-09-21 14:58 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9v85l3p.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=11795@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.