From 6ddd2f6c9590df77957f5f82ce3f075503a0993f Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Fri, 25 Mar 2022 11:11:15 -0700 Subject: [PATCH] Making org files look pretty without the notebook Still having trouble getting the notebook working, but at this point, I really just want Org to look cooler. :-D --- ha-org-word-processor.org | 29 ++++++++++++++++++++++------- ha-org.org | 11 ++++++----- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ha-org-word-processor.org b/ha-org-word-processor.org index e819866..6ca5912 100644 --- a/ha-org-word-processor.org +++ b/ha-org-word-processor.org @@ -227,7 +227,7 @@ While I'm intrigued with [[https://github.com/rougier][Nicolas P. Rougier]]'s [[ :straight (:type git :protocol ssh :host github :repo "rougier/svg-lib")) (use-package svg-tag-mode - :straight (:type git :protocol ssh :host github :repo "rougier/svg-tag-mode") + :straight (:type git :protocol ssh :host github :repo "howardabrams/svg-tag-mode") :config (setq svg-tag-tags '(("TODO:" . ((lambda (tag) (svg-tag-make "TODO" :face 'org-todo @@ -235,15 +235,29 @@ While I'm intrigued with [[https://github.com/rougier][Nicolas P. Rougier]]'s [[ :margin 0 :padding 0 :height 0.8)))) ("NOTE:" . ((lambda (tag) (svg-tag-make "NOTE" :face 'org-done :inverse nil :margin 0 :radius 2 :height 0.8)))) - ; The notebook-mode overrides this: - ; ("#\\+RESULTS:" . ((lambda (tag) (svg-tag-make tag :beg 0 :end -1 :height 0.6)))) ("\\(:[A-Z-]+\\):[a-zA-Z#0-9]+:" . ((lambda (tag) (svg-tag-make tag :beg 1 :inverse t :margin 0 :crop-right t)))) (":[A-Z-]+\\(:[a-zA-Z#0-9]+:\\)" . ((lambda (tag) (svg-tag-make tag :beg 1 :end -1 :margin 0 :crop-left t)))) - ("\\(:[A-Z-]+:\\)[ \n]" . ((lambda (tag) (svg-tag-make tag :beg 1 :end -1 :margin 0)))))) + ("\\(:[A-Z-]+:\\)[ \n]" . ((lambda (tag) (svg-tag-make tag :beg 1 :end -1 :margin 0)))) + + ; The notebook-mode overrides these: + ("#\\+BEGIN_SRC [a-zA-Z#0-9-]+" . ((lambda (tag) + (svg-tag-make "SRC" :face 'org-block-begin-line + :height 0.6 + :inverse t :margin 0 :crop-right t)))) + ("#\\+BEGIN_SRC \\([a-zA-Z#0-9-]+\\)" . ((lambda (tag) + (svg-tag-make tag :face 'org-block-begin-line + :height 0.6 + :margin 0 :crop-left t)))) + ("#\\+END_SRC" . ((lambda (tag) + (svg-tag-make "SRC" :face 'org-block-end-line + :height 0.6 + :beg 0 :inverse t :margin 0)))) + ("\\(#\\+[a-zA-Z#0-9-_]+:\\)" . ((lambda (tag) (svg-tag-make tag :face 'org-document-info-keyword + :beg 2 :end -1 :height 0.6)))))) (global-svg-tag-mode 1)) #+END_SRC @@ -252,8 +266,9 @@ What does do? Here are some examples: - NOTE: Highlights comments and other notes. - :PROP:tag: are highlighted as two parts of the same tag - And :TAG: with colons are highlighted, which include :PROPERTY: drawers. + - Org-specific #+PROPERTY: entries are highlighted. -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (use-package notebook :straight (:type git :protocol ssh :host github :repo "rougier/notebook") :after org @@ -268,8 +283,8 @@ The [[https://github.com/TonCherAmi/org-padding][org-padding]] project looks pla :hook (org-mode . org-padding-mode) :config - (setq org-padding-block-begin-line-padding '(0.5 . 0.3) - org-padding-block-end-line-padding '(0.1 . 0.5) + (setq ;; org-padding-block-begin-line-padding '(0.5 . 0.3) + ;; org-padding-block-end-line-padding '(0.1 . 0.5) org-padding-heading-padding-alist '((4.0 . 1.5) (3.0 . 0.5) (3.0 . 0.5) (3.0 . 0.5) (2.5 . 0.5) (2.0 . 0.5) (1.5 . 0.5) (0.5 . 0.5)))) #+END_SRC diff --git a/ha-org.org b/ha-org.org index 7bc3b85..c2c7109 100644 --- a/ha-org.org +++ b/ha-org.org @@ -592,12 +592,13 @@ With overlapping goals to =write-good=, the [[https://github.com/amperser/prosel Next, create a configuration file, =~/.config/proselint/config= file, to turn on/off checks: #+BEGIN_SRC js :tangle ~/.config/proselint/config.json :mkdirp yes -{ - "checks": { - "typography.diacritical_marks": false, - "consistency.spacing": false + { + "checks": { + "typography.diacritical_marks": false, + "annotations.misc": false, + "consistency.spacing": false + } } -} #+END_SRC And tell [[https://www.flycheck.org/][flycheck]] to use this: