Commit graph

4869 commits

Author SHA1 Message Date
Mark Walters
3270eea39f emacs: hello: fix accidental modification of widget-keymap
In emacs24 we use make-composed-keymap. It seems that if only a single
map is specified then emacs just resuses it rather than creating a
copy of it. Thus use make-sparse-keymap to force a copy.
2015-11-23 08:36:52 -04:00
Steven Allen
c946356cdc forbid atomic transactions on writable, upgradable databases
We can't (but currently do) allow upgrades within transactions because
upgrades need their own transactions. We don't want to re-use the
current transaction because bailing out of an upgrade would mean loosing
all previous changes (because our "atomic" transactions don't commit
before hand). This gives us two options:

1. Fail at the beginning of upgrade (tell the user to end the
   transaction, upgrade, and start over).
2. Don't allow the user to start the transaction.

I went with the latter because:

1. There is no reason to call `begin_atomic` unless you intend to to
   write to the database and anyone intending to write to the database
   should upgrade it first.
2. This means that nothing inside an atomic transaction can ever fail
   with NOTMUCH_STATUS_UPGRADE_REQUIRED.
2015-11-23 08:15:37 -04:00
Tomi Ollila
a79936cd6f emacs/Makefile.local: notmuch-lib.elc depend on notmuch-version.elc
emacs/make-depend.el will compute all other related dependencies
except this one:

notmuch-version is not top-level `require' expression in
notmuc-lib.el[c] but conditional based on the existence of
notmuch-version.el[c].

emacs/make-depend.el does not know now notmuch-version.el[c] becomes
into existence but emacs/Makefile.local does know.
2015-11-23 08:14:46 -04:00
David Bremner
d98c0854b8 test: add sanity tests for threading
These tests are inspired by a problem report

      id:CAJhTkNh7_hXDLsAGyD7nwkXV4ca6ymkLtFG945USvfqK4ZJEdQ@mail.gmail.com

Of course I can't duplicate the mentioned problem, it probably depends
on specific message data.
2015-11-23 08:08:26 -04:00
Tomi Ollila
bfb7098514 emacs: notmuch-show-view-raw-message clears buffer, makes it read-only
notmuch-show-view-raw-message() re-uses buffer created with same
name (same Message-Id:) but it did not erase it before filling.
If this ever happened, there were duplicated (potentially overlapping)
content in the buffer. Now this is fixed.
Apparently since emacs 24.5 the (view-buffer) makes the buffer read-only;
so this problem would not have happened there, just that
notmuch-show-view-raw-message() failed. This is fixed by setting
inhibit-read-only t before erasing and filling the buffer. The emacs 24.5
feature having raw message buffer read-only is also now explicitly set to
the buffer so the same experience is available with emaces < 24.5.
2015-11-21 08:02:10 -04:00
Daniel Schoepe
40325352db test: Tests for combining --batch and --remove-all
This patch adds some tests for combining --remove-all with --batch or
--input when calling notmuch-tag.
2015-11-19 07:51:14 -04:00
Daniel Schoepe
8b5644e63d cli: Allow combining --remove-all and --batch
This patch removes the restriction on notmuch-tag that disallows using
both --remove-all and --batch. Combining the two options removes tags
on all messages affected by each query before applying the new tags.
2015-11-19 07:50:58 -04:00
Jani Nikula
1abc338331 cli: content disposition values are not case-sensitive
Per RFC 2183, the values for Content-Disposition values are not
case-sensitive. While at it, use the gmime function for getting at the
disposition string instead of referencing the field directly.

This fixes attachment display and quoting in notmuch show and reply,
respectively.
2015-11-19 07:47:29 -04:00
Jani Nikula
506b81679a lib: content disposition values are not case-sensitive
Per RFC 2183, the values for Content-Disposition values are not
case-sensitive. While at it, use the gmime function for getting at the
disposition string instead of referencing the field directly.

This fixes "attachment" tagging and filename term generation for
attachments while indexing.
2015-11-19 07:47:29 -04:00
David Bremner
c1c955786a tests: add test for case insensitive Content-Disposition
This is broken now, but will be fixed in the next commit
2015-11-19 07:46:03 -04:00
Tomi Ollila
e870d73dc8 notmuch-emacs-mua: set EMACS{,CLIENT} variables to defaults when empty
... in addition to doing this when these variables are unset.

It is more useful to use defaults (emacs or emacsclient) than empty
string as a command name.
2015-11-19 07:35:22 -04:00
Tomi Ollila
36ad271704 devel/release-checks: added checking of copyright year in documentation
Check that copyright year will be current year in generated documentation.

Checking is done my matching that copyright line contains current year
as a substring which is good enough "approximation" in this context.
2015-11-19 07:34:29 -04:00
David Bremner
edae844efa Merge branch 'release' 2015-11-19 07:33:01 -04:00
David Bremner
1432a4f946 debian: another upload to work around gdb bugs 2015-11-14 19:08:12 -04:00
David Bremner
e0557c5354 debian: release 0.21-2, architecture specific fixups 2015-11-12 09:01:09 -04:00
Michal Sojka
55fb7da650 emacs: Make notmuch-message-mode play nicely with flyspell
Flyspell mode uses a special setting for message-mode to not
spell-check message headers except Subject. Apply this setting also to
notmuch-message-mode.
2015-11-09 22:25:25 -04:00
H. J. Illikainen
cbf2448bb1 emacs: Fontify From with message-header-other
Commit e26d767897 changed the
fontification of the body associated with the From header to
message-header-from.  However, that face is non-existent, and in
message.el (message-font-lock-keywords) the From-header falls through
and is attributed the message-header-other face.

This commit removes the fontification of the [Ff]rom header in
notmuch-show-mode in order to fontify it using the message-header-other
face.

This only affects non-default configurations where
notmuch-message-headers is set to display From.
2015-11-09 22:25:05 -04:00
David Bremner
ca076ce273 notmuch 0.21 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJWM0N+AAoJEPIClx2kp54swEkL/iJw6/o4I9n+0PUR0saoAWXs
 4Zhe0rawIrFcCHp0/muI8EVEIFs5GGZ3Rb0BOA65Ue3WpZamqSV8LweuKD2+aDi0
 LbFIgWgSMmN73EIR9p/2DNrhs84kmOZ+CGylEf7Uc2Zzjg+vgplXL0T5bkLidxyP
 odpGVqFj+TDggJofExAdXLTDnOyvkwlHRr3x+Ak95y4NkCjD1E0ElndV2OPX8E3I
 vgfEV3Hf5P2u2Z4VcjdJ0CUf0EG1oKsN5l4b1zjqez9NBFzeyCUzwxJknfdWzHWA
 wZtp692dTCzQWFT+84ilueUIzRsQakr/rJzbGH1KaJJ0MmGAHyhuXgv1gsg+nb1z
 kWQdnGVHAMCKNKwx54M1d7EnnYMfac76vNB++p1114zYxhlhTHekTbfpduTW+oEe
 Tst59rb3sAapNxLvXVvPh/y0N7VFjMm2ZDnusxmi1cS0eYBUu4x6G/50Y4Id1UxP
 +5R156kFeX+PzKHvZK32TE+1mJ4o/FwgHN3Ubw9KnQ==
 =H3CG
 -----END PGP SIGNATURE-----

Merge tag '0.21'

notmuch 0.21 release
2015-10-30 07:33:48 -03:00
David Bremner
bf511cb697 release: disable wget certificate check
this is a minor security hole, but no worse than what we had before. In
particular the worst that happens is someone prevents us from making a
release. Which is hardly worth the trouble of jacking the URL.
2015-10-30 07:14:41 -03:00
David Bremner
1dd0ec3991 NEWS: set date 2015-10-29 20:08:11 -03:00
David Bremner
5f326b3894 debian: changelog stanza for 0.21 2015-10-29 20:07:04 -03:00
David Bremner
cd04880d38 version: bump to 0.21 2015-10-29 19:57:30 -03:00
Mark Walters
d2ee45e0be NEWS updates for some extra emacs functionality 2015-10-29 19:56:00 -03:00
Steven Allen
10e933a3bb Documentation: fix type name spelling 2015-10-27 08:07:31 -03:00
Michal Sojka
4acbc1f7d3 Emacs: Add address completion based on company-mode
When company-mode is available (Emacs >= 24), address completion
candidates are shown in a nice popup box. This is triggered either by
pressing TAB or by waiting a while during typing an address. The
completion is based entirely on the asynchronous address harvesting
from notmuch-address.el so the GUI is theoretically not blocked for
long time.

The completion works similarly as the TAB-initiated completion from
notmuch-address.el, i.e. quick harvest based on user input is executed
first and only after full harvesting is finished, in-memory cached data
is used.

[Improved by David Bremner]
2015-10-27 08:01:15 -03:00
Michal Sojka
89f78d38c1 Emacs: Add address completion mechanism implemented in elisp
Currently, notmuch has an address completion mechanism that requires
external command to provide completion candidates. This commit adds a
completion mechanism inspired by https://github.com/tjim/nevermore,
which is implemented in Emacs lisp only.

The preexisting address completion mechanism, activated by pressing
TAB on To/Cc lines, is extended to use the new mechanism when
notmuch-address-command to 'internal, which is the new default.

The core of the new mechanism is the function notmuch-address-harvest,
which collects the completion candidates from the notmuch database and
stores them in notmuch-address-completions variable. The address
harvesting can run either synchronously (same as with the previous
mechanism) or asynchronously. When the user presses TAB for the first
time, synchronous harvesting limited to user entered text is performed.
If the entered text is reasonably long, this operation is relatively
fast. Then, asynchronous harvesting over the full database is triggered.
This operation may take long time (minutes on rotating disk). After it
finishes, no harvesting is normally performed again and subsequent
completion requests use the harvested data cached in memory. Completion
cache is updated after 24 hours.

Note that this commit restores (different) completion functionality for
users when the user used external command named "notmuch-addresses",
i.e. the old default.  The result will be that the user will use
the new mechanism instead of this command. I believe that many users may
not even recognize this because the new mechanism works the same as
http://commonmeasure.org/~jkr/git/notmuch_addresses.git and perhaps also
as other commands suggested at
http://notmuchmail.org/emacstips/#address_completion.

[This feature was significantly improved by David Bremner and Mark Walters]
2015-10-27 08:01:05 -03:00
David Bremner
0e671478c6 emacs: replace use of notmuch-address-message-insinuate
This allows e.g. Gnus users to load this file without changing
message-mode behaviour.

This will disable completion for those that did not customize the
variable but relied on the existence of a file named "notmuch-addresses"
in their path. In the next commit the default behaviour will change to
use a "workalike" internal completion mechanism.
2015-10-27 08:00:49 -03:00
David Bremner
6814a1cf73 debian: release 0.21~rc3-3
Build-conflict with gdb-minimal, since there is no gdb-python to depend
on
2015-10-25 22:09:56 -03:00
David Bremner
dea50d94fa debian: bug fix upload for #802952 2015-10-25 13:44:06 -03:00
David Bremner
9fce0e2c79 debian: start changelog entry for 0.21 2015-10-23 07:54:29 -03:00
David Bremner
e387c08599 NEWS: trim discussion of keybindings
Try to reduce the total size of NEWS
2015-10-22 09:19:21 -03:00
David Bremner
246d540dbe version: bump to 0.21~rc3 2015-10-22 09:19:21 -03:00
Mark Walters
429ec8666e NEWS for minor emacs updates
This adds NEWS items for

     the new limit/filter function in notmuch-show,

     the saved-search option for tree view,

     the binding S to run the current tree-view search in notmuch-search,

     the increase in max text part size

     the bugfix for replying to encrypted messages from tree view
2015-10-22 07:44:13 -03:00
Mark Walters
32becfa37a emacs: hello: bugfix: update docs for saved-searches
Update the documentation string for notmuch-saved-searches to include
the new :search-type option.
2015-10-22 07:43:54 -03:00
Jani Nikula
4cff5a9f98 completion: complete lastmod: search prefix 2015-10-21 21:30:15 -03:00
Jani Nikula
23180439cb completion: clean up top level completion
Add note about missing features.
2015-10-21 21:29:53 -03:00
Jani Nikula
cd4814ecb3 completion: complete shared options for each command
Add support for completing --help, --uuid=, and --version after the
subcommand. Do not support shared options at the top level yet due to
difficulties in handling options with arguments.

--uuid necessitates adding 'compopt -o nospace' also to notmuch new
completion, but that just brings it in line with the rest.
2015-10-21 21:29:20 -03:00
Jani Nikula
326824aee3 completion: complete notmuch count --lastmod 2015-10-21 21:22:02 -03:00
Jani Nikula
ddbda8f501 completion: handle notmuch address --deduplicate= option
Complete notmuch address --deduplicate=(no|mailbox|address).
2015-10-21 21:21:45 -03:00
Mark Walters
f9d2ccf67b emacs: tree: bind S to run current query in search mode 2015-10-21 09:14:07 -03:00
Mark Walters
391d9f9420 emacs: allow saved searches to select tree-view
This patch allows the user to customize a saved search to choose tree
view rather than the default search view. It also updates notmuch-jump
so that it respects this choice.
2015-10-21 09:13:55 -03:00
Jani Nikula
bf719963a7 man: clarify the parameters for lastmod: range query
<since> and <until> for the lastmod: prefix right below the date:
prefix description give the impression one could use last modified
dates to lastmod: which is not at all the case. Use
<initial-revision>..<final-revision> instead.
2015-10-21 09:13:33 -03:00
Tomi Ollila
d689a73e6d NEWS: a few formatting updates for 0.21 news items (wiki compatibility)
Trailing dots were removed from 3 NEWS items so that those appear in
same level as surrounding "heading" lines in generated wiki page.

One trailing dot was added to nmbug-status item so it appears as normal
text in generated wiki page. `nmbug-status` was put in backticks so it
looks the same as in older nmbug-status news text.
2015-10-21 09:13:01 -03:00
David Bremner
8285f9b145 debian: changelog stanza for 0.21~rc2-1 2015-10-19 07:26:04 -03:00
David Bremner
34e620b91d version: bump to 0.21~rc2 2015-10-19 07:12:18 -03:00
Jani Nikula
ea66dec878 NEWS: news for notmuch_directory_delete 2015-10-17 16:54:43 -03:00
Jani Nikula
25676b6201 NEWS: news for notmuch address --deduplicate option 2015-10-17 16:52:23 -03:00
Jani Nikula
4135e5b929 NEWS: news for date:<expr>..! 2015-10-17 16:50:06 -03:00
Jani Nikula
2c202df6ba NEWS: nmbug-status supports sort order 2015-10-17 16:29:22 -03:00
David Bremner
f47fcbe0c5 NEWS: note some Emacs UI changes for 0.21 2015-10-17 10:14:23 -03:00