aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-show.el
Commit message (Collapse)AuthorAge
* emacs: Show cleaner `From:' addresses in the summary line.Gravatar David Edmondson2011-05-18
| | | | | | | | | | Remove double quotes and flatten "foo@bar.com <foo@bar.com>" to "foo@bar.com". Edited-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> (clean up expected output for emacs tests). Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Add custom `notmuch-show-elide-same-subject'Gravatar David Edmondson2011-05-18
| | | | | | | | | This controls the appearance of collapsed messages in notmuch-show mode, avoiding redundancy for repeated subject). Remove `notmuch-show-always-show-subject'. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Add `notmuch-show-always-show-subject', allowing control overGravatar David Edmondson2011-05-18
| | | | | | the display of collapsed messages. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Allow renderer of multipart/related parts access to non-primary parts.Gravatar David Edmondson2011-05-18
| | | | | | | | | | | | | | Typically used to allow a `text/html' renderer access to images which are sent along with the HTML. This is not enabled by default, instead the user must execute `notmuch-show-setup-w3m' for it to take effect. Edited-by: Carl Worth <cworth@cworth.org> Add documentation string for notmuch-show-setup-23m and clean up warning about reference/assignment of free variable. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Optionally show all parts in multipart/alternative.Gravatar David Edmondson2011-05-18
| | | | | | | | | | | Add a variable `notmuch-show-all-multipart/alternative-parts' that allows the user to indicate that all candidate sub-parts of a multipart/alternative part should be shown rather than just the preferred part. The default is `nil', showing only the preferred part. This is mostly a debugging aid. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Render text/x-vcalendar parts.Gravatar David Edmondson2011-05-17
| | | | | | | Use code from icalendar.el to convert text/x-vcalendar parts to something suitable for use with the Emacs diary. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Allow indentation of multipart children.Gravatar David Edmondson2011-05-17
| | | | Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Add `notmuch-show-multipart/alternative-discouraged'.Gravatar David Edmondson2011-05-17
| | | | | | | Also improved implementation of indication of which parts are not shown. Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: add more part handling functionsGravatar David Edmondson2011-05-17
| | | | | This adds new notmuch-show-insert-part functions to handle multipart/alternative and message/rfc822 parts.
* notmuch show: Properly nest MIME parts within mulipart partsGravatar Carl Worth2011-05-17
| | | | | | | | | | | | | | | | | | | | | | | Previously, notmuch show flattened all output, losing information about the nesting of the MIME hierarchy. Now, the output is properly nested, (both in the --format=text and --format=json output), so that clients can analyze the original MIME structure. Internally, this required splitting the final closing delimiter out of the various show_part functions and putting it into a new show_part_end function instead. Also, the show_part function now accepts a new "first" argument that is set not only for the first MIME part of a message, but also for each first MIME part within a series of multipart parts. This "first" argument controls the omission of a preceding comma when printing a part (for json). Many thanks to David Edmondson <dme@dme.org> for originally identifying the lack of nesting in the json output and submitting an early implementation of this feature. Thanks as well to Jameson Graef Rollins <jrollins@finestructure.net> for carefully shepherding David's patches through a remarkably long review process, patiently explaining them, and providing a cleaned up series that led to this final implementation. Jameson also provided the new emacs code here.
* emacs: View the output of pipe command when it failsGravatar Michal Sojka2011-01-26
| | | | | | | | | | | | | | | Previously, the user didn't know whether the pipe command succeeded or not. It was only possible to find it out by manually inspecting the work done (or not done) by the command or by manually switching to *notmuch-pipe* buffer and determine it from command output. For this the user had to first find the text corresponding to the last run of pipe command as the buffer accumulated the output from all pipe commands. This patch changes the following. The *notmuch-pipe* buffer is erased before every pipe command so it contains only the output from the last command. Additionally, when the command failed, the *notmuch-pipe* buffer is shown and an error message is displayed. with the output of pipe command.
* emacs: Use `view-mode' when examining raw messages.Gravatar David Edmondson2010-11-16
| | | | | | | Explained-by: Carl Worth: This gives convenient keybindings for navigating the file and for quitting from the buffer, (since, with a raw message file the user will generally want to just view the message, not edit it).
* emacs: mv notmuch-{show,common}-do-stashGravatar Jameson Rollins2010-11-11
| | | | | | | Here we move the notmuch-show/notmuch-show-do-stash function to notmuch-lib/notmuch-common-do-stash. Nothing in this function is notmuch-show mode specific, so this move will make it cleaner to be used by other modes (such as notmuch-search).
* emacs: Use the header line to show the subject of the thread.Gravatar David Edmondson2010-11-11
|
* emacs: Simplify subjects more aggressively.Gravatar David Edmondson2010-11-11
| | | | | | | | | | | | | | | Remove 're: ' or 'Re: ' from anywhere within a subject line rather than just at the beginning. This is to accommodate threads where a mailing list sometimes inserts a subject prefix. For example, if a thread has the subjects: [Orgmode] org-indent, org-inlinetask: patches on github Re: [Orgmode] org-indent, org-inlinetask: patches on github [Orgmode] Re: org-indent, org-inlinetask: patches on github the last of these would not have been considered the same and would therefore have been shown.
* emacs: Elide the display of repeated subjects in thread display mode.Gravatar David Edmondson2010-11-11
| | | | | Collapsed messages do not show a "Subject:" line if the subject is the same as that of the previous message.
* Don't use kill-this-buffer to kill notmuch emacs buffersGravatar Jameson Rollins2010-11-08
| | | | | | | | kill-this-buffer appears to be a function intended specifically for use in the menu bar, and causes problem killing notmuch buffers when multiple frames have been used. This patch replaces kill-this-buffer with notmuch-kill-this-buffer, which in turn just simply calls (kill-buffer (current-buffer)).
* emacs: Fix notmuch-show-pipe-message to use notmuch-command variableGravatar Michal Sojka2010-11-06
| | | | | Previously notmuch command name was hardcoded into this function, which made remote use of pipe command impossible.
* Rename "notmuch cat" to "notmuch show --format=raw"Gravatar Carl Worth2010-11-06
| | | | | | | | | This is part of an effort to avoid proliferation of excessive top-level notmuch commands. Also, "raw" better captures the functionality here, (as opposed to "cat" which is a fairly oblique reference to a bad Unix abbreviation whose metaphor doesn't work here since "notmuch cat" operates only on a single message and hence cannot "con'cat'enate" anything).
* emacs: Access raw messages via cat subcommandGravatar Michal Sojka2010-11-05
| | | | | | | | | | | | | | | | | | | This patch modifies the following commands to access the messages via cat subcommand: - view/save attachments ('v', 'w'), - view a raw message ('V') and - pipe a message to a command ('|'). With this patch, it is straightforward to use notmuch emacs interface with a remote database accessed over SSH. To do this, it is sufficient to redefine notmuch-command variable to contain the name of a script containing: ssh user@host notmuch "$@" If the ssh client has enabled connection sharing (ControlMaster option in OpenSSH), the emacs interface is almost as responsive as when notmuch is invoked locally.
* emacs: Fix the autoload commentsGravatar Carl Worth2010-10-29
| | | | | | | Remove them from non-top-level entry points, (such as the functions to set notmuch modes and the deprecated notmuch-folder function). And add one to the notmuch-hello function. Also, add missing documentation string to notmuch-hello.
* emacs: Use copy-sequence instead of copy-seq.Gravatar Carl Worth2010-10-28
| | | | | | | | | I don't see copy-seq documented within emacs at all, and some users have encountered failures of the form: notmuch-show-del-tags-worker: Symbol's function definition is void: copy-seq This should eliminate that problem.
* emacs: Avoid runtime use of `cl'.Gravatar David Edmondson2010-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | The GNU Emacs Lisp Reference Manual section D.1 says: > * Please don't require the cl package of Common Lisp extensions at > run time. Use of this package is optional, and it is not part of > the standard Emacs namespace. If your package loads cl at run time, > that could cause name clashes for users who don't use that package. > > However, there is no problem with using the cl package at compile > time, with (eval-when-compile (require 'cl)). That's sufficient for > using the macros in the cl package, because the compiler expands > them before generating the byte-code. Follow this advice, requiring the following changes where `cl' was used at runtime: - replace `rassoc-if' in `notmuch-search-buffer-title' with the `loop' macro and inline code. At the same time find the longest prefix which matches the query rather than simply the last, - replace `union', `intersection' and `set-difference' in `notmuch-show-add-tag' and `notmuch-show-remove-tag' with local code to calculate the result of adding and removing a list of tags from another list of tags.
* emacs: Fix quoting of Message-Id to fix test case of Id containing ".."Gravatar Carl Worth2010-10-22
| | | | | | If Xapian sees unquoted ".." as in id:123..456 then it thinks that's a range specification. We avoid this problem by instead passing id:"123..456" to Xapian.
* emacs: Allow '|' to operate on multiple messages (by means of prefix argument).Gravatar Carl Worth2010-09-16
| | | | | | We extend the '|' command so that passing a prefix argument, (for example, "C-u |"), causes it to pipe all open messages in the current thread rather than just the single, current message.
* emacs: Fix line-wrapping for help message of notmuch-show mode.Gravatar Carl Worth2010-08-19
| | | | | | This was previously wrapped for unsubtituted command names. It looks much better in the notmuch-help (available with '?') if wrapped according to the length of the substituted command names.
* Add C-tab binding in notmuch-search mode as well.Gravatar Carl Worth2010-06-04
| | | | | We recently added this to notmuch-hello mode so we might as well support it in this mode as well for consistency.
* emacs: Tags should be shown with `notmuch-tag-face'.Gravatar David Edmondson2010-06-03
| | | | | Use the same face for tags in `notmuch-show' mode as that used in `notmuch-search' mode.
* emacs: Allow the display of absolute dates in the header line.Gravatar David Edmondson2010-06-03
| | | | | | | Add `notmuch-show-relative-dates' to control whether the summary line in `notmuch-show' mode displays relative dates (e.g. '26 mins. ago') or the full date string from the message. Default to `t' for compatibility with the previous behaviour.
* emacs: Bind <backtab> (shift-TAB) to notmuch-show-previous-buttonGravatar Nelson Elhage2010-06-03
| | | | | | | | Shift-TAB is standard "opposite" of TAB -- in GUI interfaces they typically cycle through input elements in opposite orders -- so it makes sense to behave the same way. Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
* emacs/notmuch-wash.el: Add `notmuch-wash-convert-inline-patch-to-part'.Gravatar David Edmondson2010-04-27
| | | | | | Detect inline patches and convert them to fake attachments, in order that `diff-mode' highlighting can be applied to the patch. This can be enabled by customising `notmuch-show-insert-text/plain-hook'.
* emacs: Fix `notmuch-show-rewind' in the presence of invisible textGravatar David Edmondson2010-04-26
| | | | | | | | | | When determining whether or not to re-align the head of the current message with the top of the window, use `count-screen-lines' rather than `count-lines' to allow for invisible text in the preceding message. When comparing that number of lines against `next-screen-context-lines', realign if the number of lines of the previous message visible is 'smaller than or equal to' rather than just 'smaller than' to improve usability.
* emacs: Add more functions to clean up text/plain partsGravatar David Edmondson2010-04-26
| | | | | | | | | | | | | | | | | | Add: - notmuch-wash-wrap-long-lines: Wrap lines longer than the width of the current window whilst maintaining any citation prefix. - notmuch-wash-tidy-citations: Tidy up citations by: - compress repeated otherwise blank citation lines, - remove otherwise blank citation lines at the head and tail of a citation, - notmuch-wash-elide-blank-lines: Compress repeated blank lines and remove leading and trailing blank lines. None of these is enabled by default - add them to `notmuch-show-insert-text/plain-hook' to use. Reviewed-by: Carl Worth <cworth@cworth.org>: I previously committed a stale version of this patch.
* Revert "emacs: Add more functions to clean up text/plain parts"Gravatar Carl Worth2010-04-26
| | | | This reverts commit 97570954cb583cacac35b0235cbe449a07630ae3.
* emacs: Correct message/header/citation/signature hidingGravatar David Edmondson2010-04-26
| | | | | | | | | | Set `buffer-invisibility-spec' to `nil' (a list) if it is just `t' before inserting any body parts, otherwise removing items from `buffer-invisibility-spec' (which is what `notmuch-show-headers-visible' and `notmuch-show-message-visible' do) is a no-op and has no effect. This caused threads with only matching messages to have those messages hidden initially because `buffer-invisibility-spec' stayed `t'.
* emacs: Add more functions to clean up text/plain partsGravatar David Edmondson2010-04-24
| | | | | | | | | | | | | | | | | | | | | | | Add: - notmuch-wash-wrap-long-lines: Wrap lines longer than the width of the current window whilst maintaining any citation prefix. - notmuch-wash-tidy-citations: Tidy up citations by: - compress repeated otherwise blank citation lines, - remove otherwise blank citation lines at the head and tail of a citation and remove blank lines between attribution statements and the citation, - notmuch-wash-compress-blanks: Compress repeated blank lines and remove leading and trailing blank lines. Enable `notmuch-wash-tidy-citations' and `notmuch-wash-compress-blanks' by default by adding them to `notmuch-show-insert-text/plain-hook'. `notmuch-wash-wrap-long-lines' is not enabled by default. If `notmuch-wash-wrap-long-lines' is enabled, word wrapping of the buffer leads to an unappealing display of text, so provide a function to disable it and add it to the list of `notmuch-show-mode' hook functions.
* emacs: Rename notmuch-show-headers to notmuch-message-headersGravatar Carl Worth2010-04-24
| | | | | | | | | | And similarly for notmuch-show-headers-visible to notmuch-message-headers-visible. I've never liked notmuch-show as a namespace prefix, but it looks especially bad when it appears as "Notmuch Show Headers Visible" in the customize buffer. Give nicer names to these variables which are exported for user manipulation.
* emacs: Don't display From header by default.Gravatar Carl Worth2010-04-24
| | | | | This header is redundant with the summary-line of each message which contains the same information.
* emacs: Allow user to customize which headers are visible.Gravatar Carl Worth2010-04-24
| | | | | Continuing our tradition of making more and more of the notmuch functionality configurable fromt eh customize interface.
* emacs: Change message headers (To, CC, From, and Date) to be visible by defaultGravatar Carl Worth2010-04-24
| | | | | | Users can still toggle these to be hidden by default, and can still toggle visibility of headers for a single message with the 'h' command.
* emacs: Allow headers to be shown by default in show modeGravatar David Edmondson2010-04-24
| | | | | Add `notmuch-show-headers-visible' which, when set `t', causes headers to be shown by default.
* emacs: Rename notmuch-show-toggle-all to notmuch-show-open-or-close-allGravatar Carl Worth2010-04-23
| | | | | | | | The function was named and documented incorrectly before, saying that it would "change the visibility of all messages". Instead it only opens the messages that are closed---it doesn't simultanesously close the messages that are open. (Granted, nobody would *want* that behavior I don't think, but the naming was confusing before.)
* emacs/notmuch-show.el: Add `notmuch-show-toggle-all' bound to M-RETGravatar David Edmondson2010-04-23
| | | | | | `notmuch-show-toggle-all' changes the visibility all of the messages in the current thread. By default it makes all of the messages visible. With a prefix argument, it makes them all not visible.
* emacs: Use single-quote not double-quote when constructing searchGravatar Carl Worth2010-04-23
| | | | | | | | | | | | | | | | | | | | Commit 44982ab33295009137e3740e644e793a08629762 added some extra quoting when constructing a search. A previous version of this patch had used single-quotation marks (') while this version used double-quotation marks ("). The intent of the extra quoting was to allow notmuch-command to be set to a script invoking ssh. What actually happens, however is that the extra quotation marks make it all the way into the query string seen by Xapian. And the double quotes trigger phrase searching, (which isn't desired here). The side-effect of that is that the emacs code would fallback to an unqalified query and display all threads with all messages open. We fix that side-effect now by using single-quote characters, but we'll want a better fix in the future to avoid Xapian seeing these characters at all I think.
* emacs: Push the cursor to point-max on `n' or `N' at the end of a threadGravatar David Edmondson2010-04-23
| | | | | | Sebastian pointed out that the pre-JSON UI would move the cursor to the end of the buffer if `n' or `N' is hit when on the last (unread) message. Mimic that behaviour in the new UI.
* Reintroduce patch to quote args in notmuch-show to facilitate remote useGravatar Jesse Rosenthal2010-04-23
| | | | | This reintroduces the patch committed in 9193455fa1, which was reverted during the upgrade to the JSON emacs UI.
* emacs/notmuch-show.el: Part headers are real buttons that save the partGravatar Carl Worth2010-04-21
| | | | | Convert the part headers into buttons that save the part when activated.
* emacs: Display all body parts using `notmuch part --part=<n>'Gravatar David Edmondson2010-04-21
| | | | | | Use the `notmuch part' command to access body parts not currently included in the JSON output and display those body parts appropriately.
* emacs: Use mailcap.el to guess the type of application/octet-stream partsGravatar David Edmondson2010-04-21
| | | | | | | | | | 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.
* emacs: Use `mm-display-part' when possibleGravatar David Edmondson2010-04-21
| | | | | | 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.