summaryrefslogtreecommitdiff
path: root/emacs/notmuch.el
Commit message (Collapse)AuthorAge
* emacs: Tweak search-buffer naming to search list in reverse orderCarl Worth2010-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | The complete-string matching of commit f2ebe3ac446afda9ced6507dc391865464ccdcaa defeats the substitution of partial search strings when the user manually types a long search string that just happens to partially match a saved search. For example, typing "tag:inbox and not tag:foo" should result in "[inbox] and not tag:foo" but this has been broken since that commit. As a compromise between this feature and what the commit was trying to achieve, we now reverse the saved-searches list before looking for a match. This happens to work for me, but won't necessarily work in general. What we really want is the longest match, but rassoc-if just gives us the first match. All of this is just about creating slightly nice search-buffer names. So if anyone really cares about making the names *even* nicer, then they could improve this further.
* emacs: Rename search buffers with "saved-search" not "folder"Carl Worth2010-04-26
| | | | | | Since we recently renamed everything from notmuch-folders to notmuch-saved-searches, fix up the generated names in the search buffers to match.
* emacs: Match entire saved-search when computing search-view buffer nameCarl Worth2010-04-26
| | | | | | | | | | I happen to have a lot of saved searches that are variants of the tag:inbox search, (such as "tag:inbox and tag:notmuch"). The logic for these was always matching inbox first, resulting in "[ inbox ] and tag:notmuch" rather than "notmuch" as desired. Anchor the regular expression on both ends to make it look harder for the better match.
* emacs: Rip out all of the notmuch-folder code.Carl Worth2010-04-26
| | | | | | | | | | | | We are asserting that the new notmuch-hello implementation, (available by just calling `notmuch') is just as easy to use as the old notmuch-folder. So let's remove what's now a largely redundant implementation. To make this transition easier, we are still supporting the notmuch-folders variable name, and we still provide `notmuch-folder' as an alias which can be invoked to get the new notmuch-hello functionality.
* emacs: Add a notmuch-saved-searches function.Carl Worth2010-04-26
| | | | | | | | | | | | | We use this function to abstract away the common 3-step process for looking for a value for the saved-searches variable: 1. Look at the notmuch-saved-searches variable itself 2. Look at the notmuch-folders vaiable 3. Use a default value We were already using this logic (open-coded) in notmuch-hello, but notmuch.el was accessing notmuch-folders directly for the clever name selection of search buffers.
* Integrate notmuch-maildir-fcc into notmuchSebastian Spaeth2010-04-26
| | | | | | | Require notmuch-maildir-fcc and also install it. Rename all jkr/* functions to notmuch-maildir-fcc-* Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* emacs: Remove duplicate declaration of `notmuch-folders'David Edmondson2010-04-26
| | | | | | | Reviewed-by: Carl Worth <cworth@cworth.org> This variable was moved from notmuch.el to notmuch-lib.el some time ago, but the declaration in notmuch.el was left around. Clean that up.
* emacs: `notmuch' should display the `notmuch-hello' interfaceDavid Edmondson2010-04-26
| | | | | | | | | | | | | | | | | Reviewed-by: Carl Worth <cworth@cworth.org> The notmuch-hello functionality is now sufficiently useful that we want to make it the default view of notmuch for new users. This also effectively hides the "hello" name from the user, so we'll be free to change that in the implementation if necessary. This change also shuffles the requires between notmuch.el and notmuch-hello.el. This fixes things so that our documented (require 'notmuch) is sufficient for getting the notmuch-hello functionality. Finally, the shuffling caused the notmuch-search-oldest-first variable from one file to the other. While doing that, give this variable the defcustom treatment for easier customization.
* emacs: Fix `notmuch-search-insert-field'David Edmondson2010-04-26
| | | | | | Compare the formatted version of the authors with the formatted sample string rather than the un-formatted authors with the formatted sample string.
* 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: 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>
* 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: 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
|
* 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.
* 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.
* 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(-)
* 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>
* notmuch.el: 'F' in search mode takes us to a list of folders.David Edmondson2010-04-07
|
* notmuch.el: fontify date in headerJameson Rollins2010-04-07
| | | | | | | The date was unfairly left out of getting pretty colors in the notmuch-show header display. This fixes that grave injustice. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* emacs: Move notmuch-show functionality to notmuch-show.elDavid Edmondson2010-04-05
| | | | | | | To ease the transition to a JSON based implementation of `notmuch-show', move the current implementation into a separate file. Create `notmuch-lib.el' to hold common variables.
* emacs: Fix "free variable" warning for notmuch-folder-show-empty.Carl Worth2010-04-03
| | | | | Emacs really wants us to defvar each variable before assigning to it, (which gives us a place to document the variable as well).
* emacs/notmuch.el: Improve tag highlighting in search modeDavid Edmondson2010-04-03
| | | | | | | Assume that tags never include an opening bracket, and hence improve the regular expression used to highlight them. This avoids false matches where the 'from' address of a thread participant includes an opening bracket.
* emacs: Fix the notmuch-search-authors-width variable.Carl Worth2010-03-31
| | | | This variable existed previously, but wasn't actually used for anything.
* emacs: Fix search refresh when on the last line of a search buffer.Carl Worth2010-03-10
| | | | | | | | | | | | | | | We currently allow the cursor to be positioned on the "End of search results" line after the last thread in a search buffer. When refreshing on this line, there's no thread ID to be used as the target. Previously, a refresh from this case would result in a nil thread target, but we were also using nil to indicate that the target thread had been found. This caused the position to be lost during refresh, (the cursor would move from the last line in the buffer to the first). We fix this by using a magic string of "found" rather than nil to clearly indicate whether the target thread has actually been found.
* emacs: Adjust search refresh to use a target line not a target position.Carl Worth2010-03-10
| | | | | | It doesn't make sense to move the cursor to some random point in the middle of a line. We always want the refresh to leave the cursor at the beginning of some line instead.
* emacs: Move emacs UI (currently just one file) to subdirectory.David Bremner2010-03-09
Add emacs/Makefile.local and emacs/Makefile. Move emacs targets into emacs/Makefile.local, but leave the byte compilation rule in the top level Makefile.