In Python bindings, Message.get_property fails with an AttributeError when trying to fetch a property that doesn't exist.
From d712832ba982085975c27b23bb502af82e638b39 Mon Sep 17 00:00:00 2001
From: hydrargyrum <dev@indigo.re>
Date: Sun, 6 Jan 2019 16:08:55 +0100
Subject: [PATCH] python: fix get_property error when property doesn't exist
Indent the directive properly to attach it to Threads autoclass
documentation.
Fixes:
WARNING: don't know which module to import for autodocumenting
'__str__' (try placing a "module" or "currentmodule" directive in the
document, or giving an explicit module name)
The simplistic mocking in conf.py falls short on python 3.7. Just use
unittest.mock instead.
Fixes:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sphinx/config.py", line 368, in eval_config_file
execfile_(filename, namespace)
File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_
exec_(code, _globals)
File "/path/to/notmuch/bindings/python/docs/source/conf.py", line 39, in <module>
from notmuch import __VERSION__,__AUTHOR__
File "/path/to/notmuch/bindings/python/notmuch/__init__.py", line 54, in <module>
from .database import Database
File "/path/to/notmuch/bindings/python/notmuch/database.py", line 25, in <module>
from .globals import (
File "/path/to/notmuch/bindings/python/notmuch/globals.py", line 48, in <module>
class NotmuchDatabaseS(Structure):
TypeError: __mro_entries__ must return a tuple
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>
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
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.
When generating a reply message, if the user was the originator and
only recipient of the original message, include the user as a
recipient of the reply.
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>
Without this patch, gcc 8.2.0-7 complains:
debugger.c: In function ‘debugger_is_active’:
debugger.c:40:24: warning: passing argument 2 to restrict-qualified parameter aliases with argument 1 [-Wrestrict]
if (readlink (buf, buf, sizeof (buf)) != -1 &&
~~~ ^~~
This is pretty silly, but it seems simplest to just avoid passing the
same buffer to readlink as both pathname and buf.
Use explicit labels for GTypeInfo member initializers, rather than
relying on comments and ordering. This is both easier to read, and
harder to screw up. This also makes it clear that we're mis-casting
GObject class initializers for gcc.
Without this patch, g++ 8.2.0-7 produces this warning:
CXX -g -O2 lib/index.o
lib/index.cc: In function ‘GMimeFilter* notmuch_filter_discard_non_term_new(GMimeContentType*)’:
lib/index.cc:252:23: warning: cast between incompatible function types from ‘void (*)(NotmuchFilterDiscardNonTermClass*)’ {aka ‘void (*)(_NotmuchFilterDiscardNonTermClass*)’} to ‘GClassInitFunc’ {aka ‘void (*)(void*, void*)’} [-Wcast-function-type]
(GClassInitFunc) notmuch_filter_discard_non_term_class_init,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The definition of GClassInitFunc in
/usr/include/glib-2.0/gobject/gtype.h suggests that this function will
always be called with the class_data member of the GTypeInfo. We set
that value to NULL in both GObject definitions in notmuch. So we mark
it as explicitly unused.
There is no functional change here, just code cleanup.