This allows finer control over when to close the database.
---
test/T566-lib-message.sh | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh
index 4c9fc0df..7e8f8959 100755
--- a/test/T566-lib-message.sh
+++
Closing the database after the iterator is created is not a problem.
---
test/T566-lib-message.sh | 23 +++
1 file changed, 23 insertions(+)
diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh
index 7e8f8959..d3765220 100755
--- a/test/T566-lib-message.sh
+++
The error message here may need adjusting.
---
test/T563-lib-directory.sh | 61 ++
1 file changed, 61 insertions(+)
create mode 100755 test/T563-lib-directory.sh
diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh
new file mode 100755
index
Exception is caught.
---
test/T590-libconfig.sh | 15 +++
1 file changed, 15 insertions(+)
diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh
index 46f3a76d..602fad0b 100755
--- a/test/T590-libconfig.sh
+++ b/test/T590-libconfig.sh
@@ -61,6 +61,21 @@ valid = 0
EOF
To the best of my current understanding, it's a bug in Xapian that no
exception is thrown here. The test should pass in either case.
---
test/T563-lib-directory.sh | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/test/T563-lib-directory.sh
Also clarify API in error case.
---
lib/directory.cc | 12
lib/notmuch.h | 2 ++
test/T563-lib-directory.sh | 1 -
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/directory.cc b/lib/directory.cc
index eb59d24d..044cd680 100644
---
Also mention error return in API docs
---
lib/notmuch.h | 1 +
test/T590-libconfig.sh | 22 ++
2 files changed, 23 insertions(+)
diff --git a/lib/notmuch.h b/lib/notmuch.h
index d52fa976..1fe62914 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -2291,6 +2291,7 @@
Hopefully this covers completely the current API for error handling on
closed databases. For the most part, it's not that I care about
supporting operations on closed databases, but rather it provides a
good opportunity to make sure exceptions are being caught at the the
boundary of libnotmuch.
Also test n_messages_destroy.
---
test/T568-lib-thread.sh | 31 +++
1 file changed, 31 insertions(+)
diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh
index 66066854..ac13d986 100755
--- a/test/T568-lib-thread.sh
+++ b/test/T568-lib-thread.sh
@@ -285,6
This is a clone of the one for get_child_directories
---
test/T563-lib-directory.sh | 18 ++
1 file changed, 18 insertions(+)
diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh
index 4d8b7e82..bbd12e12 100755
--- a/test/T563-lib-directory.sh
+++
Also clarify API in error case.
---
lib/directory.cc | 23 ---
lib/notmuch.h | 2 ++
test/T563-lib-directory.sh | 1 -
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/lib/directory.cc b/lib/directory.cc
index 09b49245..eb59d24d 100644
The mtime is cached, so closing the db is not a problem. Writing the
mtime throws an exception, which is caught.
---
test/T563-lib-directory.sh | 18 ++
1 file changed, 18 insertions(+)
diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh
index 4de31078..c45bc5f8
This is a rare and probably serious programming error, so better not
to silently return a default value.
---
lib/indexopts.c | 2 +-
lib/notmuch.h | 1 +
test/T562-lib-database.sh | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/indexopts.c
The main criteria is that they don't crash. Working with a closed
database is a bonus.
---
test/T562-lib-database.sh | 39 +++
1 file changed, 39 insertions(+)
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index 32fda72e..815c9856 100755
It's shorter. That's it pretty much.
---
emacs/notmuch-hello.el | 2 +-
emacs/notmuch-lib.el | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 89e03c36..1c084bf7 100644
--- a/emacs/notmuch-hello.el
+++
It's a bit weird to avoid having to write the "(setq ... )" more than
once, just because we can. In a language that uses '=' for the same
purpose we also happily use that once per assignment.
While there are no benefit to using just one 'setq' there are some
drawbacks. It is not always clear on
---
emacs/coolj.el | 2 +-
emacs/notmuch-address.el | 38 +++--
emacs/notmuch-company.el | 17 --
emacs/notmuch-crypto.el | 16 +++---
emacs/notmuch-draft.el | 12 ++--
emacs/notmuch-hello.el | 43 ++-
emacs/notmuch-jump.el
Putting the COND and THEN parts on the same line but ELSE on a
separate line makes it harder to determine if there actually is
an ELSE part.
---
emacs/notmuch-lib.el | 6 --
emacs/notmuch-tag.el | 3 ++-
emacs/notmuch-tree.el | 3 ++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff
---
emacs/coolj.el | 16 ++---
emacs/notmuch-address.el | 18 +++---
emacs/notmuch-compat.el| 86 -
emacs/notmuch-draft.el | 18 +++---
emacs/notmuch-hello.el | 24 +++
emacs/notmuch-lib.el | 56
---
emacs/notmuch-lib.el | 6 ++
emacs/notmuch-show.el | 19 ---
emacs/notmuch-tree.el | 4 ++--
emacs/notmuch.el | 6 ++
4 files changed, 14 insertions(+), 21 deletions(-)
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 7994d5ad..f8958a91 100644
Hello,
Please forgive me for this wall of unsolicited cleanup; I blame it
on a mild form of ocd. I made most of these changes a few months
ago when I was splitting the libraries into `outline-minor-mode'
compatible sections. To do so I had to have some understanding of the
code I was splitting
Also use 'unless' in a few cases where previously 'if' was used with
'not' but without an ELSE part.
---
emacs/notmuch-hello.el | 6 +++---
emacs/notmuch-mua.el| 4 ++--
emacs/notmuch-parser.el | 2 +-
emacs/notmuch-show.el | 3 +--
emacs/notmuch-tag.el| 4 ++--
emacs/notmuch-tree.el
Since Emacs 27 each face has to be explicitly configured to "extend
to the edge of the window". Without doing that the face used for
the newline character only has an effect that spans "one character"
(i.e. it looks like there is a single trailing space character).
We don't want that so extend
This function is being autoloaded using an autoload cookie, so it
shouldn't additionally be autoloaded using an `autoload' form.
When building libraries we don't actually load the autoloads file and
dropping the `autoload' form results in an error, which reveals a so
far unspecified dependency:
It was defined as such for a decade; ever since
a56010ac8b89a2489eee5c78469f05cee85ec858 but there
wasn't a reason to do that then nor is there now.
---
emacs/notmuch-hello.el | 1 -
1 file changed, 1 deletion(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index
It is done synchronously and it can take a while,
so we should let the user know what is going on.
---
emacs/notmuch-lib.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index fc76fd67..069a19e9 100644
--- a/emacs/notmuch-lib.el
The major mode used for shell scripts is named 'sh-mode'.
'shell-mode' on the other hand implements an interactive
shell in emacs-lisp.
---
.dir-locals.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index fc75ae61..b3ddffe8 100644
---
Doing that is better than using an `autoload' form because the latter
may result in dependencies getting hidden and indeed it turns out we
have to declare `notmuch-jump' in "notmuch-tag.el".
---
emacs/notmuch-jump.el | 1 +
emacs/notmuch-tag.el | 3 +--
2 files changed, 2 insertions(+), 2
Most people who write lots of lisp tend to only sparsely use empty
"separator" lines within forms. In lisp they feel unnecessary and
since most files stick to this convention we get a bit confused
when there are extra empty lines. It feels like the s-expressions
are falling into pieces.
All of
Also do so for some 'if' forms that lack an ELSE part.
Even go as far as using 'and' and 'not' instead of 'unless'.
---
emacs/coolj.el | 12 +++---
emacs/notmuch-address.el | 72 ++--
emacs/notmuch-crypto.el | 2 +-
emacs/notmuch-draft.el
---
NEWS | 2 +-
bindings/python-cffi/notmuch2/__init__.py | 2 +-
bindings/python-cffi/notmuch2/_base.py | 6 +++---
bindings/python-cffi/notmuch2/_database.py | 8
bindings/python-cffi/notmuch2/_message.py | 4 ++--
Fix it to consistently match the style we have configured in
".dir-locals.el".
---
test/test-lib.sh | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 90e26639..a4058660 100644
--- a/test/test-lib.sh
---
emacs/notmuch-address.el | 8 ++--
emacs/notmuch-compat.el | 6 +--
emacs/notmuch-hello.el | 8 ++--
emacs/notmuch-jump.el| 54 ++---
emacs/notmuch-lib.el | 10 ++--
emacs/notmuch-mua.el | 24 +-
emacs/notmuch-query.el | 4 +-
---
emacs/notmuch-company.el | 36 +++--
emacs/notmuch-compat.el | 15 ++
emacs/notmuch-crypto.el | 2 +-
emacs/notmuch-lib.el | 2 --
emacs/notmuch-maildir-fcc.el | 39 ++--
emacs/notmuch-print.el
- The first sentence should fit on the first line in full. This is
even the case when that causes the line to get a bit long. If it
gets very long, then it should be made shorter.
- Even even the second sentence would fit on the first line, if it
just provides some details, then it
---
emacs/make-deps.el | 3 ++-
emacs/notmuch-lib.el| 8 +++-
emacs/notmuch-parser.el | 9 +++--
emacs/notmuch-show.el | 18 +++---
emacs/rstdoc.el | 9 -
test/test-lib.el| 31 +++
6 files changed, 34
Use `makefile-gmake-mode' instead of `makefile-mode' because the
former also highlights ifdef et al. while the latter does not.
"./Makefile.global" and one "Makefile.local" failed to specify any
major mode at all but doing so is necessary because Emacs does not
automatically figure out that these
---
emacs/notmuch-tag.el | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
index e71de041..1cef17e1 100644
--- a/emacs/notmuch-tag.el
+++ b/emacs/notmuch-tag.el
@@ -32,9 +32,10 @@ (require 'crm)
(require 'notmuch-lib)
This is a rare and probably serious programming error, so better not
to silently return a default value.
---
lib/indexopts.c | 2 +-
lib/notmuch.h | 1 +
test/T562-lib-database.sh | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/indexopts.c
The first commit didn't do what the commit message claimed, as pointed
out by David. I have fixed that, and also a second issue that I have
missed because I still had some parts of 'mml-sec.el' commented out
when testing the fixes to the tests... it was a long day.
Jonas Bernoulli (3):
Starting with Emacs 27 undeclared variables in evaluated interactive
code uses lexical scope. This includes code passed with '--eval' as
we do in the Emacs tests, which also happen to assume dynamic scope.
This can affect variables defined by libraries that we use. We let-
bind such variables
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 1c8705ec..8f3ebec0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ tags
/.stamps
*.stamp
/bindings/python-cffi/build/
+/sphinx.config
--
2.26.0
Since Emacs 27 'mml-secure-epg-sign' errors out if we don't opt-in to
signing as the sender using 'mml-secure-openpgp-sign-with-sender'.
---
test/test-lib.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 8c331b88..31c858d1 100644
static_cast is a bit tricky to understand and error prone, so add a
second pointer to (potentially the same) Xapian database object that
we know has the right subclass.
---
lib/add-message.cc | 13 +++--
lib/config.cc | 4 +---
lib/database-private.h | 2 +-
lib/database.cc
The plan is to change the underlying representation.
---
lib/database.cc | 18 --
lib/directory.cc | 2 +-
lib/message.cc| 4 ++--
lib/notmuch-private.h | 3 +++
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/lib/database.cc b/lib/database.cc
I'm not sure what the point of modifying that right before destroying
the object is. In a future commit I want to remove that element of the
object, so simplify that task.
---
lib/database.cc | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/database.cc b/lib/database.cc
index
As the last commit message mentions, it is a bit hard to be sure one
is using static_cast correctly, so this series eliminates
the use of static_cast for Xapian database objects.
As a bonus, it deletes more code than it adds.
Based on a suggestion from Olly Betts.
Falling out of the catch meant the error return was lost
---
lib/directory.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/directory.cc b/lib/directory.cc
index 044cd680..37973c09 100644
--- a/lib/directory.cc
+++ b/lib/directory.cc
@@ -308,7 +308,7 @@
There is a return value bug in notmuch_directory_delete that is hiding
the exception.
---
Well that was embarrassing. Silly bug in notmuch code, nothing to do with
Xapian.
test/T563-lib-directory.sh | 38 +-
1 file changed, 37 insertions(+), 1 deletion(-)
Hello,
On Sun 26 Jul 2020 at 06:58PM +02, Jonas Bernoulli wrote:
> Also do so for some 'if' forms that lack an ELSE part.
> Even go as far as using 'and' and 'not' instead of 'unless'.
I don't follow "when the return value matters", could you explain?
Thanks.
--
Sean Whitton
Sean Whitton writes:
> On Sun 26 Jul 2020 at 06:58PM +02, Jonas Bernoulli wrote:
>
>> Also do so for some 'if' forms that lack an ELSE part.
>> Even go as far as using 'and' and 'not' instead of 'unless'.
>
> I don't follow "when the return value matters", could you explain?
As in "when the
That is fantastic!♥
Yeah, I had written "headers" for both Blahonga and Xspam.
To get the fixed version to work, I had to remove them from
~/.notmuch-config (not just edit them) and then re-add them via the CLI
instead of by editing the file.
But now works like a charm!
David Bremner writes:
52 matches
Mail list logo