From: "Sławomir Grochowski" <slawomir.grochowski@gmail.com>
To: Philip Kaludercic <philipk@posteo.net>
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: Thu, 18 Apr 2024 22:55:47 +0200 [thread overview]
Message-ID: <87mspqe6gc.fsf@gmail.com> (raw)
In-Reply-To: <87o7a9lqh1.fsf@posteo.net>
Philip Kaludercic <philipk@posteo.net> writes:
> Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:
>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>> I have pushed the changes to master.
>>
>> Thank you Philip for your help. It works.
>>
>> But there is one more small thing.
>> A message that is displayed in the minibuffer.
>> It contains two pieces of information:
>>
>> (1) command name
>> Right now it's hardcoded.
>> We need to change the it from `help-quick-toggle' to
>> `org-columns-help-quick-toggle'.
>> How to do it?
>> Add another variable like `help-quick-use-map'?
>> Maybe 'help-quick-command-name'?
>
> Instead of using substitute-command-keys, we could just use
> this-command, but that assumes that help-quick can always be toggled by
> the command that invokes it.
That's great idea. I tried with this code:
(message "Toggle display of quick-help buffer using %s."
(propertize (key-description (this-command-keys)) 'face 'help-key-binding 'font-lock-face 'help-key-binding))
And it works perfectly.
>> (2) keybinding to the command name
>> Just to modify message string. Add '\\<help-quick-use-map>'.
>> To use other keymap.
>> Change is in the diff below.
>
> I don't see how this would work in general, at the very least it breaks
> the regular usage.
>
> Furthermore, I am not convinced we have to change anything here, since
> C-h C-q (the default binding for `help-quick-toggle') should also hide
> the buffer if one uses your command, or am I mistaken?
But I would like 'help-quick' for org-columns to be bind to other
keybinding: "?" not "C-h C-q".
Because now it's like this:
1. invoke the command using "?" keybinding:
(defun org-columns-help-quick-toggle ()
(interactive)
(let ((help-quick-sections org-columns-help-quick-sections)
(help-quick-use-map org-columns-map))
(help-quick-toggle)))
(org-defkey org-columns-map "?" #'org-columns-help-quick-toggle)
2. 'help-quick' for org-columns buffer will appear with the message:
"Toggle display of quick-help buffer using C-h C-q."
So this is misleading.
Because pressing 'C-h C-q' will close the buffer but pressing it again
will show 'help-quick' buffer and not 'help-quick' for org-columns buffer.
Therefore, I think that to use a different keybinding we need to modify
the code.
Or am I missing something?
--
Slawomir Grochowski
next prev parent reply other threads:[~2024-04-18 20:56 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
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 [this message]
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=87mspqe6gc.fsf@gmail.com \
--to=slawomir.grochowski@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=philipk@posteo.net \
--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).