From f1ab04d41c0f4bf261b7e14fa8579d76126eae6a Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 29 Jan 2019 17:54:34 -0500 Subject: [PATCH] Some improvements when running in a terminal --- emacs/init.org | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 6b4ebd1..ce784a4 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -659,6 +659,7 @@ Always show inline images: (general-def 'normal org-mode-map "K" #'org-move-subtree-up) (general-def 'normal org-mode-map "J" #'org-move-subtree-down) (general-def 'normal org-mode-map "" #'org-return) + (general-def 'normal org-mode-map "TAB" #'org-cycle) (general-def org-mode-map "C-c e" #'org-preview-latex-fragment) (general-def "C-c l" #'org-store-link) #+END_SRC @@ -839,19 +840,20 @@ A function to load a font, including overriding any theme settings for org-mode (intern (completing-read "Change face: " (face-list))) (completing-read "Load font: " (font-family-list)) (read-minibuffer "Font height: " "120"))) - (if (not (number-or-marker-p height)) - (error "Height must be a number.") - (if (member font (font-family-list)) - (if (member face (face-list)) - (let ((font-alist - (assq-delete-all face (jdormit/get-font-alist)))) - (progn - (set-face-attribute face nil :family font :height height) - (persist-variable - 'jdormit/font - (cons `(,face (,font ,height)) font-alist)))) - (error "Face %s not found." (symbol-name face))) - (error "Font %s not found." font)))) + (when (display-graphic-p) + (if (not (number-or-marker-p height)) + (error "Height must be a number.") + (if (member font (font-family-list)) + (if (member face (face-list)) + (let ((font-alist + (assq-delete-all face (jdormit/get-font-alist)))) + (progn + (set-face-attribute face nil :family font :height height) + (persist-variable + 'jdormit/font + (cons `(,face (,font ,height)) font-alist)))) + (error "Face %s not found." (symbol-name face))) + (error "Font %s not found." font))))) (defun jdormit/load-persisted-fonts () (let ((fonts (jdormit/get-font-alist)))