GNU bug report logs -
#50189
wdired chmod should not follow symlinks (Bug#11912 followup)
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Tue, 24 Aug 2021 18:06:01 UTC
Severity: normal
Tags: patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50189 in the body.
You can then email your comments to 50189 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50189
; Package
emacs
.
(Tue, 24 Aug 2021 18:06:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 24 Aug 2021 18:06:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
To be consistent with dired M, wdired's method of textually editing a
symlink's permissions should also not follow symlinks. Proposed patch
attached.
I did not test this, as I don't use wdired and couldn't get it to work
for me regardless of whether the patch is applied.
This patch also removes some obsolete commentary about dired-chmod-program.
[0001-Make-wdired-match-dired-with-symlink-permissions.patch (text/x-patch, attachment)]
Added tag(s) patch.
Request was from
Paul Eggert <eggert <at> cs.ucla.edu>
to
control <at> debbugs.gnu.org
.
(Tue, 24 Aug 2021 21:42:01 GMT)
Full text and
rfc822 format available.
Changed bug title to 'wdired chmod should not follow symlinks (Bug#11912 followup)' from 'wdired chmod should not follow symlinks'
Request was from
Paul Eggert <eggert <at> cs.ucla.edu>
to
control <at> debbugs.gnu.org
.
(Tue, 24 Aug 2021 21:48:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50189
; Package
emacs
.
(Wed, 25 Aug 2021 11:48:01 GMT)
Full text and
rfc822 format available.
Message #12 received at 50189 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> I did not test this, as I don't use wdired and couldn't get it to work
> for me regardless of whether the patch is applied.
Yeah, editing the permissions doesn't seem to work for me in dired. If
I start with
-rw-r--r-- 1 larsi larsi 329K Aug 21 18:22 IMG_4478.JPG
and press DEL after the final dash, it'll delete the dash and then say
"Text is read only", leaving me with:
-rw-r--r- 1 larsi larsi 329K Aug 21 18:22 IMG_4478.JPG
And then I can't insert anything there, because it's now read-only. So
something is wonky in the way wdired tries to make certain bits of the
line read-only.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50189
; Package
emacs
.
(Sat, 10 Sep 2022 06:22:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 50189 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> To be consistent with dired M, wdired's method of textually editing a
> symlink's permissions should also not follow symlinks. Proposed patch
> attached.
The patch looks "obviously correct", so I've applied it to Emacs 29.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50189
; Package
emacs
.
(Sat, 10 Sep 2022 06:29:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 50189 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Yeah, editing the permissions doesn't seem to work for me in dired. If
> I start with
>
> -rw-r--r-- 1 larsi larsi 329K Aug 21 18:22 IMG_4478.JPG
>
> and press DEL after the final dash, it'll delete the dash and then say
> "Text is read only", leaving me with:
>
> -rw-r--r- 1 larsi larsi 329K Aug 21 18:22 IMG_4478.JPG
>
> And then I can't insert anything there, because it's now read-only. So
> something is wonky in the way wdired tries to make certain bits of the
> line read-only.
Setting wdired-allow-to-change-permissions to t or `advanced' made this
work -- you can't really edit the permissions without that.
So I guess there's nothing more to be done here...
bug marked as fixed in version 29.1, send any further explanations to
50189 <at> debbugs.gnu.org and Paul Eggert <eggert <at> cs.ucla.edu>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 10 Sep 2022 06:29:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50189
; Package
emacs
.
(Sun, 11 Sep 2022 01:34:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 50189 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
> > Yeah, editing the permissions doesn't seem to work for me in dired. If
> > I start with
> >
> > -rw-r--r-- 1 larsi larsi 329K Aug 21 18:22 IMG_4478.JPG
> >
> > and press DEL after the final dash, it'll delete the dash and then say
> > "Text is read only", leaving me with:
> >
> > -rw-r--r- 1 larsi larsi 329K Aug 21 18:22 IMG_4478.JPG
> >
> > And then I can't insert anything there, because it's now read-only. So
> > something is wonky in the way wdired tries to make certain bits of the
> > line read-only.
>
> Setting wdired-allow-to-change-permissions to t or `advanced' made this
> work -- you can't really edit the permissions without that.
That behavior not optimal and a bit confusing.
As you might remember, text properties in wdired are now attached on the
fly for better performance, implemented here:
| 4dbc44550d * lisp/wdired.el: Apply text properties lazily
| Arthur Miller <arthur.miller <at> live.com> 2021-03-27
[Arthur is CC'd]
The problem in this case: the read-only property is attached in
`before-change-functions'. But that doesn't prevent the change being
performed. Try e.g. in *scratch*:
#+begin_src emacs-lisp
(add-hook 'before-change-functions
(lambda (&rest _)
(put-text-property (point-min) (point-max)
'read-only t))
nil t)
#+end_src
The first changes goes through although the text is already read-only,
because it's still the same command or so (anyone thinking this is a
bug?).
I think we could make wdired explicitly check for and throw a
"user-error" in this case so that the editing command is not performed
(but only after the properties were attached).
TIA,
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50189
; Package
emacs
.
(Sun, 11 Sep 2022 11:06:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 50189 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>> Setting wdired-allow-to-change-permissions to t or `advanced' made this
>> work -- you can't really edit the permissions without that.
>
> That behavior not optimal and a bit confusing.
Yeah, like a lot of stuff with dired and wdired, unfortunately.
> I think we could make wdired explicitly check for and throw a
> "user-error" in this case so that the editing command is not performed
> (but only after the properties were attached).
You mean in the wdired-allow-to-change-permissions nil case? Yes,
definitely.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 09 Oct 2022 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.