From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: How do I find out, in a Lisp program, what is the current buffer?
Date: Tue, 5 Dec 2023 14:35:48 +0000 [thread overview]
Message-ID: <ZW81RPhXsI2mq8F0@ACM> (raw)
Hello, Emacs.
I want to find out what is the current buffer, and I mean the REAL
current buffer.
In particular, if that is the minibuffer, I want to be told it's the (or
a) minibuffer, not the buffer it was invoked from. The function
current-buffer won't do this.
I want to use this for writing the current buffer into the new position
info in the doc string (bug #67455). Evaluating a defun in the
minibuffer is different from evaluating one in *scratch*.
Is there some way I can get this information from Lisp, or do I have to
write a new C primitive?
Thanks in advance!
--
Alan Mackenzie (Nuremberg, Germany).
next reply other threads:[~2023-12-05 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 14:35 Alan Mackenzie [this message]
2023-12-05 15:03 ` How do I find out, in a Lisp program, what is the current buffer? Eshel Yaron
2023-12-05 15:20 ` Alan Mackenzie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZW81RPhXsI2mq8F0@ACM \
--to=acm@muc.de \
--cc=emacs-devel@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.