]> git.notmuchmail.org Git - notmuch/log
notmuch
10 years agocontrib: pick: add docstrings to all defvars
Mark Walters [Mon, 1 Jul 2013 07:54:00 +0000 (08:54 +0100)]
contrib: pick: add docstrings to all defvars

10 years agocontrib: pick: add a docstring for the main notmuch-pick function
Mark Walters [Mon, 1 Jul 2013 07:53:59 +0000 (08:53 +0100)]
contrib: pick: add a docstring for the main notmuch-pick function

10 years agocontrib: pick: fix refresh result
Mark Walters [Sun, 30 Jun 2013 08:55:12 +0000 (09:55 +0100)]
contrib: pick: fix refresh result

The function notmuch-pick-refresh-result (used to update tag changes)
was not quite correct: sometimes it got the choice between the subject
and " ..." wrong. This was always true but the new code often calls
this (when opening a message in the message pane to remove the unread
tag) while the async pick process is still running and this caused
mistakes which made the tests fail.

Thus we store the previous subject with the message.

10 years agocontrib: pick: remove hack notmuch-pick-show-match-message-with-wait
Mark Walters [Sun, 30 Jun 2013 08:55:11 +0000 (09:55 +0100)]
contrib: pick: remove hack notmuch-pick-show-match-message-with-wait

This function was a horrible hack (sleeping while waiting for the
correct message). The new target code can just open the message in the
message window when it arrives.

10 years agocontrib: pick: if no target specified go to first matching message
Mark Walters [Sun, 30 Jun 2013 08:55:10 +0000 (09:55 +0100)]
contrib: pick: if no target specified go to first matching message

10 years agotest: test insert --create-folder option
Peter Wang [Sun, 23 Jun 2013 04:24:05 +0000 (14:24 +1000)]
test: test insert --create-folder option

Add tests for notmuch insert --create-folder option.

10 years agoman: document insert --create-folder
Peter Wang [Sun, 23 Jun 2013 04:24:04 +0000 (14:24 +1000)]
man: document insert --create-folder

Add documentation for notmuch insert --create-folder option.

10 years agoinsert: add --create-folder option
Peter Wang [Sun, 23 Jun 2013 04:24:03 +0000 (14:24 +1000)]
insert: add --create-folder option

Allow the insert command to create the maildir folder
into which the new message should be delivered.

10 years agotest: test insert --folder option
Peter Wang [Sun, 23 Jun 2013 04:24:02 +0000 (14:24 +1000)]
test: test insert --folder option

Add tests for notmuch insert --folder option.

10 years agoman: document insert --folder option
Peter Wang [Sun, 23 Jun 2013 04:24:01 +0000 (14:24 +1000)]
man: document insert --folder option

Add documentation for notmuch insert --folder option.

10 years agoinsert: add --folder option
Peter Wang [Sun, 23 Jun 2013 04:24:00 +0000 (14:24 +1000)]
insert: add --folder option

Allow the new message to be inserted into a folder within the Maildir
hierarchy instead of the top-level folder.

10 years agotest: add tests for insert
Peter Wang [Sun, 23 Jun 2013 04:23:59 +0000 (14:23 +1000)]
test: add tests for insert

Add tests for new 'insert' command.

10 years agoman: reference notmuch-insert.1
Peter Wang [Sun, 23 Jun 2013 04:23:58 +0000 (14:23 +1000)]
man: reference notmuch-insert.1

Add references to notmuch-insert.1 from other man pages.

10 years agoman: document 'insert' command
Peter Wang [Sun, 23 Jun 2013 04:23:57 +0000 (14:23 +1000)]
man: document 'insert' command

Add initial documentation for notmuch insert command.

10 years agocli: add insert command
Peter Wang [Sun, 23 Jun 2013 12:20:45 +0000 (22:20 +1000)]
cli: add insert command

The notmuch insert command reads a message from standard input,
writes it to a Maildir folder, and then incorporates the message into
the notmuch database.  Essentially it moves the functionality of
notmuch-deliver into notmuch.

Though it could be used as an alternative to notmuch new, the reason
I want this is to allow my notmuch frontend to add postponed or sent
messages to the mail store and notmuch database, without resorting to
another tool (e.g. notmuch-deliver) nor directly modifying the maildir.

10 years agotag-util: do not reset list in parse_tag_command_line
Peter Wang [Sun, 23 Jun 2013 04:23:55 +0000 (14:23 +1000)]
tag-util: do not reset list in parse_tag_command_line

The 'insert' command will be better served if parse_tag_command_line
modifies a pre-populated list (of new.tags) instead of clobbering the
list outright.  The sole existing caller, notmuch_tag_command, is
unaffected by this change.

10 years agotag-util: move out 'tag' command-line check
Peter Wang [Sun, 23 Jun 2013 04:23:54 +0000 (14:23 +1000)]
tag-util: move out 'tag' command-line check

Move an error condition specific to the 'tag' command out of
parse_tag_command_line so that parse_tag_command_line can be used for
the forthcoming 'insert' command.

10 years agocontrib: pick: remove reference to inbox in docstring
Mark Walters [Mon, 3 Jun 2013 22:06:09 +0000 (23:06 +0100)]
contrib: pick: remove reference to inbox in docstring

Copy the recent changes in show to use just notmuch-archive-tags (as a
link) rather than saying '(defaults to "inbox")'.

10 years agoemacs: Remove `notmuch-call-notmuch-json'
Austin Clements [Sun, 23 Jun 2013 23:43:19 +0000 (19:43 -0400)]
emacs: Remove `notmuch-call-notmuch-json'

This function is no longer used.

10 years agoemacs: Use S-exp format everywhere
Austin Clements [Sun, 23 Jun 2013 23:43:18 +0000 (19:43 -0400)]
emacs: Use S-exp format everywhere

This switches `notmuch-mua-reply' and `notmuch-query-get-threads' to
the S-exp format.  These were the last two uses of the JSON format in
the Emacs frontend.

10 years agoemacs: Introduce `notmuch-call-notmuch-sexp'
Austin Clements [Sun, 23 Jun 2013 23:43:17 +0000 (19:43 -0400)]
emacs: Introduce `notmuch-call-notmuch-sexp'

This is just like `notmuch-call-notmuch-json', but parses S-expression
output.  Note that, also like `notmuch-call-notmuch-json', this
doesn't consider trailing data to be an error, which may or may not be
what we want in the long run.

10 years agocli: use notmuch_exclude_t in option parser
Peter Wang [Sat, 11 May 2013 19:50:09 +0000 (20:50 +0100)]
cli: use notmuch_exclude_t in option parser

Use notmuch_exclude_t constants directly instead of a redundant
enumeration while parsing search --exclude keyword arguments.

10 years agolib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t
Mark Walters [Mon, 13 May 2013 15:10:51 +0000 (16:10 +0100)]
lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t

Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can
cover all four values of search --exclude in the cli.

Previously the way to avoid any message being marked excluded was to
pass in an empty list of excluded tags: since we now have an explicit
option we might as well honour it.

The enum is in a slightly strange order as the existing FALSE/TRUE
options correspond to the new
NOTMUCH_EXCLUDE_FLAG/NOTMUCH_EXCLUDE_TRUE options so this means we do
not need to bump the version number.

Indeed, an example of this is that the cli count and show still use
FALSE/TRUE and still work.

10 years agorevert: Removed top level --stderr= option
Tomi Ollila [Fri, 31 May 2013 19:10:31 +0000 (22:10 +0300)]
revert: Removed top level --stderr= option

While looked good on paper, its attempted use caused confusion, complexity,
and potential for information leak when passed through wrapper scripts.
For slimmer code and to lessen demand for maintenance/support the set of
commits which added top level --stderr= option is now reverted.

10 years agoemacs: Remove v command
Austin Clements [Mon, 3 Jun 2013 15:54:55 +0000 (11:54 -0400)]
emacs: Remove v command

This removes the v command, since we now have much nicer part commands,
and deprecates the underlying notmuch-show-view-all-mime-parts.  This
also means that people who try using the old unprefixed 'v' command on
a part button will no longer be greeted by ALL of their parts popping
up.

10 years agoemacs: update search sort order help to match code
Jani Nikula [Mon, 3 Jun 2013 17:56:31 +0000 (20:56 +0300)]
emacs: update search sort order help to match code

10 years agotest/basic: replaced find -perm +111 with portable alternative
Tomi Ollila [Fri, 7 Jun 2013 21:37:29 +0000 (00:37 +0300)]
test/basic: replaced find -perm +111 with portable alternative

The find option syntax `-perm +111` is deprecated gnu find feature.
The replacement `( -perm -100 -o -perm -10 -o -perm 1 )` should also
work outside of the GNU domain.

10 years agoemacs: show: change emacs interactive pipe message.
Mark Walters [Sun, 9 Jun 2013 08:41:48 +0000 (09:41 +0100)]
emacs: show: change emacs interactive pipe message.

Previously the query string for piping a message to a command was
"Pipe message to command: " regardless of whether the function was
called with a prefix argument (which pipes all open messages to the
command). This patch modifies the `interactive' command to reflect
this.

10 years agoemacs: show: implement lazy hidden part handling
Mark Walters [Mon, 10 Jun 2013 04:57:13 +0000 (05:57 +0100)]
emacs: show: implement lazy hidden part handling

This adds the actual code to do the lazy insertion of hidden parts.

We use a memory inefficient but simple method: when we come to insert
the part if it is hidden we just store all of the arguments to the
part insertion function as a button property. This means when we want
to show the part we can just resume where we left off.

One thing is that we can't tell if a lazy part will produce text until
we try to render it so when unhiding a part we check to see if it
rendered; if not we invoke the default part handler (e.g. an external
viewer).

Also, we would like to insert the lazy part at the start of the line
after the part button. But if this line has some text properties
(e.g. the colours for a following message header) then the lazy part
gets these properties. Thus we start at the end of the part button
line, insert a newline, insert the lazy part, and then delete the
extra newline at the end of the part.

10 years agoemacs: show move addition of :notmuch-part to separate function
Mark Walters [Mon, 10 Jun 2013 04:57:12 +0000 (05:57 +0100)]
emacs: show move addition of :notmuch-part to separate function

This separates out the adding of the :notmuch-part text property to a
separate function to simplify calling from the lazy part insertion
code.

10 years agoemacs: show: modify the way hidden state is recorded.
Mark Walters [Mon, 10 Jun 2013 04:57:11 +0000 (05:57 +0100)]
emacs: show: modify the way hidden state is recorded.

Previously, whether a part was hidden or shown was recorded in the
invisibility/visibility of the part overlay. Since we are going to
have lazily rendered parts with no overlay store the hidden/shown
state in the part button itself.

Additionally, in preparation for the invisible part handling move the
actual hiding of the hidden parts to insert-bodypart from
create-part-overlays.

Finally, we will need to know whether a part-insertion has done
anything (it won't if the invisible part cannot be displayed by emacs)
so we slightly rejig the code order in
notmuch-show-toggle-part-invisibility to make it easier for the
function to set an appropriate return value.

10 years agoemacs: show: pass button to create-overlays
Mark Walters [Mon, 10 Jun 2013 04:57:10 +0000 (05:57 +0100)]
emacs: show: pass button to create-overlays

Now that the bodypart code has the button we can pass that to
create-overlays and simplify that.

10 years agoemacs: show: move the insertion of the header button to the top level
Mark Walters [Mon, 10 Jun 2013 04:57:09 +0000 (05:57 +0100)]
emacs: show: move the insertion of the header button to the top level

Previously each of the part insertion handlers inserted the part
button themselves. Move this up into
notmuch-show-insert-bodypart. Since a small number of the handlers
modify the button (the encryption/signature ones) we need to pass the
header button as an argument into the individual part insertion
handlers. However, the declared-type argument was only used for the
text for the part buttons we can now omit it.

The patch is large but mostly simple. The only things of note are that
we let the text/plain handler applies notmuch-wash to the whole part
including the part button. In particular, notmuch-wash removes leading
blank lines from a text/plain part, but since the button is counted as
part of the part this does not happen with text/plain buttons that
have a button. This is probably a bug in notmuch-wash but changing it
does make several tests fail (that rely on this blank line) so, for
the moment, keep the old behaviour.

10 years agoemacs: show: fake wash parts are handled at insert-bodypart level
Mark Walters [Mon, 10 Jun 2013 04:57:08 +0000 (05:57 +0100)]
emacs: show: fake wash parts are handled at insert-bodypart level

Earlier patches have moved the handling of wash fake inline patch
parts to insert-bodypart so we can drop the function
notmuch-show-insert-part-inline-patch-fake-part

10 years agoemacs: Fix "no such file or directory" error
Austin Clements [Sun, 9 Jun 2013 04:45:38 +0000 (00:45 -0400)]
emacs: Fix "no such file or directory" error

Occasionally, when the user killed the search buffer when the CLI
process was still running, Emacs would run the
notmuch-start-notmuch-sentinel sentinel twice.  The first call would
process and delete the error output file and the second would fail
with an "Opening input file: no such file or directory, ..." error
when attempting to access the error file.

Emacs isn't supposed to run the sentinel twice.  The reason it does is
rather subtle (and probably a bug in Emacs):

1) When the user kills the search buffer, Emacs invokes
kill_buffer_processes, which sends a SIGHUP to notmuch, but doesn't do
anything else.  Meanwhile, suppose the notmuch search process has
printed some more output, but Emacs hasn't consumed it yet (this is
critical and is why this error only happens sometimes).

2) Emacs gets a SIGCHLD from the dying notmuch process, which invokes
handle_child_signal, which sets the new process status, but can't do
anything else because it's a signal handler.

3) Emacs returns to its idle loop, which calls status_notify, which
sees that the notmuch process has a new status.  This is where things
get interesting.

3.1) Emacs guarantees that it will run process filters on any
unconsumed output before running the process sentinel, so
status_notify calls read_process_output, which consumes the final
output and calls notmuch-search-process-filter.

3.1.1) notmuch-search-process-filter checks if the search buffer is
still alive and, since it's not, it calls delete-process.

3.1.1.1) delete-process correctly sees that the process is already
dead and doesn't try to send another signal, *but* it still modifies
the status to "killed".  To deal with the new status, it calls
status_notify.  Dun dun dun.  We've seen this function before.

3.1.1.1.1) The *recursive* status_notify invocation sees that the
process has a new status and doesn't have any more output to consume,
so it invokes our sentinel and returns.

3.2) The outer status_notify call (which we're still in) is now done
flushing pending process output, so it *also* invokes our sentinel.

This patch addresses this problem at step 3.1.1, where the filter
calls delete-process, since this is a strange and redundant thing to
do anyway.

10 years agoemacs: Don't report CLI signals sent by Emacs as errors
Austin Clements [Sun, 9 Jun 2013 04:45:37 +0000 (00:45 -0400)]
emacs: Don't report CLI signals sent by Emacs as errors

Previously, when the user killed the search buffer before the CLI
search process had completed, we would report the signal sent by Emacs
to kill the CLI to the user as an error.  Fix this by only reporting
error exits if the process buffer is still live.  We still report
stderr output regardless in case stderr output was relevant to why the
user killed the search buffer (such as a wrapper script being stuck).

10 years agocli: Guard deprecated g_type_init calls
Tomi Ollila [Fri, 7 Jun 2013 18:41:13 +0000 (21:41 +0300)]
cli: Guard deprecated g_type_init calls

g_type_init was deprecated in GLib 2.35.1.  In order to compile
cleanly, guard these with a suitable #if.

(commit msg from https://bugs.freedesktop.org/attachment.cgi?id=73774 )

10 years agoemacs: hello: allow deleting individual searches in the history
Servilio Afre Puentes [Fri, 7 Jun 2013 20:57:46 +0000 (16:57 -0400)]
emacs: hello: allow deleting individual searches in the history

This commit adds an extra button at the end of the search entries that
allows deleting that individual search from the history. A short
confirmation («y» or «n») is made before taking action.

10 years agoemacs: hello: ask confirmation for clearing recent searches
Servilio Afre Puentes [Fri, 7 Jun 2013 20:55:57 +0000 (16:55 -0400)]
emacs: hello: ask confirmation for clearing recent searches

The button to clear the recent searches in notmuch-hello is easy to
press accidentally while moving around the, clearing potentially
useful searches with no way of recovering them.

10 years agodebian: update build dependency to require ruby-dev 1:1.9.3
Jameson Graef Rollins [Sat, 1 Jun 2013 16:27:23 +0000 (09:27 -0700)]
debian: update build dependency to require ruby-dev 1:1.9.3

ruby1.8-dev provides ruby-dev, but ruby1.9.1-dev is currently
required (which is pulled by ruby-dev 1:1.9.3).

10 years agocontrib: pick: remove unnecessary funcall
Mark Walters [Mon, 3 Jun 2013 22:05:45 +0000 (23:05 +0100)]
contrib: pick: remove unnecessary funcall

Remove unnecessary funcall. This keeps the pick function inline with
the recently tweaked show function.

10 years agonews: Be louder about s/v/o/| on part buttons going away
Austin Clements [Mon, 3 Jun 2013 16:39:55 +0000 (12:39 -0400)]
news: Be louder about s/v/o/| on part buttons going away

This change is likely to affect most people, so put this information
right in the news header and be more explicit about it in the news
detail.

10 years agoemacs: Fix applying stickiness to the :notmuch-part property
Austin Clements [Mon, 3 Jun 2013 15:17:59 +0000 (11:17 -0400)]
emacs: Fix applying stickiness to the :notmuch-part property

Previously, we simply called pushnew to add :notmuch-part to the
front-sticky and rear-nonsticky text property lists.  This works if
these are nil or lists, but they can also have the value t, meaning
that all properties are front-sticky/rear-nonsticky.  In this case,
pushnew will signal an error because t is not a list.  We never set
these properties to t ourselves, but since we apply these property
changes over arbitrary renderer output, we have to deal with this
possibility.

10 years agobindings/go: Start a .gitignore for go bindings.
David Bremner [Sun, 2 Jun 2013 13:39:46 +0000 (10:39 -0300)]
bindings/go: Start a .gitignore for go bindings.

In particular ignore downloaded source from github.com

10 years agobindings/python: ignore build subdirectory.
David Bremner [Sun, 2 Jun 2013 13:39:44 +0000 (10:39 -0300)]
bindings/python: ignore build subdirectory.

Update .gitignore to make git status less noisy

10 years agovim: use the old vim plugin function name
Felipe Contreras [Mon, 3 Jun 2013 00:49:49 +0000 (19:49 -0500)]
vim: use the old vim plugin function name

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoNEWS: update news about the vim interface
Felipe Contreras [Mon, 3 Jun 2013 00:39:27 +0000 (19:39 -0500)]
NEWS: update news about the vim interface

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoAdd new notmuch vim plugin
Felipe Contreras [Mon, 3 Jun 2013 00:31:59 +0000 (19:31 -0500)]
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>
10 years agocontrib: pick: bugfix: use notmuch-show-mark-read-tags instead of unread
Mark Walters [Sat, 1 Jun 2013 21:49:12 +0000 (22:49 +0100)]
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.

10 years agocontrib: pick: bugfix. use notmuch-show-only-matching-messages rather than prefix
Mark Walters [Sat, 1 Jun 2013 21:51:31 +0000 (22:51 +0100)]
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.

10 years agobuild: pass CPPFLAGS to C and C++ compilers
David Bremner [Sun, 26 May 2013 01:28:13 +0000 (22:28 -0300)]
build: pass CPPFLAGS to C and C++ compilers

This is used in particular by hardening flags.

10 years agoconfigure: grab CPPFLAGS from the environment.
David Bremner [Sun, 26 May 2013 01:28:12 +0000 (22:28 -0300)]
configure: grab CPPFLAGS from the environment.

This is needed in particular for hardening flags.

10 years agodebian: compile with V=1
David Bremner [Sun, 26 May 2013 01:28:11 +0000 (22:28 -0300)]
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.

10 years agodebian: update .gitignore
David Bremner [Sun, 2 Jun 2013 13:39:47 +0000 (10:39 -0300)]
debian: update .gitignore

Several packages have been added or renamed, but their build detritus
not yet ignored.

10 years agoemacs: update .gitignore
David Bremner [Sun, 2 Jun 2013 13:39:45 +0000 (10:39 -0300)]
emacs: update .gitignore

Start a seperate .gitignore for emacs stuff, move .elc rule there.

10 years agoemacs: add `notmuch-archive-tags' cross references in docstrings
David Bremner [Sun, 2 Jun 2013 14:29:17 +0000 (11:29 -0300)]
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.

10 years agoemacs: remove hardcoded defaults values from docstrings
David Bremner [Sun, 2 Jun 2013 14:04:45 +0000 (11:04 -0300)]
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.

10 years agoNEWS: key bindings for next/previous thread
Jani Nikula [Sun, 2 Jun 2013 17:46:47 +0000 (20:46 +0300)]
NEWS: key bindings for next/previous thread

10 years agoemacs: replace setq + let with let*
David Bremner [Sun, 2 Jun 2013 14:57:01 +0000 (11:57 -0300)]
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.

10 years agoemacs: replace (funcall 'foo ...) with (foo ...)
David Bremner [Sun, 2 Jun 2013 12:16:10 +0000 (09:16 -0300)]
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.

10 years agocontrib: pick: use the sexp parser
Mark Walters [Sat, 1 Jun 2013 19:04:43 +0000 (20:04 +0100)]
contrib: pick: use the sexp parser

This just converts notmuch-pick to use the sexp parser.

10 years agopackaging: fedora: add ruby bindings
Felipe Contreras [Sun, 28 Apr 2013 09:52:38 +0000 (04:52 -0500)]
packaging: fedora: add ruby bindings

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopackaging: fedora: package notmuch-mutt
Felipe Contreras [Sun, 28 Apr 2013 09:52:37 +0000 (04:52 -0500)]
packaging: fedora: package notmuch-mutt

From Fedora.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopackaging: fedora: package python bindings
Felipe Contreras [Sun, 28 Apr 2013 09:52:36 +0000 (04:52 -0500)]
packaging: fedora: package python bindings

Like in Fedora.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopackaging: fedora: separate package for emacs
Felipe Contreras [Sun, 28 Apr 2013 09:52:35 +0000 (04:52 -0500)]
packaging: fedora: separate package for emacs

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopackaging: fedora: reorganize files section
Felipe Contreras [Sun, 28 Apr 2013 09:52:34 +0000 (04:52 -0500)]
packaging: fedora: reorganize files section

Also to sync with Fedora.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopackaging: fedora: trivial cleanups
Felipe Contreras [Sun, 28 Apr 2013 09:52:33 +0000 (04:52 -0500)]
packaging: fedora: trivial cleanups

Mostly to sync with Fedora's spec.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopackaging: fedora: remove irrelevant stuff
Felipe Contreras [Sun, 28 Apr 2013 09:52:32 +0000 (04:52 -0500)]
packaging: fedora: remove irrelevant stuff

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agopackaging: fedora: update
Felipe Contreras [Sun, 28 Apr 2013 09:52:31 +0000 (04:52 -0500)]
packaging: fedora: update

So at least it builds.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoNews for S-expression support in Emacs search mode
Austin Clements [Sat, 1 Jun 2013 16:52:43 +0000 (12:52 -0400)]
News for S-expression support in Emacs search mode

10 years agoemacs: Use streaming S-expr parser for search
Austin Clements [Sat, 1 Jun 2013 00:40:07 +0000 (20:40 -0400)]
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.

10 years agoemacs: Streaming S-expression parser
Austin Clements [Sat, 1 Jun 2013 00:40:06 +0000 (20:40 -0400)]
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.

10 years agoemacs: Use async process helper for search
Austin Clements [Sat, 1 Jun 2013 00:40:05 +0000 (20:40 -0400)]
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.

10 years agoemacs: Utilities to manage asynchronous notmuch processes
Austin Clements [Sat, 1 Jun 2013 00:40:04 +0000 (20:40 -0400)]
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).

10 years agotest: Remove extraneous Emacs error handling test
Austin Clements [Sat, 1 Jun 2013 00:40:03 +0000 (20:40 -0400)]
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.)

10 years agoNews for Emacs part handling changes
Austin Clements [Thu, 30 May 2013 01:13:48 +0000 (21:13 -0400)]
News for Emacs part handling changes

10 years agoemacs: Bind MIME part commands to "." submap
Austin Clements [Thu, 30 May 2013 01:13:47 +0000 (21:13 -0400)]
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.

10 years agoemacs: Simplify MIME part command implementation
Austin Clements [Thu, 30 May 2013 01:13:46 +0000 (21:13 -0400)]
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.

10 years agoemacs: Record part p-list in a text property
Austin Clements [Thu, 30 May 2013 01:13:45 +0000 (21:13 -0400)]
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.

10 years agoemacs: Retain text properties when toggling buttons
Austin Clements [Thu, 30 May 2013 01:13:44 +0000 (21:13 -0400)]
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.

10 years agoTODO: keybindings for next/previous thread done
Jani Nikula [Sat, 25 May 2013 12:14:26 +0000 (15:14 +0300)]
TODO: keybindings for next/previous thread done

10 years agocli: remove unused argument descriptions
Jani Nikula [Sat, 25 May 2013 11:09:13 +0000 (14:09 +0300)]
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.

10 years agoNEWS: added information about new --stderr=FILE top level option
Tomi Ollila [Tue, 28 May 2013 18:38:55 +0000 (21:38 +0300)]
NEWS: added information about new --stderr=FILE top level option

10 years agoman: documented --stderr=FILE in notmuch.1 manual page
Tomi Ollila [Tue, 28 May 2013 18:38:54 +0000 (21:38 +0300)]
man: documented --stderr=FILE in notmuch.1 manual page

10 years agotest: added --stderr=FILE tests
Tomi Ollila [Tue, 28 May 2013 18:38:53 +0000 (21:38 +0300)]
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.

10 years agocli: add global option --stderr=FILE
Tomi Ollila [Tue, 28 May 2013 18:38:52 +0000 (21:38 +0300)]
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.

10 years agoemacs: Fix trimming regexp in notmuch-check-exit-status
Austin Clements [Fri, 17 May 2013 20:14:03 +0000 (16:14 -0400)]
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.

10 years agobuild: fix out-of-tree builds
Jani Nikula [Sat, 25 May 2013 11:18:58 +0000 (14:18 +0300)]
build: fix out-of-tree builds

Support for out-of-tree builds was added in
commit 3e4a9d60a9419621b08c647a306843d76c47c2cb
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 7beeb8c88a014ecbc53d8241f10683b3c4c16228
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.

10 years agoemacs: add show view bindings to move to previous/next thread
Jani Nikula [Sat, 25 May 2013 21:13:30 +0000 (22:13 +0100)]
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.

10 years agoemacs: Don't override mm-show-part in notmuch-show-view-part
Austin Clements [Sun, 26 May 2013 06:34:46 +0000 (02:34 -0400)]
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.

10 years agoNEWS: a bunch of cli news since 0.15
Jani Nikula [Sun, 26 May 2013 18:51:58 +0000 (21:51 +0300)]
NEWS: a bunch of cli news since 0.15

10 years agoMerge branch 'release'
David Bremner [Sun, 26 May 2013 00:20:39 +0000 (21:20 -0300)]
Merge branch 'release'

merge back debian-only release into master

10 years agodebian: bump standards version to 3.9.4 debian/0.15.2-2
David Bremner [Sat, 25 May 2013 21:37:48 +0000 (18:37 -0300)]
debian: bump standards version to 3.9.4

10 years agoNEWS: No Emacs 22 support
Tomi Ollila [Tue, 21 May 2013 17:07:13 +0000 (20:07 +0300)]
NEWS: No Emacs 22 support

10 years agodebian: package ruby bindings
Felipe Contreras [Tue, 16 Apr 2013 19:08:39 +0000 (14:08 -0500)]
debian: package ruby bindings

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agoruby: use in-tree notmuch library
Felipe Contreras [Mon, 20 May 2013 12:24:23 +0000 (07:24 -0500)]
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>
10 years agoemacs: Compute build dependencies to fix byte compile issues
Austin Clements [Fri, 17 May 2013 20:13:31 +0000 (16:13 -0400)]
emacs: Compute build dependencies to fix byte compile issues

Previously, we simply byte compiled each Elisp source file
independently.  This is actually the wrong thing to do and can lead to
issues with macros and performance issues with substitutions because
1) when the byte compiler encounters a (require 'x) form, it will load
x.elc in preference to x.el, even if x.el is newer, and as a result
may load old macro and substitution definitions and 2) if we update a
macro or substitution definition in one file, we currently won't
re-compile other files that depend on the file containing the
definition.

This patch addresses these problems by computing make dependency rules
from the (require 'x) forms in the Elisp source files, which we inject
into make's dependency database.

10 years agoruby: fix missing symbol UINT2FIX()
Felipe Contreras [Mon, 20 May 2013 12:24:24 +0000 (07:24 -0500)]
ruby: fix missing symbol UINT2FIX()

It has never existed in Ruby (maybe JRuby). Fortunately the symbols are
loaded lazily, so nobody would notice unless they try
'query::count_messages'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
10 years agodevel: add dkg's printmimestructure script to notmuch devel scripts
David Bremner [Mon, 20 May 2013 15:59:19 +0000 (12:59 -0300)]
devel: add dkg's printmimestructure script to notmuch devel scripts

I find this script pretty useful when figuring out who to blame for
MIME rendering problems.

The notmuch repo will be the new primary home for this script, unless
and until a better home turns up.

10 years agocontrib: pick: add a target message for pick
Mark Walters [Thu, 10 Jan 2013 11:14:58 +0000 (11:14 +0000)]
contrib: pick: add a target message for pick

This adds a target message for pick which it will jump to when (if) it
appears. It adds the target to notmuch-pick-from-show-current-query so
that pick goes straight to the message that was current in the show
view and it adds target to notmuch-pick-refresh-view so that the
current message is preserved.