GNU bug report logs - #74230
30.0.92; eshell-emit-prompt clobbers text properties

Previous Next

Package: emacs;

Reported by: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>

Date: Wed, 6 Nov 2024 18:25:02 UTC

Severity: normal

Found in version 30.0.92

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Ashton Wiersdorf <ashton <at> wiersdorfmail.net>, 74230 <at> debbugs.gnu.org
Cc: eliz <at> gnu.org
Subject: Re: bug#74230: 30.0.92; eshell-emit-prompt clobbers text properties
Date: Thu, 7 Nov 2024 10:16:16 -0800
[Message part 1 (text/plain, inline)]
On 11/6/2024 10:21 AM, Ashton Wiersdorf wrote:
> In Emacs 29.4, the function did *not* overwrite the text properties of
> the prompt `rear-nonsticky (read-only)`. The new version overwrites the
> rear-nonsticky property so that it is only `(field)`.

Thanks for noticing this.

> If I set `eshell-highlight-prompt' to `t', then I get the read-only
> behavior that I want, but now I cannot get the pleasant component
> highlighting that `fancy-shell' is meant to provide.

If you set the 'face' attribute instead of the 'font-lock-face' 
attribute, you should get the highlighting you want (that's what I do) 
while 'eshell-highlight-prompt' is non-nil.

Here's a patch to fix this though so that we're more careful about not 
clobbering stickiness properties. Eli, what do you think about this 
patch? It fixes a regression from Emacs 29, but the diff is fairly large 
for so late in the Emacs 30 cycle. Unfortunately, I can't think of a 
better solution that doesn't just shuffle the bug around to a different 
spot. On the plus side, this code already has regression tests, and it 
was easy to add a new one for this case.

Personally, I'd be ok with having this be a known bug (there's a 
workaround for Emacs 30) and fixing it on master. But if you think this 
change is ok for the release branch, I'd also be ok with installing 
there; then people don't need to deal with the workaround.
[0001-Don-t-clobber-stickiness-text-properties-when-printi.patch (text/plain, attachment)]

This bug report was last modified 241 days ago.

Previous Next


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