Commit graph

66 commits

Author SHA1 Message Date
David Edmondson
c579c8201f emacs: Display all body parts using `notmuch part --part=<n>'
Use the `notmuch part' command to access body parts not currently
included in the JSON output and display those body parts
appropriately.
2010-04-21 13:14:46 -07:00
David Edmondson
6c0621962a emacs: Use mailcap.el to guess the type of application/octet-stream parts
Use the mailcap functionality to guess a MIME type for attachments of
type application/octet-stream and, presuming successful, feed the
attachment back into the display code with the determine type.

This is mostly useless at the moment, as the JSON output from notmuch
does not include the content of application/octet-stream parts, so
they cannot be displayed even if the guess is a good one.
2010-04-21 13:14:39 -07:00
David Edmondson
4488cf30f6 emacs: Use `mm-display-part' when possible
For parts that the mm-decode/mm-view functions can inline and we have
the content, use `mm-display-part' to insert the part in the
buffer.
2010-04-21 13:10:51 -07:00
David Edmondson
b93c5749fd emacs/notmuch-show.el: Improved part labelling
If a text/plain part is not the first part in a message, add a label
in order that a user can see that multiple parts are present.

If a part has a 'filename' attribute, include it in any label
describing the part.
2010-04-21 13:05:39 -07:00
David Edmondson
3b3da097d8 emacs: Move body markup to a separate file
Move the citation and signature markup for text/plain parts to a new
file (notmuch-wash.el) and call it using a hook mechanism rather than
directly.
2010-04-21 12:55:46 -07:00
Carl Worth
aab9fa307b emacs: Rename body-invis-spec to message-invis-spec
This is more consistent with the related names (toggle-message,
:message-visible, etc.)
2010-04-21 12:52:38 -07:00
Carl Worth
b825204f0d emacs: Remove the notmuch-show-toggle-body command (with "b" binding)
In the recent switch to a JSON-based emacs interface, RET now toggles
message visibility anywhere in the message, (rather than only on the
summary line). So we no longer need this separate "b" binding for this.

Additionally, the body toggle was implemented independently from RET,
so after hiding a message with "b" one could not make it visible with
RET. This confusing state is now no longer possible, (since the
:body-visible property is removed entirely).
2010-04-21 12:52:38 -07:00
David Edmondson
e26d767897 emacs: JSON based implementation
Re-implement notmuch-show.el using the JSON output format of the
notmuch command. Most functionality is retained - HTML display is
noticeably missing.
2010-04-21 12:12:02 -07:00
David Edmondson
f920ff59b9 emacs/notmuch-show.el: Avoid passing unintended format strings to `message'
If the text being stashed included %, `message' was unhappy and
complained.
2010-04-19 10:15:09 -07:00
Jesse Rosenthal
9193455fa1 notmuch.el: quote args in notmuch-show to facilitate remote use
Put single-quotes around the argument of the `show --entire-thread' command
in notmuch-show. This change should have no effect on normal usage.
However, it allows us to use the notmuch.el client with a remote notmuch
binary and database over ssh (by, e.g., setting `notmuch-command' to a
simple shell script). Without the quotes, ssh will not send the command
properly.

One very simple example script is as follows. (Note that it requires
keypair login to the ssh server.)

        #!/bin/sh

        SSH_BIN="/path/to/local/ssh"
        NOTMUCH_HOST="my.remote.server"
        NOTMUCH_REMOTE_PATH="/path/to/remote/notmuch"

        $SSH_BIN $NOTMUCH_HOST $NOTMUCH_REMOTE_PATH $@
2010-04-13 09:14:03 -07:00
Carl Worth
d5f5b38339 Display the last few lines of a citation by default.
As put forth in the commit that enabled this functionality, the last
few lines of a citation are often much more important. In that case,
let's actually do the useful thing by default.
2010-04-07 12:15:08 -07:00
David Edmondson
c44ce805de notmuch.el: Allow citation suffixes to be shown as well as prefixes.
In many conversations the last few lines of a citation are more
interesting than the first few lines, hence allow those to be shown if
desired.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-07 12:10:36 -07:00
David Edmondson
e95dac86f5 notmuch.el: Colour cited regions and signatures with message-cited-text-face
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> (with fixup to
               avoid over-eager coloring of signatures).
2010-04-07 12:02:35 -07:00
Carl Worth
8364c2f36e emacs: Fix typo in line-wrapping in documentation of notmuch-show.
Just trying to keep things neat.
2010-04-07 10:40:29 -07:00
Jesse Rosenthal
9bee20aed3 notmuch.el: Make notmuch-show buffer name first subject, instead of thread-id (supersedes V1--3)
Change the buffer name to a uniquified subject of the thread (i.e. the
subject of the first message in the thread) instead of the thread-id. This
is more meaningful to the user, and will make it easier to scroll through
numerous open buffers.

Note that this patch adds an optional `buffer-name' argument to notmuch
show.

Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-07 10:40:06 -07:00
David Edmondson
e8414a72d4 emacs: Move notmuch-show functionality to notmuch-show.el
To ease the transition to a JSON based implementation of
`notmuch-show', move the current implementation into a separate file.

Create `notmuch-lib.el' to hold common variables.
2010-04-05 09:25:56 -07:00