[PATCH] doc: Makefile: stop build notmuch-emacs.info when not have emacs

2019-06-11 Thread Doan Tran Cong Danh
Current behavior:
- When build on system without emacs:

./configure --without-emacs
make
make install

`make install` failed with:
> /usr/bin/install: cannot stat 'doc/_build/texinfo/notmuch-emacs.info': No 
> such file or directory

Signed-off-by: Doan Tran Cong Danh 
---
I don't know if this is a _good_ fix for this issue.
This is my quick-and-dirty patch to package notmuch for Void Linux.
 doc/Makefile.local | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/Makefile.local b/doc/Makefile.local
index 719172fe..732d92f5 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -28,7 +28,10 @@ MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
 MAN1_TEXI := $(patsubst 
$(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST))
 MAN5_TEXI := $(patsubst 
$(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST))
 MAN7_TEXI := $(patsubst 
$(srcdir)/doc/man7/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN7_RST))
-INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) 
$(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
+INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI)
+ifeq ($(WITH_EMACS),1)
+INFO_TEXI_FILES := $(INFO_TEXI_FILES) $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
+endif
 INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
 
 .PHONY: sphinx-html sphinx-texinfo sphinx-info
-- 
2.22.0.rc1.479.gd8fdbe21b5

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] python: support relative path in default database

2019-04-19 Thread Doan Tran Cong Danh
>From notmuch 0.28, notmuch support relative database path in
notmuch-config(1), but python binding haven't taught this yet.

afew denied to work with a perfectly fine notmuch-config due to this.
---
 bindings/python/notmuch/database.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bindings/python/notmuch/database.py 
b/bindings/python/notmuch/database.py
index 342d665a..88ca836e 100644
--- a/bindings/python/notmuch/database.py
+++ b/bindings/python/notmuch/database.py
@@ -675,7 +675,10 @@ class Database(object):
 if not config.has_option('database', 'path'):
 raise NotmuchError(message="No DB path specified"
" and no user default found")
-return config.get('database', 'path')
+db_path = config.get('database', 'path')
+if not os.path.isabs(db_path):
+db_path = os.path.expanduser(os.path.join("~", db_path))
+return db_path
 
 """notmuch_database_get_config"""
 _get_config = nmlib.notmuch_database_get_config
-- 
2.21.0

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch