mclear-tools / tabspaces

GNU General Public License v3.0
226 stars 14 forks source link

Displays *Messages* buffer #54

Closed seagle0128 closed 6 months ago

seagle0128 commented 6 months ago

Hi, thanks for the great package! I am enjoying it, and it was integrated into Centaur Emacs.

I have a quick question: How to display the "Messages" buffer in all workspaces? I tried customizing tabspaces-include-buffers but seems not working. What was I missing?

mclearc commented 6 months ago

Glad to hear you find it useful! You would just do this:

(setopt tabspaces-include-buffers '("*scratch*" "*Messages*"))

seagle0128 commented 6 months ago

(setopt tabspaces-include-buffers '("scratch" "Messages"))

It doesn't work when "*Messages" is buried, but it's displayed in all buffers (narrow via < b).

mclearc commented 6 months ago

Hmm -- all I can report is that when I have tested it, it works (i.e. without narrowing -- any new project/tabspace includes Messages). Have you already tried it with emacs -q ?

dalugm commented 6 months ago

Looks like the same problem as mine...

https://github.com/mclear-tools/tabspaces/pull/46#issue-2009054622

seagle0128 commented 6 months ago

Looks like the same problem as mine...

#46 (comment)

Thank you, @dalugm !

They are exactly same. But the solution doesn't work when the new workspace is created.

Is it possible to change tabspaces--local-buffer-p or something else? My workaround:

(setq tabspaces-include-buffers '("*scratch*" "*Messages*"))
(defun tabspaces--local-buffer-p (buffer)
      "Return whether BUFFER is in the list of local buffers."
      (or (member (buffer-name buffer) tabspaces-include-buffers)
          (memq buffer (frame-parameter nil 'buffer-list))))
dalugm commented 6 months ago

Looks like the same problem as mine... #46 (comment)

Thank you, @dalugm !

They are exactly same. But the solution doesn't work when the new workspace is created.

Is it possible to change tabspaces--local-buffer-p or something else? My workaround:

(setq tabspaces-include-buffers '("*scratch*" "*Messages*"))
(defun tabspaces--local-buffer-p (buffer)
      "Return whether BUFFER is in the list of local buffers."
      (or (member (buffer-name buffer) tabspaces-include-buffers)
          (memq buffer (frame-parameter nil 'buffer-list))))

Cool! I find this patch works more solid than current solution, maybe we can merge this?

seagle0128 commented 6 months ago

Cool! I find this patch works more solid than current solution, maybe we can merge this?

@dalugm @mclearc I've committed a PR.

mclearc commented 6 months ago

Merged! Thanks :)