From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id gKwuGDEdY2eOCAEA62LTzQ:P1 (envelope-from ) for ; Wed, 18 Dec 2024 19:06:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id gKwuGDEdY2eOCAEA62LTzQ (envelope-from ) for ; Wed, 18 Dec 2024 20:06:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=IqhhXgIj; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734548785; 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=PYNvD/gD1iCsnbFuJmHVnVLzeemt1Ma4qjUFEbPXVpI=; b=Uqz06VCk6xCubmLEsGfrom93m7dnipwHiOpVS90vrkJ1POix2e8QIQbUOhKkgN66jPxXth 98+FVZiCLTY7jIJ4SOhwVIRwfr4UPaCBkB8cv/nbg2DUqCEA5MsKszyZxwGf2K5Z93VM6S Fc4gMfCR3QPeLLE5AOVaglzhr2NfBNtHZ3mEtInoVB9ktU8iNii3iUi5xS2U1GpSD4z1Ic IbCea4Z3c9905b8gG8ZD57MoTNL/4EpHyGkxT9A9IxhFQMq5wV/40SO//UvlPeJ9xQe7Ac RVN3EzL2y0UvqeOYYcT7mueCIv/ZcgeXFoLeNqp5SLMKc/nJk+Dsf6ksIttGQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734548785; a=rsa-sha256; cv=none; b=WgCwKlc86GlbH5ZtKhxo9DCFH1kGkWLH5rl2aZCsB7Kkn7ODmJAPPLwyhmS2cDqmAlT6uR +M/h0+170itBiR4Ow47T/nNAjyZbQo4SxyWkWLJ/LCh5+HZQ0dCzoJAAYIjxzt5I+B1QOo wgJQba3e39QFcp7WnApBzX046K885MsFuwOuBmy1mspnLK2N/2uHU8fX06b13Z8f4FX4wt D2cKiMKRVvwZWpbr5IN/961Yia8VBXFcVkPvv+yNRROQEFn9ZJ2SxfOY60hfuOgZdMmZWc nJ7h/HVxCfiTf1HvsE0B69eqywseWsFsjfisoEpkPW5pgbEDLxzu+vci0MR7Wg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=IqhhXgIj; 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"; dmarc=pass (policy=none) header.from=gmail.com 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 3945B4767D for ; Wed, 18 Dec 2024 20:06:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNzMZ-0007Zn-4X; Wed, 18 Dec 2024 14:05:39 -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 1tNxyz-0008KJ-70 for emacs-orgmode@gnu.org; Wed, 18 Dec 2024 12:37:13 -0500 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNxyx-0003zY-D2 for emacs-orgmode@gnu.org; Wed, 18 Dec 2024 12:37:12 -0500 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-29fcbf3d709so2284663fac.2 for ; Wed, 18 Dec 2024 09:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734543427; x=1735148227; darn=gnu.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PYNvD/gD1iCsnbFuJmHVnVLzeemt1Ma4qjUFEbPXVpI=; b=IqhhXgIj9z4jjj7wfJfIP8ev8nURzHrINZbmxZlnCwFsWMTWxzVhKCgwiJQ3jLEi6S OpkscP3BBjaDeOxEBzQCg3DqSsyj6QkrcX2RkFnzEgDT3rqErYd70kaJF8mQK0iieMuL CpwlUd35fscnVZuR0M0k7NmJlxr9HYJLZTdrQL6iyJGAjXp7GfPXZkYoA49IjNaGYzZN 69nUroD8gm9+72fgFak2upKR+CujpTO8wucCA830qhjv7O9OTSRe4csVybljFGKX5GfV vKI1zNGX3mGqqRahQoiqlyq4eAU5LXaCXqiUM+2cIDEVRVxP+wbSn3n15FvpwT7iFbyu DrFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734543427; x=1735148227; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PYNvD/gD1iCsnbFuJmHVnVLzeemt1Ma4qjUFEbPXVpI=; b=sPj0erueHrO4SiWTIXP6qXpY/SINTZ9PH2b/MHqMUr8219uEyj7tWIOfANOL3XYacy EyhncKw9QdcAV4lZeWYPXl8LxiIQLNFNT3A1rN11K1UL2S+Q6AfooqhOnNEYKpoKnMIq Y2BBFmTXX7sQZzxbbFOYuEPilTle8Z5PQ09rEspjlCVpMFN6YjZ/QUDL/Ma/TEVQkBrr oB/j5neB/WfmGvFKXJNVllyQ3QIS1LvimpDG33OsI5P8XS6UBuccDo58LHxyOUO1K7QY 4JrXRpIwnlOGTxoNimo/eXyg0kSh1VSEQIb8of4CBTIp4VE4kHvSS2BOOohSEreCD0aU QbUA== X-Gm-Message-State: AOJu0YwNRoscLMPlDX5pepPgyUpTdWhxRYHp1ReVIjzFz6iT8UFC7vlA p9EIsh2fYTZdcw9/SuyNveBWsKqFU8rU/G6/OELIPNKhBns93aEe4vCl1w== X-Gm-Gg: ASbGncvrIRPDYFHfNPraic6PyjFEPmBqHUcT5fJP+8DPWlCR7+VAzT043FIwTeQPvvC bQr9Hm6LlinEQi7X5hnFA824jVC4YKoAguPbpbvN3oLLun/sZ1kwZk70F2Pf6opiVa32d+EaqbJ UEEy/rkN52Kyv19apigKmsPK479M2g68xaRQ51VgQU6PeqAQx6r3TBmWTNt5KhbqpspyFQyweem CZJltbJclhQHKvuoUnuVYTUTy9zJhUcGa/dFdK+puahGGM= X-Google-Smtp-Source: AGHT+IH6CZMLkrw2dyGhLp3HDprAxABOly2fdIFKKd8ogFiz5tPwMnsN4MFd60gowsalpnFItP7/sQ== X-Received: by 2002:a05:6870:b61c:b0:29e:4bc4:97ca with SMTP id 586e51a60fabf-2a7d080b327mr184594fac.21.1734543427353; Wed, 18 Dec 2024 09:37:07 -0800 (PST) Received: from illithid ([2600:1700:957d:1d70::49]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2a3d291dde1sm3625881fac.36.2024.12.18.09.37.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 09:37:05 -0800 (PST) Date: Wed, 18 Dec 2024 11:37:03 -0600 From: "G. Branden Robinson" To: emacs-orgmode@gnu.org Subject: Re: [BUG] bug in 'ox-man? Message-ID: <20241218173703.waa75djy65cuvib4@illithid> References: <2924644.1643637646@apollo2.minshall.org> <2997747.1643675130@apollo2.minshall.org> <87cyqsry0z.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cp6ibs2hwxhamuwj" Content-Disposition: inline In-Reply-To: <87cyqsry0z.fsf@localhost> Received-SPF: pass client-ip=2001:4860:4864:20::2d; envelope-from=g.branden.robinson@gmail.com; helo=mail-oa1-x2d.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, 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, 18 Dec 2024 14:05:34 -0500 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 X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -9.86 X-Spam-Score: -9.86 X-Migadu-Queue-Id: 3945B4767D X-TUID: HtYx6Hmr0v3P --cp6ibs2hwxhamuwj Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [BUG] bug in 'ox-man? MIME-Version: 1.0 [please CC me in replies; I am not subscribed to emacs-orgmode] At 2024-04-14T11:20:28+0000, Ihor Radchenko wrote: >>From ef3fa244d1a32c2cce3616a6dffc9c3dcafd4e34 Mon Sep 17 00:00:00 2001 Message-ID: =46rom: Ihor Radchenko Date: Sun, 14 Apr 2024 14:05:59 +0300 Subject: [PATCH] ox-man: Escape backslash characters in verbatim examples * lisp/ox-man.el (org-man--protect-example): New helper function protecting special escape characters inside literal examples. (org-man-example-block): (org-man-inline-src-block): (org-man-src-block): (org-man-table): Protect contents that is intended to be rendered verbatim. Reported-by: Greg Minshall Link: https://orgmode.org/list/2924644.1643637646@apollo2.minshall.org --- lisp/ox-man.el | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) [snip] ;; Do not use a special package: transcode it verbatim. (t - (concat ".RS\n.nf\n" "\\fC" "\n" code "\n" + (concat ".RS\n.nf\n" "\\fC" "\n" (org-man--protect-example code) "\n" "\\fP\n.fi\n.RE\n"))))) I suggest something like: - (concat ".RS\n.nf\n" "\\fC" "\n" code "\n" - "\\fP\n.fi\n.RE\n"))))) + (concat ".RS\n.nf\n" ".EX\n" ".P\n" (org-man--protect-example code) = ".P\n" + ".EE\n.fi\n.RE\n"))))) I replaced inlined `\fC` and `\fP` escape sequences with `EX` and `EE` macro calls, respectively. I also think I perceive the use of empty lines as paragraph separators. These look bad when typesetting (as opposed to terminal rendering). So I changed them to be `P` paragraphing macro calls instead. Also, the `nf` request is redundant with the `EX` macro call and `fi` with `EE`; I left them in because they are harmless and positively useful if you're producing a man page for consumption by a non-groff troff that doesn't support the `EX` and `EE` macros. (mandoc(1) correctly renders `EX` and `EE`.) groff_man(7): .EX and .EE are extensions introduced in Ninth Edition Unix. Documenter=E2=80=99s Workbench, Heirloom Doctools, and Plan 9 troffs, and mandoc (since 1.12.2) also support them. Solaris troff does not. See subsection =E2=80=9CUse of extensi= ons=E2=80=9D below. Unless support for Solaris 10 troff is important to you (Solaris 11 uses groff), `nf` and `fi` are unnecessary and you can take them out too. Regards, Branden --cp6ibs2hwxhamuwj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmdjCDgACgkQ0Z6cfXEm bc6knBAAqq232c0unriDlsnFsdnAqYPaQ088anpkbrw0M4EaQpVlX1anQTyBAV+x YMEtjaCHxCH6El+b/H/ema2I2w3Fqq7yt7kecnGjHwi3WcnebEtKwqp5wQrg+v5D f6bnsynmW+yrK4qB1jBUhps0dRgenlkIaJmtU3NpELlHjxIx3r1iorFK6MqB7Swq ZkSagNDF1s57tPBHYmj7rVj1Lrvm6WMbYp5Wssy4+bLutmBDRl8zcsN7RVQ+jQcs DsVJ+f8xKxmXyugiequ/8ElW5+lB5pfSfoXn0iaZ+x8oZ2MPIq7D8C1JNI1bIomf WitP/a6RMsjp3s6M3wp2zu6hfRZ7ARJpXSSQVIEnEZRXlfzNSrdX1sBguoKJgIHH 6VCD6TV4Sg0uV+q2pgurvoyoOq0SKbmZ9zpAHCWep5RJ5IM7LaWlpMRSbl7RXcPl yFs8UjtSWT295QXZujlt6deOxr8/m02OK6XcX9jbetdIRPbtCuJuSvG7wq4R5IRW b3WpXFKXOQi3TsDK8WBTL1XtsC3O6CjDUF177lc6mWvrA18f2ITogym77uPPva2O 5aaxpLYa6FAD2a+ygOldMWW714Clh6O/siqmPZk8u9Ug5oIDywNUecA00K7EgoMm oyolEwAbkofYKOWmsasFS2lCQ179h2jP946ZFD7J7S9+vTvU1sE= =vqOc -----END PGP SIGNATURE----- --cp6ibs2hwxhamuwj--