unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Lars Ingebrigtsen <larsi@gnus.org>, Eduardo Ochs <eduardoochs@gmail.com>
Cc: 37745@debbugs.gnu.org, Michael Albinus <michael.albinus@gmx.de>
Subject: bug#37745: (save-window-excursion (shell) (buffer-name (current-buffer)))
Date: Thu, 17 Oct 2019 10:26:42 +0200	[thread overview]
Message-ID: <bcc9eb53-252c-c210-ef6c-cf43c5561d68@gmx.at> (raw)
In-Reply-To: <87pniwkr9e.fsf@gnus.org>

 >> 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?

martin





  reply	other threads:[~2019-10-17  8:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  7:55 bug#37745: (save-window-excursion (shell) (buffer-name (current-buffer))) Eduardo Ochs
2019-10-17  3:03 ` Lars Ingebrigtsen
2019-10-17  8:26   ` martin rudalics [this message]
2019-10-17 16:50     ` Michael Albinus
2019-10-27  8:42       ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcc9eb53-252c-c210-ef6c-cf43c5561d68@gmx.at \
    --to=rudalics@gmx.at \
    --cc=37745@debbugs.gnu.org \
    --cc=eduardoochs@gmail.com \
    --cc=larsi@gnus.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).