From 572a6e896a6e94507d3681f6103b388a79b3f65a Mon Sep 17 00:00:00 2001 From: Miguel Escalante Date: Sat, 3 Apr 2021 16:07:40 -0600 Subject: [PATCH 1/3] Fix #34, (although it is closed it is still unfixed. :) --- init.el | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/init.el b/init.el index e5962c6..8e541b3 100644 --- a/init.el +++ b/init.el @@ -221,8 +221,9 @@ ;; Replace list hyphen with dot (font-lock-add-keywords 'org-mode '(("^ *\\([-]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) + (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))) +(with-eval-after-load 'org-faces ;; Set faces for heading levels (dolist (face '((org-level-1 . 1.2) (org-level-2 . 1.1) @@ -232,20 +233,20 @@ (org-level-6 . 1.1) (org-level-7 . 1.1) (org-level-8 . 1.1))) - (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face))) - - ;; Ensure that anything that should be fixed-pitch in Org files appears that way - (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) - (set-face-attribute 'org-table nil :inherit 'fixed-pitch) - (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) - (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) - (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) - (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) - (set-face-attribute 'line-number nil :inherit 'fixed-pitch) - (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) + (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)) + + ;; Ensure that anything that should be fixed-pitch in Org files appears that way + (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) + (set-face-attribute 'org-table nil :inherit 'fixed-pitch) + (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) + (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) + (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) + (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) + (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) + (set-face-attribute 'line-number nil :inherit 'fixed-pitch) + (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))) (defun efs/org-mode-setup () (org-indent-mode) From 80d88589b8130dc316ad3118de9bf0c1ad975286 Mon Sep 17 00:00:00 2001 From: Miguel Escalante Date: Sun, 4 Apr 2021 12:07:58 -0500 Subject: [PATCH 2/3] Add the change to the org File --- Emacs.org | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Emacs.org b/Emacs.org index 0f27905..f87b651 100644 --- a/Emacs.org +++ b/Emacs.org @@ -378,8 +378,9 @@ The =efs/org-font-setup= function configures various text faces to tweak the siz ;; Replace list hyphen with dot (font-lock-add-keywords 'org-mode '(("^ *\\([-]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) + (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))) +(with-eval-after-load 'org-faces ;; Set faces for heading levels (dolist (face '((org-level-1 . 1.2) (org-level-2 . 1.1) @@ -389,7 +390,7 @@ The =efs/org-font-setup= function configures various text faces to tweak the siz (org-level-6 . 1.1) (org-level-7 . 1.1) (org-level-8 . 1.1))) - (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face))) + (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)) ;; Ensure that anything that should be fixed-pitch in Org files appears that way (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) @@ -402,7 +403,7 @@ The =efs/org-font-setup= function configures various text faces to tweak the siz (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) (set-face-attribute 'line-number nil :inherit 'fixed-pitch) - (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) + (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))) #+end_src From e398907fcc227a6e6d2c0ea4c96831b16151a1fc Mon Sep 17 00:00:00 2001 From: Miguel Escalante Date: Sun, 4 Apr 2021 12:11:23 -0500 Subject: [PATCH 3/3] init.el After the trangle . --- init.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/init.el b/init.el index 8e541b3..5620dc9 100644 --- a/init.el +++ b/init.el @@ -218,22 +218,22 @@ "ts" '(hydra-text-scale/body :which-key "scale text")) (defun efs/org-font-setup () - ;; Replace list hyphen with dot - (font-lock-add-keywords 'org-mode - '(("^ *\\([-]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))) + ;; Replace list hyphen with dot + (font-lock-add-keywords 'org-mode + '(("^ *\\([-]\\) " + (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))) (with-eval-after-load 'org-faces - ;; Set faces for heading levels - (dolist (face '((org-level-1 . 1.2) - (org-level-2 . 1.1) - (org-level-3 . 1.05) - (org-level-4 . 1.0) - (org-level-5 . 1.1) - (org-level-6 . 1.1) - (org-level-7 . 1.1) - (org-level-8 . 1.1))) - (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)) + ;; Set faces for heading levels + (dolist (face '((org-level-1 . 1.2) + (org-level-2 . 1.1) + (org-level-3 . 1.05) + (org-level-4 . 1.0) + (org-level-5 . 1.1) + (org-level-6 . 1.1) + (org-level-7 . 1.1) + (org-level-8 . 1.1))) + (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)) ;; Ensure that anything that should be fixed-pitch in Org files appears that way (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)