GNU bug report logs - #37745
(save-window-excursion (shell) (buffer-name (current-buffer)))

Previous Next

Package: emacs;

Reported by: Eduardo Ochs <eduardoochs <at> gmail.com>

Date: Mon, 14 Oct 2019 07:57:01 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Eduardo Ochs <eduardoochs <at> gmail.com>
Cc: 37745 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#37745: (save-window-excursion (shell) (buffer-name (current-buffer)))
Date: Thu, 17 Oct 2019 10:26:42 +0200
>> 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 <at> 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?

martin




This bug report was last modified 5 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.