Created
May 14, 2011 03:26
-
-
Save dkruchinin/971888 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun devlib/buffer-major-mode (buf-or-str) | |
"Gets buffer's major mode" | |
(save-excursion (set-buffer buf-or-str) major-mode)) | |
(defun open-main-orgfile () | |
(find-file "~/.orgfiles/gtd.org")) | |
(defun is-org-buffer (buf) | |
(let ((mmode (devlib/buffer-major-mode buf))) | |
(or (eq mmode 'org-mode) | |
(eq mmode 'org-agenda-mode)))) | |
(defun make-org-frame () | |
"Create a dedicated frame for org-mode" | |
(interactive) | |
(make-frame (quote ((name . "ORG") | |
(title . "ORG") | |
(unsplittable . nil) | |
(buffer-predicate . is-org-buffer)))) | |
(select-frame-by-name "ORG") | |
(open-main-orgfile)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment