My workflow is:

  • I initialize emacs with a shortcut (in my ~/.i3/config I have a line like this bindcode $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

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

  • You might want to set ido-default-buffer-method to 'selected-window, which you can do with (setq ido-default-buffer-method 'selected-window) in your init file.
    – user12563
    Jun 20, 2019 at 17:53
  • @DoMiNeLa10, I used an .emacs only with (ido-mode 1) and (setq ido-default-buffer-method 'selected-window) but it switched frame :(
    – bladem
    Jun 21, 2019 at 0:18

1 Answer 1



(setq ido-default-file-method 'selected-window)

not working

(setq ido-default-buffer-method 'selected-window)

thanks to this link, but they point to the wrong solution

works in selfcompiled [1] GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-10-20


sudo apt build-dep emacs
git clone git://git.sv.gnu.org/emacs.git
cd emacs
git checkout emacs-26.3
./autogen.sh all
make clean
sudo make install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.