Commit graph

6577 commits

Author SHA1 Message Date
Jonas Bernoulli
d931758a15 emacs: define new notmuch-search-item widget type
This is complex enough to warrant a dedicated widget type,
which will make future improvements less messy to implement.
2021-01-13 06:57:14 -04:00
Jonas Bernoulli
d7b83385af emacs: sanitize dedicated widget action/notify functions
These functions are used as action/notify functions.  That dictates
the appropriate function signatures but even though these functions
are not used for anything else they use incompatible signatures,
forcing the callers to use lambda expressions to deal with these
incompatibilities.

Fix that by adjusting the function signatures to the needs of the
only intended callers.

Two of these functions were defined as commands but because the
interactive form did not return the mandatory arguments, we know
that nobody (successfully) used these as commands.

In one case we move the location of a y-or-n-p prompt.
2021-01-13 06:56:50 -04:00
Jonas Bernoulli
5b19e6e1b4 emacs: use setq instead of set
Commonly `set' is only used if there is no way around it;
i.e. when the variable cannot be known until runtime.
2021-01-13 06:56:40 -04:00
Tomi Ollila
a12bf2a52a nmbug: notmuch-report: set both background and foreground colors
Whenever setting background color, set also corresponding
foreground color. Don't expect default foreground color to
be #000 (or something close); user may have changed it.
2021-01-09 11:29:07 -04:00
Daniel Kahn Gillmor
c4cce82fa0 docs: drop deprecated doxygen TCL_SUBST flag
notmuch has no tcl code, and doxygen upstream is deprecating/removing
tcl support anyway:
48a7afc0ca
2021-01-09 11:25:43 -04:00
David Bremner
0f37509cc7 Merge branch 'release' 2020-12-26 15:20:32 -04:00
David Bremner
1692fe7aa8 debian: skip gdb based tests on hppa 2020-12-26 15:14:27 -04:00
Jonas Bernoulli
0251cab3ab Revert "emacs: notmuch-search: avoid wiping out buffer-local variables"
This reverts commit f9fbd1ee3b.

Emacs provides a mechanism for avoiding wiping out buffer-local
variables: marking them as "permanent local", which essentially
means "don't wip out the local value when enabling major-mode".

  (put 'the-variable 'permanent-local t)

See (info "(elisp)Creating Buffer-Local").

Whether refreshing the buffer contents should involve re-enable the
mode is a different question, which should not be decided based on
the fact that we want keep the value of some random variable, not
least because some other (e.g. cache) variables are likely expected
to be wiped.
2020-12-25 14:32:56 -04:00
David Bremner
1331888374 Merge branch 'release' 2020-12-25 12:56:57 -04:00
David Bremner
0cd4ec8a3b Commit Debian 3.0 (quilt) metadata
[dgit (9.12) quilt-fixup]
2020-12-25 12:39:26 -04:00
David Bremner
aee34fdca3 debian: drop debian/patches
These were originally committed by git-debrebase. Unfortunately git
debrebase does not seem to like the notmuch git workflow, so giving up
on it for now.
2020-12-25 12:37:18 -04:00
David Bremner
d812256aeb debian: don't tag debian tag at release is made.
This reflects a change in the debian workflow to use dgit, which does
the tagging for us.  It also leaves room for debian specific fixups.
2020-12-25 12:28:31 -04:00
David Bremner
a103c15986 NEWS: add news for 0.31.3 2020-12-25 12:28:31 -04:00
David Bremner
784e5f4242 debian: changelog for 0.31.3-1 2020-12-25 11:49:32 -04:00
David Bremner
c7596d0e7d version: bump 0.31.3 2020-12-25 11:42:12 -04:00
David Bremner
6d5d28c593 test/T360-symbol-hiding.sh: trim extra output from readelf
readelf on (at least) ppc64le sometimes generates some extension to
the Ndx name inside '[]'. Remove this output to allow our simple
column based parsing to work.
2020-12-25 11:36:33 -04:00
Johannes Larsen
f01f6405c9 python/notmuch2: fix exclude tag handling
A typo in Database._create_query lost the exclude_tag names during the
string to utf-8 conversion.

Amended by DB: fixed patch format and updated commit message.
2020-12-25 11:25:25 -04:00
David Bremner
2702050340 lib/config: delay setting talloc destructor
If Xapian has thrown an exception, it is not safe to invoke the
destructor when freeing the list struct.

(cherry picked from commit 43ba5ed7ec)
2020-12-23 19:48:43 -04:00
David Bremner
22d9094300 lib: factor out notmuch_database_open* related code to own file
Reduce the size of database.cc, and prepare for extending the database
opening API
2020-12-23 09:25:01 -04:00
David Bremner
76871fcf5e test: add regression test for searching with alternate config
Make sure upcoming changes to config handling do not break command
line specification.
2020-12-23 09:23:42 -04:00
David Bremner
43ba5ed7ec lib/config: delay setting talloc destructor
If Xapian has thrown an exception, it is not safe to invoke the
destructor when freeing the list struct.
2020-12-23 09:22:24 -04:00
David Bremner
3b40978241 lib: factor out prefix related code to its own file
Reduce the size of database.cc, and limit the scope of prefix_table,
make sure it's accessed via a well-defined internal API.
2020-12-23 09:21:17 -04:00
David Bremner
e34e2a68b6 lib: factor out feature name related code.
database.cc is uncomfortably large, and some of the static data
structures do not need to be shared as much as they are.

This is a somewhat small piece to factor out, but it will turn out to
be helpful to further refactoring.
2020-12-23 09:06:34 -04:00
David Bremner
59488ee929 test: use keys with group 'test' in T590-libconfig
In a future commit we want to interoperate better with glib KeyFiles,
which need groups for all keys.
2020-12-20 07:46:18 -04:00
David Bremner
ced341e82e notmuch release 0.31.2-5 for unstable (sid) [dgit]
[dgit distro=debian no-split --quilt=linear]
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAl/WCisACgkQA0U5G1Wq
 FSHg5A//dKLbRIGCZiwGfBqyVd0B46+R+mrI2Tg5/i71gx8BhIhIMMc5u+SfIW1i
 izFszD5ygRXwgsqGgYy2dRBWDbA/2sxbmnyETPlDjT/H/xjXWetSh4mKTAo9WsnQ
 9yFisRFjD+YeDXBZRht0cvt170IuY335mSyJRCPNjc9pVE6hnZX5FLjWQOQjekog
 oKbP+WZcA26dnJWiFLmrogXwL2nUS19KLspNGqqYjycyrgGiAM0adlymJT0B+vSM
 zt6bXAFdwc2M6Luy79n9faEF03Z3DILkIuB8UcOOSuKwpQHS3eC7kQTaquqKUkf7
 lk98WT1GnQrw7V3djV6mvmwzH2eC8ytnOWDfllbsYe6BgbkJirROZEPEkEaApkY6
 EXrSxHmdsPrvyEKGg/+rKsN7pO4wxtFAGTd3Ltu3XQ7jcnqw2oP+X6rf2Z1rSAEt
 qSQ5gaod3yW5ycD+b+/BNGusWHaF4VzLmx+7ACtVq4pJffUAyfkFog9zeHHjUNgd
 1agIwJ+Kdkn3+R0sk4eBDX80AVf3542Fwq/5idFyYuVC3G+yvP6L9Q0Ewl+MZ88R
 Rc60pIRvKDGZyjF9K//xJECbrf2NNZkvPBgHlZ//6deRuOInDk+V2OQdxFUneVli
 BHj4S1G51Tt7zo6vpV+O4W70H9RC4I7UbOCi++6l4Ny7L9bEGtY=
 =5Rz/
 -----END PGP SIGNATURE-----

Merge tag 'debian/0.31.2-5'

notmuch release 0.31.2-5 for unstable (sid) [dgit]

[dgit distro=debian no-split --quilt=linear]
2020-12-13 08:37:47 -04:00
David Bremner
17540b73e8 Commit Debian 3.0 (quilt) metadata
[dgit (9.12) quilt-fixup]
2020-12-13 08:25:39 -04:00
David Bremner
9ebfe9d6ca debian: changelog for 0.31.2-5 2020-12-13 08:25:29 -04:00
David Bremner
82faa059b8 test/T360-symbol-hiding: use readelf in place of nm
It turns out that using nm -P isn't as portable as hoped. In
particular with some ELF ABIs (e.g. ppc64 ELFv1), the desired symbols
end up in the data section instead of text.

The test is currently only functional on ELF based architectures, so I
think it's legit to depend on readelf instead of nm.

The switch to readelf has the advantage that we can explicitely ask
for all of the symbols with global visibility, rather than grepping
for notmuch. That seems a more robust approach since it will catch any
strangely named global symbols.
2020-12-13 08:23:42 -04:00
David Bremner
06a6298262 Merge branch 'release' 2020-12-11 07:38:04 -04:00
David Bremner
c7e1910235 Commit Debian 3.0 (quilt) metadata
[dgit (9.12) quilt-fixup]
2020-12-10 21:07:10 -04:00
David Bremner
55e2dbe0d0 debian: changelog for 0.31.2-4 2020-12-10 21:03:35 -04:00
David Bremner
ed7ca948ae build/docs: move docstring prereq to file targets
Under a sufficiently high level of parallelism [1] there seems to be a
a race condition that allows sphinx-build to start running before the
docstrings are extracted. This change moves the docstring stamp from
the phony targets sphinx-html and sphinx-info to the file targets that
they depend on. I'm not sure why this makes things better, but I am
fairly confident it does not make things worse, and experimentally it
seems to eliminate the race condition.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976934
2020-12-09 21:55:38 -04:00
Jonas Bernoulli
adfded9ed0 emacs: avoid binding unnamed commands in keymaps
One should never bind unnamed commands in keymaps because doing that
makes it needlessly hard for users to change these bindings.

Replace such anonymous bindings with named commands that are generated
using macros and some boilerplate. Using macros is better than using a
simple loop because that makes it possible for `find-function' to find
the definitions. Eat your boilerplate--it forms character.

Admittedly this approach is quite ugly and it might be better to teach
the original commands to support different buffers directly instead of
requiring wrapper commands to do just that.

Never-the-less as a short-term solution this is better than what we
had before.
2020-12-06 16:23:38 -04:00
Jonas Bernoulli
54492ddf23 emacs: do not quote self-quoting t 2020-12-06 16:23:11 -04:00
Jonas Bernoulli
b4ee80dcbd emacs: use setq-local
It is available since Emacs 24.3 and we require at least Emacs 25.
It makes the variable buffer-local if it isn't always buffer-local
anyway.
2020-12-06 16:22:33 -04:00
Jonas Bernoulli
9fadab4e63 emacs: use defvar-local
It is available since Emacs 24.3 and we require at least Emacs 25.
2020-12-06 16:22:18 -04:00
Jonas Bernoulli
dff7f06711 emacs: inline notmuch-split-content-type
This trivial helper function actually made things slightly
*less* readable by adding an unnecessary indirection.
2020-12-06 16:22:07 -04:00
Jonas Bernoulli
4f57e01843 emacs: inline notmuch-documentation-first-line
Inline a simplified version of `notmuch-documentation-first-line'
into its only caller.  The new code snippet differs from the
removed function in that it returns nil instead of the empty string
for symbols that have no function documentation.  That value is
ultimately used as an argument to `concat', which treats nil like
the empty string.  So we can do the logical thing without changing
the behavior.
2020-12-06 16:21:51 -04:00
Jonas Bernoulli
6db692302d emacs: remove unnecessary notmuch-tree-button-activate
Since [1: f8bdba37] no key is bound to this command and it is
redundant because the behavior of `push-command' is identical
when called as a command.

1: f8bdba37d3
   emacs: tree: remove binding for pressing button in message pane
2020-12-06 16:21:15 -04:00
Jonas Bernoulli
e7b90eedad emacs: remove unused notmuch-address-locate-command
We stopped using it in [1: 0e671478].

1: 0e671478c6
   emacs: replace use of notmuch-address-message-insinuate
2020-12-06 16:21:07 -04:00
Jonas Bernoulli
ac8a117a84 emacs: remove unnecessary notmuch-remove-if-not
We could just have switched to using `cl-remove-if-not' instead,
but the two uses of the *remove-if-not function are pretty strange
to begin with so we refactor to not use any such function at all.
2020-12-06 16:20:57 -04:00
Jonas Bernoulli
1fbae387e3 emacs: remove deprecated notmuch-folder command
It has been deprecated for a decade and it's time to let go.
2020-12-06 16:20:44 -04:00
Jonas Bernoulli
53a4eb4780 emacs: misc doc-string improvements 2020-12-06 16:20:28 -04:00
Jonas Bernoulli
d6cacef832 emacs: always use elisp quoting style in doc-strings
Emacs doc-strings use neither markdown nor lisp symbol quoting.
2020-12-06 16:20:16 -04:00
Jonas Bernoulli
3cdf105e0f emacs: place complete first sentence on first doc-string line 2020-12-06 16:20:02 -04:00
Jonas Bernoulli
a7ba52eb94 emacs: place only first sentence on first doc-string line 2020-12-06 16:19:36 -04:00
Jonas Bernoulli
27b448f381 emacs: shorten/replace first sentence of a few doc-strings
The first sentence should fit on the first line.  It is okay if
the first sentence/line does not contain all the information that
the rest of the doc-string covers.
2020-12-06 16:19:23 -04:00
Jonas Bernoulli
471f161850 emacs: define notmuch-hello-url as a constant 2020-12-06 16:18:50 -04:00
Jonas Bernoulli
dfd99c7fba emacs: sanitize function that displays version
Previously it was defined in "notmuch-hello.el" and its name contained
"hello" solely because it replaced an anonymous function that was
mistakenly only bound in `notmuch-hello-mode-map'.  But it makes more
sense to bind it in all notmuch modes and even if we did not change
that aspect it still would make no sense to have "hello" in its name.
2020-12-06 16:18:34 -04:00
Jonas Bernoulli
ff80122972 emacs: more cleanup since dropping support for Emacs 24
Notmuch requires at least version 25 of Emacs now.

Adjust comments that previously referenced version 24 specifically,
even though they also apply to later releases. Remove documentation
and code that no longer applies.

- `mm-shr' no longer references `gnus-inhibit-images'.
2020-12-06 16:18:20 -04:00