Hi all, A rough version of the patch we were talking about in the other thread on persistent naming. To recap: New defcustoms, tab-bar-post-open-functions and tab-bar-pre-close-functions. Call all of the function in post-open-functions at the end of tab-bar-new-tab-to, passing in the new tab as an argument. Similar for pre-close-functions, but slightly more complicated to lend some expressive power. Each of the functions take 2 arguments, the tab itself, and a flag indicating whether or not it's the last tab. The big thing is that the return values are kept track of, and if *any* of the functions return a non-nil value (ie `(cl-some (mapcar (lambda (x) (funcall x tab last-tab))) pre-close-functions)` is non-nil), it short-circuits and doesn't run the rest of tab-bar-close-tab. This would be useful to provide to users so that they can do other clean-up tasks when the tab is closed, as well as providing a way to protect a tab from being closed. Ditto for being able to do some tab set-up when you open a new tab. This is going to take some additional work. I couldn't think of a clean way to gracefully provide a way to easily make permanent changes to the tab for the purposes of tab-bar-post-open-functions - the functions within have to grovel through the tabs frame parameter and write back a value themselves. I personally don't find this an optimal user experience, but feedback on that point is welcome. This will also need to be documented in the manual, but I can do that after we hash out some details - I just didn't want to make changes to the manual until we're satisfied with the semantics of this whole thing. Patch follows. Thoughts on it appreciated. Thanks, -- ~Robert Cochran GPG Fingerprint - BD0C 5F8B 381C 64F0 F3CE E7B9 EC9A 872C 41B2 77C2