1

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-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-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-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. – DoMiNeLa10 Jun 20 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 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.