From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iFlFOEcijmPikQAAbAwnHQ (envelope-from ) for ; Mon, 05 Dec 2022 17:54:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UDJUOEcijmMU3wAA9RJhRA (envelope-from ) for ; Mon, 05 Dec 2022 17:54:31 +0100 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 984C4DFBC for ; Mon, 5 Dec 2022 17:54:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2Eit-00029i-KU; Mon, 05 Dec 2022 11:53:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2Eio-00029T-Nr for emacs-orgmode@gnu.org; Mon, 05 Dec 2022 11:53:38 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2Eim-0000lB-U3 for emacs-orgmode@gnu.org; Mon, 05 Dec 2022 11:53:38 -0500 Received: by mail-pj1-x102b.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so4137040pjj.4 for ; Mon, 05 Dec 2022 08:53:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mPxkKvk9z30m100ptumx/6u34kcKSbd5xCw//KOWyK4=; b=Cs8AWuAERb1Hs6s+2IV/QEh+Q3TlCJqFo5wC05uBtLpFZ1JB15pInZBITn8xzv1Xpw u6kblx1PZyF5I9ieSOedc/jLlTZpbx/BhY+gGQXyGbWg/s4fDVSZVp/b0gG92eQOFjHN RCEVWLOtxmwjqi7Lb6hQUX1nJAGYPKsTqI/5x9M526MLBbFrvtTjViv0Agnv4EN75Qdo +gBa7Ocv6WPYm7MwTWZM97eddytDqMiUdtI6LefEcw2MXV3h02IoXNWPBOUnvORh3Ckn 9/9vfbQ5zWYWWuCb0ovkOPs5J6xtnvez4VsRjHG2gi41YqWKIs1feZEZrh1Gwhbtna+e hrdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mPxkKvk9z30m100ptumx/6u34kcKSbd5xCw//KOWyK4=; b=32S67cvUt+LI6Qz/4zuXYmFeFtbKWUm9YT2oGOIpQjJNu1R8SPnzD6KCup6SMaiNFU TE2lYxUccYKG12viHSbn8Qbl/Iv1WlQu8SVEnkuIsYIE+pnexMdDfcJH9xgdjT8fIstV tyX/9wydpGqRA7ywC+1j4mXsTWJmSlrC/tjF9KweOLRtR6VzjtLYHwytPN2eH3InsL3J 0Zx4u7zE8lmm+5E2kjULOiEIbdOM6M9nHlKI+paZzmpt/Nkhy5gI2XMGggGfMq2V344/ pBEbMgY47jgPAmrKymjhnME6MuBpa2GHQm/Ku2QOtEU16S08I6kcAza3mzkDIpHcqapR 1whg== X-Gm-Message-State: ANoB5pl4WVRc5VDLUN6HXTk9pOudSzonBsw3qHPPtA2vIq9b7WibuZu4 xQu0FAld2KTNd5TozS9ajkKlcuBxNANmliIzfW4= X-Google-Smtp-Source: AA0mqf6UGip/APmAXwAOpyYEq4y2yBzI3nmkllJCrfbf9HqGPgMxqUE+UXJ7iAU3ZnAkEnOK/8EEyslNXD6DpCKZuu8= X-Received: by 2002:a17:902:f095:b0:189:95a7:7430 with SMTP id p21-20020a170902f09500b0018995a77430mr35250662pla.124.1670259213732; Mon, 05 Dec 2022 08:53:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vikas Rawal Date: Mon, 5 Dec 2022 22:23:22 +0530 Message-ID: Subject: Re: Displaying macros differently To: William Denton Cc: org-mode mailing list Content-Type: multipart/alternative; boundary="0000000000001e109205ef1787f7" Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=vikasrawal@gmail.com; helo=mail-pj1-x102b.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-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670259271; 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=mPxkKvk9z30m100ptumx/6u34kcKSbd5xCw//KOWyK4=; b=Vz9MPTjCWlXb+Z0tAFRoEEgmH6KvMwdm1O8ZIACvJPMbpSoA/k36M3gxp+ea/K2FSwFwjt smm3A/IPob41W+58rkdR1CdxgnszY5hMiln4MG72uTdKE2ap6H/cHuJkeqqM0WW5eKXwuT NvbMmBvbtAyZLiSRfTC19gfpjDk0NnZYaeezr1isJpJRcgkbXOxHFlPK/jdlKr0qZ0APjz z1lCWmo4TJBnBbcjPtegeDUGwMQk2OZYlD+f06mtj0nGWkuTFkX6aG0/m1dK1n7D2CH5Sa FLxvPJVqvvhjWTugfvqeZSlkWmFJpDJspFSGzs7ehEisIHKYn4GbaOB9VpF+gw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670259271; a=rsa-sha256; cv=none; b=WabbEnaisYF+DqAAJg9iKE/Pq1rMOiqmofEqRaWUzfw1D3MVgiZ3/5FUoiB0Moj0lTvCqQ ABe2FkW+rmFxka8cjJSScGhHTPj8UuKkzuKHZlyQp0t4h7DBrAcmHOCPJtTmc7sG61+BGE MxeEEfrbHcsx3M5pvBbATdtfXHzsuQcqtH2nUQaMFFfdbar9UxUBKXs1VRKzazXKsVdJz2 MN4MBzdCY/SohTXEl/UFo/4o3TXYiMRkI6W2eXX9X8gbdO+mVwJ0dpiiGtEc0ggXfYcntt vY3HbaG3ItdkwFXi4H0NP0ysjHLr5x7xnqsYUAPQlVNT2iFQ7UkxUASlDzUiiw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Cs8AWuAE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Cs8AWuAE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 984C4DFBC X-Spam-Score: -5.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: jeGobitoFEzw --0000000000001e109205ef1787f7 Content-Type: text/plain; charset="UTF-8" This is perfect, thank you! On Mon, 5 Dec 2022 at 09:13, William Denton wrote: > On 4 December 2022, Vikas Rawal wrote: > > > I frequently use orgmode macros -- like {{{M(Year 1998--99)}}} -- in > tables > > designed for latex export. I find that the macro syntax occupies many > > character spaces. At the very least, 9 spaces are taken up even if my > macro > > shortcut is just one character long. This is very difficult with wide > > tables as often the tables go off the screen just because of this. > > > > I was wondering if there is a simple way of making org display the macros > > differently. That is, use some kind of overlay, and display the above > macro > > may be like M:Year 1998--99. Or some special character could be used to > > denote that there is a macro underlying what is visible here. > > Is this close enough? > > (setq org-hide-macro-markers t) > > That hides the {{{macro}}} curly brackets (if there's no leading space). > > I also have this to toggle macro visibility in the document so I can see > them > when I want to: > > #+begin_src emacs-lisp > (defun wtd/toggle-org-macro-markers () > "Toggle visibility of {{{macro}}} markers" > (interactive) > (setq org-hide-macro-markers (not org-hide-macro-markers)) > (font-lock-mode) > (font-lock-mode)) > #+end_src > > I think there's been some discussion about evaluating the macros and > showing the > result, but I don't think that's possible. > > Bill > > -- > William Denton > https://www.miskatonic.org/ > Librarian, artist and licensed private investigator. > Toronto, Canada > --0000000000001e109205ef1787f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This is perfect, thank you!=C2=A0

On Mon, 5 Dec 2022 a= t 09:13, William Denton <wtd@pobox.com<= /a>> wrote:
O= n 4 December 2022, Vikas Rawal wrote:

> I frequently use orgmode macros -- like {{{M(Year 1998--99)}}} -- in t= ables
> designed for latex export. I find that the macro syntax occupies many<= br> > character spaces. At the very least, 9 spaces are taken up even if my = macro
> shortcut is just one character long. This is very difficult with wide<= br> > tables as often the tables go off the screen just because of this.
>
> I was wondering if there is a simple way of making org display the mac= ros
> differently. That is, use some kind of overlay, and display the above = macro
> may be like M:Year 1998--99. Or some special character could be used t= o
> denote that there is a macro underlying what is visible here.

Is this close enough?

(setq org-hide-macro-markers t)

That hides the {{{macro}}} curly brackets (if there's no leading space)= .

I also have this to toggle macro visibility in the document so I can see th= em
when I want to:

#+begin_src emacs-lisp
(defun wtd/toggle-org-macro-markers ()
=C2=A0 =C2=A0"Toggle visibility of {{{macro}}} markers"
=C2=A0 =C2=A0(interactive)
=C2=A0 =C2=A0(setq org-hide-macro-markers (not org-hide-macro-markers))
=C2=A0 =C2=A0(font-lock-mode)
=C2=A0 =C2=A0(font-lock-mode))
#+end_src

I think there's been some discussion about evaluating the macros and sh= owing the
result, but I don't think that's possible.

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
--0000000000001e109205ef1787f7--