From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6I8MCNMgQWNBbwEAbAwnHQ (envelope-from ) for ; Sat, 08 Oct 2022 09:03:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UO8cCNMgQWPM5QAA9RJhRA (envelope-from ) for ; Sat, 08 Oct 2022 09:03:47 +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 D63A233D64 for ; Sat, 8 Oct 2022 09:03:46 +0200 (CEST) Received: from localhost ([::1]:51072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oh3s9-0001QC-RN for larch@yhetil.org; Sat, 08 Oct 2022 03:03:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh3r6-0001Py-Kr for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 03:02:40 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:43921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oh3r4-0000Di-UW for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 03:02:40 -0400 Received: by mail-pl1-x62e.google.com with SMTP id z20so6316074plb.10 for ; Sat, 08 Oct 2022 00:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xb4T2trVuhFuEZGt60vZnabVGxraBRwUNUKSBrD1vq4=; b=a29kZap6UHLPwvslxKQVkCF59ntI3Bo64MjakYiNz2wx2PznwCbuz0ZNCGYV1T1BW4 PwBcNwcgkwaFgWW19mX/nK5yXKZBriLa3Q4huI/qhF6WqPpeK/yV+biTmhNK+4T36t0j esfg4bmIWHXKBlZIpkY7J4oZrDOyCDYHihe3CXO/9l0I82Ypec4qxP5enCbRSKZZT0RS ItiwwRS6cC5JW0lsgIcZdDRW5Zm6tEkiWPt7wtTDoX5sGFM1RfamJIdLNRZ0ViFkxNQh BZN9Mks54fa6JV3TZxPrls8M8fS0Z9to6v7DQclPAm5yeqWJwXtpd5WuAzXDEf84SH53 a9KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xb4T2trVuhFuEZGt60vZnabVGxraBRwUNUKSBrD1vq4=; b=nvqcVVToLZUJ84fZ3hKLBrK+ESsMQCher+97TwzDwbuWjAxWou7zvxlgjV+s8Sjfkj fkxJwTIv8iyAaClTO49Zlv4aAomXy32uwq6qcnZYWHxMTg9URIGGLUuJ0Nlu9Jz+Z+ks L+BmbuYpQ9DMlHhA1z4iAZAToO6118ViCwOs4al3bg3t2Ebac639lAlXLQlT3TF3I14Q 0EzXxQ30VgZAHCd7/fNvOJGYgg9DehFKKCPpKy0UER51HSRxNP+ll+5h9OW/KajKoES1 qNX8d5t0eZHoOjAH2xps8qEg/VH6/QZqamrjcH1XGNCQe9JSWOm0+XdFoDr7H467rrvC stUQ== X-Gm-Message-State: ACrzQf0nYkyB4hxq+0XUGjYm66OD2tk0yYd/s6ZJorFgJdgOz+HyzLK0 32vOyxbUSYNHb0sfwY3nHIE= X-Google-Smtp-Source: AMsMyM5sbOBfeK7y7KV2rWDf8MiCRa68z4MyduKV0BrWQTNmyJioJJGd3qPEnw+ng5ok99QvMX182w== X-Received: by 2002:a17:903:40cb:b0:17f:6e08:6eac with SMTP id t11-20020a17090340cb00b0017f6e086eacmr8484887pld.80.1665212557401; Sat, 08 Oct 2022 00:02:37 -0700 (PDT) Received: from localhost ([1.83.155.53]) by smtp.gmail.com with ESMTPSA id f62-20020a62db41000000b00540f96b7936sm2764754pfg.30.2022.10.08.00.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Oct 2022 00:02:36 -0700 (PDT) From: Ihor Radchenko To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: emacs-orgmode@gnu.org Subject: Re: Propertize some navigational keybindings In-Reply-To: References: Date: Sat, 08 Oct 2022 15:03:28 +0800 Message-ID: <87k05akda7.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62e.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, 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-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=1665212626; 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=xb4T2trVuhFuEZGt60vZnabVGxraBRwUNUKSBrD1vq4=; b=tgsccT+gwNfZ5Y1YndHLaW87a2wGx88iDd5d9M/GpAp+jgccR49dPOPzro2oKH924fvEjW qMbo+wufzK80yP+TP59aEN212xgGDPsuA4RHTSHHYOgr6IS9zq773e7rddnFPtSLrsUtp6 01Hc2wXvz3gwoLZ0voeXoV9qM6inLb9XA/8f4N12AdHNP+Ibai2+0TWPq5sSVNCxvlMu/U QzfRKBamXzI2ns1J65FOIbxYdBML+0aK5UD2MGQY4SOqu2gkI7teNHByj3OPHCXt+vGgTY gmTnhW1JJUKlNgROnbS6/a4j3E3WC6oKP/8Y3VA3Zdw6JALp/YG7oJ/2kr/OWg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665212626; a=rsa-sha256; cv=none; b=ZNN7nDUcUi2/DB2woYIZBnrAjlsUoo46NcDHGRPzPY8A/iZVcKjT09SiEhGguNSnLz0/v8 wnSS/IX3ASZfkfMur3L447Uv0Ia1U2QBgK8FYfQEF+iFULHOXNZ3/udCEM33XPz+UQ8gBm mv2E1cqUYnmpzzA2zuJPYVdIsRMOwmOsyNqaT1GXrSLW9mGX7UZbtrrtOOAIA56h8NOQI0 fo8Xf67cZNSjU5pDisbAZ6c49frxDwSz0aVTQjMZoOWaOGvCx2trrDGLPca5BmdSBvO+ZF q3MOQOCLu2ZmK6VF8ME0kYVsEC8HjknHPCQfxbVB1vWdvs2h/P6zxXHyQ8JWMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=a29kZap6; 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: -3.38 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=a29kZap6; 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: D63A233D64 X-Spam-Score: -3.38 X-Migadu-Scanner: scn1.migadu.com X-TUID: 87gdRoleEDYw Rudolf Adamkovi=C4=8D writes: > Howdy, howdy! > > Please review the attached patch that propertizes (i.e. adds style to) > the navigational keybindings displayed in the header of the Org Export > dispatch UI. Thanks! > + (setq cursor-type nil) > + (setq header-line-format > + (apply 'format > + (cons "Use %s, %s, %s, or %s to navigate." > + (mapcar (lambda (key) > + (propertize key 'face 'help-key-bin= ding)) > + (list "SPC" "DEL" "C-n" "C-p"))))) 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): (defun help--key-description-fontified (keys &optional prefix) "Like `key-description' but add face for \"*Help*\" buffers. KEYS is the return value of `(where-is-internal \\=3D'foo-cmd nil t)'. Return nil if KEYS is nil." (when keys ;; We add both the `font-lock-face' and `face' properties here, as this ;; seems to be the only way to get this to work reliably in any ;; buffer. (propertize (key-description keys prefix) 'font-lock-face 'help-key-binding 'face 'help-key-binding))) --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at