From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id gHwNCjSjdmcGdwAA62LTzQ:P1 (envelope-from ) for ; Thu, 02 Jan 2025 14:31:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id gHwNCjSjdmcGdwAA62LTzQ (envelope-from ) for ; Thu, 02 Jan 2025 15:31:16 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=WpjlSXM1; 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=reject) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735828275; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=XkkraRFBQEsMsgnX7ooM8MBEx152605/G9Olg3y2aqA=; b=UNKkYJ+JqIch4GSPy/4bDdl+4x6ArxP87CF1FALR8GbivQYrB8LYA1HhO3gs6DNDE21yUB tEIYjWicGkS1NLZK2X7K5wYJNQsdo9MFVcuwshLWpCTX5T7PHEJdDC3gCzUQ8wkqVgh0p4 BLx5UCgY7WExM1XdZb0t248YUHCCDL6HtNnaIiodgMUcEZCNddjF1wovp5LZaSStPFYKvr u/1Xx0SDlbSMzUKvbqWy/OqgBqCbK/nlmFM7nMh3WA+IsYiFEUIRRW2a7suw0042O/uNQs dhXNJmiMhm0T7e7Xf6YVWECyuOHTFWV9mlNm2GFpjDhEnOTP6gqEjPsednzcxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b=WpjlSXM1; 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=reject) header.from=disroot.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735828275; a=rsa-sha256; cv=none; b=l9zra9bvOcLtrNOPRz8Kdq157W2tq0b9tLHYdpSRPZO34cc8kumFDwvyKGUMDVsbWYxtWP 2ui9VSG/IIOHEsvlplzVqoAQzLtpZ/mKfy8IgKsJbiu0nAvkBLq5UyPcB5E84f25c3ZYZf cFKJFvTf6Ud0BfTQM7U8LhiNPHDfOSJoWsDNq2iNUI7MekCVXEJxAZPiFU+wfw01lzN1on Xhg8nx+K3viIgbJILumnkzjw2jFQ87/3hTmL5NV0oD3Vfw1407bIk6ScH10WzmvDB4UTYb Y+oZlawV1dcE2Ezh2VgSaOUPKvjZMRJOfP2As7Cg1nBuIhnjKqc6J6YVO13wjA== 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 EA1259BF21 for ; Thu, 02 Jan 2025 15:31:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTMDI-0007oA-MJ; Thu, 02 Jan 2025 09:30:16 -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 1tTMD9-0007kd-E7; Thu, 02 Jan 2025 09:30:12 -0500 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTMD7-0000Bc-9q; Thu, 02 Jan 2025 09:30:06 -0500 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 19CDA25BC3; Thu, 2 Jan 2025 15:30:02 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id jP6XvAUUVIYn; Thu, 2 Jan 2025 15:30:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1735828201; bh=VrawWEvafhFABuvMtoRNf8Mh5Mm3zcnvjC0WXcQ6JhQ=; h=Date:Cc:Subject:From:To:References:In-Reply-To; b=WpjlSXM1IhbWTeClk63b01E5IiMmlCQP8BXlvuMLTIkQB/aJX/fYmQyhQfCs2afy2 rohKMEynIZdNwbOkW2RmGfUbVL2Xg1kHnCfER90EighM310PJ6i4fzDyvnAR/k2x89 aSCFH+WzygOmvQ7+NSfkvSMaCKF7CeDB5+FobaKPi81KY7SXprJ51F1KaQpgmvR1EO vnjEe+cTsEo76frrQspvYWpPPYnglh6pYI3dKM3HyL0Q1vV2fkLcjkOHEEaBrTBSHG H/Vesq39fjwkSCoAp0fZL78b5DZAHSR/9dVdBGkUZLAiyzJAZyzYkD6ufohMtUcgGL NDjmHnFW72ppw== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 02 Jan 2025 15:29:59 +0100 Message-Id: Cc: "G. Branden Robinson" , , , "Ingo Schwarze" Subject: Re: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)] From: "onf" To: "Ihor Radchenko" References: <20241218172040.tyytdhbyl7annyli@illithid> <87ttav7mii.fsf@localhost> <20241231170034.nzmponxxjppqrhf5@illithid> <87bjwrhg6a.fsf@localhost> <87o70qg9gi.fsf@localhost> In-Reply-To: Received-SPF: pass client-ip=178.21.23.139; envelope-from=onf@disroot.org; helo=layka.disroot.org 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.77 X-Spam-Score: -6.77 X-Migadu-Queue-Id: EA1259BF21 X-Migadu-Scanner: mx10.migadu.com X-TUID: lUsaiPNF5dhC Hi Ihor, On Wed Jan 1, 2025 at 1:30 PM CET, onf wrote: > On Wed Jan 1, 2025 at 10:38 AM CET, Ihor Radchenko wrote: > > >> Also, what if we leave \fC and add \f[CR]/.EX on top? > > >> AFAIU, the worst case scenario for \fC is that it does nothing. By > > >> leaving it there, we thus retain old working exports working while a= lso > > >> adding appropriate format when \f[CR] is supported. > > > > > > The \f escape sets current font. \fP restores previous font. > > > What this means is that doing \fC\f[CR]Lorem\fP: > > > (1) sets the text Lorem in Courier if font name C or CR exists > > > (2) restores previous font if neither font C nor CR exists > > > (3) sets font to Courier if both font name C and CR exist > > > > What about \fC\f[CR]Lorem\fP\fP? > > (1) if both C and CR exist, sets Lorem in Courier > (2) if only C or CR exists, sets font to Courier > (3) if neither exists, does nothing > > [...] > > It's important to understand that troff commands don't really use > nesting or a stack as one might be used to from HTML and similar > markup languages. That's why it's also not possible to e.g. nest > bold and italic like this: > Normal \fBbold \fIbold-italic\fP bold\fP normal > [...] > One has to do one of these instead: > Normal \fBbold \f[BI]bold-italic\fP bold\fR normal > Normal \fBbold \f[BI]bold-italic\fB bold\fR normal > Normal \fBbold\fP \f[BI]bold-italic\fP \fBbold\fP normal I don't know why it took me so long, but I think what you're looking for is this: \fC\f(CRLorem\fR \fR sets regular / "roman" font, i.e. what's usually the default. Just as shown in the examples with nested italic within bold, you will likely have to track the style changes desired by Org-mode and map them into the appropriate fonts, since troff knows only fonts, not "text styles", and so these changes cannot be nested. Note that I've used the syntax \f(, not \f[], because older implementations of troff (such as Plan9 troff iirc) don't support it. If you used \f[CR] on those platforms, it would be interpretted like: \f[ -> set font [ (non-existent =3D> ignored) CR] -> text CR] meaning you would get CR] in the text. ~ onf