4
votes

My emacs's org-mode displays menu in the new frame(for instance TODO menu with options that raises after pressing C-c C-t). The same thing with opening pdf files (it opens them in new frame as well).

How can I tell emacs to open them in the same frame as a new buffer ?

1
C-c C-t runs the command org-todo, what menu does that open ? How do you open pdf files, C-c C-o on links, I guess ? Are these all you'd like to open in the same frame ?Nikana Reklawyks

1 Answers

3
votes

For opening files, you can customize the org-link-frame-setup variable. It's help (C-h v) goes :

org-link-frame-setup is a variable defined in `org.el'.

Setup the frame configuration for following links. When following a link with Emacs, it may often be useful to display this link in another window or frame. This variable can be used to set this up for the different types of links.

For FILE, use any of
find-file
find-file-other-window
find-file-other-frame

So the following in your .emacs file should do (it keeps the default values for everything else, but anyone knowledgeable at elisp is welcome to improve this code) :

(setq org-link-frame-setup (quote ((vm . vm-visit-folder-other-frame)
               (vm-imap . vm-visit-imap-folder-other-frame)
               (gnus . org-gnus-no-new-news)
               (file . find-file)
               (wl . wl-other-frame)))
  )