unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Notion of previous buffer
@ 2023-01-07 17:14 Jean Louis
  0 siblings, 0 replies; only message in thread
From: Jean Louis @ 2023-01-07 17:14 UTC (permalink / raw)
  To: Help GNU Emacs

After slight inspection of (previous-buffer) and running function in
newly invoked buffers, it seem I can use the function to detect from
which buffer was new buffer invoked.

Something like this may tell me which are previous buffers:
(window-prev-buffers (window-normalize-window nil t))

Though by "previous" it is meant the buffer which was visited before
the current buffer.

I need little different situation as to go to the invoking buffer,
rather then to buffer that was visited before visiting the current
buffer.

Invoking buffer is from where user generated or entered in new buffer.

Maybe somebody knows if this notion to be able to return to invoking
buffer already exists in Emacs packages?

Then if it does not exist, I wish to create that feature by defining
the permanent buffer local variable:

(defvar-local rcd-invoking-buffer nil
  "Name of the invoking buffer.")
(put 'rcd-invoking-buffer 'permanent-local t)

and then by invoking generating new buffer, I setup variable
`rcd-invoking-buffer' so to remember it and make customized
`quit-window' function to make sure to return to invoking buffer.


--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-07 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 17:14 Notion of previous buffer Jean Louis

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).