aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch.el
Commit message (Collapse)AuthorAge
* emacs: Fix display of highlighted line in notmuch-searchGravatar Michal Sojka2012-02-17
| | | | | | | When notmuch-search-line-faces is used to set background color in search results, the highlight of the current line is not always displayed correctly. This patch fixes that by increasing the priority property of the highlight overlay.
* 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: add default value to notmuch-search-line-facesGravatar Jani Nikula2012-02-12
| | | | | | | | | | | | | | Add default value to notmuch-search-line-faces to show "unread" messages in bold, and "flagged" messages in blue, to have some visual indication of important messages in search results. This should be helpful for new users. "unread" tag is quite obvious, and handled specially both in the lib and emacs ui. "flagged" is synced to maildir F flag in the lib. If one syncs the maildir to IMAP, this also translates to corresponding IMAP flag. (This is "starred" in GMail and Android.) Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: s/tags/tag-changes/ for arguments of tagging functionsGravatar Dmitry Kurochkin2012-02-08
| | | | | | | This makes the argument names more consistent and clear. The following functions changed: `notmuch-tag', `notmuch-search-tag-thread', `notmuch-search-tag-region' and `notmuch-search-tag-all'.
* emacs: accept empty tag list in `notmuch-tag'Gravatar Dmitry Kurochkin2012-02-08
| | | | | | | Since `notmuch-tag' is a non-interactive function and hence is meant to be invoked programmatically, it should accept zero tags. Also, the tagging operations (bound to "*", "+", "-") would accept empty input without an error.
* emacs: relax tag syntax check in `notmuch-tag' functionGravatar Dmitry Kurochkin2012-02-08
| | | | | | | | The tag syntax check in `notmuch-tag' function was too strict and did not allow nmbug tags with "::". Since the check is done for all tagging operations in Emacs UI, this basically means that no nmbug tags can be changed. The patch relaxes the tag syntax check to allow any tag names that do not include whitespace characters.
* emacs: separate history for operations which accept single and multiple tagsGravatar Dmitry Kurochkin2012-02-08
| | | | | | | | | | | | Some tag-related operations accept a single tag without prefix (`notmuch-select-tag-with-completion'), others accept multiple tags prefixed with '+' or '-' (`notmuch-read-tag-changes'). Before the change, both functions used a single default minibuffer history. This is inconvenient because you have to skip options with incompatible format when going through the history. The patch adds separate history lists for the two functions. Note that functions that accept the same input format (e.g. "+", "-", "*") share the history list as before.
* emacs: rename `notmuch-search-operate-all' to `notmuch-search-tag-all'Gravatar Dmitry Kurochkin2012-02-08
| | | | | `Notmuch-search-tag-all' is more clear and consistent with other tagging function names.
* emacs: make "+" and "-" tagging operations in notmuch-search more flexibleGravatar Dmitry Kurochkin2012-02-08
| | | | | | | | | | | Before the change, "+" and "-" tagging operations in notmuch-search view accepted only a single tag. The patch makes them use the recently added `notmuch-read-tag-changes' function (renamed `notmuch-select-tags-with-completion'), which allows to enter multiple tags with "+" and "-" prefixes. So after the change, "+" and "-" bindings in notmuch-search view allow to both add and remove multiple tags. The only difference between "+" and "-" is the minibuffer initial input ("+" and "-" respectively).
* emacs: remove text properties from `notmuch-search-get-tags' resultGravatar Dmitry Kurochkin2012-02-08
|
* emacs: move tag format validation to `notmuch-tag' functionGravatar Dmitry Kurochkin2012-02-08
| | | | | | | Before the change, tag format validation was done in `notmuch-search-operate-all' function only. The patch moves it down to `notmuch-tag', so that all users of that function get input validation.
* emacs: Prefer '[No Subject]' to blank subjects.Gravatar David Edmondson2012-02-03
|
* emacs: Stop the `truncate-string-to-width' madness.Gravatar David Edmondson2012-02-03
| | | | | There's no need to call `truncate-string-to-width' twice in this code path.
* emacs: globally replace non-branching "(if COND (progn ..." with "(when ..."Gravatar Pieter Praet2012-02-01
| | | | Less code, same results, without sacrificing readability.
* emacs: `notmuch-search-operate-all' code cleanup, no functional changesGravatar Dmitry Kurochkin2012-01-27
|
* emacs: add completion to "tag all" operation ("*" binding)Gravatar Dmitry Kurochkin2012-01-27
| | | | | The patch adds <tab> completion to "tag all" operation bound to "*" (`notmuch-search-operate-all' function).
* emacs: use a single history for all searchesGravatar Dmitry Kurochkin2012-01-25
| | | | | | | | There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function.
* emacs: have notmuch-search-archive-thread use -next-thread functionGravatar Jameson Graef Rollins2012-01-25
| | | | Use this standard function, to keep thread navigation in one place.
* emacs/*.el: changed one-char comment prefix ';' to two; ';;'Gravatar Tomi Ollila2012-01-21
| | | | | In order for emacs (indent-region) to (re)indent emacs lisp properly there needs to be at least 2 comment characters (;;).
* emacs: globally replace non-branching "(if (not ..." with "(unless ..."Gravatar Pieter Praet2012-01-21
| | | | Less code, same results, without sacrificing readability.
* emacs: logically group def{custom,face}sGravatar Pieter Praet2012-01-19
| | | | | | | | | | | | | | | | | | | | | To allow for expansion whilst keeping everything tidy and organized, move all defcustom/defface variables to the following subgroups, defined in notmuch-lib.el: - Hello - Search - Show - Send - Crypto - Hooks - External Commands - Appearance As an added benefit, defcustom keyword args are now consistently ordered as they appear @ defcustom's docstring (OCD much?). Proper defgroup docstrings and various other improvements by courtesy of Austin Clements.
* emacs: Cycle through notmuch buffers rather than jumping to the last.Gravatar David Edmondson2012-01-15
| | | | | | | | As suggested by j4ni in #notmuch, rename `notmuch-jump-to-recent-buffer' as `notmuch-cycle-notmuch-buffers' and have it behave accordingly. Consider `message-mode' buffers to be of interest.
* emacs: bind 'r' to reply-to-sender and 'R' to reply-to-allGravatar Jani Nikula2012-01-14
| | | | | | | Change the default reply key bindings, making 'r' reply-to-sender and 'R' reply-to-all. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: add support for replying just to the senderGravatar Jani Nikula2012-01-14
| | | | | | | | Provide reply to sender counterparts to the search and show reply functions. Add key binding 'R' to reply to sender, while keeping 'r' as reply to all, both in search and show views. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: Better handling of inherited keymaps for `nomuch-help'.Gravatar David Edmondson2012-01-09
| | | | | | | | `notmuch-hello-mode' inherits the keymap for widgets, which confused `notmuch-substitute-command-keys'. Fix the confusion. Simplify `notmuch-substitute-command-keys' a little to make it easier to read.
* emacs: Don't signal an error when reaching the end of the search results.Gravatar David Edmondson2012-01-09
| | | | | | | | | With the default configuration ('space' moves through the messages matching the search and back to the results index at the end) it's unnecessary to signal an error when the last message has been read, as this is the common case. Moreover, it's very annoying when `debug-on-error' is t.
* 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)).