unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Robert Cochran <robert-emacs@cochranmail.com>
Cc: emacs-devel@gnu.org, "T.V Raman" <raman@google.com>
Subject: Re: [PATCH] Enable persistent naming for tabs
Date: Wed, 30 Oct 2019 23:52:25 +0200	[thread overview]
Message-ID: <87d0edap1a.fsf@mail.linkov.net> (raw)
In-Reply-To: <8736faozd2.fsf@cochranmail.com> (Robert Cochran's message of "Wed, 30 Oct 2019 11:35:37 -0700")

> I believe it better to be a hook personally, though admittedly that kind
> of depends on how exactly you want to use the functionality. A hook
> allows for several interested parties to be able to act on a tab
> create/close instead of just one. This allows better for dynamically
> adding or removing situationally dependent behavior. For example, maybe
> I want to kill some/all of the buffers in the tab when I close it, but
> only under certain circumstances, like if it's a tab containing non-file
> 'work' buffers like those of Magit or mpd.

Maybe we need to add the prefix 'pre-' to indicate that the hook
is called before the command is executed, with a name e.g.:

  tab-bar-pre-close-tab-functions (tab)

This might require an additional utility function to get all buffers
from the tab (it could collect buffers by traversing readable window-state),
with a name:

  tab-bar-tab-buffers (tab)

Such function is also needed for checking if a buffer exists in a tab
to prevent killing a buffer in the current tab with C-x k
when such buffer is still shown in some other tab.

> Another is if I open a new tab, and I want to be prompted to name the
> tab automatically depending on the buffers that exist at the time of
> creation - I have a tendency to segregate all of my Magit buffers for
> a repository into a single tab, and I usually rename the tab so that
> no matter what Magit sub-buffer I'm on, the tab still has a consistent
> name. I can see myself doing similar for other 'task-oriented' sets of
> windows and buffers such as gdb, mpd, etc.

This looks like calling after the tab is created, so maybe a name like

  tab-bar-post-new-tab-functions (tab)



  reply	other threads:[~2019-10-30 21:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  1:03 [PATCH] Enable persistent naming for tabs Robert Cochran
2019-10-10 21:43 ` Juri Linkov
     [not found]   ` <87ftjz6v4d.fsf@cochranmail.com>
2019-10-13 19:53     ` Juri Linkov
2019-10-15 21:45       ` Juri Linkov
2019-10-20 16:17       ` Juri Linkov
2019-10-20 23:54         ` T.V Raman
2019-10-21 21:34           ` Juri Linkov
2019-10-23 16:22             ` Robert Cochran
2019-10-23 20:41               ` Juri Linkov
2019-10-25 15:47                 ` Robert Cochran
2019-10-25 16:01                   ` Robert Cochran
2019-11-03 22:08                     ` Robert Cochran
2019-11-03 22:37                       ` Juri Linkov
2019-10-26 21:46                   ` Juri Linkov
2019-10-30 18:35                     ` Robert Cochran
2019-10-30 21:52                       ` Juri Linkov [this message]
2019-10-30 23:05                         ` Juri Linkov
2019-10-31  1:50                           ` Robert Cochran
2019-10-31 21:17                             ` Juri Linkov
2019-10-27 23:10               ` Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2019-10-08 22:26 Robert Cochran
2019-10-09 16:02 ` Eli Zaretskii
2019-10-09 22:58 ` Juri Linkov
2019-10-23 20:53 ` Kalman Reti

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=87d0edap1a.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.com \
    --cc=robert-emacs@cochranmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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