Commit graph

868 commits

Author SHA1 Message Date
David Edmondson
1aae6daef7 emacs: Optionally check for missing attachments in outgoing messages
Query the user if the message text indicates that an attachment is
expected but no MML referencing an attachment is found.

This is not enabled by default - see the documentation for
`notmuch-mua-attachment-check'.
2019-03-28 14:37:07 -03:00
David Edmondson
235fdc52f4 emacs: Easy access to URLs mentioned in the current message
Add a new binding when looking at messages, B, that prompts with a
list of URLs found in the current message, if any. Open the one that
is selected in a browser.

amended by db: s/--browse-urls/-browse-urls/
2019-03-28 14:29:02 -03:00
Matt Armstrong
adde6dfaef Emacs: bind "g" to 'notuch-refresh-this-buffer
Using "g" for refresh operations is a pretty common Emacs convention,
codified by `special-mode' in simple.el.
2019-02-21 07:16:53 -04:00
David Bremner
3d0fd40eb0 Merge branch 'release' 2019-02-10 09:47:47 -04:00
Daniel Kahn Gillmor
3c752b855f emacs: Invoke gpg with --batch and --no-tty
When invoking gpg as a backgrounded tool, it's important to let gpg
know that it is backgrounded, to avoid spurious prompts or other
breakage.

In particular, https://bugs.debian.org/913614 was a regression in
GnuPG which causes problems when importing keys without a terminal,
but gpg expects one.

Ensuring that notmuch-emacs always invokes gpg as a background process
should avoid some of these unnecessary failure.

Thanks to Justus Winter for finding this problem.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-02-10 09:47:12 -04:00
David Bremner
87eb477ba5 notmuch 0.28.1 release
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAlxUOSIACgkQ8gKXHaSn
 nizwvAv8DPoLLssPfwY1AJtc7+JQzAl5scpkjJbGYlzXWTkhD14Efnb0FzMFulRG
 fG4gpsqFA9iNJGT2uTKtYRvKayoMNQMk2eSk8IKyINIVO/jclNbsaSFhL7vqyzsm
 8l+A1UBQ2BsmUsv58ImoS/F65iF2ZBXu5OEEzqxzL+m+WBh9rNyuBaN4Arr64eVy
 f0V/CWYr9VmauuWg0UW3lZ2kwT2+eJDdw7/UwkdeaesuqypPrb+PyRbSDozr4yEj
 n+l0LsbP2iN2i8b0MBNS1vf9fSkUxhBmLzSoqJWbsEZFKwXLFTp5+TLyVxYDzKO5
 D5ug22DG4VFUOmvBaKkMdnavr8z0QZrfL1/z6998Ux+iYG/YrITsrAv02+BxXr5a
 MPmmhW+9x5AZBSP/qasvNCu/Zhczcu/DZ0oUe5qLXTY0yPsOWZRv/+iAWTxXbk+Q
 iS5wbmeZsF/WSH1l3vtK9PnD1wePqITQPK22bKCjSXhPxWOO6AxNcfpy3/lsZ2j2
 9NPLfpFl
 =G2Qd
 -----END PGP SIGNATURE-----

Merge tag '0.28.1'

notmuch 0.28.1 release
2019-02-01 08:35:20 -04:00
David Bremner
617b36f3d1 emacs: use ".ps" suffix for PostScript temporary files.
Joerg Jaspert [1] reported problems with evince reading unsuffixed
temporary files in Debian.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920856
2019-01-30 07:15:59 -04:00
David Bremner
0a9fc49b90 emacs: build docstring (rsti) files
These are intended to included in the sphinx manual for notmuch-emacs.
The stamp file makes it easier to depend on the docstrings from other
parts of the build
2018-12-08 08:49:31 -04:00
David Bremner
1ac110c12e emacs: initial version of rstdoc.el
This small library is intended to support batch extraction of Emacs
Lisp docstrings from source files. Clients will need to include (or
replace) rstdoc.rsti.
2018-12-08 08:45:48 -04:00
William Casarin
0d0e2869b9 emacs: filter tag completions by current query
When filtering by tags in notmuch-search-filter-by-tag, only return tags
related to the current query.

Before, it was returning all tags. There's no reason to refine the
current query with tags that don't exist in the current result set.

Signed-off-by: William Casarin <jb55@jb55.com>
2018-12-06 21:22:40 -04:00
David Bremner
7f726c6e87 emacs: escape quote in docstring
This prevents emacs from turning it into a fancy, non-evaluable
docstring (and also makes it easier to deal with during extraction to
sphinx).
2018-10-21 10:30:51 -03:00
David Bremner
5e98bdc3be emacs: require notmuch-lib from notmuch-wash.el
This is needed so that notmuch-wash.el is loadable by itself; in
particular for the docstring processing.
2018-10-21 10:30:32 -03:00
David Edmondson
329a8c7fce emacs: Update integration with third party packages.
`mm-inline-text-html-with-images' was removed from mm-decode.el in
2016 and replaced with `mm-html-inhibit-images'.

`gnus-select-frame-set-input-focus' was removed from gnus-util.el in
2016 and existed only for XEmacs compatibility.
2018-10-08 12:50:34 -03:00
David Edmondson
e8cb6b2cd6 emacs: Call `notmuch-mua-send-hook' hooks when sending a message
Previously any hook functions attached to `notmuch-mua-send-hook' were
ignored.
2018-09-28 20:22:42 -03:00
David Bremner
ef07e3f3bd build: install notmuch-emacs-mua with absolute shebang
Follow distro-centric rules to reduce the chance of surprising
behaviour due to PATH changes
2018-09-18 07:34:33 -03:00
David Edmondson
cfd015bda4 emacs: Kill the stderr buffer when an async process completes
On some platforms (e.g. macOS), it is necessary to add a real sentinel
process for the error buffer used by `notmuch-start-notmuch' rather
than a no-op sentinel.
2018-08-29 06:27:59 -03:00
David Bremner
95f441b06b doc: install info files in elpa package
The duplication of effort in installing into different places seems
unavoidable; or more precisely not worth avoiding by more extensive
gnu-make-isms.
2018-05-26 08:26:22 -07:00
Daniel Kahn Gillmor
c20a5eb805 move more http -> https
Correct URLs that have crept into the notmuch codebase with http://
when https:// is possible.

As part of this conversion, this changeset also indicates the current
preferred upstream URLs for both gmime and sup.  the new URLs are
https-enabled, the old ones are not.

This also fixes T310-emacs.sh, thanks to Bremner for catching it.
2018-05-03 20:59:20 -03:00
Georg Faerber
c117306f2d Fix typos as found by codespell
Signed-off-by: Georg Faerber <georg@riseup.net>
2018-03-24 20:09:54 -03:00
Daniel Kahn Gillmor
54982e520c fix typos 2018-01-04 20:35:58 -04:00
Daniel Kahn Gillmor
af8255fb71 cli/reply: make --decrypt take a keyword
This brings the --decrypt argument to "notmuch reply" into line with
the other --decrypt arguments (in "show", "new", "insert", and
"reindex").  This patch is really just about bringing consistency to
the user interface.

We also use the recommended form in the emacs MUA when replying, and
update test T350 to match.
2017-12-29 16:45:55 -04:00
Daniel Kahn Gillmor
8ea4a99d74 cli/show: make --decrypt take a keyword.
We also expand tab completion for it, update the emacs bindings, and
update T350, T357, and T450 to match.

Make use of the bool-to-keyword backward-compatibility feature.
2017-12-29 16:45:46 -04:00
David Bremner
040c3236af Merge branch 'release'
Conflicts:
        NEWS

Add in NEWS from point release
2017-12-08 22:19:06 -04:00
Tomi Ollila
f55e9a3bda emacs: letf enriched-decode-display-prop for text/enriched display
Dynamically bind enriched-decode-display-prop when inserting
text/enriched part. This complements commit 9b05823838 for
emacs versions before 24.4 which do not have advice-add
functionality.

Since emacs 25.3 this particular bug is fixed.
2017-12-08 20:35:41 -04:00
Jani Nikula
b2b65b4e6d emacs: sanitize subject in replies
Commit a7964c86d1 ("emacs: Sanitize authors and subjects in search
and show") added sanitization of header information for display. Do
the same for reply subjects.

This fixes the long-standing annoying artefact of certain versions of
mailman using tab as folding whitespace, leading to tabs in reply
subjects.
2017-09-27 08:15:02 -03:00
David Bremner
ff6d3b6489 emacs/address: use member instead of memq to check for pair
Quoting from the elisp reference:

     For other types (e.g., lists, vectors, strings), two arguments
     with the same contents or elements are not necessarily ‘eq’ to
     each other.

Thanks to "Attic Hermit" for the fix.
2017-09-12 22:17:32 -03:00
David Bremner
4366895062 notmuch 0.25.1 release
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAlm3OCwACgkQ8gKXHaSn
 niz5Swv/bhm/cSBRoav7deonMPfAAqloeNSdCpcOksEvGFtn6PZMHPDLfQ0DORcb
 pHIfGnrIpGFKlOZ8zO4Q3ANhito7hCCaasn6k70Zhpu5KV+YMCKMABtnho1p3jKT
 elK/3tkvlcWFEgRBVbuLsTn/iYFz8kaukfRyh+BhlchJSifSZQDFaPnmxOCvOfNK
 Aipp7o/yAQGgiXUczISgceirOEruq3QePC9Bjbzj3UKa5D/UUqki37xlojl9dUC7
 eNmt/grittR4e0eU5ytKck5KlVwxirs9U3Hm9A8o9giWkk98lJYobLXpDFPQ8Ock
 7GGIMyP3DGBGTfn5mswKUdiEsuCgobH47y4RBd0jpSyTpFDSTD/BTYTiU/kSa8k4
 XNO9uS4+jrgUJ4rfrZYK1VNXfQ85L17zZCpgeGgV+XguVcLKwQEjQ945/wk32pVh
 03vdQX57myPLWeWVo5pIB0qzKeuEuaZ5b2m1QngHYUgROEm5PZnBGGHkgS50dNxp
 5156wSur
 =dTj5
 -----END PGP SIGNATURE-----

Merge tag '0.25.1'

notmuch 0.25.1 release (bugfix for emacs bug 28350)
2017-09-11 22:32:00 -03:00
Jani Nikula
9b05823838 emacs: override enriched-decode-display-prop for text/enriched display
Switch to a local version of enriched-decode-display-prop if we
encounter a text/enriched part. This is to mitigate
https://bugs.gnu.org/28350. Normally it would be prudent to remove the
override afterwards, but in this case just leave it in.

Notes from db:
      This doesn't disable text/enriched, just one feature of it.
2017-09-11 22:08:01 -03:00
Vladimir Panteleev
1348212cb0 emacs: Refuse requests to refresh tree views while a refresh is running
notmuch-tree did not protect against concurrent refreshes like
notmuch-search, meaning, hitting '=' (notmuch-refresh-this-buffer)
quickly will spawn multiple parallel notmuch processes, and clobber
the existing results in the current buffer.

* notmuch-tree.el: Add a guard to notmuch-tree-refresh-view similar to
  the one in notmuch-search.
2017-09-05 21:50:03 -03:00
Vladimir Panteleev
d7a49e8199 notmuch-tag.el: Fix minor grammar error 2017-08-23 08:08:01 -03:00
Vladimir Panteleev
fdf2b3007a emacs: Use make-process when available
make-process is a new function introduced in Emacs 25, which provides
greater control over process creation. Crucially, it allows
separately redirecting stderr directly to a buffer, which allows us to
avoid needing to use the shell to redirect to a temporary file in
order to correctly distinguish stdout and stderr.

* notmuch-lib.el: Use make-process when it is available; fall back to
  the previous method when not.
2017-08-20 08:33:09 -03:00
Vladimir Panteleev
69946c47c9 emacs: Refactor subprocess stderr propagation
Load subprocess error output to a string in the callers, and propagate
the error messages as a string parameter instead of a path to file
names.

Required to be able to avoid using temporary files for subprocess
error output.

* notmuch-lib.el: Update notmuch-check-async-exit-status,
  notmuch-check-exit-status: accept an err parameter instead of
  err-file; shift the responsibility of loading error messages from
  files up the call stack.
2017-08-20 08:32:47 -03:00
Jani Nikula
cb5253578d emacs: set query-context to nil if its "" or "*"
The queries "" and "*" are special cased in the notmuch library to
match all messages, but only if they're the entire query. They can't
be combined with other queries, such as "* AND foo", in which case
they "leak" down to the Xapian query parser.

Notmuch show and tree buffers inadvertently combine the thread query
with said special queries, causing incorrect collapsing of
messages. Handle the special queries specially. We already do a
similar thing in notmuch-search-filter.
2017-08-20 08:32:07 -03:00
Vladimir Panteleev
ca4688e103 Use rooted paths in .gitignore files
A leading / in paths in a .gitignore file matches the beginning of the
path, meaning that for patterns without slashes, git will match files
only in the current directory as opposed to in any subdirectory.

Prefix relevant paths with / in .gitignore files, to prevent
accidentally ignoring files in subdirectories and possibly slightly
improve the performance of "git status".
2017-08-18 19:42:35 -03:00
David Bremner
c28ac94abf emacs: Add commentary for MELPA users
We have a steady trickle of people using notmuch-emacs from melpa with
distro packages of notmuch, and then being confused when it doesn't
work. Try to warn people what a foot-gun this is; this commentary
should be copied to the melpa web site.
2017-07-20 07:01:17 -03:00
David Bremner
1d82110f83 emacs: convert remaining format-versions from 3 to 4
This is needed for consistent beheviour between notmuch built against
gmime-2.6 and gmime-3.0 w.r.t. error reporting.
2017-07-18 06:57:26 -03:00
David Bremner
f1bcb6b7c2 emacs: change default for notmuch-crypto-process-mime to t
There are some cases like remote usage where this might cause
problems, but those users can easily customize the variable. The
inconvenience seems to be outweighed by the security benefit for most
users.
2017-07-15 09:11:32 -03:00
Kyle Meyer
37d1fa5672 emacs: tree: drop repeated "of" from docstring 2017-07-10 21:58:30 -03:00
David Bremner
e1b7d32db0 cli: implement structured output version 4
Since the error field is unused by the emacs front end, no changes are
needed other than bumping the format version number.

As it is, this is a bit overengineered, but it will reduce duplication
when we support gmime 3.0
2017-07-04 08:32:44 -03:00
David Bremner
b6f87c3085 emacs: convert to use format-version 3
Keeping the emacs interface running old format-versions makes it
impossible to test new format-versions or deprecate old ones.
2017-07-04 08:32:28 -03:00
Tom Hinton
d848d4040a Fix minor mistake where indentation width is ignored 2017-06-30 08:55:16 -03:00
Damien Cassou
3840b6b495 Add indentation to imenu in notmuch-show 2017-06-30 08:33:29 -03:00
Piotr Trojanek
c9deb32933 remove extra space in Emacs prompt
Trivial: fix extra space in the "Insert failed" Emacs prompt message.
2017-06-25 09:57:48 -03:00
Damien Cassou
a83ab29930 Add Emacs' imenu support in notmuch-show and notmuch-search
Emacs' major modes can facilitate navigation in their buffers by
supporting Imenu. In such major modes, launching Imenu (M-x imenu)
makes Emacs display a list of items (e.g., function definitions in a
code buffer). Selecting an item from this list moves point to this
item.

This patch adds Imenu support to both notmuch-show and notmuch-search
buffers:

* in notmuch-show, Imenu will present a list of all messages in the
  currently visible thread;

* in notmuch-search, Imenu will present a list of all messages in the
  search buffer.
2017-06-14 07:49:08 -03:00
Tomi Ollila
427fa5e6e6 emacs: with prefix argument, notmuch-show-stash-date stashes timestamp
Using timestamp of a message is useful in many Xapian queries.
2017-05-30 08:54:35 -03:00
David Bremner
523d2b50fc Merge branch 'release'
Emacs bug fix from Mark
2017-05-13 08:51:10 -03:00
Mark Walters
2d79d38a0f emacs: tree: bugfix: specify --format-version
Previously notmuch tree did not specify the format-version when
calling notmuch. This meant that when the structured output was
slightly changed (in commit 14c60cf168)
stash filename broke. This fixes this breakage by specifying the
format-version.
2017-05-13 08:47:04 -03:00
David Bremner
0b76e4a6f4 emacs/notmuch.el: don't use 'function' as variable name.
In principle this should work, but at least in some pre-release
versions of emacs26, this causes problems inside lexical let [1].

[1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26406
2017-04-20 06:58:32 -03:00
John Byrnes
f0d06c8ca3 emacs: use epg-gpg-program
Adjusted notmuch-crypto gpg call-process function to respect
the GPG program set by the EasyPG epg-gpg-program variable.

This is to correct a problem observed on NixOS where only gpg2 is
installed by default. The Notmuch Emacs frontend fails when trying to
access someone's key to verify their signature when it cannot find the
GPG binary.
2017-03-13 21:12:14 -03:00
Mark Walters
95e9c137e1 emacs: compat: backport fix for folding long headers when sending
This backports the fix from emacs master (commit
77bbca8c82f6e553c42abbfafca28f55fc995d00) to notmuch-emacs to wrap
long headers.

This fixes the test introduced in the previous changeset.
2017-03-04 21:16:42 -04:00