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 ms5.migadu.com with LMTPS id pXy3OPXgQWNqbAEAbAwnHQ (envelope-from ) for ; Sat, 08 Oct 2022 22:43:34 +0200 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 aPWhN/XgQWO0qQAAauVa8A (envelope-from ) for ; Sat, 08 Oct 2022 22:43:33 +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 9D4A8E7DE for ; Sat, 8 Oct 2022 22:43:33 +0200 (CEST) Received: from localhost ([::1]:58374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohGfU-0000IF-PI for larch@yhetil.org; Sat, 08 Oct 2022 16:43:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohGf1-0000I6-2O for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 16:43:03 -0400 Received: from mr85p00im-zteg06021601.me.com ([17.58.23.187]:35814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohGez-0004kd-GU for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 16:43:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1665261777; bh=NUv19SJGxI220/bKkFMY1qGWr3Z6xEXFTDsY6HrDSYY=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UFryBlQscs6kaftlJ7r2k65qc/jORF69LiR2l8ykq11H/8X/L8GmDrk67Y5dovnn4 r7Pt8IIzGxB7HLUDjhyWlpS8Fhe3nsgIxUXGIrXVC6SOL1iwWbKfJz74CzgCi9n+QF Y4TQ0gxaIhG+UYrb18HfY5SxBZE9eqa+6F8FZD2898JLRB95V9TUWDbxmx0d1EZl9O QeqveeG3RKcoRF4pEQY4f/Xag64fVtBVsoEkwZCmhrD+njvcUtYb5U7PQwj8iOCevR otJOtbZadi8MWb6fhzaeXHoZfAqCBedwO3qeXx2ep1IxCCxiOU6TvsFt/aYIdqfK9M EXAUEhwIVyBMg== Received: from Rudolfs-MacBook-Air.local (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-zteg06021601.me.com (Postfix) with ESMTPSA id CE4764062F; Sat, 8 Oct 2022 20:42:56 +0000 (UTC) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: Propertize some navigational keybindings In-Reply-To: <87k05akda7.fsf@localhost> References: <87k05akda7.fsf@localhost> Date: Sat, 08 Oct 2022 22:42:52 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Proofpoint-GUID: ohz2VwOhHkZyoH8DhGA3pSiqbtM0cSup X-Proofpoint-ORIG-GUID: ohz2VwOhHkZyoH8DhGA3pSiqbtM0cSup X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-14=5F01:2022-01-14=5F01,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 clxscore=1015 phishscore=0 mlxscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxlogscore=820 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210080134 Received-SPF: pass client-ip=17.58.23.187; envelope-from=salutis@me.com; helo=mr85p00im-zteg06021601.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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" 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=1665261813; 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=NUv19SJGxI220/bKkFMY1qGWr3Z6xEXFTDsY6HrDSYY=; b=ZO08LpRQinnSbFDhakMn/R0IffqyDAAR6qKyFbPawQMhONMFe0j1qHoXjP9tvd4NMVUplu utK71tAvs5jntyVg223iPkxVqHBcGefGBi4TCkg9zd/naPTdRdCbZkxTiLxFOadY3Z8ZA9 uDyKDPPtrfvsOGOWlLmq0g/yVJHq7Kdk0qcDqXun6fCzkWwHWfezW7xcKahOVnHB1eGxld 3E8+aqhb0uwJQTy0RuRsJb9sUia/Qx8n0oR10KlH31pZlSMn9WCS45gCEkCYGpB5e/pP2g qzqmvTr5M9hutGQjWCN9FyDjPbSpqFjpdq9Q9VPt/WxEj/WGSJGHDuSmfqf88w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665261813; a=rsa-sha256; cv=none; b=drcS7lJtFdSDdmKFlHGDzXt3BroruSFoa+oT/pUraKt26WNQM2khUsYJIxW3f5xfIn/hsH CZFsIlJGv62t6x3PXWAhDSzkaOg4q4Lrmzxj4kvywC9/u1T/a/Lu/e8NCWewY+MzOWLipC yKsW3qJHvSoqCCi1xgufacUYrtGO8ubyxwukqlS63CqAVbeITY6alRd4o8mjUZso1ETYAO 7cTaEN2Ht+B85kH9QvzYr0pF9VztANZgdWtfNNEEuot92DYyDICnJL07nuQj7UPh8AD6bH 6M9bi0gFx9lH3/nwCD6kdIMErgzT2ZvSt8Qug77M3zezaUk9QRsyP4Kl4NlWjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=UFryBlQs; dmarc=pass (policy=quarantine) header.from=me.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: -4.08 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=UFryBlQs; dmarc=pass (policy=quarantine) header.from=me.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: 9D4A8E7DE X-Spam-Score: -4.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: C6hkCsCueJqu --=-=-= Content-Type: text/plain Ihor Radchenko writes: > I think that the most thorough way to add this feature is following > what `help--key-description-fontified' does (we should not call this > internal function though): [...] How about the attached patch? Rudy --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-export-Propertize-keybindings-in-Org-Export-disp.patch >From edc5dde6d3a68e15491a0273d283e38482e6390e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= Date: Fri, 7 Oct 2022 17:05:15 +0200 Subject: [PATCH] org-export: Propertize keybindings in Org Export dispatch UI * lisp/ox.el (org-export--dispatch-ui): Propertize the navigational keybindings. --- lisp/ox.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index e059983fb..6089a575b 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -7123,8 +7123,20 @@ back to standard interface." (delete-other-windows) (org-switch-to-buffer-other-window (get-buffer-create "*Org Export Dispatcher*")) - (setq cursor-type nil - header-line-format "Use SPC, DEL, C-n or C-p to navigate.") + (setq cursor-type nil) + (setq header-line-format + (let ((propertize-help-key + (lambda (key) + ;; Add `face' *and* `font-lock-face' to "work + ;; reliably in any buffer", per a comment in + ;; `help--key-description-fontified'. + (propertize key + 'font-lock-face 'help-key-binding + 'face 'help-key-binding)))) + (apply 'format + (cons "Use %s, %s, %s, or %s to navigate." + (mapcar propertize-help-key + (list "SPC" "DEL" "C-n" "C-p")))))) ;; Make sure that invisible cursor will not highlight square ;; brackets. (set-syntax-table (copy-syntax-table)) -- 2.38.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 "One can begin to reason only when a clear picture has been formed in the imagination." -- Walter Warwick Sawyer, Mathematician's Delight, 1943 Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25 84103 Bratislava Slovakia --=-=-=--