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

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

bug#37745: (save-window-excursion (shell) (buffer-name (current-buffer))


From: Michael Albinus
Subject: bug#37745: (save-window-excursion (shell) (buffer-name (current-buffer)))
Date: Thu, 17 Oct 2019 18:50:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

martin rudalics <rudalics@gmx.at> writes:

>>> In many versions of Emacs the sexp below
>>>
>>>    (save-window-excursion (shell) (buffer-name (current-buffer)))
>>>
>>> returns "*shell*", but in some recent versions it returns the name of
>>> the current buffer instead.
>>
>> This seems to be introduced by
>>
>> commit 59191cd0cbe8463f9095a71cb4048bb138d6e446
>> Author: Michael Albinus <michael.albinus@gmx.de>
>> Date:   Sun Apr 2 11:02:54 2017 +0200
>>
>>      Apply connecion-local variables for shells
>>
>> if I read the log right.
>>
>> It wraps the `pop-to-buffer' in a `(with-current-buffer buffer', so
>> current-buffer doesn't change like it used to.
>
> Why can't you simply use (buffer-name (shell)) instead?

That's possible, of course.

However, `shell' has always made the shell buffer current. It was an
oversight by me to change this.

I've added this behavior to the docstring of `shell', and fixed
this. Committed to master.

> martin

Best regards, Michael.





reply via email to

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