I read here that I could colorize the markup in my org-mode
configuration, so I searched, and here I found an example.
The problem is when I append this code, as the answer suggests, to my .emacs
:
(add-to-list 'org-emphasis-alist '("*" (:foreground "red")))
When I restart Emacs, I get this error:
Warning (initialization): An error occurred while loading ‘c:/Users/username/.emacs’:
Symbol's value as variable is void: org-emphasis-alist
To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘--debug-init’ option to view a complete error backtrace.
emacs -Q
(no init file), and then you doM-: (add-to-list 'org-emphasis-alist '("*" (:foreground "red")))
, that is, the same code. If that does what you want then the problem is in the rest of your init file - the part that you appended this code to (and which you don't show).Debugger entered--Lisp error: (void-variable org-emphasis-alist) (member '("*" (:foreground "red")) org-emphasis-alist) (if (member '("*" (:foreground "red")) org-emphasis-alist) org-emphasis-alist (setq org-emphasis-alist (cons '("*" (:foreground "red")) org-emphasis-alist))) eval((if (member '("*" (:foreground "red")) org-emphasis-alist) org-emphasis-alist
(setq org-emphasis-alist (cons '("*" (:foreground "red")) org-emphasis-alist))) nil) eval-expression((add-to-list 'org-emphasis-alist '("*" (:foreground "red"))) nil nil 127) funcall-interactively(eval-expression (add-to-list 'org-emphasis-alist '("*" (:foreground "red"))) nil nil 127) call-interactively(eval-expression nil nil) command-execute(eval-expression)
M-x org-mode
first. Library Org (or whatever library definesorg-emphasis-list
) needs to be loaded before you can refer to that variable.