5

I'd like to have two emacs frames simultaneously open, with the first frame showing the Info(elisp tutorial) and the second frame showing the Info(elisp manual). After setting the first frame and opening the second frame, when I set the second frame to the Info(elisp manual), the first frame also changes to the Info(elisp manual). Is there an emacs variable that I can set to prevent the first frame from moving away from the Info(elisp tutorial) when the second frame is set to the Info(elisp manual)?

NickD
  • 27,023
  • 3
  • 23
  • 42
zugzwang
  • 319
  • 1
  • 14

2 Answers2

9

It's not enough to just duplicate the frame (e.g. C-x 5 2). You need to clone the Info buffer.

Open Info to the first place, then use M-n to clone the buffer. Then navigate in the new Info window (new buffer) to the second place.

In other words, it should just work, but you need to use M-n to clone the buffer (getting a new, different buffer).


If you don't see this behavior then try again, starting Emacs using emacs -Q (no init file). I you see the right behavior then, then bisect your init file to find the culprit. If you don't see the right behavior even without your init file, then update your question with a step-by-step recipe to repro the problem (starting with emacs -Q).

Drew
  • 75,699
  • 9
  • 109
  • 225
  • 1
    Drew's answer works like a charm. For other readers: C-h f clone-buffer, for details. – zugzwang Sep 13 '18 at 01:54
  • Very interesting. I can't find any reference to this clone-buffer command neither in emacs nor in elisp manual. Have I missed it? – JeanPierre Nov 26 '22 at 08:50
  • @JeanPierre: I believe it's doc'd. But also Emacs menus are your friend for discovery. Menu-bar menu `Info` has menu item `Clone Info buffer`, and that item shows that the key sequence for it is `M-n`. – Drew Nov 26 '22 at 17:36
2

Another way of achieving this is to load the info page that you want and then use M-x rename-buffer to give it a more useful name (say *info-elisp-tutorial*). You can then run info again and repeat the process for the new info page. Having done this you can easily switch between the buffers based on their name.

stevoooo
  • 737
  • 3
  • 8