mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
notmuch Debian 0.23.5-1 upload (same as 0.23.5)
-----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAlhzZgkACgkQ8gKXHaSn niy9lgwAir5ySOtZBp5P5f/jDvsDU+6x4qvGTqd9AJWG8L26Z7qHpUWwor1MvcKH OAxO3B78jRth4qjpJ1iVFxFL4hRWYYKCfJmCHGR5ttyLXzGuZVoXosF9s5jR+tjy YVjhZ+eiHCArSKhbRIfsVlgTjX13U6I8XFpWngFXdhNEeCX+6YJm+JWE8JYyWZac i6lWXOFmNSguhVEJoYkmuFhI8XKjjxu0G9Z0gB+1WSrsvG6XAeUlsaYmccdF68tP UVKgnPWSxE0VN89gLKVxU7D3LmcL8PHBsc+DGM00IVZXPEkbLEhTIHQRBr2lObBF CFE7izuLCY7CcABwRJoWpa9sAgolv+Vnf+e+kmS1S+ywZn+W2JkIL9OuN76zRdXK 16gcofN5Ayjt9dspdS+PD9rZqzWLg0RFMvy5vYyogWyxNC29Y9quCkeSS8zff91U NpVYpHx/SQzlV5/E3XFCJ3m6B4+Krt+J/+1j+TF14ufYYyrQlXVYJ4jh4eICEw3+ irgboBYw =gshI -----END PGP SIGNATURE----- Merge tag 'debian/0.23.5-1' into jessie-backports notmuch Debian 0.23.5-1 upload (same as 0.23.5)
This commit is contained in:
commit
e41c2d3a76
37 changed files with 320 additions and 152 deletions
|
@ -19,9 +19,12 @@ DATE:=$(shell date +%F)
|
|||
endif
|
||||
|
||||
VERSION:=$(shell cat ${srcdir}/version)
|
||||
ELPA_VERSION:=$(subst ~,_,$(VERSION))
|
||||
ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
|
||||
ifeq ($(IS_GIT),yes)
|
||||
VERSION:=$(shell git --git-dir=${srcdir}/.git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
|
||||
# drop the ~g$sha1 part
|
||||
ELPA_VERSION:=$(word 1,$(subst ~, ,$(VERSION)))
|
||||
# Write the file 'version.stamp' in case its contents differ from $(VERSION)
|
||||
FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)
|
||||
ifneq ($(FILE_VERSION),$(VERSION))
|
||||
|
|
55
NEWS
55
NEWS
|
@ -1,3 +1,58 @@
|
|||
Notmuch 0.23.5 (2017-01-09)
|
||||
===========================
|
||||
|
||||
Build system
|
||||
------------
|
||||
|
||||
Fix quoting bug in configure. This had introduced a RUNPATH into the
|
||||
notmuch binary in cases where it was not not needed.
|
||||
|
||||
Notmuch 0.23.4 (2016-12-24)
|
||||
===========================
|
||||
|
||||
Command Line Interface
|
||||
----------------------
|
||||
|
||||
Improve error handling in notmuch insert
|
||||
|
||||
Database lock errors no longer prevent message file delivery to the
|
||||
filesystem. Certain errors during `notmuch insert` most likely to
|
||||
be temporary return EX_TEMPFAIL.
|
||||
|
||||
Emacs
|
||||
-----
|
||||
|
||||
Restore autoload cookie for notmuch-search.
|
||||
|
||||
Notmuch 0.23.3 (2016-11-27)
|
||||
===========================
|
||||
|
||||
Command Line Interface
|
||||
----------------------
|
||||
|
||||
Treat disappearing files during notmuch new as non-fatal.
|
||||
|
||||
Test Suite
|
||||
----------
|
||||
|
||||
Fix incompatibility (related to signature size) with gnupg 2.1.16.
|
||||
|
||||
Notmuch 0.23.2 (2016-11-20)
|
||||
===========================
|
||||
|
||||
Emacs
|
||||
-----
|
||||
|
||||
Fix notmuch-interesting-buffer and notmuch-cycle-notmuch-buffers.
|
||||
|
||||
notmuch-tree-mode and notmuch-message-mode buffers are now
|
||||
considered interesting by `notmuch-interesting-buffer` and
|
||||
`notmuch-cycle-notmuch-buffers`.
|
||||
|
||||
Restore compatibility with Emacs 23.
|
||||
|
||||
Notmuch support for Emacs 23 is now deprecated.
|
||||
|
||||
Notmuch 0.23.1 (2016-10-23)
|
||||
===========================
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# this file should be kept in sync with ../../../version
|
||||
__VERSION__ = '0.23.1'
|
||||
__VERSION__ = '0.23.5'
|
||||
SOVERSION = '4'
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -274,7 +274,7 @@ if [ -z "$LIBDIR" ] ; then
|
|||
libdir_expanded="${PREFIX}/lib"
|
||||
else
|
||||
# very non-general variable expansion
|
||||
libdir_expanded=$(echo "$LIBDIR" | sed "s|\\${prefix}|${PREFIX}|g; s|\\$prefix/|${PREFIX}/|; s|//*|/|g")
|
||||
libdir_expanded=$(printf %s "$LIBDIR" | sed "s|\${prefix}|${PREFIX}|; s|\$prefix\>|${PREFIX}|; s|//*|/|g")
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
|
|
45
debian/changelog
vendored
45
debian/changelog
vendored
|
@ -1,3 +1,48 @@
|
|||
notmuch (0.23.5-1) unstable; urgency=medium
|
||||
|
||||
* Remove RUNPATH from /usr/bin/notmuch
|
||||
|
||||
-- David Bremner <bremner@debian.org> Mon, 09 Jan 2017 06:24:39 -0400
|
||||
|
||||
notmuch (0.23.4-1) unstable; urgency=medium
|
||||
|
||||
* Improve error handling in notmuch insert
|
||||
* Restore autoload cookie for notmuch-search (notmuch-emacs)
|
||||
|
||||
-- David Bremner <bremner@debian.org> Sat, 24 Dec 2016 17:47:48 +0900
|
||||
|
||||
notmuch (0.23.3-3) unstable; urgency=medium
|
||||
|
||||
* Disable gdb using tests on kfreebsd-*, due to apparent gdb breakage
|
||||
|
||||
-- David Bremner <bremner@debian.org> Mon, 05 Dec 2016 08:25:32 -0400
|
||||
|
||||
notmuch (0.23.3-2) unstable; urgency=medium
|
||||
|
||||
* Add missing depends to notmuch-emacs. Thanks to micah for the
|
||||
report.
|
||||
|
||||
-- David Bremner <bremner@debian.org> Thu, 01 Dec 2016 08:06:59 -0400
|
||||
|
||||
notmuch (0.23.3-1) unstable; urgency=medium
|
||||
|
||||
* Re-enable test suite
|
||||
* Fix test suite compatibility with gnupg 2.1.16. Fixes: "FTBFS:
|
||||
Tests failures", thanks to Lucas Nussbaum (Closes: #844915).
|
||||
* Bug fix: "race condition in `notmuch new`?", thanks to Paul Wise
|
||||
(Closes: #843127).
|
||||
|
||||
-- David Bremner <bremner@debian.org> Sat, 26 Nov 2016 08:37:39 -0400
|
||||
|
||||
notmuch (0.23.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bugfix release
|
||||
* Convert notmuch-emacs to dh-elpa, new binary package elpa-notmuch
|
||||
* Bug fix: "maintainer script(s) do not start on #!", thanks to
|
||||
treinen@debian.org; (Closes: #843287).
|
||||
|
||||
-- David Bremner <bremner@debian.org> Thu, 10 Nov 2016 22:36:04 -0400
|
||||
|
||||
notmuch (0.23.1-1~bpo8+1) jessie-backports; urgency=medium
|
||||
|
||||
* Rebuild for jessie-backports.
|
||||
|
|
17
debian/control
vendored
17
debian/control
vendored
|
@ -17,11 +17,12 @@ Build-Depends:
|
|||
python-all (>= 2.6.6-3~),
|
||||
python3-all (>= 3.1.2-7~),
|
||||
dh-python,
|
||||
dh-elpa (>= 1.3),
|
||||
python-sphinx (>= 1.0),
|
||||
ruby, ruby-dev (>>1:1.9.3~),
|
||||
emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~) |
|
||||
emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~),
|
||||
gdb [!s390x !ia64 !armel !ppc64el !mips !mipsel !mips64el],
|
||||
gdb [!s390x !ia64 !armel !ppc64el !mips !mipsel !mips64el !kfreebsd-any],
|
||||
dtach (>= 0.8),
|
||||
gpgsm <!nocheck>,
|
||||
gnupg <!nocheck>,
|
||||
|
@ -111,13 +112,13 @@ Description: Ruby interface to the notmuch mail search and index library
|
|||
|
||||
Package: notmuch-emacs
|
||||
Architecture: all
|
||||
Section: mail
|
||||
Breaks: notmuch (<<0.6~254~)
|
||||
Replaces: notmuch (<<0.6~254~)
|
||||
Depends: ${misc:Depends}, notmuch (>= ${source:Version}),
|
||||
emacs23 (>= 23~) | emacs23-nox (>=23~) | emacs23-lucid (>=23~) |
|
||||
emacs24 (>= 24~) | emacs24-nox (>=24~) | emacs24-lucid (>=24~),
|
||||
emacsen-common (>= 2.0.8)
|
||||
Depends: elpa-notmuch
|
||||
Description: thread-based email index, search and tagging (transitional package)
|
||||
This dummy package help ease transition to the new package elpa-notmuch
|
||||
|
||||
Package: elpa-notmuch
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, ${elpa:Depends}
|
||||
Description: thread-based email index, search and tagging (emacs interface)
|
||||
Notmuch is a system for indexing, searching, reading, and tagging
|
||||
large collections of email messages in maildir or mh format. It uses
|
||||
|
|
1
debian/elpa-notmuch.elpa
vendored
Normal file
1
debian/elpa-notmuch.elpa
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
emacs/*.el
|
1
debian/elpa-test
vendored
Normal file
1
debian/elpa-test
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
disable=true
|
1
debian/notmuch-emacs.dirs
vendored
1
debian/notmuch-emacs.dirs
vendored
|
@ -1 +0,0 @@
|
|||
usr/share/emacs/site-lisp/notmuch
|
1
debian/notmuch-emacs.emacsen-compat
vendored
1
debian/notmuch-emacs.emacsen-compat
vendored
|
@ -1 +0,0 @@
|
|||
0
|
48
debian/notmuch-emacs.emacsen-install
vendored
48
debian/notmuch-emacs.emacsen-install
vendored
|
@ -1,48 +0,0 @@
|
|||
#!/bin/sh
|
||||
# /usr/lib/emacsen-common/packages/install/notmuch-emacs
|
||||
set -e
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=notmuch
|
||||
|
||||
case "${FLAVOR}" in
|
||||
emacs)
|
||||
return 0
|
||||
;;
|
||||
xemacs*|emacs2[12])
|
||||
# patches welcome.
|
||||
echo install/${PACKAGE}: skipping install for unsupported emacsen flavor ${FLAVOR}
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
|
||||
esac
|
||||
|
||||
|
||||
elc_dir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
el_dir=/usr/share/emacs/site-lisp/${PACKAGE}
|
||||
|
||||
byte_compile_options="--quick --directory=${el_dir} -batch -f batch-byte-compile"
|
||||
|
||||
echo install/${PACKAGE}: byte-compiling for ${FLAVOR}
|
||||
|
||||
[ -d ${elc_dir} ] || mkdir ${elc_dir}
|
||||
|
||||
# Create symlinks to the .el files (see section 6E in debian-emacs
|
||||
# polcy). This makes complation easy, and also allows find-function
|
||||
# and find-library to work properly.
|
||||
(cd ${elc_dir} && ln -sf ${el_dir}/*.el .)
|
||||
|
||||
# Byte compile them
|
||||
(cd ${elc_dir}
|
||||
set +e
|
||||
${FLAVOR} ${byte_compile_options} *.el > Install.log 2>&1
|
||||
if test $? -ne 0
|
||||
then
|
||||
cat Install.log
|
||||
exit 1
|
||||
fi
|
||||
set -e
|
||||
gzip -9f Install.log)
|
||||
|
||||
exit 0;
|
34
debian/notmuch-emacs.emacsen-remove
vendored
34
debian/notmuch-emacs.emacsen-remove
vendored
|
@ -1,34 +0,0 @@
|
|||
#!/bin/sh
|
||||
# /usr/lib/emacsen-common/packages/remove/notmuch
|
||||
|
||||
set -e
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=notmuch
|
||||
elc_dir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
|
||||
case "${FLAVOR}" in
|
||||
emacs)
|
||||
return 0
|
||||
;;
|
||||
xemacs*|emacs2[12])
|
||||
# patches welcome.
|
||||
echo install/${PACKAGE}: skipping removal for unsupported emacsen flavor ${FLAVOR}
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo remove/${PACKAGE}: Handling removal for emacsen flavor ${FLAVOR}
|
||||
esac
|
||||
|
||||
echo remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR}
|
||||
|
||||
echo emacsen-common: purging byte-compiled files for ${FLAVOR}
|
||||
rm -f ${elc_dir}/*.elc
|
||||
rm -f ${elc_dir}/*.el
|
||||
rm -f ${elc_dir}/Install.log*
|
||||
if test -e "${elc_dir}"
|
||||
then
|
||||
rmdir --ignore-fail-on-non-empty "${elc_dir}"
|
||||
fi
|
||||
|
||||
exit 0;
|
1
debian/notmuch-emacs.install
vendored
1
debian/notmuch-emacs.install
vendored
|
@ -1 +0,0 @@
|
|||
usr/share/emacs/site-lisp/notmuch/*.el
|
7
debian/notmuch-emacs.postinst
vendored
7
debian/notmuch-emacs.postinst
vendored
|
@ -1,7 +0,0 @@
|
|||
dir="/var/lib/emacsen-common/state/package/installed"
|
||||
mkdir -p -m 0755 ${dir}
|
||||
touch ${dir}/notmuch-emacs
|
||||
#DEBHELPER#
|
||||
if [ -d /0755 ]; then
|
||||
rmdir /0755 || true
|
||||
fi
|
3
debian/notmuch-emacs.prerm
vendored
3
debian/notmuch-emacs.prerm
vendored
|
@ -1,3 +0,0 @@
|
|||
#DEBHELPER#
|
||||
dir="/var/lib/emacsen-common/state/package/installed"
|
||||
rm -f ${dir}/notmuch-emacs
|
5
debian/rules
vendored
5
debian/rules
vendored
|
@ -3,7 +3,7 @@
|
|||
python3_all = py3versions -s | xargs -n1 | xargs -t -I {} env {}
|
||||
|
||||
%:
|
||||
dh $@ --with python2,python3
|
||||
dh $@ --with python2,python3,elpa
|
||||
|
||||
override_dh_auto_configure:
|
||||
./configure --prefix=/usr \
|
||||
|
@ -12,8 +12,7 @@ override_dh_auto_configure:
|
|||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--emacslispdir=/usr/share/emacs/site-lisp/notmuch
|
||||
--localstatedir=/var
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build -- V=1
|
||||
|
|
|
@ -12,7 +12,7 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = u'notmuch'
|
||||
copyright = u'2009-2016, Carl Worth and many others'
|
||||
copyright = u'2009-2017, Carl Worth and many others'
|
||||
|
||||
location = os.path.dirname(__file__)
|
||||
|
||||
|
|
|
@ -60,6 +60,13 @@ indexing to Notmuch database, changing tags, and synchronizing tags to
|
|||
maildir flags. The ``--keep`` option may be used to settle for
|
||||
successful message file delivery.
|
||||
|
||||
This command supports the following special exit status code for
|
||||
errors most likely to be temporary in nature, e.g. failure to get a
|
||||
database write lock.
|
||||
|
||||
``75 (EX_TEMPFAIL)``
|
||||
A temporary failure occured; the user is invited to retry.
|
||||
|
||||
The exit status of the **post-insert** hook does not affect the exit
|
||||
status of the **insert** command.
|
||||
|
||||
|
|
|
@ -43,6 +43,14 @@ Supported options for **new** include
|
|||
``--quiet``
|
||||
Do not print progress or results.
|
||||
|
||||
EXIT STATUS
|
||||
===========
|
||||
|
||||
This command supports the following special exit status code
|
||||
|
||||
``75 (EX_TEMPFAIL)``
|
||||
A temporary failure occured; the user is invited to retry.
|
||||
|
||||
SEE ALSO
|
||||
========
|
||||
|
||||
|
|
1
emacs/.gitignore
vendored
1
emacs/.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.eldeps*
|
||||
*.elc
|
||||
notmuch-version.el
|
||||
notmuch-pkg.el
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
dir := emacs
|
||||
emacs_sources := \
|
||||
$(dir)/notmuch-lib.el \
|
||||
$(dir)/notmuch-compat.el \
|
||||
$(dir)/notmuch-parser.el \
|
||||
$(dir)/notmuch.el \
|
||||
$(dir)/notmuch-query.el \
|
||||
|
@ -27,6 +28,12 @@ $(dir)/notmuch-version.el: $(srcdir)/$(dir)/notmuch-version.el.tmpl
|
|||
@sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
|
||||
-e 's/%VERSION%/"$(VERSION)"/' $< > $@
|
||||
|
||||
$(dir)/notmuch-pkg.el: $(srcdir)/$(dir)/notmuch-pkg.el.tmpl
|
||||
@sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
|
||||
-e 's/%VERSION%/"$(ELPA_VERSION)"/' $< > $@
|
||||
|
||||
all: $(dir)/notmuch-pkg.el
|
||||
install-emacs: $(dir)/notmuch-pkg.el
|
||||
|
||||
emacs_images := \
|
||||
$(srcdir)/$(dir)/notmuch-logo.png
|
||||
|
@ -84,4 +91,4 @@ endif
|
|||
mkdir -p "$(DESTDIR)$(emacsetcdir)"
|
||||
install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
|
||||
|
||||
CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el
|
||||
CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el
|
||||
|
|
|
@ -136,11 +136,11 @@ toggles the setting in this buffer."
|
|||
(interactive)
|
||||
(if (local-variable-p 'notmuch-address-command)
|
||||
(kill-local-variable 'notmuch-address-command)
|
||||
(setq-local notmuch-address-command 'internal))
|
||||
(notmuch-setq-local notmuch-address-command 'internal))
|
||||
(if (boundp 'company-idle-delay)
|
||||
(if (local-variable-p 'company-idle-delay)
|
||||
(kill-local-variable 'company-idle-delay)
|
||||
(setq-local company-idle-delay nil))))
|
||||
(notmuch-setq-local company-idle-delay nil))))
|
||||
|
||||
(defun notmuch-address-matching (substring)
|
||||
"Returns a list of completion candidates matching SUBSTRING.
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
(require 'notmuch-lib)
|
||||
|
||||
(defvar notmuch-company-last-prefix nil)
|
||||
(make-variable-buffer-local 'notmuch-company-last-prefix)
|
||||
|
@ -53,7 +54,7 @@
|
|||
;; internal completion) can still be accessed via standard company
|
||||
;; functions, e.g., company-complete.
|
||||
(unless (eq notmuch-address-command 'internal)
|
||||
(setq-local company-idle-delay nil)))
|
||||
(notmuch-setq-local company-idle-delay nil)))
|
||||
|
||||
;;;###autoload
|
||||
(defun notmuch-company (command &optional arg &rest _ignore)
|
||||
|
|
73
emacs/notmuch-compat.el
Normal file
73
emacs/notmuch-compat.el
Normal file
|
@ -0,0 +1,73 @@
|
|||
;; Compatibility functions for emacs 23 and 24 pre 24.4
|
||||
|
||||
;; The functions in this file are copied from eamcs 24.4 and are
|
||||
;; Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2014 Free Software
|
||||
;; Foundation, Inc.
|
||||
|
||||
(if (fboundp 'setq-local)
|
||||
(defalias 'notmuch-setq-local 'setq-local)
|
||||
(defmacro notmuch-setq-local (var val)
|
||||
"Set variable VAR to value VAL in current buffer.
|
||||
|
||||
Backport of setq-local for emacs without setq-local (pre 24.3)."
|
||||
`(set (make-local-variable ',var) ,val)))
|
||||
|
||||
(if (fboundp 'read-char-choice)
|
||||
(defalias 'notmuch-read-char-choice 'read-char-choice)
|
||||
(defun notmuch-read-char-choice (prompt chars &optional inhibit-keyboard-quit)
|
||||
"Read and return one of CHARS, prompting for PROMPT.
|
||||
Any input that is not one of CHARS is ignored.
|
||||
|
||||
If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore
|
||||
keyboard-quit events while waiting for a valid input.
|
||||
|
||||
This is an exact copy of this function from emacs 24 for use on
|
||||
emacs 23, except with the one emacs 24 only function it calls
|
||||
inlined."
|
||||
(unless (consp chars)
|
||||
(error "Called `read-char-choice' without valid char choices"))
|
||||
(let (char done show-help (helpbuf " *Char Help*"))
|
||||
(let ((cursor-in-echo-area t)
|
||||
(executing-kbd-macro executing-kbd-macro)
|
||||
(esc-flag nil))
|
||||
(save-window-excursion ; in case we call help-form-show
|
||||
(while (not done)
|
||||
(unless (get-text-property 0 'face prompt)
|
||||
(setq prompt (propertize prompt 'face 'minibuffer-prompt)))
|
||||
(setq char (let ((inhibit-quit inhibit-keyboard-quit))
|
||||
(read-key prompt)))
|
||||
(and show-help (buffer-live-p (get-buffer helpbuf))
|
||||
(kill-buffer helpbuf))
|
||||
(cond
|
||||
((not (numberp char)))
|
||||
;; If caller has set help-form, that's enough.
|
||||
;; They don't explicitly have to add help-char to chars.
|
||||
((and help-form
|
||||
(eq char help-char)
|
||||
(setq show-help t)
|
||||
;; This is an inlined copy of help-form-show as that
|
||||
;; was introduced in emacs 24 too.
|
||||
(let ((msg (eval help-form)))
|
||||
(if (stringp msg)
|
||||
(with-output-to-temp-buffer " *Char Help*"
|
||||
(princ msg))))))
|
||||
((memq char chars)
|
||||
(setq done t))
|
||||
((and executing-kbd-macro (= char -1))
|
||||
;; read-event returns -1 if we are in a kbd macro and
|
||||
;; there are no more events in the macro. Attempt to
|
||||
;; get an event interactively.
|
||||
(setq executing-kbd-macro nil))
|
||||
((not inhibit-keyboard-quit)
|
||||
(cond
|
||||
((and (null esc-flag) (eq char ?\e))
|
||||
(setq esc-flag t))
|
||||
((memq char '(?\C-g ?\e))
|
||||
(keyboard-quit))))))))
|
||||
;; Display the question with the answer. But without cursor-in-echo-area.
|
||||
(message "%s%s" prompt (char-to-string char))
|
||||
char)))
|
||||
|
||||
;; End of compatibility functions
|
||||
|
||||
(provide 'notmuch-compat)
|
|
@ -27,6 +27,7 @@
|
|||
(require 'mm-view)
|
||||
(require 'mm-decode)
|
||||
(require 'cl)
|
||||
(require 'notmuch-compat)
|
||||
|
||||
(unless (require 'notmuch-version nil t)
|
||||
(defconst notmuch-emacs-version "unknown"
|
||||
|
|
|
@ -249,7 +249,7 @@ If CREATE is non-nil then create the folder if necessary."
|
|||
;; typo, or just the user want a new folder, let the user decide
|
||||
;; how to deal with it.
|
||||
(error
|
||||
(let ((response (read-char-choice
|
||||
(let ((response (notmuch-read-char-choice
|
||||
"Insert failed: (r)etry, (c)reate folder, (i)gnore, or (e)dit the header? "
|
||||
'(?r ?c ?i ?e))))
|
||||
(case response
|
||||
|
@ -335,7 +335,7 @@ if needed."
|
|||
;; fix it in some way.
|
||||
(let* ((prompt (format "Fcc %s is not a maildir: (r)etry, (c)reate folder, (i)gnore, or (e)dit the header? "
|
||||
fcc-header))
|
||||
(response (read-char-choice prompt '(?r ?c ?i ?e))))
|
||||
(response (notmuch-read-char-choice prompt '(?r ?c ?i ?e))))
|
||||
(case response
|
||||
(?r (notmuch-maildir-fcc-file-fcc fcc-header))
|
||||
(?c (if (file-writable-p fcc-header)
|
||||
|
|
6
emacs/notmuch-pkg.el.tmpl
Normal file
6
emacs/notmuch-pkg.el.tmpl
Normal file
|
@ -0,0 +1,6 @@
|
|||
;; %AG%
|
||||
(define-package
|
||||
"notmuch"
|
||||
%VERSION%
|
||||
"Emacs based front-end (MUA) for notmuch"
|
||||
nil)
|
|
@ -931,8 +931,8 @@ PROMPT is the string to prompt with."
|
|||
"Return the current query in this search buffer"
|
||||
notmuch-search-query-string)
|
||||
|
||||
;;;###autoload
|
||||
(put 'notmuch-search 'notmuch-doc "Search for messages.")
|
||||
;;;###autoload
|
||||
(defun notmuch-search (&optional query oldest-first target-thread target-line)
|
||||
"Display threads matching QUERY in a notmuch-search buffer.
|
||||
|
||||
|
@ -1058,8 +1058,9 @@ current search results AND that are tagged with the given tag."
|
|||
(with-current-buffer b
|
||||
(memq major-mode '(notmuch-show-mode
|
||||
notmuch-search-mode
|
||||
notmuch-tree-mode
|
||||
notmuch-hello-mode
|
||||
message-mode))))
|
||||
notmuch-message-mode))))
|
||||
|
||||
;;;###autoload
|
||||
(defun notmuch-cycle-notmuch-buffers ()
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#define _GNU_SOURCE /* for getline */
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sysexits.h>
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
|
@ -114,6 +115,16 @@ chomp_newline (char *str)
|
|||
str[strlen(str)-1] = '\0';
|
||||
}
|
||||
|
||||
/* Exit status code indicating temporary failure; user is invited to
|
||||
* retry.
|
||||
*
|
||||
* For example, file(s) in the mail store were removed or renamed
|
||||
* after notmuch new scanned the directories but before indexing the
|
||||
* file(s). If the file was renamed, the indexing might not be
|
||||
* complete, and the user is advised to re-run notmuch new.
|
||||
*/
|
||||
#define NOTMUCH_EXIT_TEMPFAIL EX_TEMPFAIL
|
||||
|
||||
/* Exit status code indicating the requested format version is too old
|
||||
* (support for that version has been dropped). CLI code should use
|
||||
* notmuch_exit_if_unsupported_format rather than directly exiting
|
||||
|
@ -478,6 +489,9 @@ print_status_database (const char *loc,
|
|||
const notmuch_database_t *database,
|
||||
notmuch_status_t status);
|
||||
|
||||
int
|
||||
status_to_exit (notmuch_status_t status);
|
||||
|
||||
#include "command-line-arguments.h"
|
||||
|
||||
extern char *notmuch_requested_db_uuid;
|
||||
|
|
|
@ -532,19 +532,20 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])
|
|||
action.sa_flags = 0;
|
||||
sigaction (SIGINT, &action, NULL);
|
||||
|
||||
if (notmuch_database_open (notmuch_config_get_database_path (config),
|
||||
NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much))
|
||||
return EXIT_FAILURE;
|
||||
|
||||
notmuch_exit_if_unmatched_db_uuid (notmuch);
|
||||
|
||||
/* Write the message to the Maildir new directory. */
|
||||
newpath = maildir_write_new (config, STDIN_FILENO, maildir);
|
||||
if (! newpath) {
|
||||
notmuch_database_destroy (notmuch);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
status = notmuch_database_open (notmuch_config_get_database_path (config),
|
||||
NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much);
|
||||
if (status)
|
||||
return keep ? NOTMUCH_STATUS_SUCCESS : status_to_exit (status);
|
||||
|
||||
notmuch_exit_if_unmatched_db_uuid (notmuch);
|
||||
|
||||
|
||||
/* Index the message. */
|
||||
status = add_file (notmuch, newpath, tag_ops, synchronize_flags, keep);
|
||||
|
||||
|
@ -577,5 +578,5 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])
|
|||
notmuch_run_hook (db_path, "post-insert");
|
||||
}
|
||||
|
||||
return status ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
return status_to_exit (status);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ typedef struct {
|
|||
int total_files;
|
||||
int processed_files;
|
||||
int added_messages, removed_messages, renamed_messages;
|
||||
int vanished_files;
|
||||
struct timeval tv_start;
|
||||
|
||||
_filename_list_t *removed_files;
|
||||
|
@ -280,11 +281,13 @@ add_file (notmuch_database_t *notmuch, const char *filename,
|
|||
case NOTMUCH_STATUS_FILE_NOT_EMAIL:
|
||||
fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename);
|
||||
break;
|
||||
/* Fatal issues. Don't process anymore. */
|
||||
case NOTMUCH_STATUS_FILE_ERROR:
|
||||
/* Someone renamed/removed the file between scandir and now. */
|
||||
state->vanished_files++;
|
||||
fprintf (stderr, "Unexpected error with file %s\n", filename);
|
||||
(void) print_status_database ("add_file", notmuch, status);
|
||||
goto DONE;
|
||||
break;
|
||||
/* Fatal issues. Don't process anymore. */
|
||||
case NOTMUCH_STATUS_READ_ONLY_DATABASE:
|
||||
case NOTMUCH_STATUS_XAPIAN_EXCEPTION:
|
||||
case NOTMUCH_STATUS_OUT_OF_MEMORY:
|
||||
|
@ -1151,5 +1154,11 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])
|
|||
if (!no_hooks && !ret && !interrupted)
|
||||
ret = notmuch_run_hook (db_path, "post-new");
|
||||
|
||||
return ret || interrupted ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
if (ret || interrupted)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
if (add_files_state.vanished_files)
|
||||
return NOTMUCH_EXIT_TEMPFAIL;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
16
status.c
16
status.c
|
@ -36,3 +36,19 @@ print_status_database (const char *loc,
|
|||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int
|
||||
status_to_exit (notmuch_status_t status)
|
||||
{
|
||||
switch (status) {
|
||||
case NOTMUCH_STATUS_SUCCESS:
|
||||
return EXIT_SUCCESS;
|
||||
case NOTMUCH_STATUS_OUT_OF_MEMORY:
|
||||
case NOTMUCH_STATUS_XAPIAN_EXCEPTION:
|
||||
case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
|
||||
case NOTMUCH_STATUS_FILE_ERROR:
|
||||
return EX_TEMPFAIL;
|
||||
default:
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,7 +189,6 @@ notmuch config set new.tags $OLDCONFIG
|
|||
|
||||
for code in OUT_OF_MEMORY XAPIAN_EXCEPTION FILE_NOT_EMAIL \
|
||||
READ_ONLY_DATABASE UPGRADE_REQUIRED PATH_ERROR; do
|
||||
gen_insert_msg
|
||||
cat <<EOF > index-file-$code.gdb
|
||||
set breakpoint pending on
|
||||
set logging file index-file-$code.log
|
||||
|
@ -201,15 +200,30 @@ continue
|
|||
end
|
||||
run
|
||||
EOF
|
||||
test_begin_subtest "error exit when add_message returns $code"
|
||||
gdb --batch-silent --return-child-result -x index-file-$code.gdb \
|
||||
--args notmuch insert < $gen_msg_filename
|
||||
test_expect_equal $? 1
|
||||
done
|
||||
|
||||
test_begin_subtest "success exit with --keep when add_message returns $code"
|
||||
gdb --batch-silent --return-child-result -x index-file-$code.gdb \
|
||||
--args notmuch insert --keep < $gen_msg_filename
|
||||
test_expect_equal $? 0
|
||||
gen_insert_msg
|
||||
|
||||
for code in FILE_NOT_EMAIL READ_ONLY_DATABASE UPGRADE_REQUIRED PATH_ERROR; do
|
||||
test_expect_code 1 "EXIT_FAILURE when add_message returns $code" \
|
||||
"gdb --batch-silent --return-child-result \
|
||||
-ex 'set args insert < $gen_msg_filename' \
|
||||
-x index-file-$code.gdb notmuch"
|
||||
test_expect_code 0 "success exit with --keep when add_message returns $code" \
|
||||
"gdb --batch-silent --return-child-result \
|
||||
-ex 'set args insert --keep < $gen_msg_filename' \
|
||||
-x index-file-$code.gdb notmuch"
|
||||
done
|
||||
|
||||
for code in OUT_OF_MEMORY XAPIAN_EXCEPTION ; do
|
||||
test_expect_code 75 "EX_TEMPFAIL when add_message returns $code" \
|
||||
"gdb --batch-silent --return-child-result \
|
||||
-ex 'set args insert < $gen_msg_filename' \
|
||||
-x index-file-$code.gdb notmuch"
|
||||
test_expect_code 0 "success exit with --keep when add_message returns $code" \
|
||||
"gdb --batch-silent --return-child-result \
|
||||
-ex 'set args insert --keep < $gen_msg_filename' \
|
||||
-x index-file-$code.gdb notmuch"
|
||||
done
|
||||
|
||||
test_done
|
||||
|
|
|
@ -59,7 +59,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content": "This is a test signed message.\n"},
|
||||
{"id": 3,
|
||||
"content-type": "application/pgp-signature",
|
||||
"content-length": 280}]}]},
|
||||
"content-length": "NONZERO"}]}]},
|
||||
[]]]]'
|
||||
test_expect_equal_json \
|
||||
"$output" \
|
||||
|
@ -94,7 +94,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content": "This is a test signed message.\n"},
|
||||
{"id": 3,
|
||||
"content-type": "application/pgp-signature",
|
||||
"content-length": 280}]}]},
|
||||
"content-length": "NONZERO"}]}]},
|
||||
[]]]]'
|
||||
test_expect_equal_json \
|
||||
"$output" \
|
||||
|
@ -127,7 +127,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content": "This is a test signed message.\n"},
|
||||
{"id": 3,
|
||||
"content-type": "application/pgp-signature",
|
||||
"content-length": 280}]}]},
|
||||
"content-length": "NONZERO"}]}]},
|
||||
[]]]]'
|
||||
test_expect_equal_json \
|
||||
"$output" \
|
||||
|
@ -197,7 +197,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content-type": "multipart/encrypted",
|
||||
"content": [{"id": 2,
|
||||
"content-type": "application/pgp-encrypted",
|
||||
"content-length": 11},
|
||||
"content-length": "NONZERO"},
|
||||
{"id": 3,
|
||||
"content-type": "multipart/mixed",
|
||||
"content": [{"id": 4,
|
||||
|
@ -205,7 +205,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content": "This is a test encrypted message.\n"},
|
||||
{"id": 5,
|
||||
"content-type": "application/octet-stream",
|
||||
"content-length": 28,
|
||||
"content-length": "NONZERO",
|
||||
"content-transfer-encoding": "base64",
|
||||
"filename": "TESTATTACHMENT"}]}]}]},
|
||||
[]]]]'
|
||||
|
@ -234,11 +234,9 @@ test_expect_equal_file OUTPUT TESTATTACHMENT
|
|||
|
||||
test_begin_subtest "decryption failure with missing key"
|
||||
mv "${GNUPGHOME}"{,.bak}
|
||||
# The length of the encrypted attachment varies so must be normalized.
|
||||
output=$(notmuch show --format=json --decrypt subject:"test encrypted message 001" \
|
||||
| notmuch_json_show_sanitize \
|
||||
| sed -e 's|"created": [1234567890]*|"created": 946728000|' \
|
||||
| sed -e 's|"content-length": 6[1234567890]*|"content-length": 652|')
|
||||
| sed -e 's|"created": [1234567890]*|"created": 946728000|')
|
||||
expected='[[[{"id": "XXXXX",
|
||||
"match": true,
|
||||
"excluded": false,
|
||||
|
@ -255,10 +253,10 @@ expected='[[[{"id": "XXXXX",
|
|||
"content-type": "multipart/encrypted",
|
||||
"content": [{"id": 2,
|
||||
"content-type": "application/pgp-encrypted",
|
||||
"content-length": 11},
|
||||
"content-length": "NONZERO"},
|
||||
{"id": 3,
|
||||
"content-type": "application/octet-stream",
|
||||
"content-length": 652}]}]},
|
||||
"content-length": "NONZERO"}]}]},
|
||||
[]]]]'
|
||||
test_expect_equal_json \
|
||||
"$output" \
|
||||
|
@ -295,7 +293,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content-type": "multipart/encrypted",
|
||||
"content": [{"id": 2,
|
||||
"content-type": "application/pgp-encrypted",
|
||||
"content-length": 11},
|
||||
"content-length": "NONZERO"},
|
||||
{"id": 3,
|
||||
"content-type": "text/plain",
|
||||
"content": "This is another test encrypted message.\n"}]}]},
|
||||
|
@ -370,7 +368,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content": "This is a test signed message.\n"},
|
||||
{"id": 3,
|
||||
"content-type": "application/pgp-signature",
|
||||
"content-length": 280}]}]},
|
||||
"content-length": "NONZERO"}]}]},
|
||||
[]]]]'
|
||||
test_expect_equal_json \
|
||||
"$output" \
|
||||
|
|
|
@ -69,7 +69,7 @@ expected='[[[{"id": "XXXXX",
|
|||
"content-type": "text/plain",
|
||||
"content": "This is a test signed message.\n"},
|
||||
{"id": 3,
|
||||
"content-length": 1922,
|
||||
"content-length": "NONZERO",
|
||||
"content-transfer-encoding": "base64",
|
||||
"content-type": "application/x-pkcs7-signature",
|
||||
"filename": "smime.p7s"}]}]},
|
||||
|
|
|
@ -736,7 +736,8 @@ notmuch_json_show_sanitize ()
|
|||
-e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \
|
||||
-e 's|"filename": "signature.asc",||g' \
|
||||
-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g' \
|
||||
-e 's|"timestamp": 97.......|"timestamp": 42|g'
|
||||
-e 's|"timestamp": 97.......|"timestamp": 42|g' \
|
||||
-e 's|"content-length": [1-9][0-9]*|"content-length": "NONZERO"|g'
|
||||
}
|
||||
|
||||
notmuch_emacs_error_sanitize ()
|
||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
|||
0.23.1
|
||||
0.23.5
|
||||
|
|
Loading…
Reference in a new issue