bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#60666: 30.0.50; [PATCH] Use field properties in Eshell buffers


From: Eli Zaretskii
Subject: bug#60666: 30.0.50; [PATCH] Use field properties in Eshell buffers
Date: Wed, 11 Jan 2023 14:15:29 +0200

> Date: Tue, 10 Jan 2023 12:51:14 -0800
> Cc: 60666@debbugs.gnu.org
> From: Jim Porter <jporterbugs@gmail.com>
> 
> On 1/10/2023 12:11 PM, Eli Zaretskii wrote:
> > That's not what I see in Emacs 29.  C-a moves to the beginning of
> > input, i.e. it stops at the end of the prompt, whereas HOME goes all
> > the way to the beginning of screen line, including the prompt.
> > 
> > "C-h c" says that C-a is bound to eshell-bol, but HOME is bound to
> > move-beginning-of-line.
> > 
> > I'm asking why not let users have this distinction after your change,
> > with some easy customization?
> 
> It sounds like we agree but we're looking at this from different 
> directions. Since my patch adds the 'field' property, a user can't just 
> use 'move-beginning-of-line' to go to the very beginning of the line 
> (instead, it stops at the end of the prompt, where the field property ends).
> 
> I agree that an easy customization to restore the old behavior would be 
> nice. The old behavior has been around a long time, so I'm sure some 
> people have come to rely on it.
> 
> One option would be to add a new function like 'eshell-really-bol' (with 
> a better name, of course), that calls 'move-beginning-of-line' and 
> ignores fields, like the function I suggested in the NEWS entry. This 
> function wouldn't be used anywhere by default, but it makes it easy for 
> users to restore the behavior. This is probably the simplest, most 
> direct way.

I think 'eshell-really-bol' is the best alternative here, yes.  Then
NEWS could tell users to bind it to HOME or whatever.

> Another option might be to enhance 'move-beginning-of-line'. Maybe we 
> could add an option so that calling it the first time obeys field 
> boundaries, but if you immediately call it again, it ignores them. Then, 
> a user who wants to go to the real beginning of a line can just press 
> <home> (or C-a) twice. That's not exactly the same as the old behavior, 
> but it would be usable outside of Eshell, and it's pretty close to 
> maintaining muscle memory: you just need to press the same key again. 

Because this is not exactly the old behavior, I don't think it alone
can be the response to backward-compatibility need.  It could be a
separate new feature, of course.





reply via email to

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