aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch.el
Commit message (Collapse)AuthorAge
...
* emacs: fix docstring for `notmuch-search-line-faces'.Gravatar Dmitry Kurochkin2011-12-24
| | | | | | | | | | | | | | Examples in documentation for `notmuch-search-line-faces' had an extra quote, e.g.: '(\"unread\" . '(:foreground \"green\")) Which resulted in values like: (\"unread\" quote (:foreground \"green\")) And tons of "Invalid face reference: quote" errors in the messages buffer.
* 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: Add `notmuch-jump-to-recent-buffer'.Gravatar David Edmondson2011-12-20
| | | | | | | | | From a Carl Worth idea: add a function which will select the most recently used notmuch buffer (search, show or hello). If no recent buffer is found, run `notmuch'. It is expected that the user will global bind this command to a key sequence.
* emacs: support "notmuch new" as a notmuch-poll-scriptGravatar Jani Nikula2011-12-15
| | | | | | | | | | | Support nil value for notmuch-poll-script to run "notmuch new" instead of an external script, and make this the new default. "notmuch new" is run using the configured notmuch-command. This allows taking better advantage of the "notmuch new" hooks from emacs without intermediate scripts. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: Use notmuch-command variable in process-lines.Gravatar Chris Gray2011-11-30
| | | | | | | The process-lines function calls the notmuch binary. The location of the binary may have been customized by the user, so it is better to use the customized location rather than allowing the process-lines function to search the user's PATH for the binary.
* emacs: Avoid unnecessary markers.Gravatar Austin Clements2011-11-24
| | | | | This is just cleanup. These markers are all immediately resolved to points by Emacs, so using markers here is just unncessary overhead.
* 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: Unbind M-RET as display of thread with crypto switch.Gravatar Jameson Graef Rollins2011-11-12
| | | | Use prefix argument instead to set switch.
* emacs: Use a single buffer invisibility spec to fix quadratic search cost.Gravatar Austin Clements2011-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Buffer redisplay requires traversing the buffer's invisibility spec for every part of the display that has an 'invisible text or overlay property. Previously, the search buffer's invisibility spec list contained roughly one entry for each search result. As a result, redisplay took O(NM) time where N is the number of visible lines and M is the total number of results. On a slow computer, this is enough to make even buffer motion noticeably slow. Worse, during a search operation, redisplay is triggered for each search result (even if there are no visible buffer changes), so search was quadratic (O(NM^2)) in the number of search results. This change switches to using a single element buffer invisibility spec. To un-hide authors, instead of removing an entry from the invisibility spec, it simply removes the invisibility overlay from those authors. I tested using a query with 6633 results on a 9 year old machine. Before this patch, Emacs took 70 seconds to fill the search buffer; toward the end of the search, Emacs consumed 10-20x as much CPU as notmuch; and moving point in the buffer took about a second. With this patch, the same query takes 40 seconds, Emacs consumes ~3x the CPU of notmuch by the end, and there's no noticeable lag to moving point. (There's still some source of non-linearity, because Emacs and notmuch consume roughly the same amount of CPU early in the search.)
* Do not query on notmuch-search exitGravatar Michal Sojka2011-11-08
| | | | | | Emacs 23.2 queries by default about killing existing processes. This is annoying when one wants to interrupt long search with 'q' key. Disable this behavior for notmuch.
* emacs: Tab completion for notmuch-search and notmuch-search-filterGravatar Daniel Schoepe2011-11-02
| | | | | This patch adds completion with <tab> in the minibuffer for notmuch-search and notmuch-search-filter.
* 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".
* 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.
* emacs: Allow the user to choose the "From" address when replying to a messageGravatar Thomas Jost2011-05-26
| | | | When pressing C-u r, the user will be prompted for the identity to use.
* emacs: Allow the user to choose the "From" address when composing a new messageGravatar Thomas Jost2011-05-26
| | | | When pressing C-u m, the user will be prompted for the identity to use.
* emacs: add notmuch-before- and notmuch-after-tag-hookGravatar Daniel Schoepe2011-05-24
| | | | | | | | This patch adds hooks that are run before/after messages are tagged From the emacs interface. In order to implement this and to avoid having hooks parse all the arguments to the notmuch binary again, I created a `notmuch-tag' function that other modules should use instead of running (notmuch-call-notmuch-process "tag" ...) directly.
* use custom-face-edit value-type in notmuch-search-line-facesGravatar Jameson Graef Rollins2011-04-25
| | | | | This enables the proper face customization UI for notmuch-search-line-faces.
* emacs: Define notmuch-search-process-filter-data before first use.Gravatar Carl Worth2011-03-10
| | | | To avoid a wraning about a reference to a free variable when compiling.
* emacs: Don't drop error messages from "notmuch search"Gravatar Carl Worth2011-03-10
| | | | | | | | | | | | | With the previous commit, unexpected output before or between search results would be displayed. However, trailing junk from the "notmuch search" output would still be silently swallowed. The most common case for an error message from "notmuch search" would be an invalid command-line, and in that case, there would be no search results and the trailing error message would get swallowed. We fix the process sentinel to check for leftover data and add it to the final buffer. We also add a test case to ensure this works.
* emacs: Fix notmuch-search-process-filter to handle incomplete linesGravatar Carl Worth2011-03-10
| | | | | | | | | This fixes the recently-added emacs-large-search-buffer test. This is as simple as saving any trailing input and then pre-prepending it on the next call. MAny thanks to Thomas Schwinge <thomas@schwinge.name> for tracking down this problem and contributing a preliminary version of this fix.
* emacs: Display any unexpected output from notmuch searchGravatar Carl Worth2011-03-10
| | | | | | | | | | | | | | Rather than silently swallowing unexpected output, the emacs interface will now display it. This will allow error messages to actually arrive at the emacs interface (though not in an especially pretty way). This also allows for easier investigation of the inadvertent swallowing of search results that span page boundaries (as demonstrated by the recent added emacs-large-search-buffer test). The page-boundary bug has been present since a commit from 2009-11-24: 93af7b574598637c2766dd1f8ef343962c9a8efb Many thanks to Thomas Schwinge for tracking that bug down and contributing the test for it.
* emacs: Improve the display of truncated authors.Gravatar David Edmondson2010-12-07
| | | | | | | | | | Incremental search does not match strings that span a visible/invisible boundary. This results in failure to correctly isearch for authors in `notmuch-search' mode if the name of the author is split between the visible and invisible components of the authors string. To avoid this, attempt to truncate the visible component of the authors string on a boundary between authors, such that the entirety of an author's name is either visible or invisible.
* emacs: add stash thread-id function to notmuch-search modeGravatar Jameson Rollins2010-11-11
| | | | | | | | | This add a "stash-map" for search-mode, just like in show-mode, and adds one function, bound to "i" to stash the thread-id of the current selected thread. Couldn't think of the correct way to stash other thread info, so I didn't add any other stash functions for now.
* 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: Re-work the implementation of highlighting in notmuch-search-mode.Gravatar David Edmondson2010-10-29
| | | | | | | Re-write `notmuch-search-color-line', with the following improvements: - create overlays only if they will be needed, - merge the properties specified for a tag on top of any matching a previous tag.
* 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.
* Don't involve the shell in notmuch searchesGravatar David Benjamin2010-10-29
| | | | | | | The shell isn't needed to interpret any of the arguments, so don't bother using it at all. Signed-off-by: David Benjamin <davidben@mit.edu>
* emacs: Eliminate warning of calling function with excess arguments.Gravatar Carl Worth2010-10-27
| | | | | | | | Yet another case of "how could this have possibly worked before?!". I guess we were just getting very lucky with the emacs lisp calling conventions and what happens with extra arguments, but, ick! Much better now.
* emacs: Remove non-interactive call of goto-lineGravatar Carl Worth2010-10-27
| | | | | | As the emacs compiler warns, the goto-line function is only intended for interactive use. Instead use the approach recommended in the goto-line documentation to avoid this.
* 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 bug when parsing a subject cotaining: \[[0-9/]\]Gravatar Carl Worth2010-09-23
| | | | | | That is, a subject with a bracketed set of digits (and optionally a slash), for example "[2010]" would cause the emacs code to misparse the search results. Fix this by tweaking the regular expression.
* emacs: In search mode, truncate authors using invisible text.Gravatar David Edmondson2010-06-03
| | | | | | | | | Rather than discarding authors when truncated to fit the defined column width, mark the text beyond the end of the column as invisible and allow `isearch' to be used over the text so hidden. This allows us to retain the compact display whilst enabling a user to find the elided text.
* emacs: Adjust comment to avoid confusing font-lock.Gravatar David Edmondson2010-06-03
| | | | | Comments with an open bracket in the first column confuse `font-lock' mode, so avoid them.
* emacs: Allow control over faces for search mode columns.Gravatar David Edmondson2010-06-03
| | | | | | | | Add face declarations for the date, count, matching author and subject columns in search mode and apply those faces when building the search mode display. Approved-by: Jameson Rollins <jrollins@finestructure.net>
* emacs: Set the `face' property rather than `font-lock-face'.Gravatar David Edmondson2010-06-03
| | | | Avoid using face properties reserved for the font-lock package.
* emacs: Display non-matching authors with a different face.Gravatar David Edmondson2010-06-03
| | | | | | In search mode some messages don't match the search criteria. Show their authors names with a different face - generally darker than those that do match.
* emacs: require notmuch-message.el from notmuch.elGravatar Jesse Rosenthal2010-04-27
| | | | | | Add a (require 'notmuch-message) to notmuch.el. This is for functions that specifically target message mode (and, in the future, notmuch-message mode).
* emacs: Tweak search-buffer naming to search list in reverse orderGravatar Carl 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"Gravatar 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 nameGravatar Carl 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.Gravatar 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.Gravatar 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 notmuchGravatar Sebastian 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'Gravatar 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' interfaceGravatar David 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'Gravatar 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 codeGravatar David 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.Gravatar 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 notmuchGravatar David 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 ↵Gravatar 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>