Re: Would it be possible to color horizontal lines in org mode?

2021-09-30 Thread John Kitchin
This looks correct. Some people prefer to use named functions for this, so it is easier to remove them, but this works fine. Alper Alimoglu writes: > Thank you Professor Kitchin. Would something like follows would work? > #+BEGIN_SRC emacs-lisp :results silent > (add-hook 'org-mode-hook (lambda

Re: Would it be possible to color horizontal lines in org mode?

2021-09-29 Thread Alper Alimoglu
Thank you Professor Kitchin. Would something like follows would work? #+BEGIN_SRC emacs-lisp :results silent (add-hook 'org-mode-hook (lambda () (font-lock-add-keywords nil '(("^-\\{5,\\}" 0 '(:foreground "red" :weight

Re: Would it be possible to color horizontal lines in org mode?

2021-09-28 Thread John Kitchin
you can add a rule like this in an org-mode hook: #+BEGIN_SRC emacs-lisp :results silent (font-lock-add-keywords nil '(("^-\\{5,\\}" 0 '(:foreground "red" :weight bold #+END_SRC that will make a line starting with at least 5 - be red and bold in color. John

Re: Would it be possible to color horizontal lines in org mode?

2021-09-28 Thread Eric S Fraga
You could use hi-lock-mode to define your own colouring for such lines. But I'm sure those that under font-locking better might be able to add appropriate rules for this horizontal line construct. -- : Eric S Fraga via Emacs 28.0.50, Org 9.5-g9a4a24 : Latest paper written in org:

Would it be possible to color horizontal lines in org mode?

2021-09-27 Thread Alper Alimoglu
In markdown mode when I enter `---` (3 dash lines or more), the horizontal line becomes green. Would it be possible to obtain the same behavior in `org-mode` where horizontal lines become colorful? --- https://orgmode.org/manual/Horizontal-Rules.html > 12.9 Horizontal Rules: > A line