[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: always local shell?
From: |
Emanuel Berg |
Subject: |
Re: always local shell? |
Date: |
Sun, 24 Apr 2022 21:27:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Thibaut Verron wrote:
> Isn't that essentially the same thing as
>
> (with-current-buffer "*Messages*"
> (shell))
>
> ?
One can use `messages-buffer' if one don't want to hard-code
"*Messages*".
Only, that is hard-coded in messages-buffer! 3 times in
total 7 lines of code.
In /usr/local/share/emacs/29.0.50/lisp/simple.el.gz
lines 9804-9810.
Also, go to a remote file. Kill the messages buffer and do
(messages-buffer)
Go to *Messages* and then C-h v default-directory RET - you'll
see it is remote as well.
Don't know how often people kill the messages buffer tho ...
> I think something like
>
> (let (default-directory user-emacs-directory)
> (shell))
>
> should also work.
Not only does that not work but it also breaks shell so you
can't use it any other way either :)
But yes, this works:
(let ((default-directory user-emacs-directory))
(shell) )
Maybe that's the best one?
--
underground experts united
https://dataswamp.org/~incal