unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Matt Armstrong <marmstrong@google.com>
To: Sheng Yang <yangsheng6810@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Fix notmuch-describe-key
Date: Tue, 05 Mar 2019 08:20:17 -0800	[thread overview]
Message-ID: <qf5ef7lcmym.fsf@naz.kir.corp.google.com> (raw)
In-Reply-To: <875zsy0yb8.fsf@gmail.com>

Sheng Yang <yangsheng6810@gmail.com> writes:

> For the second case, I mean the call of notmuch-help fails with the
> following error:
>
> notmuch-documentation-first-line: Symbol’s function definition is void: aya-persist-snippet
>
> Sorry for the confusion. Other void functions include the following for me
>
> spacemacs/search-pt-grep-region-or-symbol
> spacemacs/search-pt-grep
> spacemacs/search-rg-grep-region-or-symbol
> spacemacs/search-rg-grep
> spacemacs/search-ack-grep-region-or-symbol
> spacemacs/search-ack-grep

Thank you, that makes sense to me now.


> I think either is fine: notmuch-documentation-first-line is only
> called from notmuch-describe-key, we can do it in either function. The
> advantage of fixing it in notmuch-describe-key is that we can avoid
> some lines that have key bindings without description.

I agree.  Given all this, I think your patch looks good.


> Here are some known problems that are not fixed by this patch:
> 1. For me, 600+ lines of help are produced by notmuch-hello, which is a
> lot. (Maybe not as much, as counsel-desbinds tells me there are 3000+
> key bindings)

It is interesting that your help buffer displays 600 lines.  The intent
of the notmuch help is to display help for the notmuch commands, not the
myriad of other key bindings available.

I use vanilla Emacs (not spacemacs, not evil mode, etc.), and the help
buffers are about a page long.  For example, in a search buffer the key
bindings display as this:

Complete list of currently available key bindings:

?	Display help for the current notmuch mode.
q	Undisplay the current buffer.
s	Search for messages.
z	Display threads matching QUERY in Tree View.
g	Refresh the current buffer.
=	Refresh the current buffer.
M-=	Invoke ‘notmuch-refresh-this-buffer’ on all notmuch major-mode buffers.
G	Invoke ‘notmuch-poll’ to import mail, then refresh the current buffer.
j	Jump to a saved search by shortcut key.
x	Undisplay the current buffer.
DEL	Move backward through the search results by one window’s worth.
b	Move backward through the search results by one window’s worth.
SPC	Move forward through search results by one window’s worth.
<	Select the first thread in the search results.
>	Select the last thread in the search results.
p	Select the previous thread in the search results.
n	Select the next thread in the search results.
r	Begin composing a reply to the entire current thread in a new buffer.
R	Begin composing a reply-all to the entire current thread in a new buffer.
o	Toggle the current search order.
c i	Copy thread ID of current thread to kill-ring.
c q	Copy current query to kill-ring.
c ?	Show help for a subkeymap.
t	Filter the current search results based on a single tag.
l	Filter or LIMIT the current search results based on an additional query string.
k	Create a jump menu for tagging operations.
*	Add/remove tags from all messages in current search buffer.
a	Archive the currently selected thread or region.
C-u a	Un-archive the currently selected thread.
-	Change tags for the current thread or region (defaulting to remove).
+	Change tags for the current thread or region (defaulting to add).
RET	Display the currently selected thread.
Z	Call notmuch tree with the current query
m	Mute the currently selected thread or region.


> 2. Key bindings using leader key (in spacemacs, it is ESC) are not
> shown correctly: instead of showing "SPC q q", notmuch-help shows "q q"
> for a key binding <SPC q q>. 
> 3. Some lines show key bindings with no explanation. Possibly because no
> doc string is available for these functions.
>
> If we do not need to stick to the current implementation of
> notmuch-help, a simple way is to port counsel-desbinds or
> counsel--desbinds-cands from counsel.el.

Yes, I can believe that spacemacs and/or evil mode do not display useful
help when using "vanilla" Emacs commands to display the help, since
vanilla Emacs doesn't understand the approach.

I think it would be great if someone worked with upstream Emacs to make
the `documentation' function do something useful for evil mode and
spacemacs.  If that happened, then all packages would benefit.  Porting
things like counsel-descbinds into packages like notmuch can work but
does not feel like the right long term solution to me.

  reply	other threads:[~2019-03-05 16:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03  4:35 [PATCH] Fix notmuch-describe-key Yang Sheng
2019-03-03 18:50 ` William Casarin
2019-03-05  1:55 ` Matt Armstrong
2019-03-05  2:27   ` Matt Armstrong
2019-03-05  3:55   ` Sheng Yang
2019-03-05 16:20     ` Matt Armstrong [this message]
2019-03-05 16:36       ` Sheng Yang
2019-03-05 17:28         ` Matt Armstrong
2019-03-31 17:53 ` David Bremner

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://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=qf5ef7lcmym.fsf@naz.kir.corp.google.com \
    --to=marmstrong@google.com \
    --cc=notmuch@notmuchmail.org \
    --cc=yangsheng6810@gmail.com \
    /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://yhetil.org/notmuch.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).