all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: 11795@debbugs.gnu.org
Subject: bug#11795: 24.1.50; wdired: C-c C-c loses marks and positions of renamed files
Date: Sat, 19 Jan 2013 07:32:10 +0100	[thread overview]
Message-ID: <87622tvg2d.fsf@web.de> (raw)
In-Reply-To: <87boeohj3c.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 23 Nov 2012 09:30:31 +0200")

Hello Juri,

sorry, again, for the long delay.

> > 1.  When I prepend a letter z to the first file in a buffer, so that it
> > will be under the last files after reverting, and I hit C-c C-c, then
> > point is at another file afterwards.  This was an issue of the original
> > report.
>
> This is not a regression, so it could be fixed in the trunk
> in the same way as for `wdired-old-marks', i.e. to store the original
> value returned from `dired-save-positions', changing original filenames
> to renamed filenames in the returned value, and calling
> `dired-restore-positions' with the new value after `revert-buffer'.
> A simple patch below does this.

Ok, that seems reasonable to me.

> > 2.  If renamed files are also visible in another dired buffer, they
> > just disappear there.  That makes no sense.
>
> The problem where other Dired buffers are not updated
> in `wdired-finish-edit' is not a regression too.
> WDired worked this way from its first version.
>
> Instead of this, much simpler would be to keep the current design
> of WDired that uses `revert-buffer' to maintain consistency with renames.
> Then a simpler fix would be to call `revert-buffer' in all other
> Dired buffers that display renamed files by using
>
>   (dired-fun-in-all-buffers dired-directory nil (function revert-buffer))
>
> This patch for the trunk demonstrates how these problems could be fixed.
> Do you see more problems with this approach?

I must say that I'm a bit reluctant to force a revert in other buffers.
Because some aspects of the these buffers may be lost that maybe were
important for the user - like killed files (they reappear when
reverting) or any marks (e.g. belonging to positions stored in a
register).  That's why I tried to avoid reverting.

WRT to the marks in other buffers (see your followup
<87sj7yavw7.fsf@mail.jurta.org>) - I agree we should restore (keep) the
marks in those other buffers when renaming files, and not export the
marks form the buffer where wdired was used.


Thanks,

Michael.





  parent reply	other threads:[~2013-01-19  6:32 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
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 [this message]
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=87622tvg2d.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=11795@debbugs.gnu.org \
    /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.