Well, this works!
Thank you all!
(defun user-custom-keywords ()
;; M-x list-faces-display
(let ((user-custom-keywords
'((":next:" . 'org-habit-clear-face)
(":wait:" . 'org-habit-alert-face)
(":failed:" . 'org-habit-overdue-face)
Thank you Ihor,
It does work... too good now :-)
all the other faces are gone
Well, OK...
I will check that an other time.
Thank you all for your replies !
PHF
‐‐‐ Original Message ‐‐‐
On Friday, September 25, 2020 10:13 AM, Ihor Radchenko
wrote:
> > As suggested by Ihor, I tried:
Sorry, misplaced the argument. 'append should be the last argument to
font-lock-add-keywords:
(font-lock-add-keywords 'org-mode
'(("\\W\\(:next:\\)\\W" 1 font-lock-warning-face prepend)) 'append)
Ihor Radchenko writes:
>> As suggested by Ihor, I tried:
>>
>> (font-lock-add-keywords 'org-mo
> As suggested by Ihor, I tried:
>
> (font-lock-add-keywords 'org-mode
> '(("\\W\\(:next:\\)\\W" 1 font-lock-warning-face prepend)))
You need to fontify it _after_ all other org-mode font settings:
(font-lock-add-keywords 'org-mode
'(("\\W\\(:next:\\)\\W" 1 font-lock-warning-face prepend) 'ap
Please disregard my response. I misunderstood both your intention and
the use of font-lock keywords. Sorry for the noise. :-(
Yours,
Christian
Pierre-Henry F. writes:
> Thank you very much for your replies.
>
> Here is the use case:
>
> |---+|
> | something | :next: |
> |--
One alternative, that I use for specific org files, is
~hi-lock-mode~. Based on regular expressions, you can highlight any
bits you want without affecting the underlying org font lock settings.
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-29-gbc9664
Thank you very much for your replies.
Here is the use case:
|---+|
| something | :next: |
|---+|
I would like :next: to show up using an arbitrary face.
As suggested by Ihor, I tried:
(font-lock-add-keywords 'org-mode
'(("\\W\\(:next:\\)\\W" 1 font-lock-warni
> (add-to-list 'org-font-lock-extra-keywords
It is internal variable. You should not use it.
Simply use font-lock-add-keywords instead.
Best,
Ihor
"Pierre-Henry F." writes:
> Hello,
>
> I would like to extend the org-mode markup.
>
> For example, I would like to change the face of a keyword,
Hello,
In your example, `:next:' is a tag. Tags and keywords are different
entities.
https://orgmode.org/worg/dev/org-syntax.html
You should be able to do what you want by customizing `org-tag-faces'.
Yours,
Christian
Pierre-Henry F. writes:
> Hello,
>
> I would like to extend the org-mode
Hello,
I would like to extend the org-mode markup.
For example, I would like to change the face of a keyword, say: :next: .
Whenever :next: is displayed from an org-mode buffer, it should show up in
using an arbitrary face.
I tried this:
(defun org-add-my-extra-markup ()
(add-to-list 'org-fon
10 matches
Mail list logo