From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qOS7NLZkVGG/cAAAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 15:05:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YJdQMLZkVGHPFQAAbx9fmQ (envelope-from ) for ; Wed, 29 Sep 2021 13:05:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 399AF26E9E for ; Wed, 29 Sep 2021 15:05:58 +0200 (CEST) Received: from localhost ([::1]:55944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVZHZ-0003nO-7n for larch@yhetil.org; Wed, 29 Sep 2021 09:05:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVYbw-0000Sn-0d for emacs-orgmode@gnu.org; Wed, 29 Sep 2021 08:22:56 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:34334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVYbs-0007Td-CT for emacs-orgmode@gnu.org; Wed, 29 Sep 2021 08:22:55 -0400 Received: by mail-ed1-x534.google.com with SMTP id g7so7998882edv.1 for ; Wed, 29 Sep 2021 05:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KZhS0POR1Pk00r53sFr2F9J1nkICsGEEjCG7cnp/xsU=; b=XBqRQZAB/l7cin2RC+IlvG9+aaq4spj8bwf1S8PNrpZQ8AVe8JK7+TdrkAfGxiEjY2 Wjb9m2ZLcpEcE08Q1Rjp9pVedJ2LFQGf0+SCelWE0kDnSsDEhg3wgTHxDouzOahg9Ipm L+OzrcCIkH60nbobaD9rjwJGdwSecE2bl452cIfAlK2F91qCShZd0ieNWsaq+fEol5/b l21QilJhuMBOiyjbW/Ic9vyrakagD/tlxkddN3vxKcBfUxpTv3mKsgvzIdz+QpWE5HHB 8QnRCq8ivX11uMKKegrJsNnwUFZvVBCjjicxQYbN4fTnI8oxGMCGTc3CDDzps1BSFV7Z ZoFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KZhS0POR1Pk00r53sFr2F9J1nkICsGEEjCG7cnp/xsU=; b=GKTvk+m+pDFQzAs7PUkDcsZXJ3cbRzG/pWRZf5Q3vttPYOjwzufo+463heLr2KzzoA Ea2qd9yiTwWbdQH7mDULaeHwZfuZjV27wWq0ktzBNoP23n3zLmJ3G74kNPfHJNbaGHOP 7o3BX9cST/7crYO/hvAjpaRM3JUFaG5rVH9MPE6O6C2lZhC/xdIk1ImbAzvPme3j3iiJ qnItoD3Xhw4npFmI1WRep/f1y0WrJvHm8XXHFKPnwVARTO69P7lEwwUEd2bYvqWRroYC vaIvW7kYND92zulec+FHjSj1WDxQI4kEHVgvIipPQAgv3oVOlWTT8wrOqcbPy97Xw+st RUSg== X-Gm-Message-State: AOAM533qVmq2G/nwj2LnvCiNh8Do9DDRT8gyFy2c1we8uH9P3xuBIC62 EXTfb2COuH2/Kolm5VK6zTVb0uXenytb3HdqcNDheUUCjTg= X-Google-Smtp-Source: ABdhPJzaw8AFnj/Ifnz8Vl3UfpcUksguXLs6YjY6QEahSmbVUHlhWoZxsU1QPpgJu6x5+TmNLEMwDKk6gVctb4o8tN8= X-Received: by 2002:a17:906:3395:: with SMTP id v21mr13941519eja.210.1632918170084; Wed, 29 Sep 2021 05:22:50 -0700 (PDT) MIME-Version: 1.0 References: <87h7e5dtbb.fsf@ucl.ac.uk> In-Reply-To: From: Alper Alimoglu Date: Wed, 29 Sep 2021 15:22:13 +0300 Message-ID: Subject: Re: Would it be possible to color horizontal lines in org mode? To: John Kitchin , emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000079a6fb05cd21633b" Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alper.alimoglu@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 29 Sep 2021 09:02:05 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632920758; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KZhS0POR1Pk00r53sFr2F9J1nkICsGEEjCG7cnp/xsU=; b=Euv92K0kcbtv1BPt3PFWgiV2gj64yGUzdMNDljcbBHhbDdGfHza+e0Xxwvy1i4hTRh02qg EhOBGGY0LJQnyACgfSTNDVGdJZTstwYdn+UdkYnqrNJIXVGJ7BYYUlLVBW0Px22oeY/l9k l84nnyYXFVPQRZjBuvbOTdTYHrP8bgQU6oR/DC6NylX9lxgoMfLIHZER7OYIWNNJv2j2kM mqTo+wrrHg0ZL0NRYj3j+E6xJivpFJRncud83gyyv8rKj6tWKzAC1aQQU3mjtjdthGCOe3 0ZGggW9EgDfmrjpG3uitSmDhuyweceL7d/1M4Uxx4ANgW3mHLvXRe7/yMv37pg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632920758; a=rsa-sha256; cv=none; b=uL96/UZTWiQw/wAaC8PIn8a6s93XoRfW8NODpvnDaS7WM5AM936qzoF8mx5DgM7ZWzqNmm gaoBJ/Gp7ARXXZ1tPkl7+96lydG9Cx8DzFdBoDqSa9F6zg3O1apKRll4KI4GoUttmRW76m KEFZv9y5oAPtBcbdTJLq/5EH0Nm1QztHxoFrrN4z7jM0OK5v8VlCUPKmS93zQispeSn/0V dQshUTSx2gQillqPgpIAFyOvXobzQfbARMnz8fIZeAWIo/reDT36xgWdlEcxht71wpxwas JdOK895SdFm5ogVJF8sOj9F1sdlU3nTMHQy2G0CzFnv7ncKI7Xk831CGsYDOXQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XBqRQZAB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XBqRQZAB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 399AF26E9E X-Spam-Score: -2.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: s0i2PVmWUpIp --00000000000079a6fb05cd21633b Content-Type: text/plain; charset="UTF-8" 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 bold)))))) #+END_SRC -Alper On Tue, Sep 28, 2021 at 8:18 PM John Kitchin wrote: > 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 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 >> >> --00000000000079a6fb05cd21633b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you Professor Kitchin. Would = something like follows would work?
#+BEGIN_SRC= emacs-lisp :results silent
(add-hoo= k 'org-mode-hook (lambda () (font-lock-add-keywords
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'(("^-\\{5,\\}" =C2=A00= '(:foreground "red" :weight bold))))))
#+END_SRC

=
=
-Alper

=


On Tue, Sep 28, 2021 at 8:18 PM John Kitc= hin <jkitchin@andrew.cmu.edu<= /a>> wrote:
<= div dir=3D"ltr">you can add a rule like this in an org-mode hook:
On Tue, Sep 28, 2021 at 4:00 AM = Eric S Fraga <e.f= raga@ucl.ac.uk> wrote:
You could use hi-lock-mode to define your own colouring for s= uch
lines.=C2=A0 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<= br>
--00000000000079a6fb05cd21633b--