]> git.notmuchmail.org Git - notmuch/log
notmuch
3 years agoemacs: various doc-string improvements
Jonas Bernoulli [Sun, 10 Jan 2021 14:01:01 +0000 (15:01 +0100)]
emacs: various doc-string improvements

3 years agoemacs: various comment improvements
Jonas Bernoulli [Sun, 10 Jan 2021 14:01:00 +0000 (15:01 +0100)]
emacs: various comment improvements

3 years agoemacs: various cosmetic improvements
Jonas Bernoulli [Wed, 13 Jan 2021 17:37:50 +0000 (18:37 +0100)]
emacs: various cosmetic improvements

3 years agoemacs: notmuch-crypto-status-button-type: fix potential bug
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:58 +0000 (15:00 +0100)]
emacs: notmuch-crypto-status-button-type: fix potential bug

The "help-echo" can potentially contain an unintended %-spec
so we have to make sure it would not be treated as such.

3 years agoemacs: notmuch-mua.el: move all options into "Options" section
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:57 +0000 (15:00 +0100)]
emacs: notmuch-mua.el: move all options into "Options" section

This is how we do it in other libraries.

3 years agoemacs: notmuch-mua-prompt-for-sender: don't force Ido on users
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:56 +0000 (15:00 +0100)]
emacs: notmuch-mua-prompt-for-sender: don't force Ido on users

We shouldn't force `ido-completion-read' on users who do not otherwise
use Ido.  Unfortunately simply turning on `ido-mode' does not change
every `completing-read' into a `ido-completing-read', instead it only
changes file and buffer completion.

I do realize that existing Ido users will initially dislike this
change, but I would like to encourage them to see this as an
opportunity to learn about Fido.

Unlike `ido-mode', build-in `fido-mode' confirms to the standard
completion API, so turning it on causes every `completing-read' to
use the Fido completion mechanism and which is similar to the Ido
mechanism:

> An enhanced `icomplete-mode' that emulates `ido-mode'.  This global
> minor mode makes minibuffer completion behave more like `ido-mode'
> than regular `icomplete-mode'."

3 years agoemacs: notmuch-wash.el: require diff-mode at beginning of code
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:55 +0000 (15:00 +0100)]
emacs: notmuch-wash.el: require diff-mode at beginning of code

That's what we usually do.  Also do not declare variable
`diff-file-header-re' because it is defined in `diff-mode.el',
which we always require.

3 years agoemacs: notmuch-message-apply-queued-tag-changes: cosmetics
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:54 +0000 (15:00 +0100)]
emacs: notmuch-message-apply-queued-tag-changes: cosmetics

3 years agoemacs: define notmuch-message-queued-tag-changes as buffer-local
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:53 +0000 (15:00 +0100)]
emacs: define notmuch-message-queued-tag-changes as buffer-local

Also improve the doc-string.

3 years agoemacs: silence compiler wrt notmuch-show-insert-part-text/plain
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:52 +0000 (15:00 +0100)]
emacs: silence compiler wrt notmuch-show-insert-part-text/plain

`notmuch-show-insert-part-text/plain' calls
`notmuch-show-insert-text/plain-hook' with two arguments
MSG and DEPTH. Currently all hook functions ignore MSG but
third-party functions may not.  One hook function uses DEPTH.

3 years agoemacs: notmuch-wash-region-to-button: remove unused MSG argument
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:51 +0000 (15:00 +0100)]
emacs: notmuch-wash-region-to-button: remove unused MSG argument

3 years agoemacs: inline notmuch-sexp-eof into only caller
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:50 +0000 (15:00 +0100)]
emacs: inline notmuch-sexp-eof into only caller

This function had a few issues.
- Neither its name nor the old comment before it is called made it
  clear what it does.
- It took one argument but didn't do anything with it.
- It's doc-string made a few claims, which are untrue and generally
  focused on details instead of that its purpose is.

3 years agoemacs: notmuch-tag--get-formats: silence byte-compiler
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:49 +0000 (15:00 +0100)]
emacs: notmuch-tag--get-formats: silence byte-compiler

`format-alist' is a global variable and the byte-compiler is unhappy
when a lexical function argument shadows a global (dynamic) binding.

3 years agoemacs: deal with unused lexical arguments and variables
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:48 +0000 (15:00 +0100)]
emacs: deal with unused lexical arguments and variables

The previous commit switched to lexical-binding but without dealing
with the new warnings about unused lexical arguments and variables.

This commit deals with most of them, in most cases by either removing
leftover bindings that are actually unnecessary, or by marking certain
arguments as "known to be unused" by prefixing their names with "_".

In the case of the functions named `notmuch-show-insert-...' the
amount of silencing that is required is a bit extreme and we might
want to investigate if there is a better way.

In the case of `notmuch-mua-mail', ignoring CONTINUE means that we do
not fully follow the intended behavior described in `compose-mail's
doc-string.

3 years agoemacs: use lexical-bindings in all libraries
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:47 +0000 (15:00 +0100)]
emacs: use lexical-bindings in all libraries

Doing so causes many new compile warnings.  Some of these warnings
concern genuine changes in behavior that have to be addressed right
away.

Many other warnings are due to unused variables.  Nothing has changed
here, except that the byte-compiler can now detect these pre-existing
and harmless issues.  We delay addressing these issues so that we can
focus on the important ones here.

A third group of warnings concern arguments that are not actually used
inside the function but which cannot be removed because the functions
signature is dictated by some outside convention.  Silencing these
warning is also delayed until subsequent commits.

3 years agoemacs: make headings outline-minor-mode compatible
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:46 +0000 (15:00 +0100)]
emacs: make headings outline-minor-mode compatible

`outline-minor-mode' treats comments that begin with three or more
semicolons as headings.  That makes it very convenient to navigate
code and to show/hide parts of a file.

Elips libraries typically have four top-level sections, e.g.:

;;; notmuch.el --- run notmuch within emacs...
;;; Commentary:...
;;; Code:...
;;; notmuch.el ends here

In this package many libraries lack a "Commentary:" section, which is
not optimal but okay for most libraries, except major entry points.

Depending on how one chooses to look at it, the "... ends here" line
is not really a heading that begins a section, because it should never
have a "section" body (after all it marks eof).

If the file is rather short, then I left "Code:" as the only section
that contains code.  Otherwise I split the file into multiple sibling
sections.  The "Code:" section continues to contain `require' and
`declare-function' forms and other such "front matter".

If and only if I have split the code into multiple sections anyway,
then I also added an additional section named just "_" before the
`provide' form and shortly before the "...end here" line.  This
section could also be called "Back matter", but I feel it would be
distracting to be that explicit about it.  (The IMO unnecessary but
unfortunately still obligatory "... ends here" line is already
distracting enough as far as I am concerned.)

Before this commit some libraries already uses section headings, some
of them consistently.  When a library already had some headings, then
this commit often sticks to that style, even at the cost inconsistent
styling across all libraries.

A very limited number of variable and function definitions have to be
moved around because they would otherwise end up in sections they do
not belong into.

Sections, including but not limited to their heading, can and should
be further improved in the future.

3 years agoemacs: avoid killing process buffer when process is still alive
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:45 +0000 (15:00 +0100)]
emacs: avoid killing process buffer when process is still alive

In practice this probably does not make a difference or we would
have heard about it many times, but better be safe than sorry.

Process sentinels are called not only when the process has finished
but also on other state changes.

3 years agoemacs: avoid passing around some redundant information
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:44 +0000 (15:00 +0100)]
emacs: avoid passing around some redundant information

When running "notmuch" we use its full path but when displaying the
command to the user we show just its name for readability reasons.
Avoid passing around both representations because it is very easy
to get the name from the path.

Notmuch itself uses the involved functions just for "notmuch" but
there might be extensions that use them for other executable so we
forgo other potential simplifications.

3 years agoemacs: notmuch-start-notmuch: avoid storing process buffer twice
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:43 +0000 (15:00 +0100)]
emacs: notmuch-start-notmuch: avoid storing process buffer twice

The buffer of the error process is accessible using `process-buffer'.
We still have to store the error-buffer in the non-error process
because for that process `process-buffer' obviously returns its own
buffer.

3 years agoemacs: notmuch-start-notmuch-sentinel: assert buffer is alive
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:42 +0000 (15:00 +0100)]
emacs: notmuch-start-notmuch-sentinel: assert buffer is alive

3 years agoemacs: notmuch-start-notmuch-error-sentinel: assert buffer is alive
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:41 +0000 (15:00 +0100)]
emacs: notmuch-start-notmuch-error-sentinel: assert buffer is alive

3 years agoemacs: notmuch-start-notmuch: remove backward compatibility code
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:40 +0000 (15:00 +0100)]
emacs: notmuch-start-notmuch: remove backward compatibility code

We no longer support Emacs releases before version 25.1.

Also adjust the sentinels which only had to deal with
an error file when using an older Emacs release was used.

3 years agoemacs: define new notmuch-search-item widget type
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:39 +0000 (15:00 +0100)]
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.

3 years agoemacs: sanitize dedicated widget action/notify functions
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:38 +0000 (15:00 +0100)]
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.

3 years agoemacs: use setq instead of set
Jonas Bernoulli [Sun, 10 Jan 2021 14:00:37 +0000 (15:00 +0100)]
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.

3 years agonmbug: notmuch-report: set both background and foreground colors
Tomi Ollila [Sun, 20 Dec 2020 20:04:23 +0000 (22:04 +0200)]
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.

3 years agodocs: drop deprecated doxygen TCL_SUBST flag
Daniel Kahn Gillmor [Thu, 31 Dec 2020 23:00:37 +0000 (18:00 -0500)]
docs: drop deprecated doxygen TCL_SUBST flag

notmuch has no tcl code, and doxygen upstream is deprecating/removing
tcl support anyway:
https://github.com/doxygen/doxygen/commit/48a7afc0caf69857a42b0fe1963db3440cb4000f

3 years agoMerge branch 'release'
David Bremner [Sat, 26 Dec 2020 19:20:32 +0000 (15:20 -0400)]
Merge branch 'release'

3 years agodebian: skip gdb based tests on hppa archive/debian/0.31.3-2 debian/0.31.3-2
David Bremner [Sat, 26 Dec 2020 19:14:27 +0000 (15:14 -0400)]
debian: skip gdb based tests on hppa

3 years agoRevert "emacs: notmuch-search: avoid wiping out buffer-local variables"
Jonas Bernoulli [Sun, 8 Nov 2020 17:49:29 +0000 (18:49 +0100)]
Revert "emacs: notmuch-search: avoid wiping out buffer-local variables"

This reverts commit f9fbd1ee3bfd679175d88af403752d87a730349f.

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.

3 years agoMerge branch 'release'
David Bremner [Fri, 25 Dec 2020 16:56:57 +0000 (12:56 -0400)]
Merge branch 'release'

3 years agoCommit Debian 3.0 (quilt) metadata archive/debian/0.31.3-1 debian/0.31.3-1
David Bremner [Fri, 25 Dec 2020 16:39:26 +0000 (12:39 -0400)]
Commit Debian 3.0 (quilt) metadata

[dgit (9.12) quilt-fixup]

3 years agodebian: drop debian/patches
David Bremner [Fri, 25 Dec 2020 16:37:18 +0000 (12:37 -0400)]
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.

3 years agodebian: don't tag debian tag at release is made. 0.31.3
David Bremner [Fri, 25 Dec 2020 16:26:35 +0000 (12:26 -0400)]
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.

3 years agoNEWS: add news for 0.31.3
David Bremner [Fri, 25 Dec 2020 15:52:29 +0000 (11:52 -0400)]
NEWS: add news for 0.31.3

3 years agodebian: changelog for 0.31.3-1
David Bremner [Fri, 25 Dec 2020 15:49:32 +0000 (11:49 -0400)]
debian: changelog for 0.31.3-1

3 years agoversion: bump 0.31.3
David Bremner [Fri, 25 Dec 2020 15:42:12 +0000 (11:42 -0400)]
version: bump 0.31.3

3 years agotest/T360-symbol-hiding.sh: trim extra output from readelf
David Bremner [Tue, 15 Dec 2020 20:45:09 +0000 (16:45 -0400)]
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.

3 years agopython/notmuch2: fix exclude tag handling
Johannes Larsen [Fri, 25 Dec 2020 15:21:45 +0000 (11:21 -0400)]
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.

3 years agolib/config: delay setting talloc destructor
David Bremner [Sat, 8 Aug 2020 14:16:47 +0000 (11:16 -0300)]
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 43ba5ed7eca6e9f6433b8c2c2a9d834d4101b92a)

3 years agolib: factor out notmuch_database_open* related code to own file
David Bremner [Sat, 8 Aug 2020 14:16:45 +0000 (11:16 -0300)]
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

3 years agotest: add regression test for searching with alternate config
David Bremner [Sat, 8 Aug 2020 14:16:50 +0000 (11:16 -0300)]
test: add regression test for searching with alternate config

Make sure upcoming changes to config handling do not break command
line specification.

3 years agolib/config: delay setting talloc destructor
David Bremner [Sat, 8 Aug 2020 14:16:47 +0000 (11:16 -0300)]
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.

3 years agolib: factor out prefix related code to its own file
David Bremner [Sat, 8 Aug 2020 14:16:44 +0000 (11:16 -0300)]
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.

3 years agolib: factor out feature name related code.
David Bremner [Sat, 8 Aug 2020 14:16:43 +0000 (11:16 -0300)]
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.

3 years agotest: use keys with group 'test' in T590-libconfig
David Bremner [Sat, 8 Aug 2020 14:16:35 +0000 (11:16 -0300)]
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.

3 years agoMerge tag 'debian/0.31.2-5'
David Bremner [Sun, 13 Dec 2020 12:37:47 +0000 (08:37 -0400)]
Merge tag 'debian/0.31.2-5'

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

[dgit distro=debian no-split --quilt=linear]

3 years agoCommit Debian 3.0 (quilt) metadata archive/debian/0.31.2-5 debian/0.31.2-5
David Bremner [Sun, 13 Dec 2020 12:25:39 +0000 (08:25 -0400)]
Commit Debian 3.0 (quilt) metadata

[dgit (9.12) quilt-fixup]

3 years agodebian: changelog for 0.31.2-5
David Bremner [Sun, 13 Dec 2020 12:25:29 +0000 (08:25 -0400)]
debian: changelog for 0.31.2-5

3 years agotest/T360-symbol-hiding: use readelf in place of nm
David Bremner [Fri, 11 Dec 2020 17:06:44 +0000 (13:06 -0400)]
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.

3 years agoMerge branch 'release'
David Bremner [Fri, 11 Dec 2020 11:38:04 +0000 (07:38 -0400)]
Merge branch 'release'

3 years agoCommit Debian 3.0 (quilt) metadata archive/debian/0.31.2-4 debian/0.31.2-4
David Bremner [Fri, 11 Dec 2020 01:07:10 +0000 (21:07 -0400)]
Commit Debian 3.0 (quilt) metadata

[dgit (9.12) quilt-fixup]

3 years agodebian: changelog for 0.31.2-4
David Bremner [Fri, 11 Dec 2020 01:03:35 +0000 (21:03 -0400)]
debian: changelog for 0.31.2-4

3 years agobuild/docs: move docstring prereq to file targets
David Bremner [Thu, 10 Dec 2020 01:55:38 +0000 (21:55 -0400)]
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

3 years agoemacs: avoid binding unnamed commands in keymaps
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:42 +0000 (22:28 +0100)]
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.

3 years agoemacs: do not quote self-quoting t
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:41 +0000 (22:28 +0100)]
emacs: do not quote self-quoting t

3 years agoemacs: use setq-local
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:39 +0000 (22:28 +0100)]
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.

3 years agoemacs: use defvar-local
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:38 +0000 (22:28 +0100)]
emacs: use defvar-local

It is available since Emacs 24.3 and we require at least Emacs 25.

3 years agoemacs: inline notmuch-split-content-type
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:37 +0000 (22:28 +0100)]
emacs: inline notmuch-split-content-type

This trivial helper function actually made things slightly
*less* readable by adding an unnecessary indirection.

3 years agoemacs: inline notmuch-documentation-first-line
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:36 +0000 (22:28 +0100)]
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.

3 years agoemacs: remove unnecessary notmuch-tree-button-activate
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:35 +0000 (22:28 +0100)]
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: f8bdba37d3f4c877e05e17b5b1c7d2d512106538
   emacs: tree: remove binding for pressing button in message pane

3 years agoemacs: remove unused notmuch-address-locate-command
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:34 +0000 (22:28 +0100)]
emacs: remove unused notmuch-address-locate-command

We stopped using it in [1: 0e671478].

1: 0e671478c6f37018973392f049979da5e1a8ff99
   emacs: replace use of notmuch-address-message-insinuate

3 years agoemacs: remove unnecessary notmuch-remove-if-not
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:33 +0000 (22:28 +0100)]
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.

3 years agoemacs: remove deprecated notmuch-folder command
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:32 +0000 (22:28 +0100)]
emacs: remove deprecated notmuch-folder command

It has been deprecated for a decade and it's time to let go.

3 years agoemacs: misc doc-string improvements
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:31 +0000 (22:28 +0100)]
emacs: misc doc-string improvements

3 years agoemacs: always use elisp quoting style in doc-strings
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:30 +0000 (22:28 +0100)]
emacs: always use elisp quoting style in doc-strings

Emacs doc-strings use neither markdown nor lisp symbol quoting.

3 years agoemacs: place complete first sentence on first doc-string line
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:29 +0000 (22:28 +0100)]
emacs: place complete first sentence on first doc-string line

3 years agoemacs: place only first sentence on first doc-string line
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:28 +0000 (22:28 +0100)]
emacs: place only first sentence on first doc-string line

3 years agoemacs: shorten/replace first sentence of a few doc-strings
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:27 +0000 (22:28 +0100)]
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.

3 years agoemacs: define notmuch-hello-url as a constant
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:26 +0000 (22:28 +0100)]
emacs: define notmuch-hello-url as a constant

3 years agoemacs: sanitize function that displays version
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:25 +0000 (22:28 +0100)]
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.

3 years agoemacs: more cleanup since dropping support for Emacs 24
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:24 +0000 (22:28 +0100)]
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'.

3 years agoemacs: remove kludge for Emacs 23 from notmuch-mua-mail
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:23 +0000 (22:28 +0100)]
emacs: remove kludge for Emacs 23 from notmuch-mua-mail

Notmuch requires at least Emacs version 25.

The `return-action' argument was added prior to Emacs 24.1
in 25ca2e61403f97b5a023164f2924d5f8aca2492a.

3 years agoemacs: fix old bug in notmuch-mua-mail
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:22 +0000 (22:28 +0100)]
emacs: fix old bug in notmuch-mua-mail

This fixes a regression introduced in [1: 7e20d264].  If the argument
RETURN-ACTION was non-nil then we should pass along the value of that
argument.  Instead we passed along the constant symbol `return-action'.

1: 7e20d26480553f57d53bd9ec28cae163c1ac91e3
   emacs: Fix mail composition under Emacs 23

3 years agoemacs: remove redundant notmuch-hello-trim
Jonas Bernoulli [Mon, 16 Nov 2020 21:28:21 +0000 (22:28 +0100)]
emacs: remove redundant notmuch-hello-trim

Use `string-trim', which exists since Emacs 24.4.

3 years agoemacs: don't fset keymaps
Jonas Bernoulli [Sun, 8 Nov 2020 19:02:48 +0000 (20:02 +0100)]
emacs: don't fset keymaps

These keymaps are never invoked as commands
so the function definitions serve no purpose.

3 years agoemacs: add doc-string to notmuch-tree-mode-map
Jonas Bernoulli [Sun, 8 Nov 2020 19:02:47 +0000 (20:02 +0100)]
emacs: add doc-string to notmuch-tree-mode-map

3 years agoemacs: define notmuch-message-mode-map explicitly
Jonas Bernoulli [Sun, 8 Nov 2020 19:02:46 +0000 (20:02 +0100)]
emacs: define notmuch-message-mode-map explicitly

Key bindings should not be defined at the top-level but inside
a `defvar' form.  Doing it at the top-level makes it harder to
reliably customize key bindings.

3 years agoemacs: silence byte-compiler
Jonas Bernoulli [Sun, 8 Nov 2020 19:02:45 +0000 (20:02 +0100)]
emacs: silence byte-compiler

3 years agodebian: upload 0.31.2-3 archive/debian/0.31.2-3 debian/0.31.2-3
David Bremner [Mon, 9 Nov 2020 17:59:58 +0000 (13:59 -0400)]
debian: upload 0.31.2-3

3 years agodebian: changelog for 0.31.2-2 archive/debian/0.31.2-2 debian/0.31.2-2
David Bremner [Mon, 9 Nov 2020 12:46:07 +0000 (08:46 -0400)]
debian: changelog for 0.31.2-2

3 years agodebian: run tests in verbose mode
David Bremner [Mon, 9 Nov 2020 12:44:41 +0000 (08:44 -0400)]
debian: run tests in verbose mode

A hopefully temporary change to try and debug some test failures on
autobuilders.

3 years agorelease: explicitely build sphinx-html 0.31.2 debian/0.31.2-1
David Bremner [Sun, 8 Nov 2020 17:33:08 +0000 (13:33 -0400)]
release: explicitely build sphinx-html

This is to force it to happen after the "make clean".

3 years agoNEWS: update for 0.31.2
David Bremner [Sun, 8 Nov 2020 16:47:30 +0000 (12:47 -0400)]
NEWS: update for 0.31.2

3 years agodebian: remove quilt patches
David Bremner [Sun, 8 Nov 2020 15:56:20 +0000 (11:56 -0400)]
debian: remove quilt patches

These were generated by dgit due a mix up with .orig.tar.xz files.

3 years agodebian: update changelog for 0.31.2-1
David Bremner [Sun, 8 Nov 2020 15:33:27 +0000 (11:33 -0400)]
debian: update changelog for 0.31.2-1

3 years agoversion: bump to 0.31.2
David Bremner [Sun, 8 Nov 2020 16:36:35 +0000 (12:36 -0400)]
version: bump to 0.31.2

3 years agobuild: change one more occurrence of 'version' to 'version.txt'.
David Bremner [Sun, 8 Nov 2020 16:58:03 +0000 (12:58 -0400)]
build: change one more occurrence of 'version' to 'version.txt'.

This one disguised via tar and sed trickery.

3 years agoCommit Debian 3.0 (quilt) metadata archive/debian/0.31.1-1 debian/0.31.1-1
David Bremner [Sun, 8 Nov 2020 14:08:00 +0000 (10:08 -0400)]
Commit Debian 3.0 (quilt) metadata

[dgit (9.12) quilt-fixup]

3 years agorelease: call python3 instead of python 0.31.1
David Bremner [Sun, 8 Nov 2020 14:01:53 +0000 (10:01 -0400)]
release: call python3 instead of python

Debian does not install /usr/bin/python by default any more.

3 years agorelease: update release-checks.sh for s/version/version.txt/
David Bremner [Sun, 8 Nov 2020 14:00:57 +0000 (10:00 -0400)]
release: update release-checks.sh for s/version/version.txt/

Another place missed by the rename.

3 years agodebian: changelog for 0.31.1-1
David Bremner [Sun, 8 Nov 2020 11:46:51 +0000 (07:46 -0400)]
debian: changelog for 0.31.1-1

3 years agoNEWS: add news for 0.31.1
David Bremner [Sun, 8 Nov 2020 11:39:14 +0000 (07:39 -0400)]
NEWS: add news for 0.31.1

3 years agoupdate versions
David Bremner [Sun, 8 Nov 2020 11:32:10 +0000 (07:32 -0400)]
update versions

3 years agobuild: fix update-versions rule
David Bremner [Sun, 8 Nov 2020 11:27:48 +0000 (07:27 -0400)]
build: fix update-versions rule

This was missed in the rename of the 'version' file to version.txt

3 years agoRename version to version.txt
Ralph Seichter [Wed, 28 Oct 2020 14:44:35 +0000 (15:44 +0100)]
Rename version to version.txt

Building Notmuch on macOS is known to cause problems because the Notmuch
distribution archive contains two files named "version". These names
clash with the <version> header as defined in C++20. Therefore, the
existing naming will likely become a problem on other platforms as well,
once compilers adopt the new standard.

Signed-off-by: Ralph Seichter <github@seichter.de>
Amended-by: db s/keyword/header/ in commit message.
3 years agolib/config: don't set destructor until iterator is initialized.
David Bremner [Fri, 30 Oct 2020 00:13:01 +0000 (21:13 -0300)]
lib/config: don't set destructor until iterator is initialized.

As diagnosed by Olivier Taïbi in
id:20201027100916.emry3k2wujod4xnl@galois.lan, if an exception is
thrown while the initialization is happening (e.g. if the function is
called on a closed database), then the destructor is (sometimes)
invoked on an uninitialized Xapian object.

Solve the problem by moving the setting of the destructor until after
the placement new successfully completes. It is conceivable this might
cause a memory leak, but that seems preferable to crashing, and in any
case, there seems to be nothing better to be done if the
initialization is failing things are in an undefined state by
definition.

3 years agoconfigure: replace $(realpath emacs) with $(cd emacs && pwd -P)
Tomi Ollila [Tue, 20 Oct 2020 06:57:11 +0000 (09:57 +0300)]
configure: replace $(realpath emacs) with $(cd emacs && pwd -P)

For portability; the realpath command (e.g. from GNU coreutils)
is not so common outside Linux systems.

The "$(cd emacs && pwd -P)" replaces that realpath(1) execution
suitably in this context (using just bash(1) builtins).

3 years agoemacs docs: rstdoc.el: consistent single quote conversions
Tomi Ollila [Fri, 9 Oct 2020 07:32:02 +0000 (10:32 +0300)]
emacs docs: rstdoc.el: consistent single quote conversions

With text-quoting-style 'grave keeps "'" and "`" quotes unaltered
for further processing done by this code (regardless of locale...).
The tools that read the reStructuredText markup generated can do
their styling instead.

Added temporary conversions of ' and ` to \001 and \002 so that
's and `s outside of `...' and `...` are converted separately
('s restored back to ' and `s converted to \`).

Both `...' and `...` are finally "converted" to `...` (not ``...``).
https://docutils.sourceforge.io/docs/user/rst/quickref.html documents
that as `interpreted text`:

 "The rendering and meaning of interpreted text is domain- or
  application-dependent. It can be used for things like index
  entries or explicit descriptive markup (like program identifiers)."

Which looks pretty much right.

3 years agoemacs: Remove notmuch-mua-message-send-hook
Tim Quelch [Sat, 12 Sep 2020 04:45:40 +0000 (14:45 +1000)]
emacs: Remove notmuch-mua-message-send-hook

Currently `message-send-hook` functions are being called twice: In
notmuch send common when `notmuch-mua-send-hook` functions are
run (which by default includes `notmuch-mua-message-send-hook`) and in
`message-send` itself.

Because `message-send-hook` functions are run in `message-send` itself,
we don't need also need to run them before we delegate to `message-send`

Calling `notmuch-mua-message-send-hook` resulted in functions in
`message-send-hook` to be called twice. This causes bugs in
non-idempotent hook functions.