all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Org Mode List <emacs-orgmode@gnu.org>
Cc: Alper Alimoglu <alper.alimoglu@gmail.com>
Subject: Re: Would it be possible to color horizontal lines in org mode?
Date: Tue, 28 Sep 2021 13:17:51 -0400	[thread overview]
Message-ID: <CAJ51ETrJXBNovcPY9TuR_Y6yvNfrHWN4nKvhe1wOcSpcqqg6Cg@mail.gmail.com> (raw)
In-Reply-To: <87h7e5dtbb.fsf@ucl.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

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

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Tue, Sep 28, 2021 at 4:00 AM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> 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: https://arxiv.org/abs/2106.05096
>
>

[-- Attachment #2: Type: text/html, Size: 1678 bytes --]

  reply	other threads:[~2021-09-28 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 18:49 Would it be possible to color horizontal lines in org mode? Alper Alimoglu
2021-09-28  7:59 ` Eric S Fraga
2021-09-28 17:17   ` John Kitchin [this message]
2021-09-29 12:22     ` Alper Alimoglu
2021-09-30 19:14       ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ51ETrJXBNovcPY9TuR_Y6yvNfrHWN4nKvhe1wOcSpcqqg6Cg@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=alper.alimoglu@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.