Hello,

can anybody tell me what is the reason why org-mode has to be restarted when
'org-fontify-emphasized-text' is changed?

If I would like to have an interactive "toggle" to control rendering of
emphasized text, is there any "cheaper" way to achieve that but to restart
org-mode?

#+begin_src emacs-lisp
(defun org-mode-toggle-emphasized-text ()
  (interactive)
  (setq org-fontify-emphasized-text
        (not org-fontify-emphasized-text))
  (org-mode-restart))
#+end_src

I have tried to go through the buffer and reset text properties for org-emphais
text property and to re-fontify buffer but I didn't manage to find any way but
to restart the org-mode. I would like to skip all the work done in
initialization if possible.

Thanks for help

Reply via email to