I've seen the https://www.emacswiki.org/emacs/buffer-move.el script, but I'm trying to something a bit different. Suppose I have a frame with a buffer from file A.h in it and A.cpp in another frame somewhere else. If I currently have A.h selected and try to open A.cpp from it (using either C-x C-f or projectile open), I would want the frames containing A.h and A.cpp to simply swap buffers with each other. Is there a library or something that already does this? I'm trying to do it myself based on buffer-move.el, but I can't find any of the hooks I need or the ability to search for a frame containing a buffer with a specific name.
Asked
Active
Viewed 105 times
1
iHowell
- 111
- 2
1 Answers
0
Do you really need the buffers to swap frames? Or would it be enough to just select (move the focus to) the frame of the buffer you want to use?
For that, just C-x 4 b if pop-up-frames is non-nil, or C-x 5 b if it is nil.
Drew
- 77,472
- 10
- 114
- 243
frame-bufsthat associate buffers with frames. There is an option to associate or disassociate, or at least there is in my modified version. I have never played with the swapper-oo idea -- instead, I just associate or disassociate whatever buffers I need. I also have adisplay-buffer-alistfunction that associates certain file types with specified frames. I've taken it one step further and tied it in with a modified version of tabbar ... associating. – lawlist Jun 12 '19 at 05:13move-bufferis that I need to select the frame with arrow keys (or movement keys if I redo the keybindings), which isn't as fast for me as just opening a file or switching the buffer. – iHowell Jun 13 '19 at 14:52ace-windowcan swap buffers in windows within the same frame or in different frames -- "How to swap buffers between two frames?": https://emacs.stackexchange.com/questions/38505/how-to-swap-buffers-between-two-frames – lawlist Jun 13 '19 at 16:02