My workflow is:
- I initialize emacs with a shortcut (in my
~/.i3/config
I have a line like thisbindcode $mod+49 exec emacsclient -c -n -q -a=''
. I use i3wm.org) - By default it goes to
temp.org
, in .emacs is(setq initial-buffer-choice "~/org/temp.org")
, which is useful to do temp notes - But sometimes I want to edit an existing file, I use
C-x C-f
((ido-mode 1)
is enabled in.emacs
), most of them, org files. I have very large (at least for me) org files that are part of my personal documentation. I can open the same file different times, when this happen I would like to have (and initialize) the same buffer in different frames (I see this as a good default behavior), but I never cannot do that, what happens is that switches (reuses) to the frame where the buffer is.- Example of my problem.
- Given: Frame1-temp.org Frame2-thing.org
- Action: in Frame1 I do
C-x C-f thing.org
- Consequence: focus switches from Frame1 to Frame2 (because there is thing.org)
- Result: Frame1-temp.org Frame2-thing.org
- Example of what I would like.
- Given: Frame1-temp.org Frame2-thing.org
- Action: in Frame1 I do
C-x C-f thing.org
- Consequence: Frame1 displays thing.org
- Result: Frame1-thing.org Frame2-thing.org
- Example of my problem.
Applying over and over this workflow I end up with lots of temp.org
emacs frames opened, that I close using a bash alias: alias killtemp='i3-msg [title="^temp.org.*"] kill'
emacs version: GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2019-05-27
ido-default-buffer-method
to'selected-window
, which you can do with(setq ido-default-buffer-method 'selected-window)
in your init file..emacs
only with(ido-mode 1)
and(setq ido-default-buffer-method 'selected-window)
but it switched frame :(