Commit graph

3744 commits

Author SHA1 Message Date
Felipe Contreras
2e8dc64f5f NEWS: update news about the vim interface
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 19:43:19 -05:00
Felipe Contreras
138c6aa098 Add new notmuch vim plugin
The old one was not properly maintained and is now deprecated. The new
one has much better support.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 19:42:43 -05:00
Mark Walters
dbc3a247ca contrib: pick: bugfix: use notmuch-show-mark-read-tags instead of unread
Previously pick removed the unread tag from its tag display: since the
tag change is now customisable use the customised variable.

This only affected the tags displayed, not the tags in the database as
notmuch-show (in the view pane) did the actual tag changes.
2013-06-02 20:53:49 -03:00
Mark Walters
cec063736a contrib: pick: bugfix. use notmuch-show-only-matching-messages rather than prefix
Previously pick set a prefix argument prior to calling show in the
message pane to tell show to only show matching messages. This sets
notmuch-show-only-matching-messages instead which is much cleaner and
will work even if the user has configured show to default to showing
only matching messages.
2013-06-02 20:52:41 -03:00
David Bremner
be96004b7d build: pass CPPFLAGS to C and C++ compilers
This is used in particular by hardening flags.
2013-06-02 20:49:19 -03:00
David Bremner
51b14fb3c3 configure: grab CPPFLAGS from the environment.
This is needed in particular for hardening flags.
2013-06-02 20:45:56 -03:00
David Bremner
a226183b8d debian: compile with V=1
The idea is to allow hardening verification tools (in particular blhc)
to scan the logs. Actually fixing the problem will require modifying
the notmuch configure script to propagate CPPFLAGS.
2013-06-02 20:45:38 -03:00
David Bremner
6974c5e4f2 debian: update .gitignore
Several packages have been added or renamed, but their build detritus
not yet ignored.
2013-06-02 20:44:42 -03:00
David Bremner
b3e8be32e8 emacs: update .gitignore
Start a seperate .gitignore for emacs stuff, move .elc rule there.
2013-06-02 20:44:26 -03:00
David Bremner
915a707ae4 emacs: add `notmuch-archive-tags' cross references in docstrings
Several function docstrings refer to behaviour in docstrings that is
really controlled by notmuch-archive-tags. Add cross references, and
replace hardcoding.
2013-06-02 20:43:14 -03:00
David Bremner
487359e9cc emacs: remove hardcoded defaults values from docstrings
These functions refer to default values of variables, but it seems
less confusing and less likely to get out of date to just allow the
user to follow the help cross-reference links.
2013-06-02 20:43:02 -03:00
Jani Nikula
288a1cc206 NEWS: key bindings for next/previous thread 2013-06-02 20:42:14 -03:00
David Bremner
63782f4023 emacs: replace setq + let with let*
I found several places where a setq is immediately followed by a let
or a let*. This seems to be the pessimal combination, with the
implicit scope of the setq combined with the extra indentation of the let.
I combined these cases into a single let* which I think is easier to read.
2013-06-02 20:38:17 -03:00
David Bremner
9de0639126 emacs: replace (funcall 'foo ...) with (foo ...)
I can't see any benefit to the funcall, and it looks like the result
of cut-and-paste from some code that actually used a variable for the
function to call.
2013-06-02 11:37:22 -03:00
Mark Walters
5461c31d64 contrib: pick: use the sexp parser
This just converts notmuch-pick to use the sexp parser.
2013-06-02 08:11:27 -03:00
Felipe Contreras
b6a60cf355 packaging: fedora: add ruby bindings
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 08:03:47 -03:00
Felipe Contreras
4753a9f40e packaging: fedora: package notmuch-mutt
From Fedora.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 08:03:36 -03:00
Felipe Contreras
13a06c0d43 packaging: fedora: package python bindings
Like in Fedora.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 08:03:28 -03:00
Felipe Contreras
de668cffd7 packaging: fedora: separate package for emacs
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 08:03:10 -03:00
Felipe Contreras
468fde0845 packaging: fedora: reorganize files section
Also to sync with Fedora.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 08:02:47 -03:00
Felipe Contreras
c30ef56a1b packaging: fedora: trivial cleanups
Mostly to sync with Fedora's spec.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 08:02:39 -03:00
Felipe Contreras
8dde4af6cd packaging: fedora: remove irrelevant stuff
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 08:02:29 -03:00
Felipe Contreras
92c0591db9 packaging: fedora: update
So at least it builds.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-06-02 07:59:56 -03:00
Austin Clements
d298af4d61 News for S-expression support in Emacs search mode 2013-06-01 14:27:50 -03:00
Austin Clements
89efd5717a emacs: Use streaming S-expr parser for search
In addition to being the Right Thing to do, this noticeably improves
the time taken to display the first page of search results, since it's
roughly an order of magnitude faster than the JSON parser.
Interestingly, it does *not* significantly improve the time to
completely fill a large search buffer because for large search
buffers, the cost of creating author invisibility overlays and
inserting text (which slows down with more overlays) dominates.
However, the time required to display the first page of results is
generally more important to the user experience.
2013-06-01 09:00:40 -03:00
Austin Clements
b89ffba301 emacs: Streaming S-expression parser
This provides the same interface as the streaming JSON parser, but
reads S-expressions incrementally.  The only difference is that the
`notmuch-sexp-parse-partial-list' helper does not handle interleaved
error messages (since we now have the ability to separate these out at
the invocation level), so it no longer takes an error function and
does not need to do the horrible resynchronization that the JSON
parser had to.

Some implementation improvements have been made over the JSON parser.
This uses a vector instead of a list for the parser data structure,
since this allows faster access to elements (and modern versions of
Emacs handle storage of small vectors efficiently).  Private functions
follow the "prefix--name" convention.  And the implementation is much
simpler overall because S-expressions are much easier to parse.
2013-06-01 08:56:25 -03:00
Austin Clements
08fde50bf3 emacs: Use async process helper for search
Previously, search started the async notmuch process directly.  Now,
it uses `notmuch-start-notmuch'.  This simplifies the process sentinel
a bit and means that we no longer have to worry about errors
interleaved with the JSON output.

We also update the tests of Emacs error handling, since the error
output is now separated from the search results buffer.
2013-06-01 08:56:16 -03:00
Austin Clements
a13b388243 emacs: Utilities to manage asynchronous notmuch processes
This provides a new notmuch-lib utility to start an asynchronous
notmuch process that handles redirecting of stderr and checking of the
exit status.  This is similar to `notmuch-call-notmuch-json', but for
asynchronous processes (and it leaves output processing to the
caller).
2013-06-01 08:53:36 -03:00
Austin Clements
7eaf698e23 test: Remove extraneous Emacs error handling test
We now check error handling more carefully in the last test in
test/emacs and we're about to add more error handling tests.  (This
was also a strange place for this test, since it had nothing to do
with large search buffers.)
2013-06-01 08:53:19 -03:00
Austin Clements
b607965886 News for Emacs part handling changes 2013-05-31 22:01:21 -03:00
Austin Clements
edc740857f emacs: Bind MIME part commands to "." submap
Since the part commands are no longer tied to a button, but can be
applied with point anywhere within a part, bind the part commands
keymap to "." everywhere in the show buffer.  This lets you save or
view parts without having to navigate to the part button, and is
particularly useful for parts that have no button.

This removes the un-prefixed MIME part commands from the part button
keymap, but that's okay because those clashed in annoying ways with
show buffer bindings like "s" for search.  RET on part buttons is
unaffected, which is the most important part button binding.
2013-05-31 22:01:12 -03:00
Austin Clements
1546387d72 emacs: Simplify MIME part command implementation
This unifies the part button actions and the underlying part action
functions into single interactive command that simply applies to the
part containing point using the just-added part p-list text property
instead of button properties.  Since all part actions can be performed
by applying the appropriate mm function to an mm-handle, this patch
abstracts out the creation of mm handles, making the implementations
of the part commands trivial.  This also eliminates our special
handling for part save in favor of using the appropriate mm function.

This necessarily modifies the way we handle the default part button
action, but in a way that does not change the meaning of the
notmuch-show-part-button-default-action defcustom.

Since these commands are no longer specific to buttons, this patch
eliminates the extra metadata stored with each button.  This also
eliminates one rather special-purpose macro for a collection of
general purpose part handling utilities.
2013-05-31 22:01:02 -03:00
Austin Clements
04725cfbe5 emacs: Record part p-list in a text property
This is similar to what we already do with the message p-list, though
we apply the part's text property to the whole part's text, in
contrast with the message p-list, which is (rather obscurely) only
applied to the first character.
2013-05-31 22:00:52 -03:00
Austin Clements
6bbb91f8b6 emacs: Retain text properties when toggling buttons
Previously, we lost any text properties applied to part buttons or
wash buttons when they were toggled because `insert' directly copies
the text properties of the string being inserted.  Fix this by
capturing the properties applied to the button beforehand and
re-applying them after inserting the new text.
2013-05-31 22:00:44 -03:00
Jani Nikula
195aaa6232 TODO: keybindings for next/previous thread done 2013-05-31 21:51:54 -03:00
Jani Nikula
9c81214ae5 cli: remove unused argument descriptions
Clean up leftovers from help system rework. These are no longer
needed. They are easy to resurrect and update if a need later arises.
2013-05-31 21:51:36 -03:00
Tomi Ollila
b9020448bd NEWS: added information about new --stderr=FILE top level option 2013-05-29 20:08:33 -03:00
Tomi Ollila
21eba9d686 man: documented --stderr=FILE in notmuch.1 manual page 2013-05-29 20:06:45 -03:00
Tomi Ollila
ff598e4fdd test: added --stderr=FILE tests
--stderr=FILE tests were added to test/help-test as it is the one
doing most global option testing. Also, it was simplest to test
this new option using `notmuch help` command.
2013-05-29 20:01:38 -03:00
Tomi Ollila
8a0e85025a cli: add global option --stderr=FILE
With this option all writes to stderr are redirected to the specified
FILE (or to stdout on case FILE is '-'). This is immediately useful
in emacs interface as some of its exec intefaces do not provide
separation of stdout and stderr.
2013-05-29 20:00:52 -03:00
Austin Clements
e7ade21d56 emacs: Fix trimming regexp in notmuch-check-exit-status
For such a simple regexp, this was broken in a very complicated way.

The intent was to strip the newline (and potentially other whitespace)
off the end of the error string so there wasn't an extra newline in
the error signal.  However, the regexp was deeply dependent on the
active syntax table and the subtleties of $.  We didn't notice this
because all notmuch major modes put ?\n in the whitespace class, which
makes this behaved as intended: the "\\s " matches all newlines, but
by matching the newline character, causes the $ *not* to match
*except* where it matched the empty string at the very end of the
string, which was not followed by a newline.

However, if the syntax table declares ?\n to be non-whitespace
(lisp-mode declares it as endcomment, and is likely to be the mode
you're in when testing functions), then this regexp behaves completely
differently, matching trailing spaces at the end of every line within
the string.

The solution is to say what we mean for whitespace *and* to switch
from $ to \', which matches only the end of the string, rather than
the end of each line.  Both are necessary or this will strip away
interior newlines, which is not what we want.
2013-05-27 18:19:03 -03:00
Jani Nikula
2cbd68de92 build: fix out-of-tree builds
Support for out-of-tree builds was added in
commit 3e4a9d60a9
Author: Carl Worth <cworth@cworth.org>
Date:   Wed Mar 9 15:02:42 2011 -0800

    build: Add support for non-source-directory builds.

and broken in
commit 7beeb8c88a
Author: David Bremner <bremner@debian.org>
Date:   Sat Nov 17 12:28:15 2012 -0400

    test: initial performance testing infrastructure

Fix the build breakage.

Out-of-tree 'make test' has been broken since earlier than the above,
and remains broken, as does out-of-tree perf test, but at least the
build now works.
2013-05-26 18:49:04 -03:00
Jani Nikula
8a164516ee emacs: add show view bindings to move to previous/next thread
We have most of the plumbing in place, add the bindings M-n and M-p.
2013-05-26 18:48:31 -03:00
Austin Clements
d4940d4716 emacs: Don't override mm-show-part in notmuch-show-view-part
Previously, notmuch-show-view-part overrode the function binding of
mm-show-part to redirect it to notmuch-show-save-part to get notmuch's
default file name handling in case mm-display-part decided to fall
back to saving the part.  In addition to being messy, this depended on
the now-deprecated dynamic binding behavior of flet.

This patch removes the mm-show-part override in favor of passing the
file name in to mm-show-part the way it expects, so we get its default
file name handling.  It's not clear why we didn't do this before;
mm-show-part has supported default file names since at least Emacs
23.1.
2013-05-26 18:45:10 -03:00
Jani Nikula
c3c4da7ba8 NEWS: a bunch of cli news since 0.15 2013-05-26 18:44:53 -03:00
David Bremner
f0dfda5c77 Merge branch 'release'
merge back debian-only release into master
2013-05-25 21:20:39 -03:00
David Bremner
06c70d3d75 debian: bump standards version to 3.9.4 2013-05-25 18:37:48 -03:00
Tomi Ollila
5b5e360383 NEWS: No Emacs 22 support 2013-05-25 17:24:36 -03:00
Felipe Contreras
3b2344e122 debian: package ruby bindings
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-05-23 08:16:49 -03:00
Felipe Contreras
8c3d19313e ruby: use in-tree notmuch library
Currently it simply finds any library available, and if notmuch is
installed in the system, it would give priority to that library.

Let's implement our own helper functions to link directly to the local
library, and give priority to the local header file.

Also, add an option to properly check if there are missing symbols.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-05-23 08:15:20 -03:00