Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable certain org mode markup

I want to be able to disable strikethrough happening when I type + in an org-mode document. Specifically it is for entries in a table. Is there an easy way of doing this for a specific org-mode document since I only want to disable it for one document in particular. If not a way to toggle this would be nice.

I know I can have a literal + symbol with \plus but I would like to be able to see it in the document rather than reading the \plus.

like image 257
Jesus Ramos Avatar asked Dec 20 '22 16:12

Jesus Ramos


1 Answers

To disable strikethrough in a specific file, add the following to your file:

-*- org-emphasis-alist: (("*" bold) ("/" italic) ("_" underline) ("=" org-verbatim verbatim) ("~" org-code verbatim) ("+" (:strike-through nil))); -*-

The down-side is that it will complain that the file may contain values that are not safe (see here). You can also use the longer version at the bottom of your file, as mentioned here.

To do it for all your org files is a simpler, and will not ask questions:

(setq org-emphasis-alist (quote (("*" bold "<b>" "</b>")
                                 ("/" italic "<i>" "</i>")
                                 ("_" underline "<span style=\"text-decoration:underline;\">" "</span>")
                                 ("=" org-code "<code>" "</code>" verbatim)
                                 ("~" org-verbatim "<code>" "</code>" verbatim))))

Sources: Bernt Hansen's org-mode notes(a must-read) and the org manual

like image 195
Alexander Poslavsky Avatar answered Dec 27 '22 12:12

Alexander Poslavsky