-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spacemac-layouts: In non default layouts popping buffers is behaving wrong #4956
Comments
Are you using |
|
I think the problem here is that See #4590 (comment) and CestDiego's answer. I think |
@Andre0991 Correct. |
Well, I think we have to live with that for now. The ERC layer has a workaround:
But of course this approach is ad-hoc and doesn't scale well. We have to add every I think this is what CestDiego wants too. At first it seems that we So basically you'll have to use User 104 writes:
Att. |
That tweak is also in |
Is the problem with |
@shivamkalra The behavior originates from persp-mode hooks into So yeah, we need to find some solution. |
Surprisingly, seems that there's no hook for buffer creation: http://stackoverflow.com/questions/7899949/is-there-an-emacs-hook-that-runs-after-every-buffer-is-created One guy suggested advising Does anyone know examples of those C calls? I know there are functions He also suggests Bar writes:
Att. |
I partially solved the issue by following @Bad_Ptr's suggestions on:
|
What cases are not covered by this solution? |
@Andre0991 Solutions solves the original problem I described, however it does not solve following:
Otherwise, it works fine for me way better than before. We can close this issue by adding above two lines in |
@Andre0991 I searched the sources of Emacs 24.5 for (defun hello (&rest args)
(message "Hello: %S" args))
(advice-add #'get-buffer-create :after #'hello)
It's possible, but also not perfect. Of the top of my head I can think of two scenarios that a solution with
As I haven't tested these two scenarios, it's possible that I'm totally wrong here and these are non-issues. I'd like to suggest a different approach, involving |
Important: I did not see the comment upstream before writing my previous comment. It appears that the latest persp-mode handles the original issue now, at least partially. However, the latest persp-mode won't be available to us Spacemacs users until #4946 is merged (you can merge it locally, of course). |
@bmag I think what you described is the way to go then, as we would have the same issues by just advising the other functions. Actually, even if Emacs had a hook for buffer creation we would still have to handle those temporary/uninteresting buffers, I guess. By the way, what are some examples of them? Would we have to filter them by name? @Bad-ptr might be interested in this as he wants to solve the same problem, I think. |
Evaluate what I posted in your scratch buffer: (defun hello (&rest args)
(message "Hello: %S" args))
(advice-add #'get-buffer-create :after #'hello) And after a while you'll see in the |
@bmag At least most of them already use a blank space. But wait - we could just use same rules that |
The
So it only ignores buffers that start with I think the temporary ones don't show up on the list-buffers because disappear almost immediately. But I feel I'm missing something obvious here. |
Ping @CestDiego Also see Bad-ptr/persp-mode.el#27 (comment) - there's an option to automatically add buffers to perspectives now. |
Closing issue for being inactive. Also it has a proposed solution 😸 If you still wish for it to be open, let me know 😸 CC @bmag 😸 |
Notmuch is affected as well |
Was experiencing this and found this explanation:
So, after switching to a second layout, if that dired buffer was already opened in the initial layout, you must switch it to this layout (with |
Description
I'm using
spacemac-layouts
and in all the nonDefault
layout, behavior of popping buffers is wrong.Reproduction guide
SPC-l 2
SPC-l b
)dired
, navigate to some sub directoriesq
Observed behaviour:
Since
dired
is not part of current layout, on quitting the buffer, it shows me the last buffer onspacemacs-layouts
buffer stack instead of global buffer stack.This is making
dired
almost impossible to use, I can only navigate parent directory by pressing^
. Same happens for various Emacs plugins that create buffers with*
in front, they are not added to layouts and their history is not tracked.Expected behaviour:
On existing the current buffer, it must go back to previous buffer I was on.
It must add all the buffer opened in current layout no matter whether it is
dired
,mu4e
or*
in front of it. However, on saving them tofile
it can write exclusively.System Info
Annoying Behavior
![optimised](https://cloud.githubusercontent.com/assets/1386352/12807825/5e8f4698-cae0-11e5-83d3-397537c165b6.gif)
The text was updated successfully, but these errors were encountered: