aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-show.el
Commit message (Collapse)AuthorAge
...
* emacs: Re-enable line wrapping in `notmuch-show-mode'.Gravatar David Edmondson2012-01-27
| | | | | Turn on `visual-line-mode' via a hook, so that those who so choose can avoid it.
* emacs: Make the part content available to `mm-inlinable-p'.Gravatar David Edmondson2012-01-26
| | | | | | | | | | 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.
* emacs/*.el: changed one-char comment prefix ';' to two; ';;'Gravatar Tomi Ollila2012-01-21
| | | | | In order for emacs (indent-region) to (re)indent emacs lisp properly there needs to be at least 2 comment characters (;;).
* Make buttons for attachments allow viewing as well as savingGravatar Mark Walters2012-01-21
| | | | | | | | | | | | | | | | | 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)
* emacs: Improved printing support.Gravatar David Edmondson2012-01-21
| | | | | | | | | | 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.
* emacs: Truncate lines and do not enable visual-line-mode in notmuch-show ↵Gravatar David Edmondson2012-01-21
| | | | | | | | | | | | | buffers. 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.
* emacs: globally replace non-branching "(if (not ..." with "(unless ..."Gravatar Pieter Praet2012-01-21
| | | | Less code, same results, without sacrificing readability.
* emacs: logically group def{custom,face}sGravatar Pieter Praet2012-01-19
| | | | | | | | | | | | | | | | | | | | | 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.
* Revert "emacs: Don't attempt to colour tags in `notmuch-show-mode'."Gravatar David Bremner2012-01-17
| | | | | | | This reverts commit 4b256ff557e924fbaffca144d25a9d5f92026146. According to id:"87aa5nlwwg.fsf@praet.org" and followup messages, the assumptions of the patch seem not to hold in emacs 23.
* emacs: Don't attempt to colour tags in `notmuch-show-mode'.Gravatar David Edmondson2012-01-15
| | | | | | | 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.
* emacs: bind 'r' to reply-to-sender and 'R' to reply-to-allGravatar Jani Nikula2012-01-14
| | | | | | | Change the default reply key bindings, making 'r' reply-to-sender and 'R' reply-to-all. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: add support for replying just to the senderGravatar Jani Nikula2012-01-14
| | | | | | | | 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>
* notmuch/emacs: Observe the charset of text/html parts, where known.Gravatar David Edmondson2012-01-13
| | | | | | Add the charset of text/html parts to the JSON output of 'notmuch -show' when it is known. Observe the encoding when rendering such parts in emacs.
* Merge branch 'release'Gravatar David Bremner2012-01-13
|\ | | | | | | | | | | Conflicts: notmuch-reply.c notmuch.1
| * emacs: fix notmuch-show-indent-messages-width customization variable nameGravatar Jameson Graef Rollins2012-01-05
| | | | | | | | | | The name was originally notmuch-indent-messages-width, which is inconsistent with our variable naming convention.
* | emacs: Enable more text/plain hook functions by default.Gravatar David Edmondson2011-12-28
| | | | | | | | | | | | | | | | | | 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.
* | emacs: add inline patch fake parts through a special handlerGravatar Jani Nikula2011-12-28
|/ | | | | | | | 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>
* emacs: call notmuch-show instead of notmuch-search in buttonised id: linksGravatar Jameson Graef Rollins2011-12-24
| | | | | | | 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.
* emacs: fix off-by-one bug in notmuch-show-archiveGravatar Aaron Ecay2011-12-23
| | | | | | Text properties change between characters; prev-s-c-property-change returns the position after the change. Thus, it is still inside the invisible region.
* Don't quote lambda formsGravatar Aaron Ecay2011-12-21
| | | | | | This generates byte-compiler warnings on (at least) current trunk versions of Emacs. The quote is not necessary; lambda forms are self-quoting.
* emacs: Document notmuch-show-get-message-propertiesGravatar Daniel Schoepe2011-12-16
|
* emacs: Add a face for crypto parts headersGravatar Thomas Jost2011-12-15
| | | | | | 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.
* emacs: do not call notmuch show for non-inlinable partsGravatar Dmitry Kurochkin2011-12-07
| | | | | | | | | | | | | | 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.
* emacs: remove unused variable in `notmuch-show-insert-part-message/rfc822'Gravatar Dmitry Kurochkin2011-12-07
| | | | | An obvious cleanup. I wonder why there was no warning about this during compilation.
* emacs: remove some code duplication in notmuch-showGravatar Dmitry Kurochkin2011-12-07
| | | | | | 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'.
* emacs: make message indentation width customisableGravatar Gregor Zattler2011-11-25
| | | | | | | | | | | 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.
* emacs: Don't record undo information for search or show buffers.Gravatar Austin Clements2011-11-24
| | | | | | 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.
* emacs: breakout notmuch-show-advance functionality from ↵Gravatar Jameson Graef Rollins2011-11-20
| | | | | | | | | | | | | | | | | | | | notmuch-show-advance-and-archive 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.
* emacs: add notmuch-show-worker function for specifying crypto processing ↵Gravatar Jameson Graef Rollins2011-11-13
| | | | | | | | | | | directly 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.
* emacs: add documentation for notmuch-show crypto-switch optionGravatar Jameson Graef Rollins2011-11-13
|
* emacs: add keybind and function to stash Message-ID without prefixGravatar Pieter Praet2011-11-12
| | | | | | | | | | | 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>
* emacs: remove no longer used functions from notmuch-show.elGravatar Dmitry Kurochkin2011-11-07
| | | | | | Remove `notmuch-show-move-past-invisible-backward' and `notmuch-show-move-past-invisible-forward' functions which are unused.
* emacs: improve hidden signatures handling in notmuch-show-advance-and-archiveGravatar Dmitry Kurochkin2011-11-07
| | | | | | | 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.
* emacs: Turn id:"<message-id>" elements into buttons for notmuch searchesGravatar Daniel Schoepe2011-10-28
| | | | | This fixes the minor annoyance that message ids were parsed as mail addresses by goto-address-mode in notmuch-show buffers.
* emacs: add notmuch-show-refresh-view functionGravatar Jameson Graef Rollins2011-10-06
| | | | | | | | | This function, like the equivalent for notmuch-search, just refreshes the current show view. Like in notmuch-search, this new function is bound to "=". If a prefix is given then the redisplay happens with the crypto-switch set, which displays the thread with the opposite logic of whatever is set in the notmuch-crypto-process-mime customization variable.
* emacs: Improve support for message/rfc822 parts.Gravatar Jameson Graef Rollins2011-09-05
| | | | | | | The insert-part-message/rfc822 function is overhauled to properly processes the new formatting of message/rfc822 parts. The json output for message parts now includes "headers" and "body" fields, which are now parsed and output appropriately.
* emacs: Fix to unconditionally display subject changes in collapsed thread viewGravatar Carl Worth2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature to show subject changes in the collapsed thread view was originally added (8ab433607) with an option (notmuch-show-always-show-subject) to display the subject for all messages, even when there was no change. The subsequent commit (4f04d273) changed the sense of the test (or to and) and the name of the controlling variable (notmuch-show-elide-same-subject). But this commit is broken in a few ways: 1. The original definition of notmuch-show-always-show-subject was left around But the variable isn't actually used in the code at all, so it just adds clutter and confusion to the customization interface. 2. The name and description of the controlling variable doesn't match the implementation The name suggests that setting the variable to t will cause repeated subjects to be elided, (suggesting that when it is nil all subjects will be shown). However, when the variable is nil, no subjects are shown. So a correct name for the variable in this sense would be notmuch-show-subject-changes. Showing subject changes is a useful feature, and should be on by default. (We don't want to bury generally useful features behind customizations that users have to find). Rather than fixing the name of the variable and changing its default value, here we remove the condition entirely, such that the feature is enabled unconditionally. So both the currently-used variable and the stale definition of the formerly-used are removed. Also, the one relevant test-suite result is updated, (showing the intial subject of a collapsed thread, and no subject display for later messages that do not change the subject).
* fix sum moar typos [user-visible documentation in code]Gravatar Pieter Praet2011-06-23
| | | | | | | | | | | | Various typo fixes in documentation within the code that can be made available to the user, (emacs function help strings, "notmuch help" output, notmuch man page, etc.). Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just documentation and fixed fix of "comman" to "common" rather than "command".
* fix sum moar typos [comments in source code]Gravatar Pieter Praet2011-06-23
| | | | | | | | | | Various typo fixes in comments within the source code. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just source-code comments, (and fixed fix of "descriptios" to "descriptors" rather than "descriptions").
* emacs: Show all multipart/alternative parts by default.Gravatar Jameson Graef Rollins2011-06-22
| | | | | | | | | | | | | | | | | | This is patch is a temporary work-around for a slight regression that popped up in the part handling reorganization. Currently, text/plain parts are always preferred, if present, over other non-text/plain parts in multipart/alternative. However, this means that if there is a blank text/plain part, no content will be displayed. One way to get around this is to set the "notmuch-show-all-multipart/alternative-parts" customization variable to True ('t'), which will cause all parts to always be displayed. Since we want to move forward with the next release, we're going to set this variable true by default, to make sure that no content is unretrievably hidden from the user. Once we come up with a better solution for easy display of hidden parts we can set this back to a default value of 'nil'.
* Simplify message and headers visibility code in notmuch-show view.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | | | | | Before the change, headers and message visibility functions took extra care to correctly set `buffer-invisibility-spec'. This was needed because headers overlay `invisible' property had only headers' invisibility spec. So visibility of headers was determined only by the headers invisibility spec. The patch sets headers overlay `invisible' property a list with both the headers and the message invisibility spec. This makes headers invisible if either of them is added to the `buffer-invisibility-spec' and allows to simplify the code.
* Set higher priority for headers and hidden citation overlays.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | | | | Before the patch, message, headers and hidden citation overlays had zero priority. All these overlay have `invisible' property. Emacs documentation says that we should not make assumptions about which overlay will prevail when they have the same priority [1]. It happens to work as we need, but we should not rely on undocumented behavior. [1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Overlay-Properties.html
* Set message invisibility spec properties before inserting the body.Gravatar Dmitry Kurochkin2011-06-15
| | | | | This would allow body-inserting code (in particular, wash button-inserting code) to use message invisibility specs.
* Pass message to the `notmuch-show-insert-text/plain-hook' hook.Gravatar Dmitry Kurochkin2011-06-15
| | | | | | | | Before the change, the `notmuch-show-insert-text/plain-hook' was given only the `depth' argument. The patch adds another one - the message. Currently, the new message argument is not used by any on the hooks. But it will be used later to get access to message invisibility specs when wash buttons are inserted.
* Make `notmuch-show-clean-address' parsing-error-proof.Gravatar Dmitry Kurochkin2011-06-03
| | | | | | | | Mail-header-parse-address may fail for an invalid address. Before the change, this would result in empty notmuch-show buffer with an error message like: Scan error: "Unbalanced parentheses". The patch wraps the function in condition-case and returns unchanged address in case of error.
* emacs: fix notmuch-show-part-button to not include newlineGravatar Jameson Graef Rollins2011-06-03
| | | | | This makes the button cleaner, so that it doesn't include the entire rest of the line that the button is on.
* Don't re-compress .gz & al. in notmuch-show-save-part.Gravatar Dmitry Kurochkin2011-05-31
| | | | | | | | | | | | | | | | | | | | | | | | Write-region handles some file names specially, see Emacs Lisp manual section 25.11 Making Certain File Names "Magic" [1]. This is a nice feature for normal text editing, but it is not desirable if we need to save raw file content (e.g. attachment). In particular, this affects archives and may result in corrupted attachments saved with notmuch-show-save-part (attachment button click handler). Turns out, smart GNUS folks encountered the same problem and implemented write-region wrapper which inhibits some file name handlers. In particular, this wrapper is used in mm-save-part, which is why notmuch-save-attachments that uses it works fine with archives. The patch replaces write-region with mm-write-region in notmuch-show-save-part. Also it removes coding-system-for-write and require-final-newline setting in notmuch-show-save-part. The former is set in mm-write-region. The latter seems to be unneeded because mm-save-part does not use it. [1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Magic-File-Names.html
* emacs: Give mutlipart/{signed, encrypted} their own part handler.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | | This is the best way to make the displayed output for decrypted/verified messages clearer. The special sigstatus and encstatus buttons are now displayed under the part header button. The part header button is also tweaked to provide information to user about how to proces crypto.
* emacs: Do not attempt to render arbitrary application parts.Gravatar Jameson Graef Rollins2011-05-27
| | | | | | | We probably shouldn't have been doing this anyway, but we do it here specifically because we don't want the content of the application/pgp-encrypted parts to be displayed and cluttering the message show.
* emacs: Add support for PGP/MIME verification/decryptionGravatar Jameson Graef Rollins2011-05-27
| | | | | | | | | | | | | A new emacs configuration variable "notmuch-crypto-process-mime" controls the processing of PGP/MIME signatures and encrypted parts. When this is set true, notmuch-query will use the notmuch show --decrypt flag to decrypt encrypted messages and/or calculate the sigstatus of signed messages. If sigstatus is available, notmuch-show will place a specially color-coded header at the begining of the signed message. Also included is the ability to switch decryption/verification on/off on the fly, which is bound to M-RET in notmuch-search-mode.