15

In Emacs, one can use asterisks * to achieve bold font, for example, *bold*. My question is can I make the asterisks invisible? i.e. bold instead of *bold*. Same question for strike through, italics, etc.

I know this should be achievable. As an example, one can set the org-indent asterisks the same color of the background, so it becomes invisible:

* Headline one
** Headline two

vs.

* Headline one
 * Headline two

You can still move the caret over to see the asterisks there, which is nice.

Back to my question, I don't know if or how to do the same thing for the markups in text formatting.

Alex
  • 415
  • 5
  • 12
  • 1
    The question is not clear. If this is about a particular mode (e.g. Org mode? some markup mode?) then please elaborate. You refer to "*the markups*", without any explanation of what you mean. In Emacs in general there is *no markup* and you *cannot* use`*bold*` to achieve **`*bold*`**. – Drew Aug 06 '15 at 18:42
  • 1
    The ole asterisk vs asteroid confusion, Luke. – Emacs User Aug 06 '15 at 18:45
  • @Alex I am assuming that you were referring to org-mode in this question and editted it accordingly. Without that as Drew mentioned, this question is unclear. Feel free to revert my edits and clarify the question as suitable. – Kaushal Modi Aug 06 '15 at 20:38
  • Hi folks, thanks for replying. I've edited my post, hopefully it's clearer. My question is in the first paragraph. All the rest is just an example of what inspired the question. Thanks all! – Alex Aug 07 '15 at 21:32

1 Answers1

21

If your question is specifically about org-mode and its emphasis markup: try customizing org-hide-emphasis-markers. You can set that to t to hide the markers around words in bold, italics, etc.

glucas
  • 20,175
  • 1
  • 51
  • 83
  • Actually this answers my question. Just curious, how does it work behind the scene? For example, if I just want to set the font color of the markers, where do I edit? – Alex Aug 07 '15 at 21:37
  • 1
    @Alex You can customize `org-emphasis-alist` to specify the faces you want to use for the various kinds of markup. – glucas Sep 20 '17 at 16:37
  • `org-hide-emphasis-markers` [no match] – jaromrax Feb 25 '21 at 09:35
  • Sorry: `M-x customize-variable` and `org-hide-emphasis-markers` – jaromrax Feb 25 '21 at 09:43