From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: GNU Emacs users list <help-gnu-emacs@gnu.org>
Subject: Get current buffer name from command line?
Date: Wed, 13 Aug 2014 13:32:34 +0200 [thread overview]
Message-ID: <20140813133234.6805a417@aga-netbook> (raw)
Hello,
this is not something I really need, but I was wondering whether I can
get the (name of) the current buffer from command line? Here is an
interesting exchange I had with Eshell ("*GNU Emacs*" being the
*other* buffer):
Welcome to the Emacs shell
~ $ emacsclient -e "(current-buffer)"
#<buffer *server*>
~ $ emacsclient -e "(other-buffer)"
#<buffer *GNU Emacs*>
~ $ emacsclient -e "(progn (bury-buffer) (current-buffer))"
#<buffer *server*>
~ $ emacsclient -e "(progn (kill-buffer) (current-buffer))"
#<buffer *GNU Emacs*>
~ $ emacsclient -e "(progn (kill-buffer) (other-buffer))"
#<buffer *GNU Emacs*>
~ $
I looked into both the Emacs manual and the Elisp manual, but found
nothing to explain this behavior (I expected to see #<buffer *eshell*>
at least once...)
Best,
--
Marcin Borkowski
room B3-46, phone no +48 61 829 5375
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
next reply other threads:[~2014-08-13 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 11:32 Marcin Borkowski [this message]
2014-08-13 12:23 ` Get current buffer name from command line? Stefan Monnier
2014-08-13 20:49 ` Marcin Borkowski
2014-08-13 21:40 ` Stefan Monnier
2014-08-13 22:08 ` Marcin Borkowski
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=20140813133234.6805a417@aga-netbook \
--to=mbork@wmi.amu.edu.pl \
--cc=help-gnu-emacs@gnu.org \
/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.
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).