unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Notion of previous buffer
Date: Sat, 07 Jan 2023 20:14:03 +0300	[thread overview]
Message-ID: <58917e45a00e0d2d161f1987a5be0d7c.support1@rcdrun.com> (raw)

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/



                 reply	other threads:[~2023-01-07 17:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=58917e45a00e0d2d161f1987a5be0d7c.support1@rcdrun.com \
    --to=bugs@gnu.support \
    --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).