From: Philip Kaludercic <philipk@posteo.net>
To: "Sławomir Grochowski" <slawomir.grochowski@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
yantar92@posteo.net, emacs-orgmode@gnu.org,
emacs-devel@gnu.org
Subject: Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
Date: Wed, 10 Apr 2024 08:26:08 +0000 [thread overview]
Message-ID: <87o7ahmxnj.fsf@posteo.net> (raw)
In-Reply-To: <87cyqzllbx.fsf@gmail.com> ("Sławomir Grochowski"'s message of "Mon, 08 Apr 2024 21:13:06 +0200")
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> We could add a `help-quick-use-map' variable and bind it to `global-map'
>> by default. You can then re-bind it in your command.
>
> I'm sorry, but I don't quite understand it.
Just this here:
[-- Attachment #2: Type: text/plain, Size: 941 bytes --]
diff --git a/lisp/help.el b/lisp/help.el
index 1ef46e394f3..5700f10fdc8 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -175,6 +175,9 @@ help-quick-sections
COMMAND is the symbol of a command and DESCRIPTION is its short
description, 10 to 15 char5acters at most.")
+(defvar help-quick-use-map global-map
+ "Keymap that `help-quick' should use to lookup bindings.")
+
(declare-function prop-match-value "text-property-search" (match))
;; Inspired by a mg fork (https://github.com/troglobit/mg)
@@ -193,7 +196,7 @@ help-quick
(let ((max-key-len 0) (max-cmd-len 0) keys)
(dolist (ent (reverse (cdr section)))
(catch 'skip
- (let* ((bind (where-is-internal (car ent) nil t))
+ (let* ((bind (where-is-internal (car ent) help-quick-use-map t))
(key (if bind
(propertize
(key-description bind)
[-- Attachment #3: Type: text/plain, Size: 565 bytes --]
You would then only have to rebind `help-quick-use-map' in your custom
command.
> It seems to me that the simplest way is to add a parameter to the
> function, like this:
>
> (defun help-quick (&optional keymap)
>
> Because it will not change the behavior for previous calls to this
> function. And it will allow to pass specific keymap, not need to pass
> and search in whole global-map.
>
> What do you think?
Eli said that we shouldn't change the signature of public functions, so
I don't think that this is an option.
--
Philip Kaludercic on peregrine
next prev parent reply other threads:[~2024-04-10 8:26 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 19:55 [DISCUSSION] "quick-help" popup for org-columns (column view) Sławomir Grochowski
2024-02-08 22:16 ` Adam Porter
2024-02-08 23:01 ` Stefan Kangas
2024-02-09 23:02 ` Ihor Radchenko
2024-02-10 15:44 ` Philip Kaludercic
2024-02-10 18:04 ` [External] : " Drew Adams
2024-03-20 23:15 ` JD Smith
2024-03-20 14:08 ` Ihor Radchenko
2024-04-06 20:41 ` Sławomir Grochowski
2024-04-06 22:08 ` chad
2024-04-06 22:40 ` Philip Kaludercic
2024-04-07 5:57 ` Eli Zaretskii
2024-04-08 7:38 ` Sławomir Grochowski
2024-04-08 8:24 ` Philip Kaludercic
2024-04-08 19:13 ` Sławomir Grochowski
2024-04-10 8:26 ` Philip Kaludercic [this message]
2024-04-10 20:42 ` Sławomir Grochowski
2024-04-11 6:37 ` Philip Kaludercic
2024-04-11 6:58 ` Philip Kaludercic
2024-04-11 8:43 ` Sławomir Grochowski
2024-04-13 8:37 ` Philip Kaludercic
2024-04-15 12:39 ` Sławomir Grochowski
2024-04-16 7:24 ` Philip Kaludercic
2024-04-18 20:55 ` Sławomir Grochowski
2024-05-02 18:04 ` Sławomir Grochowski
2024-04-08 11:46 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7ahmxnj.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=slawomir.grochowski@gmail.com \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).