From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yJlWFcQUT2K/XAAAgWs5BA (envelope-from ) for ; Thu, 07 Apr 2022 18:43:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YOv8EcQUT2Lz+QAAauVa8A (envelope-from ) for ; Thu, 07 Apr 2022 18:43:48 +0200 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 065F72FB69 for ; Thu, 7 Apr 2022 18:43:48 +0200 (CEST) Received: from localhost ([::1]:60678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncVEZ-0005rR-73 for larch@yhetil.org; Thu, 07 Apr 2022 12:43:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncVE8-0005ow-Eo for emacs-orgmode@gnu.org; Thu, 07 Apr 2022 12:43:20 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:41983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncVE6-0008Jr-SE for emacs-orgmode@gnu.org; Thu, 07 Apr 2022 12:43:20 -0400 Received: by mail-pf1-x42f.google.com with SMTP id p8so5941821pfh.8 for ; Thu, 07 Apr 2022 09:43:17 -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 :cc; bh=OrxhuY3pBI5rrgeA0MQn80v5QIGx6658BrjQi/e3HiQ=; b=PxscnEacyW7FRq+YTQzKZsbkLt63mtpxJghYDDAIZbqpL+HRv4p8zOE+HPCcElgfGw ZdsTZQ7/O+TsFf5qPonm4LRLFPTYLoAYJrd9pJ48WKhAs9jlJi504wZAD2udohGL/rPt Zu6AAUE/WmprsvhzFTaH80PRdHBzQ8GEneYuNkpk0hHloJc7EdS8GeaxxhA6RTKe6TUV GU7Y/KqIgPy4LGUAywM60sVqp3NvPON/QTK44fM1FzdZVRLn4LVTG/bO8HSuRG0Xw9iA GMChMvb8l+zEfmVr4UbdH22Qvc9Qx7GZmXiKFNCoxay+a4yWArXiKt20UGqKCgl1Iuxg eN6w== 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=OrxhuY3pBI5rrgeA0MQn80v5QIGx6658BrjQi/e3HiQ=; b=SzGJ5/5DC0yONLs36tQHZgutBSNKB4hcs1iTE3daMcjZ1p3wgGu+hiRUwvhr2Vz1Zz T0DcFj1vv5lLzOab76+p6zai1iOTG2f/49Jh5nWJGtLSBG25DgJ29eTe6Vm7j6w/oweB 1+FwwypCOXG8OAJhdENAGRn3fCkqkQSBtcIgHQL6h5tgMJkJSqBPbF4sog9O5LYckTk2 UnjJYVY2dOlq/56deQdVRN8NKHiqikOXyCQWhc/uHe5ZRj9I9Hj91+dYhOQJ2DGwj8oQ eiJwdtsVFDZX8MsV1VuIWCtcVnEKOnSnRIBQHrphSWZAHZPHC/2Fu2Zps5Uw+6jofkDA QCYw== X-Gm-Message-State: AOAM5334eTy8BDtMo89245xEpweDM0HNU+O8/DWRtUaPErN1Tdo7v7Oa 3dHsT9vOIOq+SW8dC4pZCmnqJBIWQO6XR+NVlS0= X-Google-Smtp-Source: ABdhPJxEu9+M156jgLVfaUmJtXSFd3ZGn5Pf0Yn5MR3vDrgR2JKz6ip+QDtOhxNrNF1cg5robrWYpGd5hpoPp5bhfk4= X-Received: by 2002:a05:6a00:114b:b0:4f7:915:3ec3 with SMTP id b11-20020a056a00114b00b004f709153ec3mr15398989pfm.8.1649349796564; Thu, 07 Apr 2022 09:43:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kaushal Modi Date: Thu, 7 Apr 2022 12:42:40 -0400 Message-ID: Subject: Re: How to handle strings with commas in macros? To: William Denton Content-Type: multipart/alternative; boundary="000000000000bc142905dc132ca3" Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=kaushal.modi@gmail.com; helo=mail-pf1-x42f.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: emacs-org list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649349828; 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=OrxhuY3pBI5rrgeA0MQn80v5QIGx6658BrjQi/e3HiQ=; b=Od/V6kVYjjWN7FmNigr9KrJuxg9kmQVk7GaHVh85xaRyrSFZW2JVBZg1c2+pyHQMWvWA5X +B0U3cNjO65fcu7KaKDc/k5DgAkqOyF6q+0GHFlB9DOPBIpJxEBDZiIU0oXFC1O7LvuWi1 g8kt9g1Z5a4l74GjyTuP2feWfhic1qhiakxmP56vqZEtY9PTI1HMfc+A9AuLhTuqGsW7RE rniFUhbQbufX6kuEGEsqmkvQa4YwTD4FQTOh3KM8OTY2XsoXoESbd0qAMrXkzAQIfMhYnE gQ0MnCwV9e0Z3glGuk/TK84xWCjbMTBvrSDfOnrmqFFhYYo3EiztVBF7RIyYZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649349828; a=rsa-sha256; cv=none; b=SUYllPTQiDqkg0LDfvnbgeMGVhcPt09ks3WNr5Z5ID8l5bPkUp7fbRFfnTeYcWaq9LSzuY D558fO0BbXUXWXYuRpvgFEb0SJO6KjxSTHSC1yObQHQefRHvfCY/hrrLOA0uOogy77Tyfp TVujzYLmw2nNjzt14dVB/05Iom9LG0loNJZgWXhrXcl+BdWqjAy1k3Z6gFy1jVW+nokde1 5l2eSVLwmkU6BiNYVnRxWwYxcoTTyqCelZo+7WNMcF2NqtsHsGF+s20T8p+fznZA2ewmJP z7b19q4dURDdQLS7Kj1+1yyl1jVomkY1lyaMOBczo/DtpH4Wav2bBkVYhYJ+Zg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PxscnEac; 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: -6.36 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PxscnEac; 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: 065F72FB69 X-Spam-Score: -6.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: Tp23Mo3wIzfV --000000000000bc142905dc132ca3 Content-Type: text/plain; charset="UTF-8" On Thu, Apr 7, 2022 at 12:30 PM William Denton wrote: > I'm using macros to format names in a LaTeX export, like so: > > on export and LaTeX will format it. That works fine. But in an index of > names, > if I want > > {{{m(Denton, William)}}} > > then Org takes that as two arguments to the macro, and outputs > > \m{Denton} > > Is there a way to get around this? > The comma needs to be backslash escaped. {{{m(Denton\, William)}}} Ref: (org) Macro Replacement > (1) Since commas separate the arguments, commas within arguments have to be escaped with the backslash character. So only those backslash characters before a comma need escaping with another backslash character. --000000000000bc142905dc132ca3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Apr 7, 2022 at 12:30 PM William Denton <wtd@pobox.com> wrote:
I'm using macros to format names in a LaTe= X export, like so:

on export and LaTeX will format it.=C2=A0 That works fine.=C2=A0 But in= an index of names,
if I want

{{{m(Denton, William)}}}

then Org takes that as two arguments to the macro, and outputs

\m{Denton}

Is there a way to get around this?

The = comma needs to be backslash escaped.

{{{m(Denton\, William)}}}

Ref: (org) Macro Re= placement

> (1) Since commas separate the argum= ents, commas within arguments have
to be escaped with the backslash char= acter.=C2=A0 So only those backslash
characters before a comma need esca= ping with another backslash
character.
--000000000000bc142905dc132ca3--