aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
Commit message (Collapse)AuthorAge
* 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: Only compile replacement functions for emacs < emacs-23Gravatar Carl Worth2011-05-11
| | | | | | This avoids the emacs lisp compiler from emitting warnings on this replacement code, (which warnings would be hard for us to eliminate since we didn't write the code but copied it verbatim from emacs 23).
* 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.
* build: Add support for non-source-directory builds.Gravatar Carl Worth2011-03-09
| | | | | | | | | | | | | | Such as: mkdir build cd build ../configure make This is implemented by having the configure script set a srcdir variable in Makefile.config, and then sprinkling $(srcdir) into various make rules. We also use vpath directives to convince GNU make to find the source files from the original source directory.
* emacs: send notmuch-query stderr to /dev/nullGravatar Jameson Rollins2011-01-27
| | | | | | | | | | The call-process to notmuch in notmuch-query.el was previously sending stderr into the output buffer. This means that if there is any stderr the JSON parsing breaks. Unfortunately call-process does not support sending stderr to a separate buffer or to the minibuffer [0], but it does support sending it to /dev/null. So we do that here instead. [0] a bug was filed against emacs (#7842)
* Makefile: Quote variables used as filenames in shell commandsGravatar Carl Worth2011-01-26
| | | | This allows support for filenames with spaces in them.
* 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.
* configure: add options to disable emacs/zsh/bash and choose install dir.Gravatar Cédric Cabessa2011-01-26
| | | | | | | | | | | | | add --bashcompletiondir and --zshcompletiondir (like --emacslispdir) to choose installation dir for bash/zsh completion files Make some features optional: --without-emacs / --with-emacs=no do not install lisp file --without-bash-completion / --with-bash-completion=no do not install bash files --without-zsh-completion / --with-zsh-completion=no do not install zsh files By default, everything is enabled. You can reenable something with --with-feature=yes
* emacs: Remove over-eager regular expressions from notmuch-wash-tidy-citations.Gravatar David Edmondson2010-12-07
| | | | | | | The removed expressions, which were used to ensure that citations were both preceded and followed by a blank line, were poorly implemented and caused a regexp stack overflow on messages more than a few thousand lines long.
* 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: Use truenames for Fcc paths.Gravatar David Edmondson2010-12-07
| | | | | | Appease the test suite by using the true name for the Fcc directory path, otherwise a value for `notmuch-database-path' which includes symbolic links causes test suite failures.
* compatibility with emacs22Gravatar James Vasile2010-11-16
| | | | | | | | | | Emacs22 lacks apply-partially and mouse-event-p, so define them if emacs version is less than 23. With this change, I was able to begin using notmuch in emacs22. The definitions of apply-partially and mouse-event-p are copied from the emacs 23 distribution, (which is distributed under the GPLv3+ just as notmuch).
* 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: 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.
* 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: Improve the definition and use of `notmuch-fcc-dirs'.Gravatar David Edmondson2010-11-11
| | | | | | | | | | | | | | | | | | | | | Re-work the declaration and definition of `notmuch-fcc-dirs'. The variable now allows three types of values: - nil: no Fcc header is added, - a string: the value of `notmuch-fcc-dirs' is the name of the folder to use, - a list: the folder is chosen based on the From address of the current message using a list of regular expressions and corresponding folders: ((\"Sebastian@SSpaeth.de\" . \"privat\") (\"spaetz@sspaeth.de\" . \"OUTBOX.OSS\") (\".*\" . \"defaultinbox\")) If none of the regular expressions match the From address, no Fcc header will be added.
* 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.
* emacs: Correctly count the number of lines in a signature.Gravatar David Edmondson2010-11-11
|
* 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.
* Fix problem with notmuch-hello-nice-numberGravatar Dirk Hohndel2010-10-29
| | | | | | | | Without this little patch notmuch fails if asked to display a saved search that has zero results Edited-by: David Edmondson <dme@dme.org>: With code that is a little more "emacsy".
* 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: 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: Eliminate duplicate From header in replies.Gravatar Carl Worth2010-10-27
| | | | | | | | The original code was intended to work, but clearly wasn't tested. Use mail-header (as in existing code) to extract a header from a header alist. This fixes the duplicate-from-line bug that is exercised by the test just added to the test suite.
* 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: Fix to eliminate warning in notmuch-query-map-auxGravatar Carl Worth2010-10-27
| | | | | | | | | This is one of those cases where the warning looks absolutely correct, (complaining about a free variable), but I'm left wondering how the original code could have worked at all. From what I can tell, this code wasn't actually being called by any of the current code in notmuch.
* 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.
* Move notmuch-fcc-header-setup to message-header-setup-hook.Gravatar Rob Browning2010-10-27
| | | | | | | | | Call notmuch-fcc-header-setup from message-header-setup-hook rather than message-send-hook. This allows you to see what's going to happen, and to make manual adjustments if desired. Gnus does something similar. Signed-off-by: Rob Browning <rlb@defaultvalue.org>
* emacs: Explicitly set the From address when composing a new message.Gravatar Carl Worth2010-10-27
| | | | | Previously, underlying emacs code was setting this header. Now, we do the right thing and query the notmuch configuration for the default value here.
* emacs: Enable FCC (to a directory named "sent") by default.Gravatar Carl Worth2010-10-27
| | | | | | Now that the FCC code is fixed to use the notmuch database path, we can actually enable this by default, which should be highly useful for all new users of notmuch.
* emacs: Change FCC to be relative to notmuch mail store, not message-directoryGravatar Carl Worth2010-10-27
| | | | | | | | | | | | | Otherwise, FCC is too hard to use, (user must set it and also set message- directory variable to match notmuch mail datbase path). As a rule, I'd like for users of notmuch to not be required to muck around with non-notmuch mail settings in emacs. The above is only really possible now thanks to the recent addition of the "notmuch config get" command which allows emacs to query the currently configured notmuch database path. This also now allows an absolute-path FCC to be set if desired.
* 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: Remove the joke from the first line of the notmuch-hello view.Gravatar Carl Worth2010-10-22
| | | | Overuse just makes the joke unfunny.
* emacs: Fix notmuch-hello to not break when given a very narrow window.Gravatar Carl Worth2010-10-22
| | | | | | Simply ensure that some subtractions never result in a negative number, (since emacs complains when asked to create a string with a negative length).
* 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: 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.