Nicolas Goaziou <[email protected]> writes:
> Hello,
>
> Alan Schmitt <[email protected]> writes:
>
>> Thank you for the suggestion. How can I do that? Add an "(org-reload)"
>> in my async init file? Is there a more efficient way than loading org,
>> setting the variable, and immediately reloading org again?
>
> You can set the variable before loading Org for the first time.
I just tried it and I get the following error at start-up time:
> Warning (initialization): An error occurred while loading
> `/Users/schmitta/.emacs.d/init.el':
>
> Symbol's value as variable is void: org-emphasis-regexp-components
My init.el is quite short (as most of my configuration is in an org
file).
--8<---------------cut here---------------start------------->8---
;; Turn off mouse interface early in startup to avoid momentary display
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
;; remember this directory
(setq emacsd-dir
(file-name-directory (or load-file-name (buffer-file-name))))
;; set this up before loading org
(setcar (nthcdr 2 org-emphasis-regexp-components) " \t\n,")
;; org-setup
(add-to-list 'load-path (concat emacsd-dir "org/emacs/site-lisp/org"))
(require 'org)
;; Then tangle and load the file
(org-babel-load-file (expand-file-name "myconfig.org" emacsd-dir))
--8<---------------cut here---------------end--------------->8---
I assume the problem is that I want to change only one field of
`org-emphasis-regexp-components' but it's not possible to do so because
it's not defined before org is loaded.
I guess one way to proceed is to split up
`org-emphasis-regexp-components' into its four components, to be able to
change only the one I need. Would such a patch be accepted?
Thanks,
Alan