Commit graph

2481 commits

Author SHA1 Message Date
David Bremner
9981f995c6 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).
2012-01-05 17:52:50 -04:00
David Bremner
84d9e319ad NEWS: fix typos.
Thanks to Xavier for one of these.
2012-01-05 17:52:07 -04:00
Jameson Graef Rollins
4bda23f160 update NEWS
This change looks slightly larger than it actually is, since I moved
the emacs section below the Performance and Memory Management
sections.
2012-01-05 17:49:05 -04:00
Jameson Graef Rollins
74bced62b4 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.
2012-01-05 17:48:46 -04:00
David Bremner
4f5b71c38d debian: changelog stanza for 0.11~rc2-1
Set dist=experimental the first time.
2012-01-02 07:08:24 -04:00
David Bremner
ec27f802cd debian: fix typo in changelog
Previous version was actually uploaded to experimental, not unstable
2012-01-02 07:08:07 -04:00
David Bremner
ff58a06e83 version: bump to 0.11~rc2
This to "celebrate" pushing a bugfix in at the last minute.
2012-01-02 06:50:07 -04:00
Kazuo Teramoto
f80d4f9f6d lib: call g_mime_init() from notmuch_database_open()
As reported in
id:"CAEbOPGyuHnz4BPtDutnTPUHcP3eYcRCRkXhYoJR43RUMw671+g@mail.gmail.com"
sometimes gmime tries to access a NULL pointer, e.g. g_mime_iconv_open()
tries to access iconv_cache that is NULL if g_mime_init() is not called.
This causes notmuch to segfault when calling gmime functions.

Calling g_mime_init() initializes iconv_cache and others variables needed
by gmime, making sure they are initialized when notmuch calls gmime
functions.
2012-01-02 06:50:07 -04:00
Aaron Ecay
bee7cb9472 Update NEWS for change by Aaron Ecay
- text moved around within NEWS into existing Emacs section by
  committer
2011-12-30 22:49:30 -04:00
David Bremner
81ad1c29f7 NEWS: add item for notmuch-deliver
Ali mentioned he is very busy these days, so I just made something up
rather than waiting for a NEWS item from him.
2011-12-30 08:12:39 -04:00
Tomi Ollila
7da991320b NEWS: two memory leaks fixes for 0.11 2011-12-28 16:54:44 -04:00
Jani Nikula
dddbb9c4a8 NEWS: emacs: notmuch-poll-script and saved search news items 2011-12-26 15:50:51 -04:00
David Bremner
c616ada489 version: update version to 0.11~rc1
and keep python, man page, and debian package in sync.
2011-12-25 23:09:17 -04:00
Dmitry Kurochkin
c44a0edadc emacs: fix docstring for `notmuch-search-line-faces'.
Examples in documentation for `notmuch-search-line-faces' had an extra
quote, e.g.:

  '(\"unread\" . '(:foreground \"green\"))

Which resulted in values like:

  (\"unread\" quote (:foreground \"green\"))

And tons of "Invalid face reference: quote" errors in the messages
buffer.
2011-12-24 15:34:07 -04:00
Jameson Graef Rollins
c0d694035d emacs: call notmuch-show instead of notmuch-search in buttonised id: links
Since message-ids necessarily match just a single message, there's no
reason to do a search for the id before viewing the actual message;
the search just becomes an extra screen to click through.  Clicking on
an id: links now just jumps straight to the message itself.
2011-12-24 15:32:01 -04:00
Thomas Jost
824dad76b6 Fix comments about what is stored in the database
Commit 567bcbc2 introduced two new values for each message (content of the
"From" and "Subject" headers), but the comments about the database schema had
not been updated accordingly.
2011-12-23 15:08:34 -04:00
Aaron Ecay
8392a7cc54 emacs: fix off-by-one bug in notmuch-show-archive
Text properties change between characters; prev-s-c-property-change
returns the position after the change.  Thus, it is still inside the
invisible region.
2011-12-23 08:29:04 -04:00
Dmitry Kurochkin
49af79cd2a emacs: put the last search on top of recent searches in notmuch-hello
Notmuch-hello stores a list of recent searches.  Before the change, if
a search from this list is repeated, the recent search list is not
changed.  The patch makes repeated recent searches move to the head of
the list.  I.e. the last search is always on top of the recent search
list, which is what one would expect from a history list.
2011-12-22 07:41:02 -04:00
Dmitry Kurochkin
9a0b61da56 test: add test for `notmuch-hello-refresh-hook'
Test that `notmuch-hello-refresh-hook' is called once when
`notmuch-hello' is called and twice when calling
`notmuch-hello-update' after that.

The tests are very similar to tests for `notmuch-hello-mode-hook'.
2011-12-22 06:57:46 -04:00
Dmitry Kurochkin
eb8638ba2e test: add general Emacs hook counter
Replace `notmuch-hello-mode-hook-counter' with general `hook-counter'
and `add-hook-counter' functions to allow counting calls for any hook.
2011-12-22 06:57:32 -04:00
Thomas Jost
7edf9e2765 emacs: Change the default thousands separator to a space
This had been discussed and decided on IRC.

Rationale:
  Therefore the space is recommended in the SI/ISO 31-0 standard, and the
  International Bureau of Weights and Measures states that "for numbers with
  many digits the digits may be divided into groups of three by a thin space, in
  order to facilitate reading. Neither dots nor commas are inserted in the
  spaces between groups of three".

(http://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping)
2011-12-22 06:56:41 -04:00
Thomas Jost
6dd482a16d emacs: rename notmuch-decimal-separator to notmuch-hello-thousands-separator
In 123,456.78, "." is the decimal separator, but "," is the thousands separator.
2011-12-22 06:56:26 -04:00
David Edmondson
0fc424a1f0 emacs: Don't prompt the user to choose from zero matching addresses.
If the address matching function generates no matches, don't prompt
the user to choose between them (!). Instead, generate a message to
report that there were no matches.
2011-12-22 06:54:56 -04:00
Jani Nikula
d4c598dc9e emacs: Fix notmuch-mua-user-agent defcustom
The :options keyword is not meaningful for function type. Also, it was not
possible to enter nil value, contrary to the notmuch-mua-user-agent
defcustom documentation. Specify the alternatives using choice type, taking
nil into account.

Signed-off-by: Jani Nikula <jani@nikula.org>
2011-12-22 06:54:29 -04:00
Jani Nikula
2f7f259d62 emacs: Fix notmuch-hello-tag-list-make-query defcustom
It was not possible to define custom filters or filter functions because
the types were const. Remove const to allow editing.

Signed-off-by: Jani Nikula <jani@nikula.org>
2011-12-22 06:54:10 -04:00
Thomas Jost
4e2fe89520 emacs: add notmuch-hello-refresh-hook
This hook is called every time a notmuch-hello buffer is updated.
2011-12-21 07:52:10 -04:00
David Edmondson
77ec8108a1 notmuch: Quiet buildbot warnings.
Cast away the result of various *write functions. Provide a default
value for some variables to avoid "use before set" warnings.
2011-12-21 07:32:16 -04:00
Aaron Ecay
e3260d0253 Don't quote lambda forms
This generates byte-compiler warnings on (at least) current trunk
versions of Emacs.  The quote is not necessary; lambda forms are
self-quoting.
2011-12-21 07:27:38 -04:00
David Edmondson
4a2a271878 emacs: Add `notmuch-jump-to-recent-buffer'.
From a Carl Worth idea: add a function which will select the most
recently used notmuch buffer (search, show or hello). If no recent
buffer is found, run `notmuch'.

It is expected that the user will global bind this command to a key
sequence.
2011-12-20 08:10:36 -04:00
Dmitry Kurochkin
59adb2da19 emacs: do not call `notmuch-hello-mode' on update
`notmuch-hello' should call `notmuch-hello-mode' function only when
run for the first time.  But before the change, `notmuch-hello' used
`kill-all-local-variables' to remove editable widgets fields.  This
caused the major mode to be reset, and `notmuch-hello-mode' to be
called every time.

The patch manually deletes all editable widget fields and removes
`kill-all-local-variables' call.
2011-12-20 07:42:31 -04:00
Dmitry Kurochkin
9928b5b50f test: add broken test for `notmuch-hello-mode-hook' called during update
Test that `notmuch-hello-mode-hook' is not called during
`notmuch-hello' buffer updates.  The test is currently broken.
2011-12-20 07:42:14 -04:00
Dmitry Kurochkin
785028dc2e test: add test for `notmuch-hello-mode-hook'
Test that `notmuch-hello-mode-hook' is called once when
`notmuch-hello' function is called.
2011-12-20 07:42:00 -04:00
Dmitry Kurochkin
33735c28a4 test: add `notmuch-hello-mode-hook-counter'
Add `notmuch-hello-mode-hook-counter' hook to count how many times
`notmuch-hello-mode-hook' was called.  The counter function increments
`notmuch-hello-mode-hook-counter' variable value if it is bount,
otherwise it does nothing.
2011-12-20 07:41:51 -04:00
Aaron Ecay
a2d0215a58 Add an argument to notmuch-mua-mail
From the emacs changelog:

  ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
  passes it to the mail user agent function.  This argument specifies an
  action for returning to the caller after finishing with the mail.
  This is currently used by Rmail to delete a mail window.

Under Emacs 24, notmuch breaks when this argument is passed to it by a
function in another part of Emacs.  One example of a functon that does
this is report-emacs-bug -- so notmuch users cannot file emacs bug
reports!

This patch also adds a &rest argument to the arg-list of this function,
to future-proof against such changes.  This is adapted from the approach
taken by message-mail, a similar function built into emacs.

This patch was originally submitted by richardmurri@gmail.com on Aug. 1:
id:"877h6x6oor.fsf@veracitynetworks.com"
2011-12-18 08:18:06 -04:00
David Bremner
47b5797261 build-system: use a shell variable for TMPFILE in debian-snapshot
Aaron Ecay points out in
id:"1324136185-4509-1-git-send-email-aaronecay@gmail.com" that the
mktemp in

     debian-snapshot: TMPFILE := $(shell mktemp)

Is being evaluated for every target. As best I can tell, this is
because make is evaluating the right hand side, even though it is not
doing the assignment.

Of course, it isn't quite as nice to edit with the line continuations,
but it is ideomatic make.
2011-12-18 06:39:53 -04:00
David Bremner
451c57d19a test: optionally print subtest number
The idea is that $test_count could be used in tests to label
intermediate files. The output enabled by this patch (and --debug)
helps figure out which OUTPUT.nn file belongs to which test in case
several subtests write to OUTPUT.$test_count
2011-12-18 06:33:27 -04:00
Thomas Jost
6dcd575d7b Fix build with binutils-2.22
binutils-2.22 changes the behaviour of ld by defaulting to
--no-copy-dt-needed-entries, which means that required objects/libs are not
"indirectly" linked through intermediate objects/libs anymore. As a consequence,
when using binutils-2.22, building symbol-test fails with the following error:

    /usr/bin/ld: test/symbol-test.o: undefined reference to symbol
    'std::basic_string<char, std::char_traits<char>, std::allocator<char>
    >::~basic_string()@@GLIBCXX_3.4'

    /usr/bin/ld: note: 'std::basic_string<char, std::char_traits<char>,
    std::allocator<char> >::~basic_string()@@GLIBCXX_3.4' is defined in DSO
    /usr/lib/libstdc++.so.6 so try adding it to the linker command line

    /usr/lib/libstdc++.so.6: could not read symbols: Invalid operation

An easy fix is to link using CXX instead of CC.
2011-12-17 21:54:21 -04:00
Aaron Ecay
1e3a37b83c Ignore dynamic libraries on OS X.
Parallel to ignoring .so for linux.
2011-12-17 21:50:05 -04:00
Ivy Foster
db352df09e emacs: Add notmuch-hello-mode-hook
Functions called after entering `notmuch-hello-mode'
2011-12-16 17:17:30 -04:00
Daniel Schoepe
3f02ba3406 emacs: Document notmuch-show-get-message-properties 2011-12-16 08:34:26 -04:00
Thomas Jost
430fb27b3e emacs: Add a face for crypto parts headers
Commit cb841878 introduced new parts handlers for crypto parts, but also
hardcoded values for their headers face. This replaces these hardcoded values
with a customizable face.
2011-12-15 22:51:24 -04:00
David Bremner
32e656f473 Revert "test: add emacs test for hiding a message following an HTML part"
This reverts commit c6a3a768fe.

This test is unreliable, showing BROKEN in some environments and FIXED
in others.  The confusion seems to outweigh the benefits, for now.

Conflicts:

	test/emacs
2011-12-15 08:00:08 -04:00
Tomi Ollila
ff91aeedc1 notmuch: unref charset_filter to fix one memory leak
In my test case added g_object_unref(charset_filter) reduces memory
consumption over 90% when 'notmuch show --format=text "*"' is
executed (~11000 messages, RES ~330M -> ~25M).
2011-12-15 07:38:06 -04:00
Jani Nikula
ed56fee6e5 emacs: support "notmuch new" as a notmuch-poll-script
Support nil value for notmuch-poll-script to run "notmuch new" instead of
an external script, and make this the new default. "notmuch new" is run
using the configured notmuch-command.

This allows taking better advantage of the "notmuch new" hooks from emacs
without intermediate scripts.

Signed-off-by: Jani Nikula <jani@nikula.org>
2011-12-15 00:20:11 -04:00
Jameson Graef Rollins
a06f7b6737 debian: add upstream-tag and fix debian-tag configs for git-buildpackage
Debian tags have been using '/', instead of '-' as a separator.
2011-12-15 00:20:11 -04:00
David Bremner
f717d2ece1 command-line-arguments.[ch]: make arrays of keyword descriptors const
It seems like it should never be necessary to modify these arrays after
initialization.
2011-12-13 00:00:44 -04:00
David Bremner
e00aeb4f85 test: add arg-test to .gitignore
This should have been done when the binary was added, oops.
2011-12-12 23:26:06 -04:00
David Bremner
518d4ef7d0 build-system: clean $(libutil_modules) rather than listing them individually.
This matches the way the other 'Makefile.local's work.
2011-12-12 11:54:16 -04:00
David Bremner
1df71b5510 cli: factor out config handling code to get/set lists.
Two new internal routines are created _config_get_list and
_config_set_list; the notmuch_config_get_* functions that deal with
lists are simply wrappers for these functions.
2011-12-12 11:16:01 -04:00
Jani Nikula
caae152772 test: add tests for hooks
Signed-off-by: Jani Nikula <jani@nikula.org>
2011-12-11 13:59:39 -04:00