Modify the show view key bindings as follows to make them more
consistent:
'a' = Archive current message, then move to next message, or show next
thread from search if at the last message in thread.
'A' = Archive each message in thread, then show next thread from
search.
'x' = Archive current message, then move to next message, or exit back
to search results if at the last message in thread.
'X' = Archive each message in thread, then exit back to search
results.
The changes make the key bindings more consistent in two ways:
1) 'a'/'A' both advance to the next thread like 'a' used to.
2) 'x' operates on messages and 'X' on threads like 'a'/'A'.
The patch adds `notmuch-show-tag-all' function bound to "*" in
notmuch-show view. The function is similar to the
`notmuch-search-tag-all' function for the notmuch-search view: it
changes tags for all messages in the current thread.
Before the change, "+" and "-" tagging operations in notmuch-show view
accepted only a single tag. The patch makes them use the recently
added `notmuch-read-tag-changes' function, which allows to enter
multiple tags with "+" and "-" prefixes. So after the change, "+" and
"-" bindings in notmuch-show view allow to both add and remove
multiple tags. The only difference between "+" and "-" is the
minibuffer initial input ("+" and "-" respectively).
The blank line doesn't really change position, but is now considered
to be part of the body rather than part of the headers. This means
that it is visible when the body is visible rather than when the
headers are visible.
This changes the default key bindings for the 'a' key in notmuch-show
mode. Instead of archiving the entire thread, it now just archives
the current message, and then advance to the next open message
(archive-message-then-next). 'A' is now bound to the previous
archive-thread-then-next function.
This will allow for keybindings that achieve a smoother message
processing flow by reducing the number of key presses needed for most
common operations.
This adds two new message archiving functions that parallel the thread
archiving functions: notmuch-show-archive-message{,-then-next}. The
former also takes a prefix argument to unarchive the message (ie. put
back in inbox).
This function is now just for archiving the current thread. A new
function is created to archive-then-next. The 'a' key binding is
updated accordingly.
This will allow people to bind to the simple thread archiving function
without the extra navigation. The archive-thread function now also
takes a prefix to unarchive the current thread (ie. put the whole
thread back in the inbox).
Break up notmuch-show-archive-thread-internal into two new functions:
notmuch-show-tag-thread-internal: applies a tag to all messages in
thread. If option remove flag is t, tags will be removed instead of
added.
notmuch-show-next-thread: moves to the next thread in the search
result. If given a prefix, will show the next result, otherwise will
just move to it in the search view.
Two new interactive functions, notmuch-show-{add,remove}-tag-thread,
are also added. Together, these provide a better suit of thread
tagging and navigation tools.
The higher level thread archiving functions are modified to use these
new function.
`mail-header-parse-address' expects un-decoded mailbox parts, which is
not what we have at this point. Replace it with simple string
deconstruction.
Mark the corresponding test as no longer broken.
Minor whitespace cleanup.
The `mm-inlinable-p' function works better if it has access to the
data of the relevant part, so load that content before calling it.
Don't load the content for parts that the user has indicated no desire
to inline.
This fixes the display of attached image/jpeg parts, for example.
Define a keymap for attachment buttons to allow multiple actions.
Define 3 possible actions:
save attachment: exactly as currently,
view attachment: uses mailcap entry,
view attachment with user chosen program
Keymap on a button is: s for save, v for view and o for view with
other program. Default (i.e. enter or mouse button) is save but this
is configurable in notmuch customize.
One implementation detail: the view attachment function forces all
attachments to be "displayed" using mailcap even if emacs could
display them itself. Thus, for example, text/html appears in a browser
and text/plain asks whether to save (on a standard debian setup)
Add various functions to print notmuch messages and tie them together
with a simple frontend.
Add a binding ('#') in `notmuch-show-mode' to print the current
message.
one trailing space removed by db.
Enable the truncation of lines in `notmuch-show-mode' to avoid visual
noise caused by the wrapping of the header lines.
Don't enable `visual-line-mode' because it disables line truncation.
The benefits of `visual-line-mode' were that it wrapped long lines
in received messages. With `notmuch-wash-wrap-long-lines' now default
behaviour, this is no longer required.
To allow for expansion whilst keeping everything tidy and organized,
move all defcustom/defface variables to the following subgroups,
defined in notmuch-lib.el:
- Hello
- Search
- Show
- Send
- Crypto
- Hooks
- External Commands
- Appearance
As an added benefit, defcustom keyword args are now consistently
ordered as they appear @ defcustom's docstring (OCD much?).
Proper defgroup docstrings and various other improvements
by courtesy of Austin Clements.
This reverts commit 4b256ff557.
According to id:"87aa5nlwwg.fsf@praet.org" and followup messages, the
assumptions of the patch seem not to hold in emacs 23.
The tags were coloured using text properties. Unfortunately that text
(the header line) also has an overlay, which overrides the text
properties. There's not point in applying text properties that will
never be seen.
Provide reply to sender counterparts to the search and show reply
functions. Add key binding 'R' to reply to sender, while keeping 'r' as
reply to all, both in search and show views.
Signed-off-by: Jani Nikula <jani@nikula.org>
Users are missing out on various functions which usefully improve the
display of text/plain message parts because they are not enabled by
default. Enable a useful set.
`notmuch-wash-convert-inline-patch-to-part' is _not_ enabled by
default as it is based on a heuristic.
Add wash generated inline patch fake parts through a special
"inline-patch-fake-part" handler to distinguish them from real MIME
parts. The fake parts are described as "inline patch (as text/x-diff)".
Signed-off-by: Jani Nikula <jani@nikula.org>
Since message-ids necessarily match just a single message, there's no
reason to do a search for the id before viewing the actual message;
the search just becomes an extra screen to click through. Clicking on
an id: links now just jumps straight to the message itself.
Text properties change between characters; prev-s-c-property-change
returns the position after the change. Thus, it is still inside the
invisible region.
Commit cb841878 introduced new parts handlers for crypto parts, but also
hardcoded values for their headers face. This replaces these hardcoded values
with a customizable face.
Before the change, there was a workaround to avoid notmuch show calls
for parts with application/* Content-Type. But non-inlinable parts
are not limited to this Content-Type (e.g. mp3 files have audio/mpeg
Content-Type and are not inlinable). For such parts
`notmuch-show-insert-part-*/*' handler is called which unconditionally
fetches contents for all parts.
The patch moves content fetching from `notmuch-show-insert-part-*/*'
to `notmuch-show-mm-display-part-inline' function after MIME inlinable
checks are done to avoid useless notmuch show calls. The
application/* hack is no longer needed and removed.
Add optional props argument to `notmuch-show-get-header'. Use it to
get headers in `notmuch-show-insert-part-multipart/signed' and
`notmuch-show-insert-part-multipart/encrypted'.
Till now Emacs UI indents messages according to their respecive
depth of neting in the thread. The actual width of indentation
per level is hardcoded to `1' space.
This patch makes message indentation customisable by introducing
a variable `notmuch-indent-messages-width' which defaults to `1',
which is the same as before. Felix could set this variable to
`0' in order to disable indentation, I tested it with a value of
`4' for a clearer separation of messages in a thread.
There's no reason to record undo information for read-only,
programmatically-constructed buffers. The undo list just chews up
memory keeping track of our calls to insert.
This patch breaks out much of the functionality of
notmuch-show-advance-and-archive into a new function:
notmuch-show-advance. This new function does all the advancing
through a show buffer that notmuch-show-advance-and-archive did,
without all the invasive thread archiving. The return value of
notmuch-show-advance is nil if the bottom of the thread is not
reached, and t if it is.
notmuch-show-advance-and-archive is modified to just call
notmuch-show-advance, and then call notmuch-show-archive-thread if the
return value is true. In this way the previous functionality of
notmuch-show-advance-and-archive is preserved.
This provides a way for people to rebind the space bar to a more sane
function if they don't like the default behavior.
The main reason to introduce this new unexposed function is to allow
the buffer redisplay crypto switch to behaving in a more expected way.
The prefix to notmuch-show-redisplay buffer now switches the crypto
processing of the current show buffer, as opposed to switching the
logic of the notmuch-crypto-process-mime customization variable. This
behavior is more intuitive.
Add function `notmuch-show-stash-message-id-stripped'
which stashes a Message-ID after ripping off the prefix and quotes,
add bind it to "I" key in `notmuch-show-stash-map'.
Simplifying `notmuch-show-get-message-id' instead might seem better,
but that would require concat'ing in 9 places instead of 1.
Signed-off-by: Pieter Praet <pieter@praet.org>
Use `previous-single-char-property-change' instead of going
through each character by hand and testing it's visibility. This
fixes `notmuch-show-advance-and-archive' to work for the last
message in thread with hidden signature.