]> git.notmuchmail.org Git - notmuch/log
notmuch
12 years agoemacs: `notmuch-search-operate-all' code cleanup, no functional changes
Dmitry Kurochkin [Thu, 26 Jan 2012 17:34:49 +0000 (21:34 +0400)]
emacs: `notmuch-search-operate-all' code cleanup, no functional changes

12 years agoemacs: add completion to "tag all" operation ("*" binding)
Dmitry Kurochkin [Thu, 26 Jan 2012 17:34:48 +0000 (21:34 +0400)]
emacs: add completion to "tag all" operation ("*" binding)

The patch adds <tab> completion to "tag all" operation bound to "*"
(`notmuch-search-operate-all' function).

12 years agotest: `notmuch-test-run' should protect against buffer switching.
David Edmondson [Thu, 26 Jan 2012 07:19:38 +0000 (07:19 +0000)]
test: `notmuch-test-run' should protect against buffer switching.

The body of the test may cause the current buffer to change. Ensure
that the output goes to the correct buffer by switching back before
inserting it.

12 years agotest: `visible-buffer-substring' should not return text properties.
David Edmondson [Thu, 26 Jan 2012 07:19:37 +0000 (07:19 +0000)]
test: `visible-buffer-substring' should not return text properties.

When using `visible-buffer-substring' to examine a buffer, the text
properties are not useful, so don't include them.

12 years agoemacs: polish notmuch-hello help text
Dmitry Kurochkin [Wed, 25 Jan 2012 18:24:56 +0000 (22:24 +0400)]
emacs: polish notmuch-hello help text

Make `=' binding description consistent with others.

12 years agoemacs: Fix a notmuch-print.el compiler warning.
David Edmondson [Wed, 25 Jan 2012 08:52:15 +0000 (08:52 +0000)]
emacs: Fix a notmuch-print.el compiler warning.

`notmuch-show-get-prop' should be declared.

12 years agoemacs: Make the part content available to `mm-inlinable-p'.
David Edmondson [Thu, 19 Jan 2012 09:34:07 +0000 (09:34 +0000)]
emacs: Make the part content available to `mm-inlinable-p'.

The `mm-inlinable-p' function works better if it has access to the
data of the relevant part, so load that content before calling it.

Don't load the content for parts that the user has indicated no desire
to inline.

This fixes the display of attached image/jpeg parts, for example.

12 years agoemacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer
Dmitry Kurochkin [Wed, 25 Jan 2012 01:10:54 +0000 (05:10 +0400)]
emacs: bind "s" to `notmuch-hello-search' in notmuch-hello buffer

`notmuch-hello-search' uses `notmuch-search' function but refreshes
notmuch-hello buffer when the search buffer is closed.

12 years agoemacs: use a single history for all searches
Dmitry Kurochkin [Wed, 25 Jan 2012 01:10:53 +0000 (05:10 +0400)]
emacs: use a single history for all searches

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.

12 years agoemacs: bind "s" to `notmuch-search' in notmuch-hello buffer
Dmitry Kurochkin [Wed, 25 Jan 2012 01:10:52 +0000 (05:10 +0400)]
emacs: bind "s" to `notmuch-search' in notmuch-hello buffer

Before the change, "s" in notmuch-hello buffer would jump to the
search box.  The patch changes the binding to `notmuch-search' which
is consistent with all other notmuch buffers.

12 years agouncrustify.cfg: label indent, some known types, not, # and ##
Tomi Ollila [Tue, 24 Jan 2012 20:55:59 +0000 (22:55 +0200)]
uncrustify.cfg: label indent, some known types, not, # and ##

Adjusted some uncrustify variables to get closer to prevailing style:

* Label indent (for goto) relative to current indentation.
* Registered GMimeObject and mime_node_t being as types.
* Space after ! (not) operator.
* No space after 'stringify' (#) preprosessor token.
* No spacing change around ## (option not versatile enough).

There are at least 3 cases where attention needs to be paid:

* If there is newline between function name and open paren in function
  call, the paren (and args) are indented too far right.
* #define HOUR (60 *MINUTE) -- i.e. no space after star (*).
* void (*foo)(args) -- i.e no space between (name) and (args).

12 years agotest: Add address cleaning tests.
David Edmondson [Tue, 24 Jan 2012 16:14:07 +0000 (16:14 +0000)]
test: Add address cleaning tests.

12 years agotest: Add more helpers for emacs tests.
David Edmondson [Tue, 24 Jan 2012 16:14:06 +0000 (16:14 +0000)]
test: Add more helpers for emacs tests.

12 years agotest: Add `test_emacs_expect_t'.
David Edmondson [Tue, 24 Jan 2012 16:14:05 +0000 (16:14 +0000)]
test: Add `test_emacs_expect_t'.

Add a new test function to allow simpler testing of emacs
functionality.

`test_emacs_expect_t' takes one argument - a lisp expression to
evaluate. The test passes if the expression returns `t', otherwise it
fails and the output is reported to the tester.

12 years agotest: Don't return the result of checking for running emacs to the tester.
David Edmondson [Tue, 24 Jan 2012 16:14:04 +0000 (16:14 +0000)]
test: Don't return the result of checking for running emacs to the tester.

When checking for a running emacs, test_emacs evaluates the empty list
'()'. This returns 'nil' when emacs is running, which is then
prepended to the actual test result. Given that it is not part of the
actual test output the test harness can incorrectly report test
failure (or success).

12 years agoshow: Introduce mime_node formatter callback
Austin Clements [Mon, 23 Jan 2012 23:33:10 +0000 (18:33 -0500)]
show: Introduce mime_node formatter callback

This callback is the gateway to the new mime_node_t-based formatters.
This maintains backwards compatibility so the formatters can be
transitioned one at a time.  Once all formatters are converted, the
formatter structure can be reduced to only message_set_{start,sep,end}
and part, most of show_message can be deleted, and all of
show-message.c can be deleted.

12 years agomime node: Record depth-first part numbers
Austin Clements [Mon, 23 Jan 2012 23:33:09 +0000 (18:33 -0500)]
mime node: Record depth-first part numbers

This makes the part numbers readily accessible to formatters.
Hierarchical part numbering would be a more natural and efficient fit
for MIME and may be the way to go in the future, but depth-first
numbering maintains compatibility with what we currently do.

12 years agoemacs: have notmuch-search-archive-thread use -next-thread function
Jameson Graef Rollins [Tue, 17 Jan 2012 18:54:26 +0000 (10:54 -0800)]
emacs: have notmuch-search-archive-thread use -next-thread function

Use this standard function, to keep thread navigation in one place.

12 years agoNEWS: update "Tag exclusion" section
Pieter Praet [Mon, 23 Jan 2012 05:41:45 +0000 (06:41 +0100)]
NEWS: update "Tag exclusion" section

12 years agosetup: prompt user for search.exclude_tags value
Pieter Praet [Mon, 23 Jan 2012 05:40:33 +0000 (06:40 +0100)]
setup: prompt user for search.exclude_tags value

Allow users to customize the search.exclude_tags option during setup.

12 years agosetup: Create functions for tag list printing and parsing
Austin Clements [Mon, 23 Jan 2012 05:50:45 +0000 (06:50 +0100)]
setup: Create functions for tag list printing and parsing

This refactors the tag list printing and parsing currently used for
new.tags so that both can be reused for the new search.exclude_tags
option.

12 years agoconfig: only exclude messages if 'search.exclude_tags' is explicitly set
Pieter Praet [Mon, 23 Jan 2012 04:22:34 +0000 (05:22 +0100)]
config: only exclude messages if 'search.exclude_tags' is explicitly set

Currently, the 'search.exclude_tags' option is automatically
set to "deleted;spam;" if it's missing from the config file.

This violates the Principle of Least Surprise, so *only* set
'search.exclude_tags' to "deleted;spam;" if we didn't find a
configuration file at all.

This patch is actually Austin Clements' work:
  id:"20120117203211.GQ16740@mit.edu"

12 years agotest: only exclude "deleted" messages from search if explicitly configured
Pieter Praet [Mon, 23 Jan 2012 04:22:33 +0000 (05:22 +0100)]
test: only exclude "deleted" messages from search if explicitly configured

Currently, the 'search.exclude_tags' option is automatically set to
"deleted;spam;" if it's missing from the config file.

This violates the Principle of Least Surprise, so update the tests to
*only* expect the exclusion of messages which are tagged "deleted" if the
'search.exclude_tags' option is explicitly set *and* contains that tag.

12 years agosearch: rename auto_exclude_tags to {search, }exclude_tags
Pieter Praet [Mon, 23 Jan 2012 04:22:32 +0000 (05:22 +0100)]
search: rename auto_exclude_tags to {search, }exclude_tags

All other config-related functions and args include the section
title in their name, so for the sake of consistency, mirror that.

Also, the "auto"matic part is a given, so that was dropped.

12 years agoshow: Use consistent header ordering in the text format
Austin Clements [Mon, 23 Jan 2012 02:31:12 +0000 (21:31 -0500)]
show: Use consistent header ordering in the text format

Previously, top-level message headers were printed as Subject, From,
To, Date, while embedded message headers were printed From, To,
Subject, Date.  This makes both cases use the former order and updates
the tests accordingly.

Strangely, the raw format also uses this function, so this also fixes
the two raw format tests affected by this change.

12 years agotest/emacs-large-search-buffer: correct typo (EXPEXTED -> EXPECTED)
Pieter Praet [Mon, 23 Jan 2012 04:26:10 +0000 (05:26 +0100)]
test/emacs-large-search-buffer: correct typo (EXPEXTED -> EXPECTED)

introduced in commit 3b24b396

12 years agotest: make (kill-emacs) from emacsclient work with emacs 23.(1|2)
Tomi Ollila [Fri, 13 Jan 2012 08:17:28 +0000 (10:17 +0200)]
test: make (kill-emacs) from emacsclient work with emacs 23.(1|2)

emacsclient --eval '(kill-emacs)' makes emacs versions 23.1
and 23.2 ask user input from running emacs. Redefining
yes-or-no-p function when kill-emacs is executed for these
emacs versions in test-lib.el avoids this test problem.

12 years agotest: whitespace-cleanup for most test/* files
Tomi Ollila [Wed, 11 Jan 2012 16:53:59 +0000 (18:53 +0200)]
test: whitespace-cleanup for most test/* files

Used emacs (whitespace-cleanup) function to "cleanup blank problems"
in test files where that could be done without breaking tests;
test/emacs was partially, and test/multipart was fully reverted.

12 years ago.dir-locals.el: changed one-char comment prefix '; ' to two; '; ; '
Tomi Ollila [Sun, 22 Jan 2012 08:35:47 +0000 (10:35 +0200)]
.dir-locals.el: changed one-char comment prefix '; ' to two; '; ; '

Like in emacs/*.el two comment chars (;;) is required so that
(indent-region) doesn't break indentation.

12 years agoshow: don't use hex literals in JSON output
Thomas Jost [Sun, 22 Jan 2012 00:20:57 +0000 (01:20 +0100)]
show: don't use hex literals in JSON output

JSON does not support hex literals (0x..) so numbers must be formatted
as %d instead of %x.

Currently, the possible values for the gmime error code are 1 (expired
signature), 2 (no public key), 4 (expired key) and 8 (revoked key).
The other possible value is 16 (unsupported algorithm) but obviously
it is much more rare. If this happens, the current code will add
'"errors": 10'. This is valid JSON (it looks like a decimal number)
but it is incorrect (should be 16, not 10).

Since this is just an issue in the JSON encoder, no changes are needed
on the Emacs side (or in other UIs using the JSON output).

12 years agoFix NEWS about gmime 2.6
Thomas Jost [Sun, 22 Jan 2012 00:29:41 +0000 (01:29 +0100)]
Fix NEWS about gmime 2.6

Previous version had a typo ("they may be" instead of "there may be")
and was lacking a proper description of the gmime bug.

12 years agopython: fix error handling
Justus Winter [Sun, 22 Jan 2012 05:14:57 +0000 (06:14 +0100)]
python: fix error handling

Before 3434d1940 the return values of libnotmuch functions were
declared as c_void_p and the code checking for errors compared the
returned value to None, which is the ctypes equivalent of a NULL
pointer.

But said commit wrapped all the data types in python classes and the
semantic changed in a subtle way. If a function returns NULL, the
wrapped python value is falsish, but no longer equal to None.

12 years agouncrustify.cfg: initial support for notmuch coding style
David Bremner [Tue, 10 Jan 2012 12:07:07 +0000 (08:07 -0400)]
uncrustify.cfg: initial support for notmuch coding style

Uncrustify is a free (as in GPL2+) tool that indents and beautifies
C/C++ code. It is similar to GNU indent in functionality although
probably more configurable (in fairness, indent has better
documentation).  Uncrustify does not have the indent mis-feature of
needing to have every typedef'ed type defined in the
configuration (even standard types like size_t).

This configuration starts with the linux-kernel style from the
uncrustify config, disables aggressive re-indenting of structs,
and fine tunes the handling 'else' and braces.

In an ideal situation, running uncrustify on notmuch code would be
NOP; currently this is not true for all files because 1) the
configuration is not perfect 2) the coding style of notmuch is not
completely consistent; in particular the treatment of braces after
e.g. for (_) is not consistent.

Some fine tuning by Tomi Olilla.

12 years agoemacs/*.el: changed one-char comment prefix ';' to two; ';;'
Tomi Ollila [Sat, 21 Jan 2012 14:44:28 +0000 (16:44 +0200)]
emacs/*.el: changed one-char comment prefix ';' to two; ';;'

In order for emacs (indent-region) to (re)indent emacs lisp
properly there needs to be at least 2 comment characters (;;).

12 years agoMake buttons for attachments allow viewing as well as saving
Mark Walters [Fri, 20 Jan 2012 09:44:06 +0000 (09:44 +0000)]
Make buttons for attachments allow viewing as well as saving

Define a keymap for attachment buttons to allow multiple actions.
Define 3 possible actions:
    save attachment: exactly as currently,
    view attachment: uses mailcap entry,
    view attachment with user chosen program

Keymap on a button is: s for save, v for view and o for view with
other program. Default (i.e. enter or mouse button) is save but this
is configurable in notmuch customize.

One implementation detail: the view attachment function forces all
attachments to be "displayed" using mailcap even if emacs could
display them itself. Thus, for example, text/html appears in a browser
and text/plain asks whether to save (on a standard debian setup)

12 years agoUpdate NEWS and INSTALL about gmime 2.6
Thomas Jost [Fri, 20 Jan 2012 09:39:25 +0000 (10:39 +0100)]
Update NEWS and INSTALL about gmime 2.6

12 years agoAdd compatibility with gmime 2.6
Thomas Jost [Fri, 20 Jan 2012 09:39:24 +0000 (10:39 +0100)]
Add compatibility with gmime 2.6

There are lots of API changes in gmime 2.6 crypto handling. By adding
preprocessor directives, it is however possible to add gmime 2.6 compatibility
while preserving compatibility with gmime 2.4 too.

This is mostly based on id:"8762i8hrb9.fsf@bookbinder.fernseed.info".

This was tested against both gmime 2.6.4 and 2.4.31. With gmime 2.4.31, the
crypto tests all work fine (as expected). With gmime 2.6.4, one crypto test is
currently broken (signature verification with signer key unavailable), most
likely because of a bug in gmime which will hopefully be fixed in a future
version.

12 years agoemacs: add invisible dot instead of space at the end of notmuch-hello search box
Dmitry Kurochkin [Thu, 19 Jan 2012 23:52:14 +0000 (00:52 +0100)]
emacs: add invisible dot instead of space at the end of notmuch-hello search box

This makes `show-trailing-whitespace' happy, i.e. it does not mark the
whole search box line as trailing spaces.

Since the dot is invisible, this change makes no visible difference
for `notmuch-hello'.

Edited-by: Pieter Praet <pieter@praet.org> to fix the tests.
12 years agoSilence buildbot warnings about unused results
Austin Clements [Thu, 19 Jan 2012 22:29:19 +0000 (17:29 -0500)]
Silence buildbot warnings about unused results

This ignores the results of the two writes in sigint handlers even
harder than before.

While my libc lacks the declarations that trigger these warnings, this
can be tested by adding the following to notmuch.h:

__attribute__((warn_unused_result))
ssize_t write(int fd, const void *buf, size_t count);

12 years agoshow: Handle read and write errors
Austin Clements [Thu, 19 Jan 2012 22:29:18 +0000 (17:29 -0500)]
show: Handle read and write errors

For showing a message in raw format, rather than silently succeeding
when a read or a write fails (or, probably, looping if a read fails),
try to print an error message and exit with a non-zero status.

This silences one of the buildbot warnings about unused results.  While
my libc lacks the declarations that trigger these warnings, this can
be tested by adding the following to notmuch.h:

__attribute__((warn_unused_result))
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);

12 years agoemacs: invert relation between 'notmuch-send and 'message customization groups
Pieter Praet [Thu, 19 Jan 2012 19:13:05 +0000 (20:13 +0100)]
emacs: invert relation between 'notmuch-send and 'message customization groups

'message contains options relevant to 'notmuch-send, not the other way around.

Thanks to Austin for suggesting `custom-add-to-group'.
  id:"20120118184408.GD16740@mit.edu"

12 years agoemacs: Improved printing support.
David Edmondson [Wed, 18 Jan 2012 08:00:21 +0000 (08:00 +0000)]
emacs: Improved printing support.

Add various functions to print notmuch messages and tie them together
with a simple frontend.

Add a binding ('#') in `notmuch-show-mode' to print the current
message.

one trailing space removed by db.

12 years agoDocument external dependencies in the test suite
Ethan Glasser-Camp [Mon, 16 Jan 2012 18:52:47 +0000 (13:52 -0500)]
Document external dependencies in the test suite

Add an explicit note to the README explaining what programs are
necessary and the perhaps-surprising behavior of skipping tests if
they aren't present.

Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
12 years agoemacs: Truncate lines and do not enable visual-line-mode in notmuch-show buffers.
David Edmondson [Mon, 16 Jan 2012 14:13:22 +0000 (14:13 +0000)]
emacs: Truncate lines and do not enable visual-line-mode in notmuch-show buffers.

Enable the truncation of lines in `notmuch-show-mode' to avoid visual
noise caused by the wrapping of the header lines.

Don't enable `visual-line-mode' because it disables line truncation.

The benefits of `visual-line-mode' were that it wrapped long lines
in received messages. With `notmuch-wash-wrap-long-lines' now default
behaviour, this is no longer required.

12 years agoemacs: globally replace non-branching "(if (not ..." with "(unless ..."
Pieter Praet [Mon, 16 Jan 2012 10:56:40 +0000 (11:56 +0100)]
emacs: globally replace non-branching "(if (not ..." with "(unless ..."

Less code, same results, without sacrificing readability.

12 years agoconfig: Better formatting for search section comment
Austin Clements [Wed, 18 Jan 2012 20:56:45 +0000 (15:56 -0500)]
config: Better formatting for search section comment

Since "auto_exclude_tags" is long and its description is multi-line,
start the description on the next line and indent it consistently.

12 years agoNews for tag exclusion
Austin Clements [Wed, 18 Jan 2012 20:58:50 +0000 (15:58 -0500)]
News for tag exclusion

12 years agoemacs: logically group def{custom,face}s
Pieter Praet [Mon, 16 Jan 2012 10:38:33 +0000 (11:38 +0100)]
emacs: logically group def{custom,face}s

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.

12 years agoFix dependency generation for compat, test, and util
Austin Clements [Sun, 15 Jan 2012 20:20:42 +0000 (15:20 -0500)]
Fix dependency generation for compat, test, and util

This adds source files in compat, test, and util to SRCS so that the
top-level Makefile.local will generate dependency files for them.

12 years agoFix dependency generation for CLI sources
Austin Clements [Sun, 15 Jan 2012 20:20:23 +0000 (15:20 -0500)]
Fix dependency generation for CLI sources

Previously, the dependency file list was generated before the CLI
sources were added to SRCS, so dependency files weren't generated for
CLI sources.  This moves that code to after the CLI sources are added.

12 years agoStart devel directory for developer tools and documentation.
David Bremner [Tue, 17 Jan 2012 12:47:51 +0000 (08:47 -0400)]
Start devel directory for developer tools and documentation.

We had a lot of back and forth about the name of this directory, but
nothing very conclusive. In the end, I just chose "devel" just to move
on.

12 years agofix .gitignore for gzipped man pages
Jani Nikula [Tue, 17 Jan 2012 18:16:03 +0000 (20:16 +0200)]
fix .gitignore for gzipped man pages

12 years agoRevert "emacs: Don't attempt to colour tags in `notmuch-show-mode'."
David Bremner [Tue, 17 Jan 2012 12:01:48 +0000 (08:01 -0400)]
Revert "emacs: Don't attempt to colour tags in `notmuch-show-mode'."

This reverts commit 4b256ff557e924fbaffca144d25a9d5f92026146.

According to id:"87aa5nlwwg.fsf@praet.org" and followup messages, the
assumptions of the patch seem not to hold in emacs 23.

12 years agoNEWS: consistent 2-space indentation
Tomi Ollila [Tue, 17 Jan 2012 11:00:15 +0000 (13:00 +0200)]
NEWS: consistent 2-space indentation

In NEWS file, indentation for item descriptions is generally 2 spaces
but in a few cases there were 3 or 4 (4 caused different markdown
handling) space indentations. Indentation in those lines are brought
to consistent 2-space indentation.

12 years agosearch: Support automatic tag exclusions
Austin Clements [Sun, 15 Jan 2012 00:17:34 +0000 (19:17 -0500)]
search: Support automatic tag exclusions

This adds a "search" section to the config file and an
"auto_tag_exclusions" setting in that section.  The search and count
commands pass tag tags from the configuration to the library.

12 years agolib: Add support for automatically excluding tags from queries
Austin Clements [Sun, 15 Jan 2012 00:17:33 +0000 (19:17 -0500)]
lib: Add support for automatically excluding tags from queries

This is useful for tags like "deleted" and "spam" that people
generally want to exclude from query results.  These exclusions will
be overridden if a tag is explicitly mentioned in a query.

12 years agocli: pick the user's address in a group list as from address
Jani Nikula [Sat, 14 Jan 2012 21:49:50 +0000 (23:49 +0200)]
cli: pick the user's address in a group list as from address

Messages received to a group list were not replied to using the from
address in the list. Fix it.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agotest: add known broken test for reply from address in named group list
Jani Nikula [Sat, 14 Jan 2012 21:49:49 +0000 (23:49 +0200)]
test: add known broken test for reply from address in named group list

If a message was received to the user's address that was in a named
group list, notmuch reply does not use that address for picking the
from address.

Groups lists are of the form: foo:bar@example.com,baz@example.com;

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agopy3k: add a specialized version of _str for python3
Justus Winter [Mon, 16 Jan 2012 12:39:41 +0000 (13:39 +0100)]
py3k: add a specialized version of _str for python3

All strings are unicode strings in python 3 and the basestring and
unicode types are removed hence the need for a specialized version.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
12 years agotest: don't bail out of `run_emacs' too early when missing prereqs
Pieter Praet [Sat, 14 Jan 2012 09:09:37 +0000 (10:09 +0100)]
test: don't bail out of `run_emacs' too early when missing prereqs

When running the Emacs tests in verbose mode, only the first missing
prereq is reported because the `run_emacs' function is short-circuited
early:

  #+begin_example
    emacs: Testing emacs interface
     missing prerequisites: [0]  emacs(1)
     skipping test: [0]  Basic notmuch-hello view in emacs
     SKIP   [0]  Basic notmuch-hello view in emacs
  #+end_example

This can lead to situations reminiscent of "dependency hell", so instead
of returning based on each individual `test_require_external_prereq's exit
status, we now do so only after checking all the prereqs:

  #+begin_example
    emacs: Testing emacs interface
     missing prerequisites: [0]  dtach(1) emacs(1) emacsclient(1)
     skipping test: [0]  Basic notmuch-hello view in emacs
     SKIP   [0]  Basic notmuch-hello view in emacs
  #+end_example

Also added missing prereq for dtach(1).

12 years agoemacs: Cycle through notmuch buffers rather than jumping to the last.
David Edmondson [Wed, 28 Dec 2011 08:29:58 +0000 (08:29 +0000)]
emacs: Cycle through notmuch buffers rather than jumping to the last.

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.

12 years agoemacs: Don't attempt to colour tags in `notmuch-show-mode'.
David Edmondson [Tue, 27 Dec 2011 16:47:14 +0000 (16:47 +0000)]
emacs: Don't attempt to colour tags in `notmuch-show-mode'.

The tags were coloured using text properties. Unfortunately that text
(the header line) also has an overlay, which overrides the text
properties. There's not point in applying text properties that will
never be seen.

12 years agoNEWS: add news items for reply to sender
Jani Nikula [Sat, 14 Jan 2012 16:39:28 +0000 (18:39 +0200)]
NEWS: add news items for reply to sender

12 years agoFix build warning: "/*" within comment
Austin Clements [Sat, 14 Jan 2012 03:08:23 +0000 (22:08 -0500)]
Fix build warning: "/*" within comment

12 years agotest: add tests for "notmuch reply" --reply-to=sender
Mark Walters [Sat, 14 Jan 2012 14:46:19 +0000 (16:46 +0200)]
test: add tests for "notmuch reply" --reply-to=sender

12 years agoemacs: bind 'r' to reply-to-sender and 'R' to reply-to-all
Jani Nikula [Sat, 14 Jan 2012 14:46:18 +0000 (16:46 +0200)]
emacs: bind 'r' to reply-to-sender and 'R' to reply-to-all

Change the default reply key bindings, making 'r' reply-to-sender and 'R'
reply-to-all.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agoemacs: add support for replying just to the sender
Jani Nikula [Sat, 14 Jan 2012 14:46:17 +0000 (16:46 +0200)]
emacs: add support for replying just to the sender

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>
12 years agocli: add support for replying just to the sender in "notmuch reply"
Jani Nikula [Sat, 14 Jan 2012 14:46:16 +0000 (16:46 +0200)]
cli: add support for replying just to the sender in "notmuch reply"

Add new option --reply-to=(all|sender) to "notmuch reply" to select whether
to reply to all (sender and all recipients), or just sender. Reply to all
remains the default.

Credits to Mark Walters <markwalters1009@gmail.com> for his similar earlier
work where I picked up the basic idea of handling reply-to-sender in
add_recipients_from_message(). All bugs are mine, though.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agocli: slightly refactor "notmuch reply" address scanning functions
Jani Nikula [Sat, 14 Jan 2012 14:46:15 +0000 (16:46 +0200)]
cli: slightly refactor "notmuch reply" address scanning functions

Slightly refactor "notmuch reply" recipient and user from address scanning
functions in preparation for reply-to-sender feature.

Add support for not adding recipients at all (just scan for user from
address), and returning the number of recipients added.

No externally visible functional changes.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agonotmuch/emacs: Observe the charset of text/html parts, where known.
David Edmondson [Fri, 13 Jan 2012 09:44:46 +0000 (09:44 +0000)]
notmuch/emacs: Observe the charset of text/html parts, where known.

Add the charset of text/html parts to the JSON output of 'notmuch
-show' when it is known. Observe the encoding when rendering such
parts in emacs.

12 years agocount: Convert to new-style argument parsing
Austin Clements [Fri, 13 Jan 2012 23:07:02 +0000 (18:07 -0500)]
count: Convert to new-style argument parsing

12 years agoSet fill column to 70 in .dir-locals.el.
Austin Clements [Thu, 12 Jan 2012 23:17:23 +0000 (18:17 -0500)]
Set fill column to 70 in .dir-locals.el.

This controls where comments and other text wraps.  70 is the default
value, so this simply returns it to the default for people who have
overridden it.  Most notmuch code already adheres to this.

12 years agoMerge branch 'release'
David Bremner [Sat, 14 Jan 2012 00:52:01 +0000 (20:52 -0400)]
Merge branch 'release'

Conflicts:
notmuch-reply.c
notmuch.1

12 years agoNEWS: set release date. 0.11 debian/0.11-1
David Bremner [Sat, 14 Jan 2012 00:28:44 +0000 (20:28 -0400)]
NEWS: set release date.

It's Friday the thirteenth. What could possibly go wrong?

12 years agodebian: changelog stanza for 0.11
David Bremner [Sat, 14 Jan 2012 00:06:39 +0000 (20:06 -0400)]
debian: changelog stanza for 0.11

12 years agoUpdate version to 0.11
David Bremner [Fri, 13 Jan 2012 23:58:36 +0000 (19:58 -0400)]
Update version to 0.11

12 years agoemacs: Improve `notmuch-hello' display on ttys.
David Edmondson [Tue, 10 Jan 2012 10:15:28 +0000 (10:15 +0000)]
emacs: Improve `notmuch-hello' display on ttys.

Inserting spaces to pad out columns is good, except when the padding
makes the line wider than the window. This looks particularly bad on a
tty where there is no fringe.

Hence, avoid padding the last column on each row.

12 years agolib: fix messages.c build warn
Jani Nikula [Sat, 7 Jan 2012 23:26:17 +0000 (01:26 +0200)]
lib: fix messages.c build warn

lib/messages.c: In function ‘notmuch_messages_move_to_next’:
lib/messages.c:131:2: warning: ISO C forbids ‘return’ with expression, in function returning void [-pedantic]

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agoman: add missing SEE ALSO header to notmuch reply man page
Jani Nikula [Sun, 8 Jan 2012 20:57:22 +0000 (22:57 +0200)]
man: add missing SEE ALSO header to notmuch reply man page

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agoemacs: Mark the quoted region during reply.
David Edmondson [Fri, 6 Jan 2012 10:03:40 +0000 (10:03 +0000)]
emacs: Mark the quoted region during reply.

Mark the quoted region of text during a reply, making it easy for the
user to delete it quickly.

12 years agoemacs: Better handling of inherited keymaps for `nomuch-help'.
David Edmondson [Fri, 30 Dec 2011 11:37:17 +0000 (11:37 +0000)]
emacs: Better handling of inherited keymaps for `nomuch-help'.

`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.

12 years agoNEWS: add news entry for notmuch reply uninitialized variable bugfix
Jani Nikula [Mon, 9 Jan 2012 11:49:56 +0000 (11:49 +0000)]
NEWS: add news entry for notmuch reply uninitialized variable bugfix

12 years agoMerge branch 'master' of ssh://notmuchmail.org/git/notmuch
Sebastian Spaeth [Mon, 9 Jan 2012 16:25:19 +0000 (17:25 +0100)]
Merge branch 'master' of ssh://notmuchmail.org/git/notmuch

12 years agodebian: add changelog stanza for 0.11~rc3-1
David Bremner [Mon, 9 Jan 2012 11:13:56 +0000 (07:13 -0400)]
debian: add changelog stanza for 0.11~rc3-1

as usual for pre-releases, fairly minimal commentary.

12 years agoversion: update to 0.11~rc3 0.11_rc3 debian/0.11_rc3-1
David Bremner [Mon, 9 Jan 2012 11:05:40 +0000 (07:05 -0400)]
version: update to 0.11~rc3

We found another serious-ish bug during freeze.

12 years agocli: fix use of uninitialized variable in "notmuch reply"
Jani Nikula [Thu, 5 Jan 2012 20:25:12 +0000 (22:25 +0200)]
cli: fix use of uninitialized variable in "notmuch reply"

notmuch_show_params_t params is only initialized partially in
notmuch_reply_command(). The only field that is used uninitialized is
params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted
messages work by coincidence.

Initialize params properly, and set params.decrypt as needed.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agocli: convert "notmuch reply" to use the new argument parser
Jani Nikula [Thu, 5 Jan 2012 20:25:13 +0000 (22:25 +0200)]
cli: convert "notmuch reply" to use the new argument parser

Use the new notmuch argument parser to handle arguments in "notmuch
reply". There should be no functional changes.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agocli: fix use of uninitialized variable in "notmuch reply"
Jani Nikula [Thu, 5 Jan 2012 20:25:12 +0000 (22:25 +0200)]
cli: fix use of uninitialized variable in "notmuch reply"

notmuch_show_params_t params is only initialized partially in
notmuch_reply_command(). The only field that is used uninitialized is
params.decrypt. It is usually non-zero, making "notmuch reply" on encrypted
messages work by coincidence.

Initialize params properly, and set params.decrypt as needed.

Signed-off-by: Jani Nikula <jani@nikula.org>
12 years agoemacs: Don't signal an error when reaching the end of the search results.
David Edmondson [Tue, 20 Dec 2011 08:45:14 +0000 (08:45 +0000)]
emacs: Don't signal an error when reaching the end of the search results.

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.

12 years agopython test "compare message ids"
Patrick Totzke [Mon, 2 Jan 2012 14:51:27 +0000 (14:51 +0000)]
python test "compare message ids"

Introduces a second (trivial) test for the python
bindings that searches for message ids and compares
the output with that of `notmuch search`.

12 years agoclean up "compare thread ids" python test
Patrick Totzke [Mon, 2 Jan 2012 14:51:26 +0000 (14:51 +0000)]
clean up "compare thread ids" python test

This makes the test script open the database in READ_ONLY mode
and use the libraries own sorting methods instead of "sort".

12 years agoUpdate NEWS for Emacs changes
Thomas Jost [Wed, 4 Jan 2012 09:25:07 +0000 (10:25 +0100)]
Update NEWS for Emacs changes

- A fair amount of conflict resolution by db.

12 years agoNEWS: give a hint about using sort to achieve the old dump behavior.
David Bremner [Wed, 4 Jan 2012 03:19:05 +0000 (23:19 -0400)]
NEWS: give a hint about using sort to achieve the old dump behavior.

This is needed for a few applications, and actually is quite
fast (relative to the actual dump).

12 years agoNEWS: fix typos.
David Bremner [Thu, 5 Jan 2012 21:52:07 +0000 (17:52 -0400)]
NEWS: fix typos.

Thanks to Xavier for one of these.

12 years agoupdate NEWS
Jameson Graef Rollins [Mon, 2 Jan 2012 22:16:51 +0000 (14:16 -0800)]
update NEWS

This change looks slightly larger than it actually is, since I moved
the emacs section below the Performance and Memory Management
sections.

12 years agoemacs: fix notmuch-show-indent-messages-width customization variable name
Jameson Graef Rollins [Mon, 2 Jan 2012 22:23:02 +0000 (14:23 -0800)]
emacs: fix notmuch-show-indent-messages-width customization variable name

The name was originally notmuch-indent-messages-width, which is
inconsistent with our variable naming convention.

12 years agopython: str.decode() doesn't like kwargs in python 2.5
Sebastian Spaeth [Mon, 2 Jan 2012 16:07:53 +0000 (17:07 +0100)]
python: str.decode() doesn't like kwargs in python 2.5

Recent changes introduced lots of unicodification of strings, mostly in
the form of .decode('utf-8', errors='ignore'). However, python 2.5 does
not like the errors keyword argument and complains. It does work when
used as a simple arg though, so that's what this patch does.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agopython: make the result of Message.get_replies() more pythonic
Justus Winter [Wed, 21 Dec 2011 13:15:02 +0000 (14:15 +0100)]
python: make the result of Message.get_replies() more pythonic

Formerly Message.get_replies() returned an iterator or None forcing
users to check the result before iterating over it leading to strange
looking code at the call site.

Fix this flaw by adding an EmptyMessagesResult class that behaves like
the Messages class but immediatly raises StopIteration if used as an
iterator and returning objects of this type from Message.get_replies()
to indicate that there are no replies.

12 years agopython: refactor print_messages into format_messages and print_messages
Justus Winter [Wed, 21 Dec 2011 13:15:01 +0000 (14:15 +0100)]
python: refactor print_messages into format_messages and print_messages

12 years agopython: add missing conversions from and to utf-8
Justus Winter [Wed, 14 Dec 2011 10:58:25 +0000 (11:58 +0100)]
python: add missing conversions from and to utf-8