From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sIblJNpOU2GoWAEAgWs5BA (envelope-from ) for ; Tue, 28 Sep 2021 19:20:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mk9jINpOU2HjYgAAbx9fmQ (envelope-from ) for ; Tue, 28 Sep 2021 17:20:26 +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 BF65E37F4D for ; Tue, 28 Sep 2021 19:20:25 +0200 (CEST) Received: from localhost ([::1]:51778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVGmG-0006Px-UR for larch@yhetil.org; Tue, 28 Sep 2021 13:20:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVGk6-0004sO-4O for emacs-orgmode@gnu.org; Tue, 28 Sep 2021 13:18:10 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:33641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVGk2-0007fP-E1 for emacs-orgmode@gnu.org; Tue, 28 Sep 2021 13:18:09 -0400 Received: by mail-wr1-x432.google.com with SMTP id t18so59366637wrb.0 for ; Tue, 28 Sep 2021 10:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JV++EjuZItQOMHp18ccFrB9oQsGTcq4sEqUJsYRdRH0=; b=cWHWc4z2USVgqnYOkA66Y7Ys6Iqfq66bduHcegX/FcK+90B6yXPv174S30nG/1378A TAAYj349yDYRbF06Wm4PK4o5tZNZ85dwQw8gFGzpTkHZCLIvDSifjOdNY1rSH0FzRHlh hSEjtpTE28fy1b7eId3iIhTbd+VAtB8ucSnAygkrDHqQ2kL45gtiG7xPuvAg8BTsZN19 KhU6gw+un23grOxDd2sK6psGOMZKPdkapLfWRlNHtm/vFiewhFkGEaf8C7LvgMVzO9a2 LTXQBNA8KJCDoMVxmG+5Wc+ydkueKwCntOLb7KHXvPVQ3u6OTQhns629Ua81hcBoA6RH XsAg== 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:cc; bh=JV++EjuZItQOMHp18ccFrB9oQsGTcq4sEqUJsYRdRH0=; b=sZZYYr028BjpVNGhK90JJwgYASQJr8WmhhwhB12J2/lhrKfxf33HBjrailyL7fuuZq JGoUOCx0/yRcOTXWcovMaowCnl7iHX8/kHITul68rt3LcuadEbftYlsadIc6gT5/aw9Q oYPUIW+2xZQvwYm6473PJzR/EuBTGsbnrSOFS4h7ac2KtVVsbc0G1ZecZB5MKM21xog/ fsBMp65Wiu4D8Y+QS3bm71gtpz7+uTqwVJgXTjqodv0MVS3G9ELnJlS96Kc85mKCf68Q eJqgSHHP5QXjsHKPCKnT0YTDSgfbE64gQMDnPtEqufcKwmrukh1OquhFZKHYGFuC106i jt/A== X-Gm-Message-State: AOAM5304uppFMaJ7bgvQULFRagNtclNhD4T4N+wSarmKG55mlfgOzgxe LIS9IznpwLVxPrKH6gSQJOkpzov7NpMg7b3FpWmklAHsBXk= X-Google-Smtp-Source: ABdhPJxft9h0S2RDn8I67hR0Tc5qE3+qtsu3SPi1LJi3kCGzH9WpSY3wMSaYTAOYSjuwXmdT1jrVdp1YOyyfQWY2piQ= X-Received: by 2002:a05:6000:144d:: with SMTP id v13mr1426875wrx.303.1632849482439; Tue, 28 Sep 2021 10:18:02 -0700 (PDT) MIME-Version: 1.0 References: <87h7e5dtbb.fsf@ucl.ac.uk> In-Reply-To: <87h7e5dtbb.fsf@ucl.ac.uk> From: John Kitchin Date: Tue, 28 Sep 2021 13:17:51 -0400 Message-ID: Subject: Re: Would it be possible to color horizontal lines in org mode? To: Org Mode List Content-Type: multipart/alternative; boundary="0000000000005f5fa805cd1165ac" Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=johnrkitchin@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: , Cc: Alper Alimoglu 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=1632849626; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=JV++EjuZItQOMHp18ccFrB9oQsGTcq4sEqUJsYRdRH0=; b=IEonhQOOs3L34prjyW1ArKYi2fud6vT/FuWu+8lwWp2n+shjlMTZ52+rpqVjiMS1NcLIKE P8wPeXGwsYFIGsKwZg1vQhLaWEzWVJVopLA3/ho6IFBBj/wXTQD1Ow6vsxgV4qqZeHX1Fm a3gdUaYSq2fSdM+K4lxZ338innnwwaIViEPUw0xVKJbQoY5E75BqlJp3Qdczx0FFavK4fN kDbjK6v1GHWR+X/g2Kv12zX9Q1kiE4U1A6gNh7PMdMaaUfBxniu2CkNIszdSU0LRSFiirf ofENLTP3EmyDGHk3rAiyXgII8UhdYCl1VuQbNoLklX3AG2ApqC/Gz88TSu0OQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632849626; a=rsa-sha256; cv=none; b=YPxe4sVxDPEkty4cCegPmBjJWIkkc+WflVNcWcCy3MXzFCtBonW3SNCjrqyeJN5aYPM/3+ 6ZDyxQ5k1U3P7PReFQ2nk52Kng2F3Q5A03VqXSzmyhzrGj15b9b/Ha20SsKC1aV2s7iHUG vxEHohcv/tB05n8Wop566ZwW6U5hM0gUqGHLwh9I27AtDobxRIRCKxQsfAmeyzjcgx5Teg 3IWx0rSKHGQgQtFix540J/3TtEA3RHceAdaO56MGYP8o6G+wUSczY8h9986kXa7PoQc7Fn E7ktvP2qUsjfR92VjxOVS79mhfdqRkA4hE5focVEm8zA/fFY9zhau/6vofsJ6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20210112.gappssmtp.com header.s=20210112 header.b=cWHWc4z2; 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: -1.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20210112.gappssmtp.com header.s=20210112 header.b=cWHWc4z2; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); 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: BF65E37F4D X-Spam-Score: -1.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: S1PGGts/Uv8t --0000000000005f5fa805cd1165ac Content-Type: text/plain; charset="UTF-8" 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 > > --0000000000005f5fa805cd1165ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
you can add a rule like this in an org-mode hook:

=
#+BEGIN_SRC emacs-lisp :results silent
(font-lock-add-keyword= s
=C2=A0nil
=C2=A0'(("^-\\{5,\\}" =C2=A00 '(:foregr= ound "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 EngineeringCarnegie 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.=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>
--0000000000005f5fa805cd1165ac--