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 ms11 with LMTPS id cFt3DauVT2BWEAAA0tVLHw (envelope-from ) for ; Mon, 15 Mar 2021 17:13:15 +0000 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 UMUdCauVT2DmRwAAbx9fmQ (envelope-from ) for ; Mon, 15 Mar 2021 17:13:15 +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 9C95C192AA for ; Mon, 15 Mar 2021 18:13:14 +0100 (CET) Received: from localhost ([::1]:46104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLqmH-0006mU-NG for larch@yhetil.org; Mon, 15 Mar 2021 13:13:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLqju-0005Mx-QK for emacs-orgmode@gnu.org; Mon, 15 Mar 2021 13:10:46 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41975) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLqjm-0003b5-KX for emacs-orgmode@gnu.org; Mon, 15 Mar 2021 13:10:44 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id C50F32400FD for ; Mon, 15 Mar 2021 18:10:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1615828234; bh=eEPkpNJmyCfIssuOauc2Iv1PhQs7JtRhgSejCdirZqw=; h=From:To:Subject:Date:From; b=NwabjPSr8dgywDXocJOiJKPE7LEMUPsU3dqz17VyPsZO0wdvG+wwBgRhBkOMR8L8w cCeS3gLf4jRyR693/eWTUqrqdtjF69Nc99HrPTFwLjKAQH3VnKxWEOuROqP1//Ddzp Pkemy8vOgWwlLHIrPCnVn/H3QnlRbB6LXbPNaqze3nTqCfv42kNF0l3i7aC3a+P4M3 DiyXD1480eJsEDMCwwrDZr7AG8Rud4LJREB4CWMt778oljilmE82qtjnT9lsmyUcKl U6zNPUv11I2OUWcJ22oIsOysnxYxG/RfMEscdwAmxMNdrh/ahE1NB2uabOYKFEZZv4 9WbfHM5Ql4nZQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dzjbs0q45z9rxS for ; Mon, 15 Mar 2021 18:10:32 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: Nested macros and fontification Date: Mon, 15 Mar 2021 18:10:31 +0100 Message-ID: <87y2eo4a2g.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , 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=1615828394; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fsIRT2tXEtm4gb92EF1cDuWHVqR30+p7bsWewyneNlw=; b=Fq8EXD5gj6T7BPNZojNLEhyKdEP8ZOZcX0QGsm2e6zHVAI6f7ANaF1NXyA4ecUIhyF1lTn nstbJhwflE1qnjeUGJkvSrbbCnYFAXaJT1lOY4VHZtKirLGyUeegJdS03KNHe7VdGYckeY 0kmefdUn+uxtjCqi0wEfQomnawzPnNVuXcX0ScH/CUtbCYT5d1oB6HN50zApt75R9YuwoC eKxTUqvttPC5hG+wNj6NheWjIhY6TVw4C1+PoR/EacdLUttCMB8ZucWCExXh2C4BcSTrCs 8a9PUt+dvqQU2dM1MZocNEwox1QtnoKGmIz5jxsQpdX/cBnDk9YII6eJirx2fA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615828394; a=rsa-sha256; cv=none; b=nEeuMETlXralR+/mE5PIC73pdfVGRaQOSm8LfBQkTk9NUhuXpi56blPfDZ3UjRXYsoRy3H yu08TYBjW+435yDWz2Zd7YNMChx+L93oIfnepsKo0onTic3bKfH4MdFcZoVgTs30c3fY9H 2q2fmL2O83epfrTRhW7Nytfc/0Fj683+eBStQZWyWgkFdX7sPZsFNSoFsiHchowqadpZQ8 Rra7fx8qNNIS7yxWFcKEz0wkoBgNorcWAGU6CzWJkqawl90ICWY1kWIvR1smT6WOG3GXUE eJobuX4PiZLOi0KHkXUY/fyZEkPNd66P3vB7SryYFLIR895/CN1Nxh7bkvgTwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NwabjPSr; dmarc=pass (policy=none) header.from=posteo.net; 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.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=NwabjPSr; dmarc=pass (policy=none) header.from=posteo.net; 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: 9C95C192AA X-Spam-Score: -2.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0L1C43YZv9La Hi, I make heavy use of replacement macros, and often my Org documents are full of nested macros (in the 'LaTeX way') throughout the text. The problem is that `org-fontify-macros' breaks the macro fontification when it is a nested construction. I've found a simple high level solution that consists in ensuring that the macros have a look identical to normal text (in my theme): (set-face-attribute org-macro nil :bold nil :foreground black) And then I only highlight the macro boundaries with `highlight-regexp'. I think that this gives me a more legible and consistent text, without that 'rainbow effect' that many themes apply to macros. I share a couple of samples, in case this little solution is helpful to someone who also uses a lot of (nested) replacement macros: https://imgur.com/a/fSPHH0w Best regards, Juan Manuel