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: l@tlo
Subject: Re: [emacs-humanities] highlighting parts of the org file
Date: Sat, 17 Jun 2023 08:29:29 +0900


> On Jun 13, 2023, at 8:49, Edgar Vincent <e-v@posteo.net> wrote:
> 
> "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


Edgar,

I looked for documentation about hi-red-b but could not find anything.

It looks like it produces a bold red highlighting, but counterintuitively 
hi-red puts everything in a yellow background...

-- 
Jean-Christophe Helary @jchelary@emacs.ch
https://traductaire-libre.org
https://mac4translators.blogspot.com
https://sr.ht/~brandelune/omegat-as-a-book/




reply via email to

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