Re: [PATCH 1/2] lib: replace deprecated xapian call 'flush()' with 'commit()'

2016-10-25 Thread David Bremner
David Bremner  writes:

> This will make notmuch incompatible with Xapian before 1.1.0, which is
> more than 6 years old this point.

pushed to master, which already requires Xapian 1.2.6, as of 0.23.1

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


Re: [PATCH] emacs: tree: make tag updates show in the message pane

2016-10-25 Thread David Bremner
Mark Walters  writes:

> This makes tag changes appear in the message pane as well as in the
> tree window.
>

pushed to master

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


Re: [PATCH] test/test-lib.sh: execute basename(1)s lazier in test_expect_equal_file ()

2016-10-25 Thread David Bremner
Tomi Ollila  writes:

> Moved the 2 basename(1) executions to the test failure branch in
> test_expect_equal_file ().
>
> The output of basename(1) executions in function test_expect_equal_file ()
> are only used when tests fails -- when all tests pass these 2 basename(1)
> executions are no longer done at all.

I challenge you to measure the improvement; pushed to master anyway. ;)

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


Re: [PATCH] emacs: interesting-buffer bugfixes/updates

2016-10-25 Thread David Bremner
Mark Walters  writes:

> The command notmuch-interesting-buffer has got out of date -- it
> doesn't mention notmuch-tree, and it still refers to message-mode not
> notmuch-message-mode. Update both of these.
>

pushed to release and master.

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


Re: [PATCH v2] devel: Document emacs keybindings

2016-10-25 Thread David Bremner
Mark Walters  writes:

> This adds a file under devel listing all the keybindings sorted by key
> in the main three modes (search, show and tree).
>

pushed to master, after deleting blank line at the end.

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


Re: [PATCH] emacs: add compatability functions for emacs 23

2016-10-25 Thread Mark Walters

On Tue, 25 Oct 2016, David Bremner  wrote:
> Mark Walters  writes:
>
>> Some of the recent changes to the emacs code have used functions
>> introduced in emacs 24. The functions used are read-char-choice and
>> setq-local. This changeset adds compatability functions to
>> notmuch-lib so that it should work on emacs 23.
>>
>> ---
>>
>> Hi
>>
>> I tried compiling under emacs 23 recently and noticed that some recent
>> changes have used some features introuduced in emacs 24. I think we
>> still support emacs 23 so this changeset adds two compatability
>> functions.
>
> Hi Mark;
>
> Can you give me a recipe to reproduce the failures in emacs23? I only
> get warnings when building. Of course I believe that things will go
> wrong at some point calling non-existent functions.

Hi

You can make the read-char-choice fail by setting the fcc header to use
insert (the default), locking the database (eg doing notmuch tag
--batch), composing and sending a message. The Fcc will fail, which will
trigger the error.

For the setq-local start to compose a message, and then run
M-x notmuch-address-toggle-internal-completion
This will give the error.

Best wishes

Mark


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


Re: [PATCH] emacs: add compatability functions for emacs 23

2016-10-25 Thread David Bremner
Mark Walters  writes:

> Some of the recent changes to the emacs code have used functions
> introduced in emacs 24. The functions used are read-char-choice and
> setq-local. This changeset adds compatability functions to
> notmuch-lib so that it should work on emacs 23.
>
> ---
>
> Hi
>
> I tried compiling under emacs 23 recently and noticed that some recent
> changes have used some features introuduced in emacs 24. I think we
> still support emacs 23 so this changeset adds two compatability
> functions.

Hi Mark;

Can you give me a recipe to reproduce the failures in emacs23? I only
get warnings when building. Of course I believe that things will go
wrong at some point calling non-existent functions.

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


Re: [PATCH v2] completion: complete mimetype: search prefix

2016-10-25 Thread Tomi Ollila
Jani Nikula  writes:

> Use /etc/mime.types if available, with a homebrew sed parser, and fall
> back to a handful of common types otherwise.

I'd suggest the following line:

sed -n '/^[[:alpha:]]/ s/[[:space:]].*//p' /etc/mime.types

I tested the sed expression works on Linux and Darwin (macOS sierra).

I'd guess that any future 'ietf-token' starts with alpha character, and
'x-token' always starts with 'x'.

I agree with Jani that we'd rather used some other solution but so far
using sed(1) looks like best tolerable choice there is.

Tomi

PS: used something like the following to start the emacs to send this email:


  #!/bin/sh
  :; exec "${EMACS:-emacs}" --debug-init --load "$0" "$@"; exit

  (eval-after-load "notmuch"
(lambda ()
  (setq notmuch-command (concat (file-name-directory load-file-name)
"my-notmuch-remote-command"))
  (setq smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 465
smtpmail-stream-type 'tls
smtpmail-debug-info t
smtpmail-debug-verb t
message-send-mail-function 'message-smtpmail-send-it)
  ))
  (notmuch)

  ;; Local Variables:
  ;; mode: emacs-lisp
  ;; End:


PPS: first send failed, had to visit

  https://www.google.com/settings/security/lesssecureapps

... it would be nice to know what makes this "less secure" application ...


>  completion/notmuch-completion.bash | 32 
>  1 file changed, 32 insertions(+)
>
> diff --git a/completion/notmuch-completion.bash 
> b/completion/notmuch-completion.bash
> index 78047b5f424d..e7e7d68b04ed 100644
> --- a/completion/notmuch-completion.bash
> +++ b/completion/notmuch-completion.bash
> @@ -58,6 +58,34 @@ _notmuch_email()
>   sed 's/[^<]*<\([^>]*\)>/\1/' | tr "[:upper:]" "[:lower:]" | sort -u
>  }
>  
> +_notmuch_mimetype()
> +{
> +# use mime types from mime-support package if available, and fall
> +# back to a handful of common ones otherwise
> +if [ -r "/etc/mime.types" ]; then
> + sed -n '/^[^ \t#]/{s/[ \t].*//;p;}' < /etc/mime.types
> +else
> + cat < +application/gzip
> +application/msword
> +application/pdf
> +application/zip
> +audio/mpeg
> +audio/ogg
> +image/gif
> +image/jpeg
> +image/png
> +message/rfc822
> +text/calendar
> +text/html
> +text/plain
> +text/vcard
> +text/x-diff
> +text/x-vcalendar
> +EOF
> +fi
> +}
> +
>  _notmuch_search_terms()
>  {
>  local cur prev words cword split
> @@ -85,6 +113,10 @@ _notmuch_search_terms()
>   COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
>   sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
>   ;;
> + mimetype:*)
> + compopt -o nospace
> + COMPREPLY=( $(compgen -P "mimetype:" -W "`_notmuch_mimetype 
> ${cur}`" -- ${cur##mimetype:}) )
> + ;;
>   *)
>   local search_terms="from: to: subject: attachment: mimetype: tag: 
> id: thread: folder: path: date: lastmod:"
>   compopt -o nospace
> -- 
> 2.1.4
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch