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

From: Stefan Monnier <[email-masked]>
Date: Sat, 15 Mar 2025 10:07:51 -0400

>> This worked:
>> (add-hook 'eshell-mode-hook (lambda () (setq-local
>> inhibit-field-text-motion t)))
>> but then I lose the completions I get when I type a command like `cd
>> <tab>`
>> It would be nice if I could get back the behavior I was used to in
>> emacs 29.
>> Currently, I'm managing by first hitting `C-b` followed by `M-b`.
>
> That's unfortunate. I'm open to implementation options here. Stefan (or
> anyone else who wants to chime in), do you think it would make sense to say,
> "Users should be able to set 'inhibit-field-text-motion' to t in Eshell,"
> and that any problems with that are bugs to be fixed?

The `inhibit-*` variables are generally not considered configuration
variables, so we should look for other ways to provide the
desired behavior.

E.g. provide navigation commands which don't pay attention to field
boundaries, so Hrishi can bind this to `M-b`?
Or provide a config var which works a bit like
`inhibit-field-text-motion` but affects only the specific commands which
pay attention to it (and only when called interactively)?

        Stefan