emacs-devel
[Top][All Lists]
Advanced

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

Re: Sv: Partial wdired (edit just filename at the point)


From: Stefan Monnier
Subject: Re: Sv: Partial wdired (edit just filename at the point)
Date: Fri, 19 Mar 2021 17:58:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Yes, of course, I had `wdired-allow-to-change-permissions' set to t; it is 
> the pre-requisita.

Well, I first tried it "as-is" and was quite perplexed until I saw that
I needed to set `wdired-allow-to-change-permissions` before anything
would have a chance of working ;-)

> Ok, originally permissions flags are preprocessed before change to wdired is
> finalized. So something somewhere in
> wdired setup is checking for permission bits? I think.

It's simply that the way the edition of permissions works when
`wdired-allow-to-change-permissions' is set to t is that wdired places
a `keymap` property on those permissions.  This way when you hit `x`
while point is in that area, it doesn't run `self-insert-command` but
`wdired-set-bit` (which edits the buffer manually with
inhibit-read-only).

But with the new code, that `keymap` property is not added right away,
so `x` works if that line has already been processed by our
`dired--before-change-fn` but not otherwise, because there's no `keymap`
property yet and hence the `x` runs `self-insert-command` rather than
`wdired-set-bit`.


        Stefan




reply via email to

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