bug#42612: 28.0.50; Eshell: support setting working buffer like IELM

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#42612: 28.0.50; Eshell: support setting working buffer like IELM

Sean Whitton
Hello,

Eshell's docs advertise it as a replacement for IELM, but one IELM
feature that Eshell doesn't have is an equivalent to C-c C-b, or,
ielm-change-working-buffer.  It would be great to have something like
this.

--
Sean Whitton



Reply | Threaded
Open this post in threaded view
|

bug#42612: 28.0.50; Eshell: support setting working buffer like IELM

Eli Zaretskii
> From: Sean Whitton <[hidden email]>
> Date: Wed, 29 Jul 2020 22:29:52 -0700
>
> Eshell's docs advertise it as a replacement for IELM, but one IELM
> feature that Eshell doesn't have is an equivalent to C-c C-b, or,
> ielm-change-working-buffer.  It would be great to have something like
> this.

Like "C-u M-x eshell RET"?

If that's not what you wanted, then perhaps I don't quite understand
what you meant by running Eshell in another buffer.



Reply | Threaded
Open this post in threaded view
|

bug#42612: 28.0.50; Eshell: support setting working buffer like IELM

Sean Whitton
Hello Eli,

On Thu 30 Jul 2020 at 04:15PM +03, Eli Zaretskii wrote:

>> From: Sean Whitton <[hidden email]>
>> Date: Wed, 29 Jul 2020 22:29:52 -0700
>>
>> Eshell's docs advertise it as a replacement for IELM, but one IELM
>> feature that Eshell doesn't have is an equivalent to C-c C-b, or,
>> ielm-change-working-buffer.  It would be great to have something like
>> this.
>
> Like "C-u M-x eshell RET"?
>
> If that's not what you wanted, then perhaps I don't quite understand
> what you meant by running Eshell in another buffer.

No, not what I had in mind.

In IELM you can type C-c C-b and select a buffer, and then when you eval
further sexps in *ielm*, it will be as if you used M-: with that other
buffer selected.  Useful for debugging a major or minor mode.

In Eshell the closest thing you can do is wrap your sexps in a
(with-current-buffer) form, or use (progn (set-buffer ...) ...), which
is less convenient.

--
Sean Whitton



Reply | Threaded
Open this post in threaded view
|

bug#42612: 28.0.50; Eshell: support setting working buffer like IELM

Sean Whitton
Hello Eli,

On Thu 30 Jul 2020 at 08:06PM +03, Eli Zaretskii wrote:

> Eshell is a shell.  What is the semantics of running a shell in a
> buffer?  The only semantics I can think of is to run the shell in the
> default-directory of that buffer.

(info "(eshell) Top") says

    [Eshell] is intended to be an alternative to the IELM REPL for Emacs
    and with an interface similar to command shells ...

The functionality of setting a working buffer would be for when Eshell
is being used as an alternative to IELM, and it would have the same
semantics as the equivalent functionality in IELM.

I agree that when Eshell is being used as a command shell the only
significant thing would be default-directory.

--
Sean Whitton