Subject: Re: bug#76853: M-b not navigating to the previous word in the prompt string inside Eshell on emacs 30.1

From: Hrishikesh S <[email-masked]>
Date: Sun, 9 Mar 2025 20:12:13 -0700

I see.. Thanks for the response! I will try setting
`'inhibit-field-text-motion` and test.

I'm used to using `M-b` a lot when I'm inside eshell as it lets me copy
parts of my current directory when running commands
(e.g: copy the git branch I'm on before pushing, etc), so found the change
to be a bit jarring. As long as there is a way
to get back the old behavior, I have no complaints :)

Regards,
Hrishi

On Sat, Mar 8, 2025 at 10:05 AM Jim Porter <[email-masked]> wrote:

> On 3/8/2025 12:21 AM, Stefan Kangas wrote:
> > Hrishikesh S <[email-masked]> writes:
> >
> >> which I installed by simply running "brew install emacs" on my work
> machine,
> >> when I'm inside the eshell buffer, typing `M-b` does not take me back
> by a
> >> word like how it used to be.
> [snip]
> >
> > Jim, any comments?
>
> Like 'shell' has for a long time, Eshell now uses fields when
> propertizing the prompt, and '(for|back)ward-word' don't move across
> field boundaries by default. So this is the intended default behavior.
>
> You could try setting 'inhibit-field-text-motion' to nil buffer-locally,
> though maybe that's a drastic change. Is there a better way to do that?
> (Or if not, should there be?)
>