From: Stephen Berman <stephen.berman@gmx.net>
To: Juri Linkov <juri@linkov.net>
Cc: 32673@debbugs.gnu.org
Subject: bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop'
Date: Wed, 12 Sep 2018 12:02:00 +0200 [thread overview]
Message-ID: <87sh2fghk7.fsf@gmx.net> (raw)
In-Reply-To: <87sh2fpq4m.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 12 Sep 2018 02:32:09 +0300")
On Wed, 12 Sep 2018 02:32:09 +0300 Juri Linkov <juri@linkov.net> wrote:
>> The immediate cause of this is that wdired--restore-dired-filename-prop,
>> which is on after-change-functions, calls dired-get-filename without
>> making sure that the file name is not the empty string. But it turns
>> out that using dired-get-filename in that function also doesn't work
>> with symlinks as I had thought (and tested, but evidently not enough):
>> after enabling wdired-mode but before making a change, (file-symlink-p
>> (dired-get-filename)) on a symlink returns the name of the target, but
>> as soon as a change is made, that sexp returns nil, which causes a
>> text-read-only signal. The patch below replaces this sexp and according
>> to my tests avoids the error which breaks delete-selection-mode and also
>> most text-read-only signals (one remains: when deleting the whole link
>> name; I haven't been able to figure out how to avoid that). The patch
>> should get more testing (in particular, is looking for the `l' flag a
>> reliable way to identify a symlink?), and an ERT test would also be
>> good, but I probably can't do either for the next few weeks, because
>> I'll be travelling. I can install the patch before I leave, since it
>> seems at least better than the status quo, or maybe someone else can
>> take a look and either confirm that it is good enough or else come up
>> with a better fix.
>
> Thanks, since your patch fixes the reported problem, there is no reason
> to postpone installing it.
Ok, but I'll wait another day or two, to give others a chance to object.
> Regarding improving the handling of symlinks,
> maybe you can use some code from dired-move-to-end-of-filename,
> especially handling dired-ls-F-marks-symlinks.
Thanks for the pointer. I don't think I'll have time to look into that
before leaving, but maybe I can do so while I'm away, otherwise after
returning.
Steve Berman
next prev parent reply other threads:[~2018-09-12 10:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-09 15:52 bug#32673: 27.0.50; wdired: broken 'wdired--restore-dired-filename-prop' Juri Linkov
2018-09-11 22:08 ` Stephen Berman
2018-09-11 23:32 ` Juri Linkov
2018-09-12 10:02 ` Stephen Berman [this message]
2018-09-12 13:57 ` Eli Zaretskii
2018-09-13 20:21 ` Stephen Berman
2020-02-12 21:53 ` Juri Linkov
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=87sh2fghk7.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=32673@debbugs.gnu.org \
--cc=juri@linkov.net \
/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.