From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4C2SADAh7GGhgQAAgWs5BA (envelope-from ) for ; Sat, 22 Jan 2022 16:22:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cLbIOC8h7GGsEAAAauVa8A (envelope-from ) for ; Sat, 22 Jan 2022 16:22:23 +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 BECE529AC9 for ; Sat, 22 Jan 2022 16:22:23 +0100 (CET) Received: from localhost ([::1]:54924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBIDf-0006Ie-0w for larch@yhetil.org; Sat, 22 Jan 2022 10:22:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBIBQ-0006IP-8i for emacs-orgmode@gnu.org; Sat, 22 Jan 2022 10:20:04 -0500 Received: from [2001:4b98:dc4:8::223] (port=38877 helo=relay3-d.mail.gandi.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBIBM-0006MW-Tm for emacs-orgmode@gnu.org; Sat, 22 Jan 2022 10:20:02 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id A07B760003; Sat, 22 Jan 2022 15:19:56 +0000 (UTC) From: Nicolas Goaziou To: Jonas Bernoulli Subject: Re: [PATCH v3 1/3] ox-texinfo: Add function for use by kbd macro References: <20211218214038.9459-1-jonas@bernoul.li> <20220118151129.19646-1-jonas@bernoul.li> <20220118151129.19646-2-jonas@bernoul.li> Date: Sat, 22 Jan 2022 16:19:54 +0100 In-Reply-To: <20220118151129.19646-2-jonas@bernoul.li> (Jonas Bernoulli's message of "Tue, 18 Jan 2022 16:11:27 +0100") Message-ID: <878rv7ztk5.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:4b98:dc4:8::223 (failed) Received-SPF: pass client-ip=2001:4b98:dc4:8::223; envelope-from=mail@nicolasgoaziou.fr; helo=relay3-d.mail.gandi.net X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1642864943; 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; bh=5rMeIGrVEEFPCaYVnJMfsIDap/0tE48jYYtHoMdpK6g=; b=KtH+NKGKeJecY4znX3udKa0mC26siqK8i6u9krgzgcESE/mul9Dn/LJ+ecTAIqDjAGeonl 9kRQlNMSklo0aMwyE3ZpWsoPdNigPLz12xpbMsy9+AzoEzG09DJycr4N9rtcKVFwpBxAwn Rz2oArexn0SSuZIE+UcND+nfv6oo2Zovhy3EDQFB1zV+OtmDKbeI6WH7sGqPhq8aA6Egcd FhRCsgZrupdEJhX5cBMchc6jO7XMmD42Q4cH7hpwrdG8z69iFnl8aBojEXO2i9wnt98jDX d/6P2kxBBInFSIZielc3QpjPhrUtAIdGVToPr4eEj945Xk+VVLBX0t3MXYm2ew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642864943; a=rsa-sha256; cv=none; b=TQrtX7s+GmfpITvugO8cWdBoEyMhFPDlpNFNRayw3m405fd1CGfOaX34ZpGqufkiq5gxPY GpqPIkd/k1V1EQxDReurGSUxirF8f1BYaEIUq/XnH0UysOhkVgh8L7pnPNyKm6gDrv9JSO dEvGQQ8FKZ+/Jj7V+FaLIdI5KKxT7/1zhPY5NZdPyPdsI2Lb5D1JTF6WUNxBOyIU5x+Pj/ qNaJfrGFm497riq5UPeEZBHJXBcbkpshCSH/bmYYp4x+QZinFGlk2e1vQ5Jeb9kBPWT6r+ In/mTxo+uIJV7O/tJqGyXWzDDItxCqTpO64CFNblVLLL69+VHyOCqSRWXeNaQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: BECE529AC9 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: HbBMQNOemdyS Hello, Jonas Bernoulli writes: > * doc/doc-setup.org: Use org-texinfo-kbd-macro for kbd macro. > * doc/org-manual.org: Add new node "Key bindings in Texinfo export". > * lisp/ox-texinfo.el (org-texinfo-kbd-macro): New function. Thank you. Some comments follow. > +(defun org-texinfo-kbd-macro (key &optional noquote) > + "Quote KEY using @kbd{...} and if necessary $key{...}. Typo: $key -> @key > +This is intended to be used as an Org macro like so: > + > + #+macro: kbd (eval (org-texinfo-kbd-macro $1)) > + Type {{{kbd(C-c SPC)}}}. > + > +Also see info node `(org)Key bindings in Texinfo export'. > + > +If optional NOQOUTE is non-nil, then do not add the quoting > +that is necessary when using this in an Org macro." > + (format (if noquote "@kbd{%s}" "@@texinfo:@kbd{@@%s@@texinfo:}@@") > + (let ((case-fold-search nil)) > + (replace-regexp-in-string > + org-texinfo--quoted-keys-regexp AFAICT the variable is not defined in the patch. Otherwise, LGTM. Regards, -- Nicolas Goaziou