From e06a2e1a1d22bbcfc97c83014c4fbd8c01bcdc7f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 25 Aug 2017 12:49:35 -0700 Subject: [PATCH] [Emacs] Use frames in org-mode when frame-mode enabled --- dotfiles/emacs.d/README.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 32e799ee..c73dfb20 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1164,6 +1164,12 @@ it on by default. Its probably safe to turn it on when in a programming mode. :demand t :config (progn + (defun imalison:maybe-use-frames-for-org (&rest args) + (let ((fn (if frame-mode 'org-switch-to-buffer-other-window + 'switch-to-buffer-other-frame))) + (apply fn args))) + (advice-add 'org-switch-to-buffer-other-window + :override 'imalison:maybe-use-frames-for-org) (add-hook 'frame-mode-hook (lambda () (display-time-mode -1))) (frame-mode +1) (frame-keys-mode +1)))