Am 07.07.25 um 13:55 schrieb Christian Moe:
Andreas Röhler <andreas.roeh...@easy-emacs.de> writes:
With plain .org file and something like
* /home/MyName/.something
the first two words get slanted
Is there a way to avoid that?
Various ways, but you may not like the side effects. This is what I can
think of; others may have better ideas:
- Make it a link (looks different, makes it a slightly harder to
copy/paste, but you may not need to anymore)
: * [[/home/MyName/.something]]
: * file:/home/MyName/.something
- Make it verbatim with tilde or equals characters (looks different,
makes it a bit harder to copy/paste)
: * ~/home/MyName/.something~
: * =/home/MyName/.something=
- Insert an invisible character, e.g. ZERO WIDTH JOINER, between slash
and dot (will look right and print like normal text, but probably
won't work right if you copy/paste it into a terminal, and then you
have to remember you put in an invisible character and try to find it)
- Change the way Org parses emphasis characters to omit "." as a border
character. There are good reasons why this cannot be done with
customize anymore, so you probably shouldn't, and I haven't tested the
following hack extensively. But it seems to work, and run in a buffer,
it should change the parsing for that buffer only, for the current
session only. To change it everywhere, omit the
=make-variable-buffer-local= lines.
#+begin_src elisp
(make-variable-buffer-local 'org-emphasis-regexp-components)
(make-variable-buffer-local 'org-emph-re)
(setf (cadr org-emphasis-regexp-components) "-[:space:],:!?;'\")}\\[")
(org-set-emph-re 'org-emphasis-alist org-emphasis-alist)
#+end_src
Regards,
Christian
Thanks!
Now in my init-file:
(setq org-emphasis-regexp-components
'("" 1))
It also solved a couple of other issues, as
evens ++ odds # List(2, 4, 6, 1, 3, 5)
is displayed now nicely in plain org-mode.
Best,
Andreas