0

I know that it is possible to change the face used to display markup (bold, italic, etc.) in org-mode, just as explained here.

However, I would like to know if it is possible to have this kind of settings activated for just one particular buffer, instead of having it activated for all org-mode buffers. In other words, I'm looking for a per-buffer setting for special text highlight in org-mode.

I'm a language teacher and I have dictionaries in org-mode format; it would be great to have special highlight for the different parts of a word entry based on the org-mode markups. On the other hand, naturally I do have also personal notes in org-mode, and for those notes I want the org-mode markups just the way they are.

Thanks for your help.

  • 1
    Are you perhaps interested in binding org-emphasis-alist on a per-buffer basis? E.g., place (make-variable-buffer-local 'org-emphasis-alist) in your .emacs and then use file-local variable settings: gnu.org/software/emacs/manual/html_node/emacs/… – lawlist Mar 27 '17 at 14:54
  • Yes, it does answer to my question. I would consider it as a proper answer, not just a comment. It makes me wonder that, even if I'm not a programer, one day I should take the courage to read all through the emacs manuals... Thanks for your help. – gabrielpdp1979 Mar 27 '17 at 19:04
1

The variable org-emphasis-alist is global, but can be made buffer-local with (make-variable-buffer-local 'org-emphasis-alist) inside the .emacs file. There are other methods to make variables buffer-local, but the above-mentioned approach seems appropriate in this circumstance.

In terms of setting buffer-local variables on a per-file basis, the manual describes a couple of way to set file variables: https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.