all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: tab-bar-mode new tab hook?
Date: Mon, 25 Apr 2022 23:27:01 -0400	[thread overview]
Message-ID: <CAHyO48wiuac2VZoHKVNsfb=B_6PNw1=6zRjwaAa+EcUoEPAXhw@mail.gmail.com> (raw)
In-Reply-To: <86czh5jjj4.fsf@mail.linkov.net>

On Mon, Apr 25, 2022 at 11:45 AM Juri Linkov <juri@linkov.net> wrote:
>
> > I've been experimenting using tabspaces
> > (https://github.com/mclear-tools/tabspaces) to enable each tab to have
> > its own isolated buffer list. It provides a command,
> > tabspaces-create-workspace that invokes tab-bar-new-tab and then sets
> > frame parameters to isolate the buffer list space.
> >
> > I was curious if there has been any thought given to including a hook
> > for when a new tab is created. This way, I could just add a hook to do
> > this and not have to use a separate command (and replace all the other
> > commands that use tab-bar-new-tab). I could use advice, but that seems
> > like a last resort.
>
> You can provide own custom function for tab-bar-new-tab-choice.
> Then you can set an initial buffer list in it, and even to display
> this buffer list as the default contents of the new tab.

This function seems like it is meant to just return the buffer to
display in the new tab. It also seem like it is called before the new
tab is actually created. I haven't tried it yet, but I would think
that would mean that any modification of frame parameters in that
function would apply to the previous tab, rather than the about to be
created tab.

> > Alternatively (or in addition) is the behavior to isolate buffer lists
> > in tabs one that would make sense for Emacs to support out-of-the-box?
>
> There is already project-based buffer isolation that works nicely
> with tabs, so in a new tab you can set a tab group name, and just
> use project buffer commands: 'C-x p b' (project-switch-to-buffer),
> 'C-x p k' (project-kill-buffers), etc.  Switching to a project buffer
> in a new tab is also supported with 'C-x t p b'.

Yes, I used that before, but I like to be able to bring buffers in
from other projects and have them in my buffer list. Sort of reference
files from one project to another, so it is nice for them to actually
have their own buffer lists entirely that is not limited to those in
the project.

Thanks,

Aaron



  reply	other threads:[~2022-04-26  3:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25  2:07 tab-bar-mode new tab hook? Aaron Jensen
2022-04-25 15:44 ` Juri Linkov
2022-04-26  3:27   ` Aaron Jensen [this message]
2022-04-26  7:27     ` Juri Linkov
2022-04-26  9:48       ` Aaron Jensen
2022-04-26 15:48         ` Juri Linkov
2022-04-26 15:56           ` Aaron Jensen

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='CAHyO48wiuac2VZoHKVNsfb=B_6PNw1=6zRjwaAa+EcUoEPAXhw@mail.gmail.com' \
    --to=aaronjensen@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    /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.