[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
From: |
Sławomir Grochowski |
Subject: |
Re: [DISCUSSION] "quick-help" popup for org-columns (column view) |
Date: |
Thu, 18 Apr 2024 22:55:47 +0200 |
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
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), (continued)
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/08
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/08
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/10
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/10
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/11
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/11
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/11
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/13
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/15
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/16
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view),
Sławomir Grochowski <=
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Eli Zaretskii, 2024/04/08