summaryrefslogtreecommitdiff
path: root/emacs
Commit message (Collapse)AuthorAge
...
* emacs: Add more functions to clean up text/plain partsDavid 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: Fix i-search to open up invisible citations as necessaryDavid Edmondson2010-04-24
| | | | | | Add an `isearch-open-invisible' property to the overlays used to hide citations and signatures, together with an appropriate function to leave the invisible text visible should that be required.
* emacs: Make notmuch-hello jumpt to search bar by default.Carl Worth2010-04-24
| | | | | | | This isn't ideal for me personally, since I usually want to inovke a saved search rather than entering a new search textually. But it's at least better than just putting point in the upper-left corner where it doesn't do anything.
* emacs: Rename notmuch-show-headers to notmuch-message-headersCarl 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.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.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 defaultCarl 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 modeDavid Edmondson2010-04-24
| | | | | Add `notmuch-show-headers-visible' which, when set `t', causes headers to be shown by default.
* emacs: Add notmuch-address.el for address completion using notmuchDavid Edmondson2010-04-23
| | | | | | | | A tool `notmuch-addresses' is required to produce addresses which match a query string. An example of a suitable script can be found in the git repository at http://jkr.acm.jhu.edu/git/notmuch_addresses.git There are no doubt others.
* emacs: Rename notmuch-show-toggle-all to notmuch-show-open-or-close-allCarl 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-RETDavid 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 searchCarl 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: Re-arrange message sending codeDavid Edmondson2010-04-23
| | | | | | | | | | | | | | | Define a new `mail-user-agent' (`notmuch-user-agent') and use it by default. Re-arrange various routines that send mail to use this (compose, reply, forward). Insert a `User-Agent:' header by default. This is the real commit for this functionality this time. The previous attempt to merge this code: commit 57926bc7b0f784cbacb620fda0ee5157e2e0ff27 was botched (by Carl Worth, not David) to include only the Makefile change. So the build was broken until this commit that actually adds the new file.
* emacs: Push the cursor to point-max on `n' or `N' at the end of a threadDavid 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.
* emacs: Re-arrange message sending codeDavid Edmondson2010-04-23
| | | | | | Define a new `mail-user-agent' (`notmuch-user-agent') and use it by default. Re-arrange various routines that send mail to use this (compose, reply, forward). Insert a `User-Agent:' header by default.
* emacs: Fix some compilation warnings.Carl Worth2010-04-23
| | | | | | Fix missing argumen in declaration of notmuch-search function and add a definition of notmuch-search-continuation to avoid warning about assignment to a free variable.
* emacs: Add notmuch-hello.el, a friendly frontend to notmuchDavid Edmondson2010-04-23
| | | | | | | This is based on the prototype that Carl Worth described in the TODO file. It provides a search bar as well as support for recent searches, saved searches, and a list of all tags in the database (as well as the number of messages with each tag).
* emacs: Remove `notmuch-search-authors-width' and fix the use of ↵David Edmondson2010-04-23
| | | | | | | | | | | | | | | | | | `notmuch-search-result-format' accordingly The width of the authors field in search output was previously specified in two places: - `notmuch-search-authors-width': the limit beyond which the authors names are truncated, - `notmuch-search-result-format': the layout of the search results. Changing the configuration of one of these may have required the user to know about and adapt the other accordingly. This led to confusion. Instead, remove `notmuch-search-authors-width' and perform truncation based on the relevant field in `notmuch-search-result-format'. Approved-By: Jameson Rollins <jrollins@finestructure.net>
* Reintroduce patch to quote args in notmuch-show to facilitate remote useJesse Rosenthal2010-04-23
| | | | | This reintroduces the patch committed in 9193455fa1, which was reverted during the upgrade to the JSON emacs UI.
* emacs: Add customize treatment and rename refresh-script to notmuch-poll-scriptCarl Worth2010-04-22
| | | | | | | | | With defcustom the user can easily find this variable (and its documentation) within "M-x customize-group" "notmuch" (though finding *that* is still tricky). The new name of notmuch-poll-script is also easier to remember, (for me at least).
* emacs: Use consistent naming for the two new poll functions.Carl Worth2010-04-22
| | | | | | Emacs scoping rules strongly encourage us to have fully-namespaced function names. A prefix like "notmuch-search" is a pretty ugly namespace name, but it's what we have for now.
* Add 'G' keybinding to folder and search view that triggers external pollDirk Hohndel2010-04-22
| | | | | | | | | | | | The new functions first check if an external poll script has been defined in the variable 'notmuch-external-refresh-script and if yes, runs that script before executing the existing refresh function (which is bound to '=') This can be used to have 'G' mimic the mutt behavior of polling an external mail server - or if the mail polling is already automatic, it can trigger the call to notmuch new and any necessary automatic tagging of new email. Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
* emacs: Move definition of notmuch-folders to earlier in the file.Carl Worth2010-04-21
| | | | To avoid a warning about a free variable from the emacs compiler.
* emacs: Try to name search buffers using info in notmuch-foldersServilio Afre Puentes2010-04-21
| | | | | | As the user has already defined aliases for certain searches in notmuch-folders, search buffer names that use these aliases will be easier to identify.
* emacs: Fix notmuch-search-authors-width declaration.Carl Worth2010-04-21
| | | | | Our defcustom call was missing the 'notmuch group, which emacs was nice enough to warn about during compilation.
* emacs: Support for customizing search result displayDavid Edmondson2010-04-21
| | | | | | | | | | | | | | | This patch helps in customizing search result display similar to mutt's index_format. The customization is done by defining an alist as below: (setq notmuch-search-result-format '(("date" . "%s ") ("authors" . "%-40s ") ("subject" . "%s "))) The supported keywords are date, count, authors, subject and tags. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: David Edmondson <dme@dme.org>
* emacs/notmuch-show.el: Part headers are real buttons that save the partCarl 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>'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 partsDavid 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 possibleDavid 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.
* emacs/notmuch-show.el: Improved part labellingDavid Edmondson2010-04-21
| | | | | | | | 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.
* emacs: Move body markup to a separate fileDavid Edmondson2010-04-21
| | | | | | 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.
* emacs: Rename body-invis-spec to message-invis-specCarl Worth2010-04-21
| | | | | This is more consistent with the related names (toggle-message, :message-visible, etc.)
* emacs: Remove the notmuch-show-toggle-body command (with "b" binding)Carl Worth2010-04-21
| | | | | | | | | | | 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).
* emacs: JSON based implementationDavid Edmondson2010-04-21
| | | | | | Re-implement notmuch-show.el using the JSON output format of the notmuch command. Most functionality is retained - HTML display is noticeably missing.
* emacs/notmuch.el: Enable `hl-line-mode' in `notmuch-search-mode'David Edmondson2010-04-19
|
* emacs/notmuch-show.el: Avoid passing unintended format strings to `message'David Edmondson2010-04-19
| | | | | If the text being stashed included %, `message' was unhappy and complained.
* Revert "notmuch.el: 'F' in search mode takes us to a list of folders."Carl Worth2010-04-16
| | | | | | | | | This reverts commit fbec989fe3272d6eff038369587be076347b96f0. I only pushed this accidentally. See message id:871ver6u9r.fsf@yoom.home.cworth.org for the various reasons I didn't like this patch, (mostly I think the association of 'F' is wrong).
* emacs: Fix search filtering of a global search ("*")Carl Worth2010-04-15
| | | | | | | | | | | | | | | With the recent addition of "*" being a special case for a search matching all messages, we have to take care when doing a filter operation. In this case it's not legal to simply append and get: * and <some-new-search-terms> Instead we carefully construct a new search string of only: <some-new-search-terms> This could all be avoided if we had a parser that could understand "*" with the meaning we want.
* Clean up code duplication in adding or removing tag by region.Jesse Rosenthal2010-04-14
| | | | | | Clean up code duplication, as per Carl's suggestion, by making notmuch-search-{add/remove}-tag-thread a special case of the -region commands, where the region in question is between (point) and (point).
* Fix bug in adding or removing tag by region.Jesse Rosenthal2010-04-14
| | | | | | | | | | | | | | There was a bug in notmuch-search-{add,remove}-tag-region, which would not behave correctly if the region went beyond the last message. Now, instead of simply iterating to the last line of the region, these functions will iterate to the minimum of the last line of the region and the last possible line, i.e. (- (line-number-at-pos (point-max)) 2) Tested-by: Carl Worth <cworth@cworth.org> Note that the old, buggy behavior included infinite loops of emacs lisp code, so the new behavior is significantly better than that.
* notmuch.el: quote args in notmuch-show to facilitate remote useJesse Rosenthal2010-04-13
| | | | | | | | | | | | | | | | | | | | 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 $@
* emacs: Correct the documentation for notmuch-search-add-tag (and -remove-tag)Carl Worth2010-04-07
| | | | | | These commands act on all messages in the thread, not simply those that match the search. (There are use case for both behaviors, but the documentation must match the behavior that's actually implemented).
* notmuch.el: add functionality in notmuch search mode to add or remove tags ↵Jesse Rosenthal2010-04-07
| | | | | | | | | | | | | | | | | | | | | by region This patch adds `-region' versions of the `notmuch-search-' commands to find properties. It also splits up `notmuch-add/remove-tags' into both a `-thread' and a `-region' version. (This makes us modify `notmuch-search-archive-thread' to use the `notmuch-search-remove-tag-thread' function, instead of `notmuch-search-remove-tag', for consistency.) The add/remove-tag command called by pressing `+' or `-' will then choose accordingly, based on whether region is active. This version fixes a couple of errors in the first version, which led to incorrect marking of some tags in the search view (though the actual tagging was still correct). It's also based on current master. I'm not sure any more if region selection is actually the correct way to do this, or if a mutt-style message-marking method would be better. But I didn't want a buggy incorrect version out there.
* Display the last few lines of a citation by default.Carl Worth2010-04-07
| | | | | | 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.
* notmuch.el: Allow citation suffixes to be shown as well as prefixes.David Edmondson2010-04-07
| | | | | | | | 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>
* notmuch.el: Colour cited regions and signatures with message-cited-text-faceDavid Edmondson2010-04-07
| | | | | Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> (with fixup to avoid over-eager coloring of signatures).
* notmuch.el: colorize lines in notmuch-search based on thread tags.Jameson Rollins2010-04-07
| | | | | | | | | | | | | | | Arbitrary font faces can be specified for given thread tags. By default, no coloring is applied. To specify coloring, place something like this in your .emacs: (setq notmuch-search-line-faces '(("delete" . '(:foreground "red")) ("unread" . '(:foreground "green")))) Order matters: line faces listed first will take precedence (in the example above, a thread tagged both "delete" and "unread" will be colored red, since the "delete" face is listed before the "unread"). notmuch.el | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-)
* emacs: Fix typo in line-wrapping in documentation of notmuch-show.Carl Worth2010-04-07
| | | | Just trying to keep things neat.
* notmuch.el: Make notmuch-show buffer name first subject, instead of ↵Jesse Rosenthal2010-04-07
| | | | | | | | | | | | | | | 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>