Prettify org-mode more

This commit is contained in:
2020-03-05 09:12:15 +01:00
parent a75d92b86e
commit 0e600643ae

View File

@@ -371,21 +371,29 @@ All archives should be stored in a single ~.archive~ file per directory.
** Beautify org-mode ** Beautify org-mode
*** Icons for headline indentation *** Icons for headline indentation
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org-bullets (use-package org-bullets
:init (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) :init (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(setq org-bullets-bullet-list '("" "" "" "" "" ""))
#+END_SRC #+END_SRC
*** Replace checkmark with unicode icons *** Replace checkmark with unicode icons
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package pretty-mode (use-package pretty-mode
:init (global-pretty-mode t)) :init (global-pretty-mode t))
(add-hook 'org-mode-hook (lambda () (add-hook 'org-mode-hook
"Beautify Org Checkbox Symbol" (lambda ()
(push '("[ ]" . "") prettify-symbols-alist) "Beautify Org Checkbox Symbol"
(push '("[X]" . "" ) prettify-symbols-alist) (push '("[ ]" . "") prettify-symbols-alist)
(push '("[-]" . "" ) prettify-symbols-alist) (push '("[X]" . "" ) prettify-symbols-alist)
(prettify-symbols-mode))) (push '("[-]" . "" ) prettify-symbols-alist)
(prettify-symbols-mode)))
#+END_SRC
We also want them in exported HTML files
#+BEGIN_SRC emacs-lisp
(setq org-html-checkbox-type 'html)
#+END_SRC #+END_SRC
*** Strike out done ckeckbox items *** Strike out done ckeckbox items
@@ -401,6 +409,13 @@ All archives should be stored in a single ~.archive~ file per directory.
'append) 'append)
#+END_SRC #+END_SRC
*** Replace dash in bullet lists with unicode symbol
#+BEGIN_SRC emacs-lisp
(font-lock-add-keywords 'org-mode
'(("^ *\\([-]\\) "
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))))))
#+END_SRC
** CSS Themes for Exports ** CSS Themes for Exports
When exporting from org-mode (usually to HTML) we want to specify additional styles. When exporting from org-mode (usually to HTML) we want to specify additional styles.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp