RFC notmuch-pick: an emacs threaded message view with split-pane
Mark Walters
markwalters1009 at gmail.com
Sun Feb 12 02:32:48 PST 2012
Hello
On irc recently dme posted a patch notmuch-pick.el which provided a
threaded message view in the emacs interface. I have added substantially
to it and made some cli changes to support it better. See
http://kanelephant.com/screen.png for a screenshot.
It seems to be working well (although doubtless has bugs and lots of
room for improvement).
One important caveat is that it does call notmuch-show rather than
notmuch-search so it can be slow. Viewing 10000 notmuch messages takes
me 20 seconds with a warm cache and about a minute with a cold
cache. Viewing million message searches in this fashion is not
recommended!
Note since I modify the notmuch-show.c backend this applies on top of
Jani's show parsing patches id:"cover.1328558175.git.jani at nikula.org"
The most important key bindings are as follows:
'z' enter a search to display in pick view (analogous to s; works in
hello, search, show and pick mode).
'Z' displays the current search in pick mode (works in search and show
mode)
In pick mode: RET displays a message (splitting the current window),
SPACE scrolls the message window and goes to next message when it
reaches the end, 'b' scrolls the message window back, 'p', 'n' move to
the next matching message, 'q' closes the message window (if open) or
quits the pick view.
't' toggles whether to show the messages as a thread-tree structure or
just as single messages, 'o' toggles the sort order.
Most of the other commands I could think of work as I would expect (eg
tagging, piping, help etc)
Questions/thoughts and known bugs:
Do people like the rough idea?
At the moment there is some shared code with notmuch-show.el. This could
be factored out: however, while this pick mode is WIP I don't think it
is worth it. I have tried to keep the impact on the current parts of the
emacs code and the command line interface fairly small.
I will send the patches as 3 bits: one is the command-line support
needed (i.e. changes to notmuch-show.c) one is the changes to the other
emacs files and the final one is the notmuch-pick.el file itself.
There are some things that need fixing: some of which are marked in the
code. For example the highlighting (lowlighting?) of non-matching
messages is hard-wired gray and should be a defcustom. The tags are not
in a nice tag face and do not update automatically. There should be an
option not to use the split-screen mode.
Anyway I am already finding it useful: show a long thread, press 'Z' to
see the thread structure nicely and then ...
Best wishes
Mark
More information about the notmuch
mailing list