Git Product home page Git Product logo

Comments (10)

aaronjensen avatar aaronjensen commented on July 20, 2024 1

Yeah, I hear you. In this instance, there really should be a hook invoked when creating a new tab. That would allow a non-advice extension point, but I don't know if they would want that. I'll raise it on emacs-devel. In the interim, what would you think about putting the buffer isolation part into its own function so one could use it to advise tab-bar-new-tab if one so desired?

from tabspaces.

aaronjensen avatar aaronjensen commented on July 20, 2024 1

Looks like there is already a hook for this:

(defun tabspaces--tab-post-open-function (_tab)
  "Reset buffer list on new tab creation."
  (tabspaces-reset-buffer-list))

(add-to-list 'tab-bar-tab-post-open-functions #'tabspaces--tab-post-open-function)

With this in place, there is no need to advise anything or define commands like tabspaces-create-workspace, every new tab will have its own workspace. I'm not sure if that would be what you are looking for, but I think it's what I'm looking for in that I just want to be able to use tabs and have them each manage their own buffer list.

I think, for now, I will experiment with a trimmed down version of tabspaces that uses this technique and see how I like it in practice.

from tabspaces.

aaronjensen avatar aaronjensen commented on July 20, 2024 1

Just migrated over, seems to work great. Thanks for making those updates, it's nice to have a more "vanilla" tab bar configuration now.

from tabspaces.

mclearc avatar mclearc commented on July 20, 2024

In general I'm reticent to use advice if I can code up something relatively small. With advice this means that one would have to turn off tabspaces mode to get the normal behavior from tab-bar, rather than having that exist alongside. Maybe that is overly cautious but 🤷‍♂️

from tabspaces.

mclearc avatar mclearc commented on July 20, 2024

what would you think about putting the buffer isolation part into its own function so one could use it to advise tab-bar-new-tab if one so desired?

Yeah that seems like a good compromise in the meantime. If you wanna open another pull request I'll merge it.

from tabspaces.

aaronjensen avatar aaronjensen commented on July 20, 2024

Thanks for the quick merging and collaboration, much appreciated. If I end up advising, I'll share the snippet so it can be added to the readme in case anyone wants that.

from tabspaces.

mclearc avatar mclearc commented on July 20, 2024

Sounds great -- thanks for your contributions!

from tabspaces.

mclearc avatar mclearc commented on July 20, 2024

Cool -- I'll try this as well and see.

from tabspaces.

mclearc avatar mclearc commented on July 20, 2024

FYI -- I've made a bunch of changes and simplifications starting with commit d883baf

from tabspaces.

aaronjensen avatar aaronjensen commented on July 20, 2024

Looks great, I’ll try it out shortly.

from tabspaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.