GNU bug report logs - #45029
27.1.50; Regression: Yanking into externally modified file with delete-selection-mode

Previous Next

Package: emacs;

Reported by: Lars Ljung <lars <at> matholka.se>

Date: Thu, 3 Dec 2020 20:11:02 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 27.1.50

Fixed in version 27.2

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #45 received at 45029 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 45029 <at> debbugs.gnu.org
Subject: Re: bug#45029: 27.1.50; Regression: Yanking into externally
 modified file with delete-selection-mode
Date: Fri, 15 Sep 2023 09:36:12 +0300
>>>> Anyway, here is a patch with two fixes:
>>>> 1. Guards read-char-from-minibuffer-insert-char against inadvertent
>>>>    operating on the non-minibuffer buffer;
>>> I suspect this will/would just hide a problem (such as the current one)
>>> under the rug.
>> I admit this is a workaround, but I have no idea what would be a proper fix.
>
> The let-binding of `this-command` fixes the problem, doesn't it?

But might other uses of a recursive edit break it again?
I guess `when (minibufferp)` can't be removed
from `read-char-from-minibuffer-insert-other`
until all cases below are fixed.

>>>> 2. Prevents read-char-from-minibuffer from changing the value of
>>>>    'this-command' by read-from-minibuffer:
>>> Right, but I think that this needs to apply to all recursive edits
>>> rather than only `read-char-from-minibuffer`.
>> I tried to test recursive commands at the read-char-from-minibuffer's
>> prompt, but can't reproduce the same problem.
>
> No, I mean other uses of a recursive edit from `pre-command-hook` would
> cause the same problem, so the let-binding should be placed deeper than
> in `read-char-from-minibuffer`, e.g. inside `recursive_edit_1`.

I see, so this problem is more general and not specific to
`read-char-from-minibuffer`?  It would be nice to find
a test case for other commands to confirm that a change in
`recursive_edit_1` fixes them.




This bug report was last modified 1 year and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.