[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Get current buffer name from command line?
From: |
Marcin Borkowski |
Subject: |
Get current buffer name from command line? |
Date: |
Wed, 13 Aug 2014 13:32:34 +0200 |
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
- Get current buffer name from command line?,
Marcin Borkowski <=