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

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

Re: Get current buffer name from command line?


From: Stefan Monnier
Subject: Re: Get current buffer name from command line?
Date: Wed, 13 Aug 2014 08:23:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> this is not something I really need, but I was wondering whether I can
> get the (name of) the current buffer from command line?

I think your notion of "current buffer" is not the same as
`current-buffer'.  You probably want "the buffer displayed in the
`selected-window'".

Of course, the selected-window may also be temporarily changed, but
I think

   emacsclient -e "(window-buffer (selected-window))"

will more often give you what you're looking for.


        Stefan




reply via email to

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