syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

Automatic Switching of Layouts #12935

Open dbankmann opened 4 years ago

dbankmann commented 4 years ago

First of all, I'm not sure, whether I fully understood the concept of layouts. So, I'm just gonna explain how I want to use it. Comments, whether this is intended behavior are very welcome.

I'm mostly using the standard layouts shipped with some of the layers, i.e., @Spacemacs, @Mu4e and @Org layer. Buffer separation within the layouts works fine as long as I stay in one regime (i.e., just edit my org files or acting on mails). However, as soon as I 'connect' two layouts I'm getting in trouble.

For instance, I occasionally capture some mails as todo task in my org files. Then, at some point I want to return to that mail by following the link in the corresponding org entry. Of course, at that time, I'm in the @Org layout. Unfortunately, after following the link, the *mu4e-view* and *mu4e-headers* buffers show up (as expected) while staying in the @Org layout.

This leads to several strange behavior:

nixmaniack commented 4 years ago

I agree that the behaviour of layouts when accessing the buffers from other layouts is not well defined and not very intuitive.

To suppress the prompt that you mentioned in point # 1, I had set (setq persp-kill-foreign-buffer-behaviour 'kill) based on this.

practicalli-johnny commented 4 years ago

@dbankmann I am unsure if this helps, but the spacemacs-layouts documentation has been updated in develop and included examples of restricting functions to the current layout.

https://github.com/syl20bnr/spacemacs/tree/develop/layers/+spacemacs/spacemacs-layouts

dbankmann commented 4 years ago

@jr0cket Thanks, but I don't think, this really helps, because I actually intentionally want to access a buffer that is outside the current layout.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

dbankmann commented 3 years ago

It is still valid.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

fnussbaum commented 2 months ago

I think it would be nice to address this in some way, and I have some work in progress on that.