emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What would be "cheapest" way to toggle emphasized text?


From: Arthur Miller
Subject: What would be "cheapest" way to toggle emphasized text?
Date: Tue, 25 Jan 2022 07:26:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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

[Prev in Thread] Current Thread [Next in Thread]