emacs-humanities
[Top][All Lists]
Advanced

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

Re: [emacs-humanities] highlighting parts of the org file


From: Edgar Vincent
Subject: Re: [emacs-humanities] highlighting parts of the org file
Date: Mon, 12 Jun 2023 23:49:31 +0000

"l@tlo" <lists@traduction-libre.org> writes:

>> On Jun 12, 2023, at 4:17, Marcin Borkowski <mbork@mbork.pl> wrote:
>> 
>> 
>> On 2023-06-10, at 04:30, l@tlo <lists@traduction-libre.org> wrote:
>> 
>>> I my org document, I add stuff like:
>>> 
>>> @référence
>>> 
>>> → to remind myself that I need to add a proper reference to what I wrote
>>> 
>>> or
>>> 
>>> @(ne pas oublier ce machin)
>>> 
>>> → Not to forget to add something about that "machin".
>>> 
>>> And I'd like to have that highlighted in my org file, like headers are, for 
>>> ex.
>>> 
>>> How do I do that?
>> 
>> Try M-s h C-h and see if anything there is useful for you.
>
> Interesting. Thank you. But it's not "permanent" marks, is it ?

Hi Jean-Christophe,

Perhaps you could try something like this to make the highlighting permanent?

┌────
│ ;; Alist of the form '((REGEXP . FACE) ...)
│ (setq ev/hi-lock-permanent-keywords
│       '(("@(.+)" . hi-red-b)))
│ 
│ (defun ev/hi-lock-permanent-highlight ()
│   (hi-lock-mode 1)
│   (mapc (lambda (r)
│           (highlight-regexp (car r) (cdr r)))
│         ev/hi-lock-permanent-keywords))
│ 
│ (add-hook 'org-mode-hook 'ev/hi-lock-permanent-highlight)
└────

Edgar


reply via email to

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