aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-show.el
Commit message (Collapse)AuthorAge
* emacs: show: exclude bug fixGravatar Mark Walters2012-08-02
| | | | | | The pipe message function (when used with a prefix) uses a search of the form "id:<id1> or id:<id2>" etc. Since the user says precisely which messages are wanted by opening them it should not use excludes.
* emacs: make elide messages use notmuch-show for omitting messages.Gravatar Mark Walters2012-06-29
| | | | | | | | | Previously the elide messages code got the entire-thread from notmuch-show.c and then threw away all non-matching messages. This version calls notmuch-show.c without the --entire-thread flag so it never receives the non-matching messages in the first place. This makes it substantially faster.
* emacs: add pipe attachment commandGravatar Mark Walters2012-06-22
| | | | | | | Allow the user to pipe the attachment somewhere. Bound to '|' on the attachment button. Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* emacs: only strip "re:" in the beginning of subjectGravatar Jani Nikula2012-06-07
| | | | | Fix notmuch-show-strip-re by matching "re:" only in the beginning of the input string.
* emacs: Correctly quote non-text/plain parts in replyGravatar Adam Wolfe Gordon2012-05-06
| | | | | | | | | | Quote non-text parts nicely by displaying them with mm-display-part before calling message-cite-original to quote them. HTML-only emails can now be quoted correctly. We re-use some code from notmuch-show (notmuch-show-mm-display-part-inline), which has been moved to notmuch-lib.el. Mark the test for this feature as not broken.
* emacs: modify show tag functions to use new notmuch-tag interfaceGravatar Jameson Graef Rollins2012-04-29
| | | | | | The main change here is to modify argument parsing so as to not force tag-changes to be a list, and to let notmuch-tag handle prompting the user when required. doc strings are also updated and cleaned up.
* emacs: create notmuch-tag.el, and move appropriate functions from notmuch.elGravatar Jameson Graef Rollins2012-04-29
| | | | | | | | Tagging functions are used in notmuch.el, notmuch-show.el, and notmuch-message.el. There are enough common functions for tagging that it makes sense to put them all in their own library. No code is modified, just moved around.
* emacs: fix archive thread/message function documentation.Gravatar Jameson Graef Rollins2012-04-29
| | | | | This removes an inaccuracy in the thread archiving function, and adds a clarification to the message archiving function.
* emacs: Don't move to the next thread unless the cursor is at the end of the ↵Gravatar David Edmondson2012-04-29
| | | | | | | | | buffer. When using the spacebar to scroll through a thread, hitting 'space' when the bottom of the last message is visible should take the cursor to the end of the buffer rather than immediately archiving the thread and moving to the next thread.
* emacs-show: open excluded matches if no other matchesGravatar Mark Walters2012-04-29
| | | | | | | | Currently emacs show does not open matching but excluded messages. This is normally the desired behaviour but is probably not ideal if only excluded messages match. This patch opens all the matching (necessarily excluded) messages in this case and goes to the first one.
* emacs: do not modify subject in search or showGravatar Jameson Graef Rollins2012-04-28
| | | | | | | | | | | | | A previous patch [0] replaced blank subject lines with '[No Subject]' in search and show mode. Apparently this was needed to circumvent some bug in the printing code, but there was no need for it search or show, and it is definitely not desirable, so we undo it here (a revert is no longer feasible). We should not be modifying strings in the original message without good reason, or without a clear indication that we are doing so, neither of which apply in this case. For further discussion see [0]. [0] id:"1327918561-16245-3-git-send-email-dme@dme.org"
* emacs: make show set --exclude=falseGravatar Mark Walters2012-04-07
| | | | | | Show has to set --exclude=false to deal with cases where it is asked to show a single excluded message. It uses JSON so it can easily pass the exclude information to the user.
* emacs: Escape all message ID queriesGravatar Austin Clements2012-03-30
| | | | | | | | | | This adds a lib function to turn a message ID into a properly escaped message ID query and uses this function wherever we previously hand-constructed ID queries. Wherever this new function is used, documentation has been clarified to refer to "id: queries" instead of "message IDs". This fixes the broken test introduced by the previous patch.
* emacs: Use the new JSON reply format and message-cite-originalGravatar Adam Wolfe Gordon2012-03-19
| | | | | | | | | | | | | | | | | Use the new JSON reply format to create replies in emacs. Quote HTML parts nicely by using mm-display-part to turn them into displayable text, then quoting them with message-cite-original. This is very useful for users who regularly receive HTML-only email. Use message-mode's message-cite-original function to create the quoted body for reply messages. In order to make this act like the existing notmuch defaults, you will need to set the following in your emacs configuration: message-citation-line-format "On %a, %d %b %Y, %f wrote:" message-citation-line-function 'message-insert-formatted-citation-line The tests have been updated to reflect the (ugly) emacs default.
* emacs: Factor out useful functions into notmuch-libGravatar Adam Wolfe Gordon2012-03-19
| | | | | Move a few functions related to handling multipart/alternative parts into notmuch-lib.el, so they can be used by future reply code.
* emacs: show: recognize the exclude flag.Gravatar Mark Walters2012-03-02
| | | | | | | Show mode will recognize the exclude flag by not opening excluding messages by default, and will start at the first matching non-excluded message. If there are no matching non-excluded messages it will go to the first matching (necessarily excluded) message.
* emacs: Clarify description of thread manipulating functionsGravatar Michal Sojka2012-02-29
| | | | | | | | | | | It is not clear whether the term "thread" refers to the thread in the database or to the thread currently shown in a buffer. Those two meanings may refer to different sets of messages, e.g. when a new email is added to the database while the buffer shows the state before the new email arrived. This patch replaces the term thread with the term current buffer, which is hopefully less ambiguous.
* emacs: Fix out of date commentGravatar Austin Clements2012-02-27
| | | | | | The behavior of the header line in show-mode changed from showing the subject of the first open message to showing the subject of the first message in 4d77f18b. Update a comment to reflect this.
* emacs: Reverse the meaning of notmuch-show-refresh-view's argumentGravatar Austin Clements2012-02-25
| | | | | | | | Consensus seems to be that people prefer that refreshing show buffers retains state by default, rather than resetting it by default. This turns out to be the case in the code, as well. In fact, there's even a test for this that's been marked broken for several months, which this patch finally gets to mark as fixed.
* emacs: When refreshing a show buffer, only mark read when resetting stateGravatar Austin Clements2012-02-25
| | | | | | | | | | | | | | | If we retain state while refreshing a show buffer, it should not mark any messages read since it's not a navigation operation (it especially shouldn't mark the first message matching the query read, which is what it did previously). If the user or caller requests that refresh reset the state of the buffer, then we consider that a navigation operation, so we do mark the message under point after the refresh read. This is implemented by moving responsibility for initial positioning and read-marking out of notmuch-show-worker and into its caller. Since notmuch-show-worker is now exclusively about building the show buffer, we rename it to notmuch-show-build-buffer.
* emacs: add `notmuch-show-stash-mlarchive-link{, -and-go}'Gravatar Pieter Praet2012-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emacs/notmuch-show.el (notmuch-show-stash-mlarchive-link-alist): New defcustom of type `alist' (key = name, value = URI), containing Mailing List Archive URI's for searching by Message-Id. (notmuch-show-stash-mlarchive-link-default): New defcustom, default MLA to use when `notmuch-show-stash-mlarchive-link' received no user input whatsoever. Available choices are generated using the contents of `notmuch-show-stash-mlarchive-link-alist'. (notmuch-show-stash-map): Added keybinds "l" and "L" for `notmuch-show-stash-mlarchive-link' respectively `notmuch-show-stash-mlarchive-link-and-go'. (notmuch-show-stash-mlarchive-link): New function, stashes a URI pointing to the current message at one of the MLAs configured in `notmuch-show-stash-mlarchive-link-alist'. Prompts user with `completing-read' if not provided with an MLA key. (notmuch-show-stash-mlarchive-link-and-go): New function, uses `notmuch-show-stash-mlarchive-link' to stash a URI, and then visits it using the browser configured in `browse-url-browser-function'. Based on original work [1] by David Edmondson <dme@dme.org>. [1] id:"1327397873-20596-1-git-send-email-dme@dme.org"
* emacs: `notmuch-show-get-message-id': optionally return Message-Id sans prefixGravatar Pieter Praet2012-02-25
| | | | | | | | | | | | * emacs/notmuch-show.el (notmuch-show-get-message-id): Add optional arg BARE. When non-nil, return a Message-Id without quotes and prefix, thus obviating the need to strip them off again in various places. (notmuch-show-stash-message-id-stripped): Update wrt changes in `notmuch-show-get-message-id'.
* emacs: support text/calendar mime typeGravatar Jani Nikula2012-02-25
| | | | | | | Replace text/x-vcalendar with text/calendar, while maintaining support and backwards compatibility for text/x-vcalendar. Code by David Edmondson <dme@dme.org>
* emacs: allow to set RETAIN-STATE for `notmuch-show-refresh-view' interactivelyGravatar Dmitry Kurochkin2012-02-14
| | | | | | The notmuch-show view refresh function (`notmuch-show-refresh-view', bound to "=") accepts an optional RETAIN-STATE argument. The patch allows to set this argument interactively by using "C-u =".
* emacs: cleanup and simplify `notmuch-show-archive-thread' and related functionsGravatar Dmitry Kurochkin2012-02-12
| | | | | | | | | | | | Recent changes in notmuch-show tagging introduced some code duplication. The patch cleanups and simplifies `notmuch-show-archive-thread' function by using `notmuch-show-tag-all', no longer used function are removed. After the change, `notmuch-show-archive-thread' function becomes symmetric with `notmuch-show-archive-message'. A side effect of these changes is that `notmuch-show-archive-thread' no longer calls "notmuch tag" for each message in the thread.
* emacs: A prefix argument to `notmuch-show' should invert the matching ↵Gravatar David Edmondson2012-02-12
| | | | | | | | message behaviour. Allow the user to open a thread with inverted `notmuch-show-only-matching-messages' behaviour using a prefix argument.
* emacs: Add `notmuch-show-only-matching-messages'.Gravatar David Edmondson2012-02-12
| | | | | Allow the user to choose that only matching messages are shown by default.
* emacs: Check that the parent buffer is alive before using it.Gravatar David Edmondson2012-02-12
|
* emacs: Optionally retain the state of the buffer during ↵Gravatar David Edmondson2012-02-12
| | | | | | | | | | | | | | | `notmuch-show-refresh-view'. With an argument, record and reply the state of the buffer during `notmuch-show-refresh-view'. In this context, "state" is defined as: - the open/closed state of each message, - the current message. Traditional use of refresh with the = key does not retain the state. The recently introduced toggle commands ($, !, < and >) do retain the state.
* emacs: Add a binding (t) to toggle the truncation of long lines.Gravatar David Edmondson2012-02-12
|
* emacs: Allow the indentation of content to be toggled.Gravatar David Edmondson2012-02-12
| | | | | | | | | Very deeply indented content is sometimes difficult to read (particular for something like patches). Allow the indentation of the content to be toggled with '<'. Indentation of the header lines is not affected, so it remains possible to see the structure of the thread.
* emacs: Allow `notmuch-show-mode' to display only matching messages.Gravatar David Edmondson2012-02-12
| | | | | | | The current behaviour (all messages shown, non-matching collapsed) is retained as the default. Type '!' to switch to showing only the matching messages - non-matching messages are not available. '!' will switch back to showing everything.
* emacs: Rework crypto switch toggle.Gravatar David Edmondson2012-02-12
| | | | | | | | | | | | | | Re-work the existing crypto switch toggle to be based on a persistant buffer-local variable. To allow this, modify `notmuch-show-refresh-view' to erase and re-draw in the current buffer rather than killing the current buffer and creating a new one. (This will also allow more per-buffer behaviour in future patches.) Add a binding ('$') to toggle crypto processing of the current buffer and remove the prefix argument approach that achieves a similar result.
* emacs: make show view a/A/x/X key bindings more consistentGravatar Jani Nikula2012-02-08
| | | | | | | | | | | | | | | | | | | | | 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'.
* emacs: add "*" binding for notmuch-show viewGravatar Dmitry Kurochkin2012-02-08
| | | | | | | 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.
* emacs: make "+" and "-" tagging operations in notmuch-show more flexibleGravatar Dmitry Kurochkin2012-02-08
| | | | | | | | | | 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).
* emacs: Move the blank line from the bottom of the headers to the top of the ↵Gravatar David Edmondson2012-02-03
| | | | | | | | | body. 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.
* emacs: More address cleaning.Gravatar David Edmondson2012-02-03
| | | | | | | Remove outer single-quotes from the mailbox part. Allow for multiple sets of nested single and double quotes. Add more tests.
* emacs: Prefer '[No Subject]' to blank subjects.Gravatar David Edmondson2012-02-03
|
* emacs: globally replace non-branching "(if COND (progn ..." with "(when ..."Gravatar Pieter Praet2012-02-01
| | | | Less code, same results, without sacrificing readability.
* emacs: fix show-previous-message doc stringGravatar Jameson Graef Rollins2012-01-30
|
* emacs: modify the default show-mode key bindings for archivingGravatar Jameson Graef Rollins2012-01-30
| | | | | | | | 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.
* emacs: use pop-at-end functionality in show-archive-message-then-next functionGravatar Jameson Graef Rollins2012-01-30
| | | | | This provides a smoother message processing flow by reducing the number of key presses needed for these common operations.
* emacs: add option to show-next-{, open-}message functions to pop out to ↵Gravatar Jameson Graef Rollins2012-01-30
| | | | | | | | parent buffer if at end This will allow for keybindings that achieve a smoother message processing flow by reducing the number of key presses needed for most common operations.
* emacs: add message archiving functionsGravatar Jameson Graef Rollins2012-01-30
| | | | | | | 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).
* emacs: break out thread navigation from notmuch-show-archive-threadGravatar Jameson Graef Rollins2012-01-30
| | | | | | | | | | | 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).
* emacs: break up notmuch-show-archive-thread-internal into two more generally ↵Gravatar Jameson Graef Rollins2012-01-30
| | | | | | | | | | | | | | | | | | | | | useful functions 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.
* emacs: use search-next-thread to move to next thread in show modeGravatar Jameson Graef Rollins2012-01-30
| | | | | We should always use the dedicated search mode navigation functions, in case navigation mechanics change down the line.
* emacs: Another special case for `notmuch-show-clean-address'.Gravatar David Edmondson2012-01-27
| | | | Remove backslashes.
* emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address'.Gravatar David Edmondson2012-01-27
| | | | | | | | | | `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.