]> git.notmuchmail.org Git - notmuch/log
notmuch
7 years agocompletion: complete mimetype: search prefix
Jani Nikula [Wed, 2 Nov 2016 18:46:47 +0000 (20:46 +0200)]
completion: complete mimetype: search prefix

Use /etc/mime.types if available, parsed using a sed one-liner, and
fall back to a handful of common types otherwise.

7 years agoemacs: add notmuch-address-post-completion-hook
David Bremner [Fri, 4 Nov 2016 01:02:43 +0000 (22:02 -0300)]
emacs: add notmuch-address-post-completion-hook

This hook can be used to update the message based on the results of
address completion. For example using message-templ or gnus-alias to set
the From address based on the To address just completed.

The post-completion command is added to the notmuch-company backend to
ensure that the hook is also called company completion is started
without going through notmuch-address-expand-name. See the docstring of
`company-backends' for more information.

7 years agoemacs: tree: use message pane decryption state for replies
Mark Walters [Wed, 21 Sep 2016 15:49:19 +0000 (16:49 +0100)]
emacs: tree: use message pane decryption state for replies

This makes replying to a message in tree view, use the decrypted state
from the message pane if it is open. Previously it just used the
global decryption state from notmuch-crypto-process-mime.

In particular if notmuch-crypto-process-mime is nil, and the user
views the messages (which doesn't decrypt), toggles decryption in the
message pane, and then replies, the reply will be decrypted.

7 years agoemacs: tree: allow the user to decrypt the message pane
Mark Walters [Wed, 21 Sep 2016 15:49:18 +0000 (16:49 +0100)]
emacs: tree: allow the user to decrypt the message pane

This makes $ in the tree pane toggle decryption in the message
pane. Without this the user can only decrypt the message pane by
switching to it, or by setting decryption on globally by setting
notmuch-crypto-process-mime to t.

7 years agonotmuch-emacs-mua: add support for mailto: URL handling
Jani Nikula [Sat, 22 Oct 2016 11:22:49 +0000 (14:22 +0300)]
notmuch-emacs-mua: add support for mailto: URL handling

Add support for composing an email in the Notmuch Emacs UI using a
mailto: URL. The mailto: URL mode is mutually exclusive with
specifying other message modifying parameters and positional
arguments.

7 years agoemacs: make faces readable on dark backgrounds.
Matt Armstrong [Fri, 28 Oct 2016 22:31:42 +0000 (15:31 -0700)]
emacs: make faces readable on dark backgrounds.

The notmuch-tag-flagged, notmuch-search-flagged-face and
notmuch-crypto-part-header faces defaulted to "blue", which is nearly
unreadable when a dark background is in use.  This is addressed by using
"LightBlue1" for dark backgrounds.

As a side effect, these faces are now no-op definitions for grayscale or
mono displays.

7 years agocli: try to run external notmuch- prefixed commands as subcommands
Jani Nikula [Sat, 22 Oct 2016 12:50:05 +0000 (15:50 +0300)]
cli: try to run external notmuch- prefixed commands as subcommands

If the given subcommand is not known to notmuch, try to execute
external notmuch-<subcommand> instead. This allows users to have their
own notmuch related tools be run via the notmuch command, not unlike
git does. Also notmuch-emacs-mua will be executable via 'notmuch
emacs-mua'.

By design, this does not allow notmuch's own subcommands to be
overriden using external commands.

7 years agoemacs: make notmuch-search-tag tag the region when called non-interactively.
Mark Walters [Sun, 16 Oct 2016 16:12:23 +0000 (17:12 +0100)]
emacs: make notmuch-search-tag tag the region when called non-interactively.

The normal tag commands in search mode tag the all threads meeting the
region when called interactively. This makes them do the same when
called non-interactively. This is a change in the api.

7 years agoMerge branch 'release'
David Bremner [Wed, 26 Oct 2016 00:57:23 +0000 (21:57 -0300)]
Merge branch 'release'

merge interesting buffers bugfix from release

7 years agolib: replace deprecated xapian call 'flush()' with 'commit()'
David Bremner [Wed, 5 Oct 2016 11:34:33 +0000 (08:34 -0300)]
lib: replace deprecated xapian call 'flush()' with 'commit()'

This will make notmuch incompatible with Xapian before 1.1.0, which is
more than 6 years old this point.

7 years agotest/test-lib.sh: execute basename(1)s lazier in test_expect_equal_file ()
Tomi Ollila [Sun, 9 Oct 2016 20:36:07 +0000 (23:36 +0300)]
test/test-lib.sh: execute basename(1)s lazier in test_expect_equal_file ()

Moved the 2 basename(1) executions to the test failure branch in
test_expect_equal_file ().

The output of basename(1) executions in function test_expect_equal_file ()
are only used when tests fails -- when all tests pass these 2 basename(1)
executions are no longer done at all.

7 years agoemacs: tree: make tag updates show in the message pane
Mark Walters [Sat, 15 Oct 2016 18:25:19 +0000 (19:25 +0100)]
emacs: tree: make tag updates show in the message pane

This makes tag changes appear in the message pane as well as in the
tree window.

Note that the message pane is reloaded each time a message is viewed
so the tags shown in the message pane can still be different from
those in the tree window. Usually this will just be that the tag
change is still shown as a change (strikethough underline etc) in the
tree window, and are shown after the change in the message
pane. However, if something else updates the database then the tags
shown can be genuinely different.

7 years agoemacs: interesting-buffer bugfixes/updates
Mark Walters [Sat, 22 Oct 2016 12:10:04 +0000 (13:10 +0100)]
emacs: interesting-buffer bugfixes/updates

The command notmuch-interesting-buffer has got out of date -- it
doesn't mention notmuch-tree, and it still refers to message-mode not
notmuch-message-mode. Update both of these.

This fixes the bug that notmuch-cycle-notmuch-buffers does not include
notmuch-tree or notmuch-message-mode buffers in its cycling.

7 years agodevel: Document emacs keybindings
Mark Walters [Sun, 23 Oct 2016 08:38:21 +0000 (09:38 +0100)]
devel: Document emacs keybindings

This adds a file under devel listing all the keybindings sorted by key
in the main three modes (search, show and tree).

To reduce clutter it only lists the single key "unmodified"
keybindings: I think all our uses of prefixes and modifiers are
natural variants of the unmodified binding (eg M-n compared to n in
show mode)

This should make easier to see what keybindings are available when
adding new features.

7 years agoMerge tag '0.23.1'
David Bremner [Mon, 24 Oct 2016 01:24:08 +0000 (22:24 -0300)]
Merge tag '0.23.1'

notmuch 0.23.1 release

7 years agofinalize release 0.23.1 0.23.1
David Bremner [Mon, 24 Oct 2016 01:06:39 +0000 (22:06 -0300)]
finalize release 0.23.1

7 years agoAdd notmuch-show--build-queries.
Matt Armstrong [Wed, 19 Oct 2016 22:08:15 +0000 (15:08 -0700)]
Add notmuch-show--build-queries.

notmuch-show--build-buffer now queries a list of queries built by the
former.  This simplifies the logic.  It also provides an easy place to
experiment with alternate sets of queries for given notmuch-show-*
variables (e.g. users can use advice-add to do so in a surgical way).

7 years agoMerge in test-suite, docstring fixes, release prep
David Bremner [Sat, 22 Oct 2016 15:44:39 +0000 (12:44 -0300)]
Merge in test-suite, docstring fixes, release prep

7 years agodebian: start changelog stanza for 0.23.1
David Bremner [Sat, 22 Oct 2016 15:39:11 +0000 (12:39 -0300)]
debian: start changelog stanza for 0.23.1

7 years agoversion: bump to 0.23.1
David Bremner [Sat, 22 Oct 2016 15:35:25 +0000 (12:35 -0300)]
version: bump to 0.23.1

7 years agoNEWS for two bugfixes
Mark Walters [Sat, 22 Oct 2016 06:45:17 +0000 (07:45 +0100)]
NEWS for two bugfixes

This adds news items for the two bugs

    emacs: search face bugfix
and
    emacs: fix notmuch-search-line-faces defcustom

7 years agoExpand docstrings about fcc using notmuch-insert
Keith Amidon [Wed, 19 Oct 2016 10:05:19 +0000 (03:05 -0700)]
Expand docstrings about fcc using notmuch-insert

This commit expands docstrings for notmuch-fcc-dirs and
notmuch-maildir-fcc-with-notmuch-insert to describe how quoted strings
are processed and make the ability to configure sent folders containing
whitespace more discoverable.

7 years agotest: use vt100 as "smart" terminal for known dumb/unknown terminals
Tomi Ollila [Thu, 20 Oct 2016 08:19:45 +0000 (11:19 +0300)]
test: use vt100 as "smart" terminal for known dumb/unknown terminals

Otherwise use whatever user environment has set for TERM so
that there is more chance to test on users' actual environments.

7 years agotest-lib.sh: rename $DTACH_TERM to $SMART_TERM
Tomi Ollila [Thu, 20 Oct 2016 08:19:44 +0000 (11:19 +0300)]
test-lib.sh: rename $DTACH_TERM to $SMART_TERM

7 years agoMerge emacs face fixes and NEWS
David Bremner [Wed, 19 Oct 2016 11:44:35 +0000 (08:44 -0300)]
Merge emacs face fixes and NEWS

7 years agoNEWS for 0.23.1
David Bremner [Wed, 12 Oct 2016 02:01:56 +0000 (23:01 -0300)]
NEWS for 0.23.1

7 years agoemacs: search face bugfix
Mark Walters [Wed, 12 Oct 2016 07:39:21 +0000 (08:39 +0100)]
emacs: search face bugfix

In commit 2a7b11b064233afc4feead876fa396e3c18a6b91 the default faces
for unread and flagged were accidentally swapped. This swaps them back.

7 years agoemacs: fix notmuch-search-line-faces defcustom
Mark Walters [Sat, 15 Oct 2016 09:40:48 +0000 (10:40 +0100)]
emacs: fix notmuch-search-line-faces defcustom

In commit 2a7b11b064233afc4feead876fa396e3c18a6b91 the default value
for notmuch-search-line-faces was changed so that it didn't match the
specification in the corresponding defcustom. This meant that it was
difficult for the user to customize this variable as they got a type
mismatch error.

Note anyone who had already customised this variable would not see
this bug as their customisation would match the defcustom.

7 years agoemacs: add global keybinding M-= for refresh all buffers
Mark Walters [Sat, 15 Oct 2016 07:32:46 +0000 (08:32 +0100)]
emacs: add global keybinding M-= for refresh all buffers

We can't use c-u = as some of the notmuch-show refresh function
already uses that. This is a global keybinding for a relatively
infrequent function but M-= seems unlikely to cause conflicts.

7 years agoemacs: notmuch-lib: add refresh all buffers function
Ioan-Adrian Ratiu [Sat, 15 Oct 2016 07:32:45 +0000 (08:32 +0100)]
emacs: notmuch-lib: add refresh all buffers function

notmuch-refresh-all-buffers calls each buffer's major mode specific
refresh function using the generic notmuch-refresh-this-buffer function.

Since the earlier changesets have stopped the refresh functions from
forcing the buffers to be redisplayed this can refresh buffers that
are not currently displayed without disturbing the user.  This is very
useful for silent async background updating the emacs display when new
mail is fetched.

Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
7 years agoemacs: notmuch-show: refresh all windows displaying buffer
Ioan-Adrian Ratiu [Sat, 15 Oct 2016 07:32:44 +0000 (08:32 +0100)]
emacs: notmuch-show: refresh all windows displaying buffer

This updates all windows displaying a notmuch-show buffer when the
buffer refresh function is called.

Each window displaying a notmuch-show buffer has its own currently
displayed message based on the (point) location. We store the state
of all displayed windows when refreshing a notmuch-show buffer and
re-apply the current shown message (point) for all windows.

Implementation note: Each window has it's own (point) value, besides
the buffer's (point) value. Sometimes these values are identical like
in the case where a single window displays a buffer. When multiple
windows display a buffer, (point) returns each window's specific value.
What we are storing in this changeset is the window values not the
buffer point values. The buffer's point is returned only if no window
is displaying the buffer, a case we do not care about here.

Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
7 years agoemacs: notmuch-search-refresh-view: reuse buffer
Ioan-Adrian Ratiu [Sat, 15 Oct 2016 07:32:43 +0000 (08:32 +0100)]
emacs: notmuch-search-refresh-view: reuse buffer

There's no reason to completely kill a buffer while refreshing its
search results because the buffer name is constant between refreshes
(based on the search query), only its contents may change and notmuch
search kills all local variables, so it's safe to reuse.

Reusing the same buffer also makes it possible to do things like
refreshing a buffer which is not focused or even not shown in any
window - this will be used in the next commits to add auto-refresh
capabilities to all existing notmuch buffers + a function to call
after syncing mail to refresh everything.

Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
7 years agoemacs: notmuch-search: add no-display functionality
Ioan-Adrian Ratiu [Sat, 15 Oct 2016 07:32:42 +0000 (08:32 +0100)]
emacs: notmuch-search: add no-display functionality

If no-display is non-nil when calling notmuch-search then do not force
the search buffer to be displayed.

Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
7 years agoemacs: hello: stop update from forcing the buffer to be displayed
Mark Walters [Sat, 15 Oct 2016 07:32:41 +0000 (08:32 +0100)]
emacs: hello: stop update from forcing the buffer to be displayed

Make the notmuch-hello refresh function (notmuch-hello-update) not
force the buffer to be displayed. All the callers call it when the
buffer is already displayed so it will only affect non-interactive
callers. Since it is just a trivial wrapper of notmuch-hello anyone
who wants to force the buffer to be displayed should just call
notmuch-hello.

7 years agoemacs: make the refresh functions more consistent
Mark Walters [Sat, 15 Oct 2016 07:32:40 +0000 (08:32 +0100)]
emacs: make the refresh functions more consistent

The different refreshed functions were called differently: some were
called interactively and some were not. Make them all interactive.

7 years agoemacs: tree: make refresh use generic binding
Mark Walters [Sat, 15 Oct 2016 07:32:39 +0000 (08:32 +0100)]
emacs: tree: make refresh use generic binding

Not using the generic binding is an anomaly from when tree was in
contrib (as pick).

7 years agoFix reply to encrypted mail when discouraging plain text.
Matthew Lear [Tue, 11 Oct 2016 21:24:30 +0000 (22:24 +0100)]
Fix reply to encrypted mail when discouraging plain text.

If an encrypted multipart message is received which contains html and
notmuch-multipart/alternative-discouraged is set to discourage "text/plain",
any encrypted parts are not decrypted during generation of the reply
text. This fixes that problem by making sure notmuch-mua-reply does
that.

7 years agoemacs: jump: make multilevel keys do multilevel jump
Mark Walters [Sat, 15 Oct 2016 11:50:42 +0000 (12:50 +0100)]
emacs: jump: make multilevel keys do multilevel jump

notmuch jump allows the user to specify a key sequence rather than
just a single key for its bindings. However, it doesn't show what has
already been typed so it can be difficult to see what has
happened. This makes each key press appear, and the jump menu reduce
to the possible follow up keys.

We also bind backspace (emacs symbol DEL) to go back up a level in the
subjumpmaps, and to exit from the top level.

7 years agoemacs: tag-jump: docstring fix
Mark Walters [Sat, 15 Oct 2016 11:09:31 +0000 (12:09 +0100)]
emacs: tag-jump: docstring fix

In commit 297d091e1ca8f5b1e144d2be0a8e0a7c271634a8 the key for
switching to the reverse keymap was changed from r to k but the
docstring for the defcustom was not updated. This changeset updates
the documentation to match.

7 years agotest: add known broken test for nondestructiveness of count
David Bremner [Sun, 2 Oct 2016 02:13:26 +0000 (23:13 -0300)]
test: add known broken test for nondestructiveness of count

Thanks to Lucas (id:147263183913.27784.12274024193186585889@mbp) for the
bug report and the test case.

I decided to use the python version because the python bindings could
use more exercise.

7 years agotest/T000-basic: replaced use of which(1) with shell builtin command -v
Tomi Ollila [Sun, 9 Oct 2016 18:48:29 +0000 (21:48 +0300)]
test/T000-basic: replaced use of which(1) with shell builtin command -v

Some minimal chroot/container environments don't have which(1) installed.

7 years agomerge buttonise-links patch to master
David Bremner [Wed, 12 Oct 2016 01:42:26 +0000 (22:42 -0300)]
merge buttonise-links patch to master

7 years agoemacs/show: force notmuch-show-buttonise-links to act on lines
David Bremner [Sun, 9 Oct 2016 22:30:44 +0000 (19:30 -0300)]
emacs/show: force notmuch-show-buttonise-links to act on lines

This seems to fix a problem with emacs 25 creating partial buttons by
calling n-s-b-l with a region that does not include the whole button.
I'm not 100% sure it's legit to act outside the region passed by
jit-lock, but goto-address-fontify-region (where I borrowed the code
from) already does this, so this patch to not make things worse.

7 years agoemacs: mua: check for misplaced secure mml tags
Mark Walters [Sat, 8 Oct 2016 20:05:23 +0000 (21:05 +0100)]
emacs: mua: check for misplaced secure mml tags

Emacs message-send seems to ignore a secure mml tag anywhere except at
the start of the body, and it must be followed by a newline. Since
this is almost certainly not desired we check for it, and require user
confirmation before sending.

As the setup before message-send or message-send-and-exit is getting
more complicated it is convenient to unify the two correspoinding
notmuch functions.

7 years agoemacs: mua: extract a common message-send function.
Mark Walters [Sat, 8 Oct 2016 20:05:22 +0000 (21:05 +0100)]
emacs: mua: extract a common message-send function.

This commit adds a common message-send function for message-send and
message-send-and-exit. At the moment the overlap is small, but the
message-send function will get more complex.

7 years agoemacs: include first match in address completion
Mark Walters [Tue, 27 Sep 2016 15:45:27 +0000 (16:45 +0100)]
emacs: include first match in address completion

The current code for address completion takes the list of possible
completions (whether generated internally or externally), makes the
first match the initial value for the completion, and puts all the
others (but not the first match) into the possible completions.

This has the nice effect that the <down> key takes you immediately to
the next completion (whereas if the first match were included in the
possible completions it would take you to the first match
again).

However, it has two side effects. First, once you have completed to
the full match you find it says and try completing again you get told
"no match" not "sole completion". Secondly, if you delete some of the
text and try completing you don't get the first match as an option.

This tries to get round most of these problems by including the full
list of possible completions, but with the first match moved to the
very end of the list.

7 years agoemacs: add mimetype completions to searches
Mark Walters [Tue, 27 Sep 2016 09:26:56 +0000 (10:26 +0100)]
emacs: add mimetype completions to searches

7 years agoemacs: tag-jump: make k binding for the reverse tag change map
Mark Walters [Thu, 6 Oct 2016 21:59:00 +0000 (22:59 +0100)]
emacs: tag-jump: make k binding for the reverse tag change map

Currently, by default k invokes the tag-jump menu, and following it by
r invokes the reverse tag change jump menu. This is awkward to type
(e.g. k r u for undoing a -unread change). This changes it so that k
followed by k invokes the reverse menu. We make the key for the
reverse map a variable as that makes it possible for a user to
change it by editing their .emacs file.

7 years agoMerge branch 'release'
David Bremner [Fri, 7 Oct 2016 01:56:46 +0000 (22:56 -0300)]
Merge branch 'release'

7 years agolib: document API added in 0.23
David Bremner [Wed, 5 Oct 2016 01:12:56 +0000 (22:12 -0300)]
lib: document API added in 0.23

The API was already documented, but for future readers note when the
functions were added,

7 years agorequire xapian >= 1.2.6
David Bremner [Wed, 5 Oct 2016 00:35:23 +0000 (21:35 -0300)]
require xapian >= 1.2.6

It seems that no-one tried to compile without Xapian compact support
since March of 2015, since that's when I introduced a syntax error in
that branch of the ifdef.

Given the choice of maintaining this underused branch of code, or
bumping the Xapian dependency to a version from 2011, it seems
reasonable to do the latter.

7 years agodebian: changelog stanza for 0.23-2
David Bremner [Thu, 6 Oct 2016 00:27:17 +0000 (21:27 -0300)]
debian: changelog stanza for 0.23-2

7 years agoemacs: add a tag jump menu
Mark Walters [Tue, 20 Sep 2016 19:57:16 +0000 (20:57 +0100)]
emacs: add a tag jump menu

Add a customisable "jump" style menu for doing tagging operations.

7 years agonmbug: Add --no-renames to default log options
W. Trevor King [Mon, 26 Sep 2016 16:32:13 +0000 (09:32 -0700)]
nmbug: Add --no-renames to default log options

Git has supported this since b68ea12e (diff.c: respect diff.renames
config option, 2006-07-07, v1.4.2).  All of our information is in the
paths (the files are empty), so we don't want rename detection.  By
using --no-renames, we get entries like:

  $ nmbug log -- e473b453a2
  commit e473b453a25c072b5df67d834d822121373321f5
  Author: David Bremner <david@tethera.net>
  Date:   Sun Sep 25 07:54:11 2016 -0300

  D       tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/0.23
  A       tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/pushed

  ...

Instead of the old:

  $ nmbug log -- e473b453a2
  commit e473b453a25c072b5df67d834d822121373321f5
  Author: David Bremner <david@tethera.net>
  Date:   Sun Sep 25 07:54:11 2016 -0300

  R100    tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/0.23   tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/pushed

7 years agoMerge tag '0.23'
David Bremner [Tue, 4 Oct 2016 02:04:22 +0000 (23:04 -0300)]
Merge tag '0.23'

notmuch 0.23 release

7 years agodebian: changelog stanza for 0.23-1 0.23
David Bremner [Tue, 4 Oct 2016 01:47:21 +0000 (22:47 -0300)]
debian: changelog stanza for 0.23-1

7 years agoNEWS: bump date to today
David Bremner [Tue, 4 Oct 2016 01:43:23 +0000 (22:43 -0300)]
NEWS: bump date to today

7 years agoversion: bump to 0.23
David Bremner [Tue, 4 Oct 2016 01:40:22 +0000 (22:40 -0300)]
version: bump to 0.23

7 years agolib: bump minor version to mark added symbols
David Bremner [Sun, 2 Oct 2016 01:11:56 +0000 (22:11 -0300)]
lib: bump minor version to mark added symbols

This should not change the SONAME, and therefore won't change the
dynamic linking behaviour, but it may help some users debug missing
symbols in case their libnotmuch is too old.

7 years agodebian: changelog stanza for 0.23~rc1-1 0.23_rc1 debian/0.23_rc1-1
David Bremner [Fri, 30 Sep 2016 10:21:09 +0000 (07:21 -0300)]
debian: changelog stanza for 0.23~rc1-1

7 years agoversion: update to 0.23~rc1
David Bremner [Fri, 30 Sep 2016 10:18:04 +0000 (07:18 -0300)]
version: update to 0.23~rc1

7 years agoconfigure: set platform variables also when `uname` is unrecognized
Tomi Ollila [Thu, 29 Sep 2016 13:12:49 +0000 (16:12 +0300)]
configure: set platform variables also when `uname` is unrecognized

Since commit

124a67e96ecab5495c0f17b6875d53dfd67ff137: configure: add set -u

all variables must be set before their expansion are attempted. These
2 variables: "platform" and "linker_resolves_library_dependencies" were
not given value in the final 'else' branch when platform check failed
due to unrecognized kernel name (output of `uname`). Now those two are
given reasonable non-empty values.

7 years agoemacs: fcc: say we are doing Fcc
Mark Walters [Thu, 29 Sep 2016 13:44:04 +0000 (14:44 +0100)]
emacs: fcc: say we are doing Fcc

Since doing the Fcc with notmuch insert could be slow (if the indexing
takes some time) add a message saying we are doing it.

7 years agoemacs: document notmuch-fcc-dirs
Mark Walters [Wed, 28 Sep 2016 10:03:46 +0000 (11:03 +0100)]
emacs: document notmuch-fcc-dirs

This updates the docstring for the variable notmuch-fcc-dirs to match
the new insert code.

7 years agoNEWS: add news for fcc insert and address completion changes
Mark Walters [Wed, 28 Sep 2016 12:33:54 +0000 (13:33 +0100)]
NEWS: add news for fcc insert and address completion changes

7 years agolib/database.cc: fix misleading indentation
Tomi Ollila [Tue, 27 Sep 2016 15:06:52 +0000 (18:06 +0300)]
lib/database.cc: fix misleading indentation

Found by gcc 6.1.1 -Wmisleading-indentation option (set by -Wall).

7 years agoNEWS: emacs notmuch-show-resend-message
Tomi Ollila [Tue, 27 Sep 2016 17:24:41 +0000 (20:24 +0300)]
NEWS: emacs notmuch-show-resend-message

7 years agoNEWS: mention message properties API, dump/restore
David Bremner [Sun, 25 Sep 2016 11:36:52 +0000 (08:36 -0300)]
NEWS: mention message properties API, dump/restore

7 years agoNEWS: fix headline for go bindings NEWS
David Bremner [Sun, 25 Sep 2016 11:33:26 +0000 (08:33 -0300)]
NEWS: fix headline for go bindings NEWS

7 years agoNEWS: note notmuch-reply refactor
David Bremner [Sun, 25 Sep 2016 11:30:49 +0000 (08:30 -0300)]
NEWS: note notmuch-reply refactor

7 years agoNEWS: note dropping of User-Agent header
David Bremner [Sun, 25 Sep 2016 11:22:50 +0000 (08:22 -0300)]
NEWS: note dropping of User-Agent header

7 years agoNEWS: document mtime bugfix
David Bremner [Sun, 25 Sep 2016 11:12:40 +0000 (08:12 -0300)]
NEWS: document mtime bugfix

7 years agoemacs: tree: make b bounce a message and backspace scroll message pane up
Mark Walters [Sun, 25 Sep 2016 07:18:10 +0000 (08:18 +0100)]
emacs: tree: make b bounce a message and backspace scroll message pane up

This tweaks the keybindings in tree-mode. It make b do bounce/resend
matching show-mode. Since b was already bound to scroll message pane
back, we now use backspace for that.

This means space/backspace scroll the message pane forwards/backwards,
and page-up/page-down scrolls the tree pane forwards/backwards.

7 years agodebian: update symbols for 0.23 0.23_rc0 debian/0.23_rc0-1
David Bremner [Mon, 26 Sep 2016 10:39:25 +0000 (07:39 -0300)]
debian: update symbols for 0.23

New sub-APIs: config, built_with, message_property. A new exception used
internally. Mark the exception as optional, as it only shows up when
built against Xapian supporting FieldProcessors

7 years agodebian: changelog stanza for 0.23~rc0-1
David Bremner [Mon, 26 Sep 2016 10:30:15 +0000 (07:30 -0300)]
debian: changelog stanza for 0.23~rc0-1

7 years agoversion: bump to 0.23~rc0
David Bremner [Mon, 26 Sep 2016 10:22:21 +0000 (07:22 -0300)]
version: bump to 0.23~rc0

7 years agoemacs: tag deleted face bugfix
Mark Walters [Sun, 18 Sep 2016 10:57:32 +0000 (11:57 +0100)]
emacs: tag deleted face bugfix

Commit d25d33ff cleaned up some of the tag face code. However, for the
face notmuch-tag-deleted it used the test

((class color) (supports :strike-through))

to decide whether to use red strikethrough or inverse-video (emacs in
a terminal typically doesn't support red strikethrough, but in X it does).

However, it seems that test often returns true even though red
strikethrough is not supported. This breaks the tag update code -- the
wrong thing is displayed to the user.

Thus we make the test explicitly more specific, changing the test to

((class color) (supports :strike-through "red"))

7 years agotest: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch
Tomi Ollila [Sat, 24 Sep 2016 12:43:27 +0000 (15:43 +0300)]
test: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch

In case of the test script is to be relaunced under valgrind, or --tee
is requested, use the $BASH shell variable to locate the command
interpreter. The $SHELL variable is re-set by non-interactive shells
so in case the shell uses some other shell (e.g. zsh) for interactive
use these bash scripts continue to work.

7 years agolib: add talloc reference from string map iterator to map
David Bremner [Fri, 23 Sep 2016 09:33:19 +0000 (06:33 -0300)]
lib: add talloc reference from string map iterator to map

This is needed so that when the map is modified during traversal, and
thus unlinked by the database code, the map is not disposed of until the
iterator is done with it.

7 years agoemacs: tree: make jump close message pane
Mark Walters [Mon, 19 Sep 2016 09:39:49 +0000 (10:39 +0100)]
emacs: tree: make jump close message pane

j is in the global notmuch keymap bound to notmuch jump. In tree-mode
it makes sense to close the message pane first (otherwise the new
search runs in the small top pane of tree-mode).

7 years agotest/emacs: add broken test for message replying to msg to self
David Bremner [Tue, 13 Sep 2016 02:24:43 +0000 (23:24 -0300)]
test/emacs: add broken test for message replying to msg to self

This is a strange corner case where the removing of the user's address
from the To: header does the wrong thing. If we think it is
worth (eventually) fixing, this test can serve as a reminder.

7 years agoNEWS: fix markup of CONSTANTS_WITH_UNDERSCORES
David Bremner [Fri, 23 Sep 2016 23:58:32 +0000 (20:58 -0300)]
NEWS: fix markup of CONSTANTS_WITH_UNDERSCORES

Alas, I did not notice when when I originally applied the NEWS patch

7 years agoNEWS: news for Xapian 1.4 enabled features
David Bremner [Sat, 17 Sep 2016 13:07:44 +0000 (10:07 -0300)]
NEWS: news for Xapian 1.4 enabled features

In fact some of these features are available in Xapian 1.3.x development
releases, but these are not really widely packaged. In any case, the
experts who are using development releases of Xapian can figure that
out.

7 years agotest: fix printf format
David Bremner [Thu, 22 Sep 2016 11:11:42 +0000 (08:11 -0300)]
test: fix printf format

notmuch_status_t is an integer type, printing it as a string is a very
bad idea.

7 years agobuild system: choose gnu99 as a C standard
David Bremner [Wed, 21 Sep 2016 23:09:14 +0000 (20:09 -0300)]
build system: choose gnu99 as a C standard

Apparently pre 5.1 gcc defaulted to gnu89, but we decided it was ok to
use some c99 features.

'-std=c99' by itself is not enough for notmuch to compile.

'-std=gnu99' seems to work with clang and gcc, so I'm not convinced
configuration support is needed.

7 years agoadd property: query prefix to search for specific properties
Daniel Kahn Gillmor [Fri, 8 Jul 2016 09:15:36 +0000 (11:15 +0200)]
add property: query prefix to search for specific properties

We want to be able to query the properties directly, like:

   notmuch count property:foo=bar

which should return a count of messages where the property with key
"foo" has value equal to "bar".

7 years agocli: optionally restore message properties from dump file
David Bremner [Mon, 13 Jun 2016 01:05:55 +0000 (22:05 -0300)]
cli: optionally restore message properties from dump file

This somewhat mimics the config line parsing, except there can be
arbitrarily many key value pairs, so one more level of looping is
required.

7 years agoCLI: add properties to dump output
David Bremner [Mon, 13 Jun 2016 01:05:54 +0000 (22:05 -0300)]
CLI: add properties to dump output

Part of providing extensibility via properties is to make sure that user
data is not lost. Thus we need to be able to dump and restore
properties.

7 years agoCLI: refactor dumping of tags.
David Bremner [Mon, 13 Jun 2016 01:05:53 +0000 (22:05 -0300)]
CLI: refactor dumping of tags.

This is mainly code movement, to make room in the loop over messages for
dumping properties.

7 years agolib: iterator API for message properties
David Bremner [Mon, 13 Jun 2016 01:05:52 +0000 (22:05 -0300)]
lib: iterator API for message properties

This is a thin wrapper around the string map iterator API just introduced.

7 years agolib: extend private string map API with iterators
David Bremner [Mon, 13 Jun 2016 01:05:51 +0000 (22:05 -0300)]
lib: extend private string map API with iterators

Support for prefix based iterators is perhaps overengineering, but I
wanted to mimic the existing database_config API.

7 years agolib: basic message-property API
David Bremner [Mon, 13 Jun 2016 01:05:50 +0000 (22:05 -0300)]
lib: basic message-property API

Initially, support get, set and removal of single key/value pair, as
well as removing all properties.

7 years agolib: private string map (associative array) API
David Bremner [Mon, 13 Jun 2016 01:05:49 +0000 (22:05 -0300)]
lib: private string map (associative array) API

The choice of array implementation is deliberate, for future iterator support

7 years agolib: read "property" terms from messages.
David Bremner [Mon, 13 Jun 2016 01:05:48 +0000 (22:05 -0300)]
lib: read "property" terms from messages.

This is a first step towards providing an API to attach
arbitrary (key,value) pairs to messages and retrieve all of the values
for a given key.

7 years agotest: silence the output of notmuch new mid-test
Jani Nikula [Sun, 11 Sep 2016 15:42:25 +0000 (18:42 +0300)]
test: silence the output of notmuch new mid-test

Fix this during test run:

T470-missing-headers: Testing messages with missing headers
Added 2 new messages to the database.

7 years agoemacs: reply: remove wrong sig/enc status buttons
Mark Walters [Tue, 13 Sep 2016 01:45:58 +0000 (22:45 -0300)]
emacs: reply: remove wrong sig/enc status buttons

This stops the (usually incorrect) sigstatus and encstatus buttons
appearing when replying in emacs, and updates the test suite to match.

Overriding the status button functions is a little unusual but much
less intrusive than passing an argument all the way down the call
chain. It also makes it clear exactly what it does.

We also hide the application/pgp-encrypted part as it can only contain
"Version: 1". We do this in notmuch show, which means it also happens
when replying.

7 years agotest/crypto: test reply to encrypted message in emacs
David Bremner [Tue, 13 Sep 2016 01:45:57 +0000 (22:45 -0300)]
test/crypto: test reply to encrypted message in emacs

This test considers the extra output about encryption/signature status
as a bug, to be fixed in the next commit

7 years agocli/reply: only pass gmime message to add recipients to reply message
Jani Nikula [Tue, 13 Sep 2016 17:14:22 +0000 (20:14 +0300)]
cli/reply: only pass gmime message to add recipients to reply message

The notmuch message is no longer needed. Simplify.

7 years agocli/reply: pass gmime message to Reply-To: redundancy detection
Jani Nikula [Tue, 13 Sep 2016 17:14:21 +0000 (20:14 +0300)]
cli/reply: pass gmime message to Reply-To: redundancy detection

Use gmime message instead of notmuch message in Reply-To: redundancy
detection. This allows us to easily iterate over all recipient email
addresses accurately, instead of just scanning for strings in the
relevant message headers. This improves the accuracy of the detection
in many ways.

This also makes the notmuch message parameter to get_sender()
unused. This will be cleaned up in a follow-up patch to not make too
many changes here at once.

7 years agocli/reply: do not parse Reply-To: header into internet address list twice
Jani Nikula [Tue, 13 Sep 2016 17:14:20 +0000 (20:14 +0300)]
cli/reply: do not parse Reply-To: header into internet address list twice

Avoid parsing Reply-To: header into internet address list twice. Move
the parsing outside of reply_to_header_is_redundant(), and pass the
parsed internet address list in as parameter. This also avoids leaking
the memory of one copy of the internet address list.