Regarding notmuch and Fedora 16

2012-01-03 Thread Darren McGuicken
On Tue, 03 Jan 2012 17:09:39 -0500, Peter Portante  wrote:
> I am interested in using notmuch from within emacs, but have not been 
> able to get the latest version of notmuch (0.10.2) to compile under 
> Fedora 16.

Looks like we have a growing Fedora community, yay! :-)

And it's nothing you're doing wrong, per my reply to the other thread
F16 is using the current development version of gmime which has API
differences with the stable version 2.4.  The patch that exists isn't
part of standard notmuch since it in turn breaks 2.4 compatibility.

What's the right way to handle this?  I see 2.6 tarballs on gnome... is
2.6 officially out there and stable?
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/81486230/attachment.pgp>


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Darren McGuicken
On Tue, 03 Jan 2012 13:17:04 -0800, Jameson Graef Rollins  wrote:
> On Tue, 3 Jan 2012 20:59:51 +0100, Karel Zak  wrote:
> > Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(
> 
> Yikes that's old (0.11 is being released eminently).  There have been
> quite a few important changes since then.  Is there no one actively
> maintaining the fedora package?  Obviously there's not.  Anyone willing
> to take this on?

The problem is probably the use of gmime 2.5+ in Fedora.  We don't
currently seem to have a patchset which allows compilation across both
gmime <=2.4 and >=2.5, although we can do either/or.

There's also a build of 0.9 in koji:

http://koji.fedoraproject.org/koji/packageinfo?packageID=11257
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/1707262a/attachment-0001.pgp>


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Darren McGuicken
On Tue, 3 Jan 2012 20:59:51 +0100, Karel Zak  wrote:
> Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(

Take a look at id:"8762i8hrb9.fsf at bookbinder.fernseed.info".  There is a
gmime patch which still applies cleanly to everything up to the current
git head and which will let you build your own Fedora package.  I'm
using it myself with no issues.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/351e6a68/attachment.pgp>


[PATCH 1/2] add notmuch keybinding 'd'

2012-01-03 Thread Jani Nikula
On Tue, 03 Jan 2012 14:56:50 +, David Edmondson  wrote:
> On Sat, 16 Jul 2011 14:39:59 -0400, Antoine Beaupr?  
> wrote:
> > It adds a tag 'deleted' and removes the tags 'inbox' and 'unread'. It
> > works in show as well as in search mode
> 
> Various people have asked for a keybinding to add a 'delete' tag. Is
> this version the right one to choose?

The code's there, and talk is cheap... but I'd rather like to see a
solution that would make it easy for users to add arbitrary tagging
operations to key bindings, instead of a fixed binding for "deleted".

That way perhaps adding a default 'd' for "deleted" wouldn't feel so
special either.

> It seems sane to me (though I won't use it).

I wouldn't use it either, and I don't use "deleted" tag in the first
place. And even if I used it, I'd still like to keep the distinction
between "deleted after reading" and "deleted unread", which this patch
loses by removing the "unread" tag.


BR,
Jani.


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Karel Zak
On Tue, Jan 03, 2012 at 06:45:46PM +, Darren McGuicken wrote:
> On Tue, Jan 03, 2012 at 01:39:38PM +0100, Karel Zak wrote:
> > This is not another curses front-end for notmuch, this is mutt :-)
> 
> Outstanding!  Assuming this mail makes it to the list, I can confirm
> that it works well for me!  Although I will have to find and dust
> off an old .muttrc...

You can create notmuch specific rc file and use it by

mutt -F ~/.muttrc-notmuch

> I had to tweak your use of notmuch_database_find_message (I'm using
> 0.11_rc2) but otherwise it compiles fine.

Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(

But I'm ready to accept patches to make it compatible with other
distros and the latest upstream.

> Thanks so much for this.
> Is the intent that this remains a fork, or will it find its way back
> into upstream?

Good question. It would be nice to merge the change into mutt upstream, 
but from my point of view the mutt upstream is not too active. The whole 
project seems in maintenance mode, I don't see any really active 
*development* there. We will see... it's probably too early to answer
the question.

Karel

-- 
 Karel Zak  
 http://karelzak.blogspot.com


Emacs: Crypto: How to get automatic encryption?

2012-01-03 Thread Gregor Zattler
Dear notmuch developers,

I replied to a PGP/MIME signed and encrypted e-mail and was
astonished to realise that my reply was sent unencrypted (and
unsigened for that matter).

Actually the message buffer in which I write replies has Auto
Encryption Mode enabled, but nothing happens.  

Till now I investigated customisable variables for notmuch,
message mode, epg but did not find a way to tell Emacs to sign
and encrypt an e-mail if the correspondent (signed and) and
encrypted her/his e-mail.  

Is this doable?   How so?

Thanks for an answer, happy new year and thanks again for notmuch, Gregor



[PATCH] emacs: call "notmuch tag" only once when archiving a thread

2012-01-03 Thread Jani Nikula
Optimize thread archiving by combining all the -inbox tagging operations to
a single "notmuch tag" call. Also skip redisplay of tag changes in current
buffer, as it is immediately killed by the archiving functions.

For threads in the order of tens or a hundred inbox tagged messages, this
gives a noticeable speedup.

On the downside, IIRC Xapian does not perform very well if the query (in
this case a lot of message-ids OR'd together) is very big. It is unknown to
me at which point this approach would become slower than the original one
by one tagging approach, if ever.

Also, this introduces a limitation to the number of messages that can be
archived at the same time (through ARG_MAX limiting the command line). At
least on Linux this seems more like a theoretical limitation than a real
one.

Signed-off-by: Jani Nikula 

---

On my Linux machines, 'getconf ARG_MAX' gives 2097152, leading me to
believe that notmuch-show would choke on the thread that would be limited
by this anyway...
---
 emacs/notmuch-show.el |   23 ---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 5502efd..b9ea839 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1414,11 +1414,28 @@ argument, hide all of the messages."
   (interactive)
   (backward-button 1))

+(defun notmuch-show-thread-remove-tag ( toremove)
+  "Remove TOREMOVE tags from the current set of messages.
+
+Note: This function does not call `notmuch-show-set-tags' on the
+messages to redisplay the changed tags. This is meant to be
+called by `notmuch-show-archive-thread-internal' which kills the
+buffer afterwards."
+  (goto-char (point-min))
+  (let ((message-ids))
+(loop do
+ (let* ((current-tags (notmuch-show-get-tags))
+(new-tags (notmuch-show-del-tags-worker current-tags 
toremove)))
+   (unless (equal current-tags new-tags)
+ (add-to-list 'message-ids (notmuch-show-get-message-id
+ until (not (notmuch-show-goto-message-next)))
+(when message-ids
+  (apply 'notmuch-tag (mapconcat 'identity message-ids " OR ")
+(mapcar (lambda (s) (concat "-" s)) toremove)
+
 (defun notmuch-show-archive-thread-internal (show-next)
   ;; Remove the tag from the current set of messages.
-  (goto-char (point-min))
-  (loop do (notmuch-show-remove-tag "inbox")
-   until (not (notmuch-show-goto-message-next)))
+  (notmuch-show-thread-remove-tag "inbox")
   ;; Move to the next item in the search results, if any.
   (let ((parent-buffer notmuch-show-parent-buffer))
 (notmuch-kill-this-buffer)
-- 
1.7.5.4



[PATCH 2/2] update NEWS

2012-01-03 Thread Xavier Maillard
Hi,

sorry to bother with such a simple correction

On Mon,  2 Jan 2012 14:16:51 -0800, Jameson Graef Rollins  wrote:

> +Don't sort messages when creating a dump file
> +
> +  This speads up tag dumps considerably, without any loss of
  ^^
  speeds

/Xavier


Possible bug in tests with emacs 23.2.1 (debian stable)

2012-01-03 Thread Mark Walters

On Tue, 03 Jan 2012 15:07:04 +0200, Tomi Ollila  wrote:

> I did some more testing; doing
> 
> emacsclient --eval '(defun yes-or-no-p (prompt) t)' --eval '(kill-emacs)'
> 
> Will make emacs 23.2.1 exit also, so IMO this "workaround" could be
> used to "fix" the problem. 

I can confirm that the patch below (using this suggestion) fixes the
tests for me on emacs 23.2.1 and, on a different machine with emacs
23.3.1 they work just as before.

Best wishes

Mark

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 82767c0..218ce91 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -866,7 +866,7 @@ test_done () {

echo

-   [ -n "$EMACS_SERVER" ] && test_emacs '(kill-emacs)'
+   [ -n "$EMACS_SERVER" ] && test_emacs '(defun yes-or-no-p (prompt) t) 
(kill-emacs)'

if [ "$test_failure" = "0" ]; then
if [ "$test_broken" = "0" ]; then   


Python bindings for adoption

2012-01-03 Thread Xavier Maillard
On Mon, 02 Jan 2012 17:14:58 +0100, Sebastian Spaeth  
wrote:

> As I have repeatedly stated that I want to hand over the maintainership
> of the notmuch python bindings, and I would like to do it asap. I feel
> that people like Patrick Totzke, or Justus Winter who generally have
> been working on this far more intensely than I recently did are both
> very well positioned to take on that role :-). Most importantly, they
> actually work with the bindings while I don't use them myself anymore.

Thank you very much for your work and effort much appreciated.

/Xavier


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Xavier Maillard

On Tue, 3 Jan 2012 13:39:38 +0100, Karel Zak  wrote:
> 
> This is not another curses front-end for notmuch, this is mutt :-)
> 
> I have forked mutt to seriously integrate notmuch to this excellent e-mail
> client. I don't want to use symlinks or any other hacks to emulate virtual
> folders. My wish is mutt linked with libnotmuch.

Not sure I will ever use it but this is really an awesome news ! Good
job.

/Xavier


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Darren McGuicken
On Tue, Jan 03, 2012 at 01:39:38PM +0100, Karel Zak wrote:
> This is not another curses front-end for notmuch, this is mutt :-)

Outstanding!  Assuming this mail makes it to the list, I can confirm that it 
works well for me!  Although I will have to find and dust off an old .muttrc...

I had to tweak your use of notmuch_database_find_message (I'm using 0.11_rc2) 
but otherwise it compiles fine.  Thanks so much for this.  Is the intent that 
this remains a fork, or will it find its way back into upstream?


Regarding notmuch and Fedora 16

2012-01-03 Thread Peter Portante
Is there a good test suite for notmuch?

I'll take a crack at it using the latest 0.11 sources and see how far I get.

Thanks, -peter

On Tue, Jan 3, 2012 at 5:21 PM, Jameson Graef Rollins <
jrollins at finestructure.net> wrote:

> On Tue, 03 Jan 2012 17:09:39 -0500, Peter Portante <
> peter.a.portante at gmail.com> wrote:
> > I am interested in using notmuch from within emacs, but have not been
> > able to get the latest version of notmuch (0.10.2) to compile under
> > Fedora 16:
> >
> > [pportant at frodo notmuch-0.10.2]$ make
> > Use "make V=1" to see the verbose compile lines.
> > CC -O2 debugger.o
> > In file included from debugger.c:21:0:
> > notmuch-client.h:72:5: error: unknown type name
> 'GMimeSignatureValidity'
> > notmuch-client.h:86:5: error: unknown type name 'GMimeCipherContext'
> > make: *** [debugger.o] Error 1
> >
> > It appears that with GMime v2.6 (from v2.4), a change was made to remove
> > the use of GMimeSignatureValidity in favor of GMimeSignatureList, and
> > renamed GMimeCipherContext to GMimeCryptoContext.
>
> Hey, Peter.  Unfortunately notmuch is not yet compatible with gmime 2.6.
> gmime 2.5, which is apparently what's in Fedora 16, is the experimental
> release of the 2.6 interface.
>
> Updating notmuch to work with gmime 2.6 has been on the todo list for a
> while now, and it's obviously getting more urgent.  I've been planning
> on looking into it at it as soon as I can, but if anyone else wants to
> take a crack at it, I'll be happy to review patches.
>
> jamie.
>
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/6ff83d91/attachment.html>


Regarding notmuch and Fedora 16

2012-01-03 Thread Peter Portante
Hello folks,

I am interested in using notmuch from within emacs, but have not been 
able to get the latest version of notmuch (0.10.2) to compile under 
Fedora 16:

[pportant at frodo notmuch-0.10.2]$ make
Use "make V=1" to see the verbose compile lines.
CC -O2 debugger.o
In file included from debugger.c:21:0:
notmuch-client.h:72:5: error: unknown type name 'GMimeSignatureValidity'
notmuch-client.h:86:5: error: unknown type name 'GMimeCipherContext'
make: *** [debugger.o] Error 1

It appears that with GMime v2.6 (from v2.4), a change was made to remove 
the use of GMimeSignatureValidity in favor of GMimeSignatureList, and 
renamed GMimeCipherContext to GMimeCryptoContext.

Am I doing something wrong here? Using the wrong version of notmuch 
sources with Fedora 16? Or do I need to get gmime 2.4 installed? I have 
gmime.x86_64 2.5.8-1.fc16 installed, and it appears that provides the 
v2.6 include files for gmime (go figure).

Could there be work already done to solve this?

Thanks, -peter
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/23291e7f/attachment.html>


[PATCH] Perform mail polling asynchronously

2012-01-03 Thread David Edmondson
On Mon,  5 Sep 2011 07:14:36 +0300, Antono Vasiljev  wrote:
>   * reimplemented notmuch-poll( callback) so that it
> calls process asynchronously and run callback after process
> finished
>   * changed usage of notmuch-poll in notmuch-hello-poll-and-update
> and notmuch-search-poll-and-refresh-view

I don't understand the real purpose of this patch.

If the poll script runs asynchronously, won't the notmuch-search output
refresh and jump into my face when I'm busy doing something else? And,
if I'm not busy doing something else, why can't I just wait for the poll
script to complete?
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/93a2e6fb/attachment.pgp>


Possible bug in tests with emacs 23.2.1 (debian stable)

2012-01-03 Thread Tomi Ollila
On Mon, 02 Jan 2012 16:55:45 +0200, Tomi Ollila  wrote:
> On Sun, 1 Jan 2012 10:05:59 +, Mark Walters  gmail.com> wrote:

[ ... ]

> > As far as I can see emacs is not exiting when sent the "(kill-emacs)"
> > command from test-lib.sh (line 931 called from line 869). It seems
> > that this version of emacs prompts before exit asking "The current
> > server still has clients; delete them? (yes or no) ".
> > 
> > This seems to have been "fixed" (i.e. emacs does not ask for a prompt
> > in emacs revision 100150
> > http://bzr.savannah.gnu.org/lh/emacs/emacs-23/revision/100150).
> > 
> > If I change test-lib.sh line 869 to send "(setq kill-emacs-hook 'nil)
> > (kill-emacs)" instead of just (kill-emacs) then the tests work
> > correctly (*). But I definitely don't know enough emacs to know if
> > this is a sensible solution.

[ ... ]

> ... so my "vote" is that we don't attempt to work around this bug. Do
> we have KNOWN ISSUES file where this kind of things can be documented ?
> 
> > Note I get exactly the same behaviour when trying to build the debian
> > package from squeeze backports so it could be a bug in my setup in
> > which case my apologies for the noise!
> 
> It is not a bug in your setup; I tested it with emacs 23.2.1; running
> emacs from command line, executing (server-start) there and then executed
> emacsclient --eval '(kill-emacs)' in another terminal window.

I did some more testing; doing

emacsclient --eval '(defun yes-or-no-p (prompt) t)' --eval '(kill-emacs)'

Will make emacs 23.2.1 exit also, so IMO this "workaround" could be
used to "fix" the problem. 

> > Best wishes
> > 
> > Mark
> 
> Tomi

Tomi




[PATCH 1/2] add notmuch keybinding 'd'

2012-01-03 Thread David Edmondson
On Sat, 16 Jul 2011 14:39:59 -0400, Antoine Beaupr?  
wrote:
> It adds a tag 'deleted' and removes the tags 'inbox' and 'unread'. It
> works in show as well as in search mode

Various people have asked for a keybinding to add a 'delete' tag. Is
this version the right one to choose?

It seems sane to me (though I won't use it).
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/5525d3f8/attachment.pgp>


Regarding notmuch and Fedora 16

2012-01-03 Thread Jameson Graef Rollins
On Tue, 3 Jan 2012 17:36:32 -0500, Peter Portante  wrote:
> Is there a good test suite for notmuch?

Hey, Peter.  Yes, there is a very good, extensive test suite for
notmuch.  It can be run with "make test"

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/26a5cf8e/attachment.pgp>


Regarding notmuch and Fedora 16

2012-01-03 Thread Jameson Graef Rollins
On Tue, 03 Jan 2012 17:09:39 -0500, Peter Portante  wrote:
> I am interested in using notmuch from within emacs, but have not been 
> able to get the latest version of notmuch (0.10.2) to compile under 
> Fedora 16:
> 
> [pportant at frodo notmuch-0.10.2]$ make
> Use "make V=1" to see the verbose compile lines.
> CC -O2 debugger.o
> In file included from debugger.c:21:0:
> notmuch-client.h:72:5: error: unknown type name 'GMimeSignatureValidity'
> notmuch-client.h:86:5: error: unknown type name 'GMimeCipherContext'
> make: *** [debugger.o] Error 1
> 
> It appears that with GMime v2.6 (from v2.4), a change was made to remove 
> the use of GMimeSignatureValidity in favor of GMimeSignatureList, and 
> renamed GMimeCipherContext to GMimeCryptoContext.

Hey, Peter.  Unfortunately notmuch is not yet compatible with gmime 2.6.
gmime 2.5, which is apparently what's in Fedora 16, is the experimental
release of the 2.6 interface.

Updating notmuch to work with gmime 2.6 has been on the todo list for a
while now, and it's obviously getting more urgent.  I've been planning
on looking into it at it as soon as I can, but if anyone else wants to
take a crack at it, I'll be happy to review patches.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/e9bd7dd0/attachment.pgp>


[PATCH] emacs: Improved printing support.

2012-01-03 Thread David Edmondson
Add various functions to print notmuch messages and tie them together
with a simple frontend. No keybinding is currently made to encourage
paper saving.
---

Fix the lack of shell quoting for muttprint. Rename the ps-print
buffers to have a relevant name.

 emacs/Makefile.local   |3 +-
 emacs/notmuch-print.el |   79 
 emacs/notmuch-show.el  |   51 +++
 3 files changed, 132 insertions(+), 1 deletions(-)
 create mode 100644 emacs/notmuch-print.el

diff --git a/emacs/Makefile.local b/emacs/Makefile.local
index 0c58b82..4fee0e8 100644
--- a/emacs/Makefile.local
+++ b/emacs/Makefile.local
@@ -13,7 +13,8 @@ emacs_sources := \
$(dir)/notmuch-maildir-fcc.el \
$(dir)/notmuch-message.el \
$(dir)/notmuch-crypto.el \
-   $(dir)/coolj.el
+   $(dir)/coolj.el \
+   $(dir)/notmuch-print.el

 emacs_images := \
$(srcdir)/$(dir)/notmuch-logo.png
diff --git a/emacs/notmuch-print.el b/emacs/notmuch-print.el
new file mode 100644
index 000..d4b7ed4
--- /dev/null
+++ b/emacs/notmuch-print.el
@@ -0,0 +1,79 @@
+;; notmuch-print.el --- printing messages from notmuch.
+;;
+;; Copyright ? David Edmondson
+;;
+;; This file is part of Notmuch.
+;;
+;; Notmuch is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; Notmuch is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with Notmuch.  If not, see .
+;;
+;; Authors: David Edmondson 
+
+(defcustom notmuch-print-mechanism 'notmuch-print-lpr
+  "How should printing be done?"
+  :group 'notmuch
+  :type '(choice
+ (function :tag "Use lpr" notmuch-print-lpr)
+ (function :tag "Use ps-print" notmuch-print-ps-print)
+ (function :tag "Use ps-print then evince" 
notmuch-print-ps-print/evince)
+ (function :tag "Use muttprint" notmuch-print-muttprint)
+ (function :tag "Use muttprint then evince" 
notmuch-print-muttprint/evince)
+ (function :tag "Using a custom function")))
+
+(defmacro notmuch-print-with-file (filename  body)
+  `(with-temp-buffer
+ (insert-file-contents ,filename)
+ (set-buffer-modified-p nil)
+ , at body))
+
+(defun notmuch-print-lpr (filename msg)
+  (notmuch-print-with-file filename
+  (lpr-buffer)))
+
+(defun notmuch-print-ps-print (filename msg)
+  (let ((subject (plist-get (notmuch-show-get-prop :headers msg) :Subject)))
+(notmuch-print-with-file filename
+(rename-buffer subject t)
+(ps-print-buffer
+
+(defun notmuch-print-ps-print/evince (filename msg)
+  (let ((ps-file (make-temp-file "notmuch"))
+   (subject (plist-get (notmuch-show-get-prop :headers msg) :Subject)))
+(notmuch-print-with-file filename
+(rename-buffer subject t)
+(ps-print-buffer ps-file)
+(async-shell-command (concat "evince " ps-file)
+
+(defun notmuch-print-muttprint (filename msg)
+  (shell-command
+   (concat "muttprint "
+  "--file " (shell-quote-argument filename) " "
+  ;; Show the tags.
+  "--printed-headers 'Date_To_From_CC_Newsgroups_*Subject*_/Tags/'")))
+
+(defun notmuch-print-muttprint/evince (filename msg)
+  (let ((ps-file (make-temp-file "notmuch")))
+(call-process-shell-command
+ (concat "muttprint "
+"--file " (shell-quote-argument filename) " "
+;; Show the tags.
+"--printed-headers 'Date_To_From_CC_Newsgroups_*Subject*_/Tags/' "
+"--printer 'TO_FILE:" (shell-quote-argument ps-file) "'"))
+(async-shell-command (concat "evince " ps-file
+
+(defun notmuch-print-message (filename msg)
+  (funcall notmuch-print-mechanism filename msg))
+
+;;
+
+(provide 'notmuch-print)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 5502efd..55ccfc5 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -34,6 +34,7 @@
 (require 'notmuch-wash)
 (require 'notmuch-mua)
 (require 'notmuch-crypto)
+(require 'notmuch-print)

 (declare-function notmuch-call-notmuch-process "notmuch" ( args))
 (declare-function notmuch-fontify-headers "notmuch" nil)
@@ -186,6 +187,51 @@ indentation."
   mm-handle (> (notmuch-count-attachments mm-handle) 1
   (message "Done"))

+(defun notmuch-show-with-message-as-text (fn)
+  "Apply function `fn' to a text representation of the current
+message."
+
+  ;; Remake the header to ensure that all information is available.

Emacs: Crypto: How to get automatic encryption?

2012-01-03 Thread Jameson Graef Rollins
On Tue, 3 Jan 2012 20:56:51 +0100, Gregor Zattler  wrote:
> I replied to a PGP/MIME signed and encrypted e-mail and was
> astonished to realise that my reply was sent unencrypted (and
> unsigened for that matter).

Yikes!  Sorry this happened, and I hope nothing too sensitive was
exposed.

Auto signing of outgoing mail can be enabled by the following [0]:

(add-hook 'message-setup-hook mml-secure-message-sign-pgpmime)

You can configure the message-setup-hook with the customization UI as
well.

Unfortunately, auto encrypting of replies to encrypted emails is not yet
implemented.  It is desperately needed, though, obviously.  So this is a
good excuse to start a discussion about how we could achieve this.

It just occurs to me that a way to do this would be to have notmuch
reply add the appropriate mml #secure tag for encryption to the output
reply template, maybe with something like a --emacs option.  That would
be pretty easy to implement, although it would obviously be very UI
specific.

Another possibility would be for notmuch reply to add some sort of
header to the reply message to indicate that the original was encrypted,
and then do something in emacs to try to read that header and add the
appropriate mml #secure tag.  That would also be easy to implement in
the notmuch CLI, and it would be more UI agnostic, but it would require
a lot more elisp.

Or maybe we could support both?

Any other suggestions?

> Actually the message buffer in which I write replies has Auto
> Encryption Mode enabled, but nothing happens.  

That's unfortunate.  Can you explain exactly how you set this up, and
how it didn't work?

> Till now I investigated customisable variables for notmuch,
> message mode, epg but did not find a way to tell Emacs to sign
> and encrypt an e-mail if the correspondent (signed and) and
> encrypted her/his e-mail.  

It's actually usually mml that is used with message-mode to
sign/encrypt message, not epg.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/48b52dd0/attachment.pgp>


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Karel Zak

This is not another curses front-end for notmuch, this is mutt :-)

I have forked mutt to seriously integrate notmuch to this excellent e-mail
client. I don't want to use symlinks or any other hacks to emulate virtual
folders. My wish is mutt linked with libnotmuch.

Features:

 * in .muttrc defined virtual folders by notmuch queries

 * on-the-fly generate virtual folder from queries

 * add / remove / modify labels (notmuch tags)

 * support for INBOX --> archive use case

 * support  (key ';') mutt functionality to work with set of 
messages

 * all is implemented by regular mutt commands, so all is usable in user
   defined macros


More information:

 https://github.com/karelzak/mutt-kz/wiki

 https://raw.github.com/karelzak/mutt-kz/master/README.notmuch


TODO:

 * add  command to display all e-mails that belongs to the same
   thread as the current message. This command will be useful when you have a 
   new email in your INBOX and you want to see the rest of the archived thread.

-- 
 Karel Zak  
 http://karelzak.blogspot.com


[PATCH 1/2] add notmuch keybinding 'd'

2012-01-03 Thread Jameson Graef Rollins
On Tue, 03 Jan 2012 21:57:22 +0200, Jani Nikula  wrote:
> The code's there, and talk is cheap... but I'd rather like to see a
> solution that would make it easy for users to add arbitrary tagging
> operations to key bindings, instead of a fixed binding for "deleted".

It's already easy for users to add arbitrary key bindings.  It's emacs,
and the whole point of which is that it's infinitely extensible [0]:

(define-key notmuch-show-mode-map "d"
  (lambda ()
"Delete current message and advance to next message."
(interactive)
(notmuch-show-add-tag "delete")
(notmuch-show-next-open-message-or-pop)))

There really can't be an "easier" solution to add a key binding other
than just adding the above to your .emacs, and I really don't think it
would be worth it to try to make one.

The fact that it's already so easy to customize the key bindings is why
I've been reluctant (or even against) getting into protracted
discussions about what the default key bindings should be.  Everyone is
going to want a different behavior, and since it's easy enough to
customize, just let users define what they want.

> I wouldn't use it either, and I don't use "deleted" tag in the first
> place. And even if I used it, I'd still like to keep the distinction
> between "deleted after reading" and "deleted unread", which this patch
> loses by removing the "unread" tag.

Beyond what I just said about letting everyone customize things
themselves, I agree that I don't personally want other tags added or
removed when I "delete" a message.  The key binding above is actually
the one I use.

jamie.

[0] http://notmuchmail.org/emacstips/#index6h2
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/9c744320/attachment.pgp>


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Jameson Graef Rollins
On Tue, 3 Jan 2012 20:59:51 +0100, Karel Zak  wrote:
> Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(

Yikes that's old (0.11 is being released eminently).  There have been
quite a few important changes since then.  Is there no one actively
maintaining the fedora package?  Obviously there's not.  Anyone willing
to take this on?

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/67b744b6/attachment.pgp>


[PATCH] bound mail-parse-charset, used by some functions on mm-view.el when there is no charset metadata in the html

2012-01-03 Thread David Edmondson
On Tue, 3 Jan 2012 10:15:44 -0200, Konrad Scorciapino  wrote:
> It fixes some encoding issues. I thought it was already incorporated,
> as I no longer have this issue, but words like 'catal?' were being
> displayed as 'catala', iirc.

I'll mark the patch as 'obsolete', then.

> 2011/12/30 David Edmondson :
> > Konrad, can you provide a specific example of when this is useful? I
> > don't understand what it is for.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/5d75/attachment-0001.pgp>


[PATCH] emacs: Improved printing support.

2012-01-03 Thread David Edmondson
On Sat, 31 Dec 2011 15:15:36 -0400, David Bremner  wrote:
> print using muttprint doesn't seem to work for me, I get a message:
> 
>   "zsh:1: no matches found:
>   Date_To_From_CC_Newsgroups_*Subject*_/Tags/" 

zsh is appropriately fussy about unquoted wildcards. I'll send an
updated version.

> I wonder if the header line for ps-print could be easily improved (say
> by giving the buffer a suggestive name).

Good idea. Will look into it.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/03ef3165/attachment-0001.pgp>


[notmuch] [PATCH] Calls to notmuch get queued and executed asynchronously.

2012-01-03 Thread David Edmondson
At a quick look your code seems fine. I wonder if async operation should
be optional (and non-default?) given that it has different failure
modes?
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/13b99e06/attachment-0001.pgp>


Python bindings for adoption

2012-01-03 Thread Jameson Graef Rollins
On Mon, 02 Jan 2012 17:14:58 +0100, Sebastian Spaeth  
wrote:
> After a few weeks of notmuch abstinence I am being overwhelmed with 750
> new notmuch mails, and I really don't have the time or will (nor does my
> family approve) to spend enormous amounts of time on notmuch. I am
> already neglecting offlineimap, which also needs some attention.

Hey, Sebastian.  Thank you so much for your hard work developing and
maintaining the python bindings.  You've done really great work, and it
is very much appreciated.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20120103/bfc6150e/attachment.pgp>


[PATCH] bound mail-parse-charset, used by some functions on mm-view.el when there is no charset metadata in the html

2012-01-03 Thread Konrad Scorciapino
It fixes some encoding issues. I thought it was already incorporated,
as I no longer have this issue, but words like 'catal?' were being
displayed as 'catala', iirc.

2011/12/30 David Edmondson :
> Konrad, can you provide a specific example of when this is useful? I
> don't understand what it is for.


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Tim Gray
On Jan 03, 2012 at 01:39 PM +0100, Karel Zak wrote:
>
>This is not another curses front-end for notmuch, this is mutt :-)
>
>I have forked mutt to seriously integrate notmuch to this excellent e-mail
>client. I don't want to use symlinks or any other hacks to emulate virtual
>folders. My wish is mutt linked with libnotmuch.

Fantastic.  I was hoping someone would get around to doing this.


Re: [PATCH 1/2] test: add a function to run Python tests

2012-01-03 Thread Patrick Totzke
Quoting Thomas Jost (2011-12-13 17:21:34)
On Sun, 11 Dec 2011 18:58:18 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 Perhaps we should have a test-lib.py for test-specific stuff like this
 (similar to test-lib.el)?  I think it would be cleaner and makes it easy
 to add more Python test auxiliary functions later.

Well, right now that would probably be overkill: the stdout-to-file
redirection takes 3 lines at most. Besides we would still need to set
some environment variables to run python with the correct directories.
But of course if we need to add more helper functions for running python
tests, then a test-lib.py would be nice.

I agree that a test-lib python module that contains some helpers would be 
useful.
Specifically, we could use a test_expect_success helper that
wraps a given script into a try/except block.

Maybe we could even think about using one of Python's unit test libs for
that: doctest, unittest (both in the standard library) and nose seem to
be the most popular ones.
never used any of these.

I cleaned up the initial test a bit (see the following messages for the 
patches).
Here are a few suggestions for tests we should implement later:

test_begin_subtest tag messages # add_tag/remove_tag 
test_begin_subtest add messages # compare msg.get_filename to original 
test_begin_subtest find message 
test_begin_subtest remove messages 
test_begin_subtest list tags # get_all_tags() 
test_begin_subtest count messages # count_messages() 
test_begin_subtest count threads # MISSING in the bindings!  count_messages() 
test_begin_subtest count messages in thread # get_total_messages compare with 
notmuch search messages |wc 
test_begin_subtest exceptions # ReadOnlyDatabaseError, XapianError. 
test_begin_subtest format message content # format_message_as_text(indent=0)

best,
/p
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/2] clean up compare thread ids python test

2012-01-03 Thread Patrick Totzke
This makes the test script open the database in READ_ONLY mode
and use the libraries own sorting methods instead of sort.
---
 test/python |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/python b/test/python
index c3aa726..c318cc1 100755
--- a/test/python
+++ b/test/python
@@ -7,11 +7,12 @@ add_email_corpus
 test_begin_subtest compare thread ids
 test_python EOF
 import notmuch
-db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE)
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
 q_new = notmuch.Query(db, 'tag:inbox')
+q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
 for t in q_new.search_threads():
 print t.get_thread_id()
 EOF
-notmuch search --output=threads tag:inbox | sed s/^thread:// | sort  EXPECTED
-test_expect_equal_file (sort OUTPUT) EXPECTED
+notmuch search --sort=oldest-first --output=threads tag:inbox | sed 
s/^thread://  EXPECTED
+test_expect_equal_file OUTPUT EXPECTED
 test_done
-- 
1.7.5.4

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


[PATCH 2/2] python test compare message ids

2012-01-03 Thread Patrick Totzke
Introduces a second (trivial) test for the python
bindings that searches for message ids and compares
the output with that of `notmuch search`.
---
 test/python |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/test/python b/test/python
index c318cc1..6018c2d 100755
--- a/test/python
+++ b/test/python
@@ -15,4 +15,17 @@ for t in q_new.search_threads():
 EOF
 notmuch search --sort=oldest-first --output=threads tag:inbox | sed 
s/^thread://  EXPECTED
 test_expect_equal_file OUTPUT EXPECTED
+
+test_begin_subtest compare message ids
+test_python EOF
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+q_new = notmuch.Query(db, 'tag:inbox')
+q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
+for m in q_new.search_messages():
+print m.get_message_id()
+EOF
+notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// 
 EXPECTED
+test_expect_equal_file OUTPUT EXPECTED
+
 test_done
-- 
1.7.5.4

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


Re: Possible bug in tests with emacs 23.2.1 (debian stable)

2012-01-03 Thread Tomi Ollila
On Sun, 1 Jan 2012 10:05:59 +, Mark Walters markwalters1...@gmail.com 
wrote:
 Hello
 
 When I try and run the tests on my (fairly standard) debian stable
 system they hang after PASS   Search message: json, utf-8. This is
 with latest git (07768fb1bb50e) and emacs 23.2.1.
 
 As far as I can see emacs is not exiting when sent the (kill-emacs)
 command from test-lib.sh (line 931 called from line 869). It seems
 that this version of emacs prompts before exit asking The current
 server still has clients; delete them? (yes or no) .
 
 This seems to have been fixed (i.e. emacs does not ask for a prompt
 in emacs revision 100150
 http://bzr.savannah.gnu.org/lh/emacs/emacs-23/revision/100150).
 
 If I change test-lib.sh line 869 to send (setq kill-emacs-hook 'nil)
 (kill-emacs) instead of just (kill-emacs) then the tests work
 correctly (*). But I definitely don't know enough emacs to know if
 this is a sensible solution.

Interesting case... what if we want to use this hook from notmuch in
the future -- and, naturally, provide a test for this functionality.

Perhaps... if we wanted to support workaround for this particular bug,
the (setq kill-emacs-hook nil) could be put after (server-start) in
test-lib.sh...

.. but, I checked code and tested that. In case that hook is disabled,
server shutdown cleanup is not done (at least dangling server socket
file is left behind)...

... so my vote is that we don't attempt to work around this bug. Do
we have KNOWN ISSUES file where this kind of things can be documented ?

 Note I get exactly the same behaviour when trying to build the debian
 package from squeeze backports so it could be a bug in my setup in
 which case my apologies for the noise!

It is not a bug in your setup; I tested it with emacs 23.2.1; running
emacs from command line, executing (server-start) there and then executed
emacsclient --eval '(kill-emacs)' in another terminal window.

 Best wishes
 
 Mark

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


Re: [PATCH 5/5] python: add get_mtime() to the Message class

2012-01-03 Thread Sebastian Spaeth
On Tue, 13 Dec 2011 18:11:45 +0100, Thomas Jost schno...@schnouki.net wrote:
 ---
  bindings/python/notmuch/message.py |   20 
  1 files changed, 20 insertions(+), 0 deletions(-)

The patch looks good, so once this goes into libnotmuch, +1 for also
applying this one.

Sebastian


pgpOHiLclGgxV.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 5/7] py3k: the basestring and unicode types are removed in python 3

2012-01-03 Thread Sebastian Spaeth
Happy new year. Pushed patches 1-4 of this series so far. Looking fine,
but ugh, the below seems like a rather ugly hack in a function that is
probably called quite often.

Isn't there a more pretty variant avoiding these sys.version_info checks
all over the place?

 @@ -200,9 +201,9 @@ def _str(value):
  
  C++ code expects strings to be well formatted and
  unicode strings to have no null bytes.
 -if not isinstance(value, basestring):
 +if not isinstance(value, basestring if sys.version_info[0] == 2 else 
 str):
  raise TypeError(Expected str or unicode, got %s % str(type(value)))
 -if isinstance(value, unicode):
 +if sys.version_info[0] == 3 or isinstance(value, unicode):
  return value.encode('UTF-8')
  return value


pgpsZskLRluHs.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Segmentation fault at gmime-iconv with python binding

2012-01-03 Thread Sebastian Spaeth
On Fri, 30 Dec 2011 10:58:06 -0400, David Bremner da...@tethera.net wrote:
 On Thu, 29 Dec 2011 22:57:27 -0200, Kazuo Teramoto kaz@gmail.com wrote:
 
  notmuch CLI show the message correct. I know nothing about gmime or
  notmuch code, but can this be the case of the python bindings not
  calling g_mime_init() correctly?

The python binding are never calling g_mime_init, as that is not exposed
to the python bindings. So either libnotmuch needs to take care of that
or there needs to be a clear guideline as to when a binding needs to
call what gmime stuff itself.

Sebastian


pgpGCFBWgthfK.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/2] python: refactor print_messages into format_messages and print_messages

2012-01-03 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:01 +0100, Justus Winter 
4win...@informatik.uni-hamburg.de wrote:
 ---
  bindings/python/notmuch/message.py |   37 +--
  1 files changed, 26 insertions(+), 11 deletions(-)

Pushed


pgpV5PET0tvXX.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2012-01-03 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter 
4win...@informatik.uni-hamburg.de wrote:
 Formerly Message.get_replies() returned an iterator or None forcing
 users to check the result before iterating over it leading to strange
 looking code at the call site.
 
 Fix this flaw by adding an EmptyMessagesResult class that behaves like
 the Messages class but immediatly raises StopIteration if used as an
 iterator and returning objects of this type from Message.get_replies()
 to indicate that there are no replies.


Makes sense, pushed. It shouldn't cause the breaking of existing
clients... (famous last words)

Sebastian


pgp9Vw1cvyoIX.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Python bindings for adoption

2012-01-03 Thread Sebastian Spaeth
Hi all, a happy new year!

After a few weeks of notmuch abstinence I am being overwhelmed with 750
new notmuch mails, and I really don't have the time or will (nor does my
family approve) to spend enormous amounts of time on notmuch. I am
already neglecting offlineimap, which also needs some attention.

As I have repeatedly stated that I want to hand over the maintainership
of the notmuch python bindings, and I would like to do it asap. I feel
that people like Patrick Totzke, or Justus Winter who generally have
been working on this far more intensely than I recently did are both
very well positioned to take on that role :-). Most importantly, they
actually work with the bindings while I don't use them myself anymore.

I will only merge bug fixes as of now, and not invest time to refactor
the code or add lots of bells and whistles. Let me know if anyone would
volunteer to take them on.

Looking forward to see more cool notmuch, alot, afew, and muchother
development progress.

Sebastian


pgpa3Pp3UizcZ.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/3] pep8 fixes

2012-01-03 Thread Sebastian Spaeth
On Mon,  5 Dec 2011 21:12:33 +, Patrick Totzke 
patricktot...@googlemail.com wrote:
 no changes to the code, only fixed stuff denounced by `pep8 *py`

Hi, just tried to apply but it doesn't apply cleanly anymore, can you
update the patch to latest master? 

Sorry for letting this languish for so long.

Sebastian


pgp2XZaJQqris.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/4] emacs: unify search mechanisms

2012-01-03 Thread Xavier Maillard
On Mon, 02 Jan 2012 15:23:17 +0200, Tomi Ollila tomi.oll...@nixu.com wrote:
 On Sat, 31 Dec 2011 14:42:47 +0200, Jani Nikula j...@nikula.org wrote:
  On Fri, 30 Dec 2011 10:43:37 -0400, David Bremner da...@tethera.net wrote:
  
   Personally I would like to be able to customize the hello screen to
   remove the search box. I find it confusing that that 's' jumps to the
   search box there, and everywhere else brings up the mini-buffer. That
   might be just me, and the fact that I bind C-c s globally to
   notmuch-search.  I could easily believe that for new users having a
   search box is nicer.
  
  Would it be a suitable compromise to bind 's' to notmuch-search (the
  mini-buffer search) also in notmuch-hello, while leaving the search box
  there with a common history?
 
 I like this approach!

+1 but, like David, I'd like to be able to display/to hide the search
box via a keybinding and/or a configuration option.

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


[PATCH 2/2] update NEWS

2012-01-03 Thread Jameson Graef Rollins
This change looks slightly larger than it actually is, since I moved
the emacs section below the Performance and Memory Management
sections.
---
 NEWS |   51 ---
 1 files changed, 40 insertions(+), 11 deletions(-)

diff --git a/NEWS b/NEWS
index 6650126..ca8edb9 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,28 @@ Hooks
   supports pre-new and post-new hooks that are run before and after
   importing new messages into the database.
 
+Performance
+---
+
+Automatic tag query optimization
+
+  notmuch tag now automatically optimizes the user's query to
+  exclude messages whose tags won't change.  In the past, we've
+  suggested that people do this by hand; this is no longer necessary.
+
+Don't sort messages when creating a dump file
+
+  This speads up tag dumps considerably, without any loss of
+  information.
+
+Memory Management
+-
+
+Reduction of memory leaks
+
+  Two memory leaks when searching and showing messages were identified
+  and fixed in this release.
+
 Emacs Interface
 ---
 
@@ -34,22 +56,29 @@ Improvements in saved search management
   not inserted in front. It's also possible to define a sort function
   for displaying saved searches; alphabetical sort is provided.
 
-Performance

+Enable hooks for notmuch-hello-mode and notmuch-hello-refresh
 
-Automatic tag query optimization
+Customizable message indentation width
 
-  notmuch tag now automatically optimizes the user's query to
-  exclude messages whose tags won't change.  In the past, we've
-  suggested that people do this by hand; this is no longer necessary.
+  notmuch-show-indent-messages-width
 
-Memory Management
--
+Customizable thousands separator
 
-Reduction of memory leaks
+  The new configuartion variable is notmuch-hello-thousands-separator.
+  The default is now a space instead of a comma.
 
-  Two memory leaks when searching and showing messages were identified
-  and fixed in this release.
+Call notmuch-show instead of notmuch-search when clicking on
+buttonized id: links.
+
+New function notmuch-show-advance
+
+  This new function advances through just the current thread, and is
+  less invasive than notmuch-show-advance-and-archive.  It can easily
+  be bound to SPC with:
+
+  (define-key notmuch-show-mode-map   'notmuch-show-advance)
+
+Various performance improvements.
 
 New add-on tool
 ---
-- 
1.7.7.3

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


[PATCH 1/2] emacs: fix notmuch-show-indent-messages-width customization variable name

2012-01-03 Thread Jameson Graef Rollins
The name was originally notmuch-indent-messages-width, which is
inconsistent with our variable naming convention.
---
 emacs/notmuch-show.el |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index eee4da9..82d11c9 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -91,7 +91,7 @@ any given message.
   :group 'notmuch
   :type 'boolean)
 
-(defcustom notmuch-indent-messages-width 1
+(defcustom notmuch-show-indent-messages-width 1
   Width of message indentation in threads.
 
 Messages are shown indented according to their depth in a thread.
@@ -248,7 +248,7 @@ unchanged ADDRESS if parsing fails.
   Insert a notmuch style headerline based on HEADERS for a
 message at DEPTH in the current thread.
   (let ((start (point)))
-(insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth))
+(insert (notmuch-show-spaces-n (* notmuch-show-indent-messages-width 
depth))
(notmuch-show-clean-address (plist-get headers :From))
 (
date
@@ -739,7 +739,7 @@ current buffer, if possible.
 (setq content-end (point-marker))
 
 ;; Indent according to the depth in the thread.
-(indent-rigidly content-start content-end (* notmuch-indent-messages-width 
depth))
+(indent-rigidly content-start content-end (* 
notmuch-show-indent-messages-width depth))
 
 (setq message-end (point-max-marker))
 
-- 
1.7.7.3

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


[PATCH] emacs: fix notmuch-show-indent-messages-width customization variable name

2012-01-03 Thread Jameson Graef Rollins
The name was originally notmuch-indent-messages-width, which is
inconsistent with our variable naming convention.
---
Sorry, I forgot to fix the tests in the original patch.

 emacs/notmuch-show.el |6 +++---
 test/emacs|6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index eee4da9..82d11c9 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -91,7 +91,7 @@ any given message.
   :group 'notmuch
   :type 'boolean)
 
-(defcustom notmuch-indent-messages-width 1
+(defcustom notmuch-show-indent-messages-width 1
   Width of message indentation in threads.
 
 Messages are shown indented according to their depth in a thread.
@@ -248,7 +248,7 @@ unchanged ADDRESS if parsing fails.
   Insert a notmuch style headerline based on HEADERS for a
 message at DEPTH in the current thread.
   (let ((start (point)))
-(insert (notmuch-show-spaces-n (* notmuch-indent-messages-width depth))
+(insert (notmuch-show-spaces-n (* notmuch-show-indent-messages-width 
depth))
(notmuch-show-clean-address (plist-get headers :From))
 (
date
@@ -739,7 +739,7 @@ current buffer, if possible.
 (setq content-end (point-marker))
 
 ;; Indent according to the depth in the thread.
-(indent-rigidly content-start content-end (* notmuch-indent-messages-width 
depth))
+(indent-rigidly content-start content-end (* 
notmuch-show-indent-messages-width depth))
 
 (setq message-end (point-max-marker))
 
diff --git a/test/emacs b/test/emacs
index ca82445..f36718e 100755
--- a/test/emacs
+++ b/test/emacs
@@ -52,21 +52,21 @@ test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage
 
 test_begin_subtest Basic notmuch-show view in emacs default indentation
 maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
-test_emacs (let ((notmuch-indent-messages-width 1))
+test_emacs (let ((notmuch-show-indent-messages-width 1))
  (notmuch-show \$maildir_storage_thread\)
  (test-output))
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-maildir-storage
 
 test_begin_subtest Basic notmuch-show view in emacs without indentation
 maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
-test_emacs (let ((notmuch-indent-messages-width 0))
+test_emacs (let ((notmuch-show-indent-messages-width 0))
  (notmuch-show \$maildir_storage_thread\)
  (test-output))
 test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-without-indentation
 
 test_begin_subtest Basic notmuch-show view in emacs with fourfold indentation
 maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
-test_emacs (let ((notmuch-indent-messages-width 4))
+test_emacs (let ((notmuch-show-indent-messages-width 4))
  (notmuch-show \$maildir_storage_thread\)
  (test-output))
 test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
-- 
1.7.7.3

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


Re: [notmuch] [PATCH] Calls to notmuch get queued and executed asynchronously.

2012-01-03 Thread David Edmondson
At a quick look your code seems fine. I wonder if async operation should
be optional (and non-default?) given that it has different failure
modes?


pgpkQYEnXFRIz.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] emacs: Improved printing support.

2012-01-03 Thread David Edmondson
On Sat, 31 Dec 2011 15:15:36 -0400, David Bremner da...@tethera.net wrote:
 print using muttprint doesn't seem to work for me, I get a message:
 
   zsh:1: no matches found:
   Date_To_From_CC_Newsgroups_*Subject*_/Tags/ 

zsh is appropriately fussy about unquoted wildcards. I'll send an
updated version.

 I wonder if the header line for ps-print could be easily improved (say
 by giving the buffer a suggestive name).

Good idea. Will look into it.


pgpJpOJY2IMLE.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] bound mail-parse-charset, used by some functions on mm-view.el when there is no charset metadata in the html

2012-01-03 Thread David Edmondson
On Tue, 3 Jan 2012 10:15:44 -0200, Konrad Scorciapino k...@konr.mobi wrote:
 It fixes some encoding issues. I thought it was already incorporated,
 as I no longer have this issue, but words like 'català' were being
 displayed as 'catala', iirc.

I'll mark the patch as 'obsolete', then.

 2011/12/30 David Edmondson d...@dme.org:
  Konrad, can you provide a specific example of when this is useful? I
  don't understand what it is for.


pgpE0VjS0z09s.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Karel Zak

This is not another curses front-end for notmuch, this is mutt :-)

I have forked mutt to seriously integrate notmuch to this excellent e-mail
client. I don't want to use symlinks or any other hacks to emulate virtual
folders. My wish is mutt linked with libnotmuch.

Features:

 * in .muttrc defined virtual folders by notmuch queries

 * on-the-fly generate virtual folder from queries

 * add / remove / modify labels (notmuch tags)

 * support for INBOX -- archive use case

 * support tag-prefix (key ';') mutt functionality to work with set of 
messages

 * all is implemented by regular mutt commands, so all is usable in user
   defined macros


More information:

 https://github.com/karelzak/mutt-kz/wiki

 https://raw.github.com/karelzak/mutt-kz/master/README.notmuch


TODO:

 * add entire-thread command to display all e-mails that belongs to the same
   thread as the current message. This command will be useful when you have a 
   new email in your INBOX and you want to see the rest of the archived thread.

-- 
 Karel Zak  k...@redhat.com
 http://karelzak.blogspot.com
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Possible bug in tests with emacs 23.2.1 (debian stable)

2012-01-03 Thread Tomi Ollila
On Mon, 02 Jan 2012 16:55:45 +0200, Tomi Ollila tomi.oll...@iki.fi wrote:
 On Sun, 1 Jan 2012 10:05:59 +, Mark Walters markwalters1...@gmail.com 
 wrote:

[ ... ]

  As far as I can see emacs is not exiting when sent the (kill-emacs)
  command from test-lib.sh (line 931 called from line 869). It seems
  that this version of emacs prompts before exit asking The current
  server still has clients; delete them? (yes or no) .
  
  This seems to have been fixed (i.e. emacs does not ask for a prompt
  in emacs revision 100150
  http://bzr.savannah.gnu.org/lh/emacs/emacs-23/revision/100150).
  
  If I change test-lib.sh line 869 to send (setq kill-emacs-hook 'nil)
  (kill-emacs) instead of just (kill-emacs) then the tests work
  correctly (*). But I definitely don't know enough emacs to know if
  this is a sensible solution.

[ ... ]

 ... so my vote is that we don't attempt to work around this bug. Do
 we have KNOWN ISSUES file where this kind of things can be documented ?
 
  Note I get exactly the same behaviour when trying to build the debian
  package from squeeze backports so it could be a bug in my setup in
  which case my apologies for the noise!
 
 It is not a bug in your setup; I tested it with emacs 23.2.1; running
 emacs from command line, executing (server-start) there and then executed
 emacsclient --eval '(kill-emacs)' in another terminal window.

I did some more testing; doing

emacsclient --eval '(defun yes-or-no-p (prompt) t)' --eval '(kill-emacs)'

Will make emacs 23.2.1 exit also, so IMO this workaround could be
used to fix the problem. 

  Best wishes
  
  Mark
 
 Tomi

Tomi


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


[PATCH] emacs: Improved printing support.

2012-01-03 Thread David Edmondson
Add various functions to print notmuch messages and tie them together
with a simple frontend. No keybinding is currently made to encourage
paper saving.
---

Fix the lack of shell quoting for muttprint. Rename the ps-print
buffers to have a relevant name.

 emacs/Makefile.local   |3 +-
 emacs/notmuch-print.el |   79 
 emacs/notmuch-show.el  |   51 +++
 3 files changed, 132 insertions(+), 1 deletions(-)
 create mode 100644 emacs/notmuch-print.el

diff --git a/emacs/Makefile.local b/emacs/Makefile.local
index 0c58b82..4fee0e8 100644
--- a/emacs/Makefile.local
+++ b/emacs/Makefile.local
@@ -13,7 +13,8 @@ emacs_sources := \
$(dir)/notmuch-maildir-fcc.el \
$(dir)/notmuch-message.el \
$(dir)/notmuch-crypto.el \
-   $(dir)/coolj.el
+   $(dir)/coolj.el \
+   $(dir)/notmuch-print.el
 
 emacs_images := \
$(srcdir)/$(dir)/notmuch-logo.png
diff --git a/emacs/notmuch-print.el b/emacs/notmuch-print.el
new file mode 100644
index 000..d4b7ed4
--- /dev/null
+++ b/emacs/notmuch-print.el
@@ -0,0 +1,79 @@
+;; notmuch-print.el --- printing messages from notmuch.
+;;
+;; Copyright © David Edmondson
+;;
+;; This file is part of Notmuch.
+;;
+;; Notmuch is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; Notmuch is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with Notmuch.  If not, see http://www.gnu.org/licenses/.
+;;
+;; Authors: David Edmondson d...@dme.org
+
+(defcustom notmuch-print-mechanism 'notmuch-print-lpr
+  How should printing be done?
+  :group 'notmuch
+  :type '(choice
+ (function :tag Use lpr notmuch-print-lpr)
+ (function :tag Use ps-print notmuch-print-ps-print)
+ (function :tag Use ps-print then evince 
notmuch-print-ps-print/evince)
+ (function :tag Use muttprint notmuch-print-muttprint)
+ (function :tag Use muttprint then evince 
notmuch-print-muttprint/evince)
+ (function :tag Using a custom function)))
+
+(defmacro notmuch-print-with-file (filename rest body)
+  `(with-temp-buffer
+ (insert-file-contents ,filename)
+ (set-buffer-modified-p nil)
+ ,@body))
+
+(defun notmuch-print-lpr (filename msg)
+  (notmuch-print-with-file filename
+  (lpr-buffer)))
+
+(defun notmuch-print-ps-print (filename msg)
+  (let ((subject (plist-get (notmuch-show-get-prop :headers msg) :Subject)))
+(notmuch-print-with-file filename
+(rename-buffer subject t)
+(ps-print-buffer
+
+(defun notmuch-print-ps-print/evince (filename msg)
+  (let ((ps-file (make-temp-file notmuch))
+   (subject (plist-get (notmuch-show-get-prop :headers msg) :Subject)))
+(notmuch-print-with-file filename
+(rename-buffer subject t)
+(ps-print-buffer ps-file)
+(async-shell-command (concat evince  ps-file)
+
+(defun notmuch-print-muttprint (filename msg)
+  (shell-command
+   (concat muttprint 
+  --file  (shell-quote-argument filename)  
+  ;; Show the tags.
+  --printed-headers 'Date_To_From_CC_Newsgroups_*Subject*_/Tags/')))
+
+(defun notmuch-print-muttprint/evince (filename msg)
+  (let ((ps-file (make-temp-file notmuch)))
+(call-process-shell-command
+ (concat muttprint 
+--file  (shell-quote-argument filename)  
+;; Show the tags.
+--printed-headers 'Date_To_From_CC_Newsgroups_*Subject*_/Tags/' 
+--printer 'TO_FILE: (shell-quote-argument ps-file) '))
+(async-shell-command (concat evince  ps-file
+
+(defun notmuch-print-message (filename msg)
+  (funcall notmuch-print-mechanism filename msg))
+
+;;
+
+(provide 'notmuch-print)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 5502efd..55ccfc5 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -34,6 +34,7 @@
 (require 'notmuch-wash)
 (require 'notmuch-mua)
 (require 'notmuch-crypto)
+(require 'notmuch-print)
 
 (declare-function notmuch-call-notmuch-process notmuch (rest args))
 (declare-function notmuch-fontify-headers notmuch nil)
@@ -186,6 +187,51 @@ indentation.
   mm-handle ( (notmuch-count-attachments mm-handle) 1
   (message Done))
 
+(defun notmuch-show-with-message-as-text (fn)
+  Apply function `fn' to a text representation of the current
+message.
+
+  ;; Remake the header to ensure that all information is available.
+  (let* ((to 

Re: [ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Tim Gray

On Jan 03, 2012 at 01:39 PM +0100, Karel Zak wrote:


This is not another curses front-end for notmuch, this is mutt :-)

I have forked mutt to seriously integrate notmuch to this excellent e-mail
client. I don't want to use symlinks or any other hacks to emulate virtual
folders. My wish is mutt linked with libnotmuch.


Fantastic.  I was hoping someone would get around to doing this.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/2] add notmuch keybinding 'd'

2012-01-03 Thread David Edmondson
On Sat, 16 Jul 2011 14:39:59 -0400, Antoine Beaupré anar...@koumbit.org wrote:
 It adds a tag 'deleted' and removes the tags 'inbox' and 'unread'. It
 works in show as well as in search mode

Various people have asked for a keybinding to add a 'delete' tag. Is
this version the right one to choose?

It seems sane to me (though I won't use it).


pgpwGU12vOd5F.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] Perform mail polling asynchronously

2012-01-03 Thread David Edmondson
On Mon,  5 Sep 2011 07:14:36 +0300, Antono Vasiljev s...@antono.info wrote:
   * reimplemented notmuch-poll(optional callback) so that it
 calls process asynchronously and run callback after process
 finished
   * changed usage of notmuch-poll in notmuch-hello-poll-and-update
 and notmuch-search-poll-and-refresh-view

I don't understand the real purpose of this patch.

If the poll script runs asynchronously, won't the notmuch-search output
refresh and jump into my face when I'm busy doing something else? And,
if I'm not busy doing something else, why can't I just wait for the poll
script to complete?


pgpuAElLSJgDb.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Python bindings for adoption

2012-01-03 Thread Jameson Graef Rollins
On Mon, 02 Jan 2012 17:14:58 +0100, Sebastian Spaeth sebast...@sspaeth.de 
wrote:
 After a few weeks of notmuch abstinence I am being overwhelmed with 750
 new notmuch mails, and I really don't have the time or will (nor does my
 family approve) to spend enormous amounts of time on notmuch. I am
 already neglecting offlineimap, which also needs some attention.

Hey, Sebastian.  Thank you so much for your hard work developing and
maintaining the python bindings.  You've done really great work, and it
is very much appreciated.

jamie.


pgp0IOUb5ctaJ.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] emacs: call notmuch tag only once when archiving a thread

2012-01-03 Thread Jani Nikula
Optimize thread archiving by combining all the -inbox tagging operations to
a single notmuch tag call. Also skip redisplay of tag changes in current
buffer, as it is immediately killed by the archiving functions.

For threads in the order of tens or a hundred inbox tagged messages, this
gives a noticeable speedup.

On the downside, IIRC Xapian does not perform very well if the query (in
this case a lot of message-ids OR'd together) is very big. It is unknown to
me at which point this approach would become slower than the original one
by one tagging approach, if ever.

Also, this introduces a limitation to the number of messages that can be
archived at the same time (through ARG_MAX limiting the command line). At
least on Linux this seems more like a theoretical limitation than a real
one.

Signed-off-by: Jani Nikula j...@nikula.org

---

On my Linux machines, 'getconf ARG_MAX' gives 2097152, leading me to
believe that notmuch-show would choke on the thread that would be limited
by this anyway...
---
 emacs/notmuch-show.el |   23 ---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 5502efd..b9ea839 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1414,11 +1414,28 @@ argument, hide all of the messages.
   (interactive)
   (backward-button 1))
 
+(defun notmuch-show-thread-remove-tag (rest toremove)
+  Remove TOREMOVE tags from the current set of messages.
+
+Note: This function does not call `notmuch-show-set-tags' on the
+messages to redisplay the changed tags. This is meant to be
+called by `notmuch-show-archive-thread-internal' which kills the
+buffer afterwards.
+  (goto-char (point-min))
+  (let ((message-ids))
+(loop do
+ (let* ((current-tags (notmuch-show-get-tags))
+(new-tags (notmuch-show-del-tags-worker current-tags 
toremove)))
+   (unless (equal current-tags new-tags)
+ (add-to-list 'message-ids (notmuch-show-get-message-id
+ until (not (notmuch-show-goto-message-next)))
+(when message-ids
+  (apply 'notmuch-tag (mapconcat 'identity message-ids  OR )
+(mapcar (lambda (s) (concat - s)) toremove)
+
 (defun notmuch-show-archive-thread-internal (show-next)
   ;; Remove the tag from the current set of messages.
-  (goto-char (point-min))
-  (loop do (notmuch-show-remove-tag inbox)
-   until (not (notmuch-show-goto-message-next)))
+  (notmuch-show-thread-remove-tag inbox)
   ;; Move to the next item in the search results, if any.
   (let ((parent-buffer notmuch-show-parent-buffer))
 (notmuch-kill-this-buffer)
-- 
1.7.5.4

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


Re: [ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Xavier Maillard

On Tue, 3 Jan 2012 13:39:38 +0100, Karel Zak k...@redhat.com wrote:
 
 This is not another curses front-end for notmuch, this is mutt :-)
 
 I have forked mutt to seriously integrate notmuch to this excellent e-mail
 client. I don't want to use symlinks or any other hacks to emulate virtual
 folders. My wish is mutt linked with libnotmuch.

Not sure I will ever use it but this is really an awesome news ! Good
job.

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


Re: Python bindings for adoption

2012-01-03 Thread Xavier Maillard
On Mon, 02 Jan 2012 17:14:58 +0100, Sebastian Spaeth sebast...@sspaeth.de 
wrote:

 As I have repeatedly stated that I want to hand over the maintainership
 of the notmuch python bindings, and I would like to do it asap. I feel
 that people like Patrick Totzke, or Justus Winter who generally have
 been working on this far more intensely than I recently did are both
 very well positioned to take on that role :-). Most importantly, they
 actually work with the bindings while I don't use them myself anymore.

Thank you very much for your work and effort much appreciated.

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


Re: [PATCH 2/2] update NEWS

2012-01-03 Thread Xavier Maillard
Hi,

sorry to bother with such a simple correction

On Mon,  2 Jan 2012 14:16:51 -0800, Jameson Graef Rollins 
jroll...@finestructure.net wrote:

 +Don't sort messages when creating a dump file
 +
 +  This speads up tag dumps considerably, without any loss of
  ^^
  speeds

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


Emacs: Crypto: How to get automatic encryption?

2012-01-03 Thread Gregor Zattler
Dear notmuch developers,

I replied to a PGP/MIME signed and encrypted e-mail and was
astonished to realise that my reply was sent unencrypted (and
unsigened for that matter).

Actually the message buffer in which I write replies has Auto
Encryption Mode enabled, but nothing happens.  

Till now I investigated customisable variables for notmuch,
message mode, epg but did not find a way to tell Emacs to sign
and encrypt an e-mail if the correspondent (signed and) and
encrypted her/his e-mail.  

Is this doable?   How so?

Thanks for an answer, happy new year and thanks again for notmuch, Gregor

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


Re: [PATCH 1/2] add notmuch keybinding 'd'

2012-01-03 Thread Jani Nikula
On Tue, 03 Jan 2012 14:56:50 +, David Edmondson d...@dme.org wrote:
 On Sat, 16 Jul 2011 14:39:59 -0400, Antoine Beaupré anar...@koumbit.org 
 wrote:
  It adds a tag 'deleted' and removes the tags 'inbox' and 'unread'. It
  works in show as well as in search mode
 
 Various people have asked for a keybinding to add a 'delete' tag. Is
 this version the right one to choose?

The code's there, and talk is cheap... but I'd rather like to see a
solution that would make it easy for users to add arbitrary tagging
operations to key bindings, instead of a fixed binding for deleted.

That way perhaps adding a default 'd' for deleted wouldn't feel so
special either.

 It seems sane to me (though I won't use it).

I wouldn't use it either, and I don't use deleted tag in the first
place. And even if I used it, I'd still like to keep the distinction
between deleted after reading and deleted unread, which this patch
loses by removing the unread tag.


BR,
Jani.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Karel Zak
On Tue, Jan 03, 2012 at 06:45:46PM +, Darren McGuicken wrote:
 On Tue, Jan 03, 2012 at 01:39:38PM +0100, Karel Zak wrote:
  This is not another curses front-end for notmuch, this is mutt :-)
 
 Outstanding!  Assuming this mail makes it to the list, I can confirm
 that it works well for me!  Although I will have to find and dust
 off an old .muttrc...

You can create notmuch specific rc file and use it by

mutt -F ~/.muttrc-notmuch

 I had to tweak your use of notmuch_database_find_message (I'm using
 0.11_rc2) but otherwise it compiles fine.

Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(

But I'm ready to accept patches to make it compatible with other
distros and the latest upstream.

 Thanks so much for this.
 Is the intent that this remains a fork, or will it find its way back
 into upstream?

Good question. It would be nice to merge the change into mutt upstream, 
but from my point of view the mutt upstream is not too active. The whole 
project seems in maintenance mode, I don't see any really active 
*development* there. We will see... it's probably too early to answer
the question.

Karel

-- 
 Karel Zak  k...@redhat.com
 http://karelzak.blogspot.com
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Possible bug in tests with emacs 23.2.1 (debian stable)

2012-01-03 Thread Mark Walters

On Tue, 03 Jan 2012 15:07:04 +0200, Tomi Ollila tomi.oll...@nixu.com wrote:

 I did some more testing; doing
 
 emacsclient --eval '(defun yes-or-no-p (prompt) t)' --eval '(kill-emacs)'
 
 Will make emacs 23.2.1 exit also, so IMO this workaround could be
 used to fix the problem. 

I can confirm that the patch below (using this suggestion) fixes the
tests for me on emacs 23.2.1 and, on a different machine with emacs
23.3.1 they work just as before.

Best wishes

Mark

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 82767c0..218ce91 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -866,7 +866,7 @@ test_done () {
 
echo
 
-   [ -n $EMACS_SERVER ]  test_emacs '(kill-emacs)'
+   [ -n $EMACS_SERVER ]  test_emacs '(defun yes-or-no-p (prompt) t) 
(kill-emacs)'
 
if [ $test_failure = 0 ]; then
if [ $test_broken = 0 ]; then   
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Jameson Graef Rollins
On Tue, 3 Jan 2012 20:59:51 +0100, Karel Zak k...@redhat.com wrote:
 Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(

Yikes that's old (0.11 is being released eminently).  There have been
quite a few important changes since then.  Is there no one actively
maintaining the fedora package?  Obviously there's not.  Anyone willing
to take this on?

jamie.


pgpqtskQBlR5h.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 1/2] add notmuch keybinding 'd'

2012-01-03 Thread Jameson Graef Rollins
On Tue, 03 Jan 2012 21:57:22 +0200, Jani Nikula j...@nikula.org wrote:
 The code's there, and talk is cheap... but I'd rather like to see a
 solution that would make it easy for users to add arbitrary tagging
 operations to key bindings, instead of a fixed binding for deleted.

It's already easy for users to add arbitrary key bindings.  It's emacs,
and the whole point of which is that it's infinitely extensible [0]:

(define-key notmuch-show-mode-map d
  (lambda ()
Delete current message and advance to next message.
(interactive)
(notmuch-show-add-tag delete)
(notmuch-show-next-open-message-or-pop)))

There really can't be an easier solution to add a key binding other
than just adding the above to your .emacs, and I really don't think it
would be worth it to try to make one.

The fact that it's already so easy to customize the key bindings is why
I've been reluctant (or even against) getting into protracted
discussions about what the default key bindings should be.  Everyone is
going to want a different behavior, and since it's easy enough to
customize, just let users define what they want.

 I wouldn't use it either, and I don't use deleted tag in the first
 place. And even if I used it, I'd still like to keep the distinction
 between deleted after reading and deleted unread, which this patch
 loses by removing the unread tag.

Beyond what I just said about letting everyone customize things
themselves, I agree that I don't personally want other tags added or
removed when I delete a message.  The key binding above is actually
the one I use.

jamie.

[0] http://notmuchmail.org/emacstips/#index6h2


pgpEHraO8ovZi.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Emacs: Crypto: How to get automatic encryption?

2012-01-03 Thread Jameson Graef Rollins
On Tue, 3 Jan 2012 20:56:51 +0100, Gregor Zattler telegr...@gmx.net wrote:
 I replied to a PGP/MIME signed and encrypted e-mail and was
 astonished to realise that my reply was sent unencrypted (and
 unsigened for that matter).

Yikes!  Sorry this happened, and I hope nothing too sensitive was
exposed.

Auto signing of outgoing mail can be enabled by the following [0]:

(add-hook 'message-setup-hook mml-secure-message-sign-pgpmime)

You can configure the message-setup-hook with the customization UI as
well.

Unfortunately, auto encrypting of replies to encrypted emails is not yet
implemented.  It is desperately needed, though, obviously.  So this is a
good excuse to start a discussion about how we could achieve this.

It just occurs to me that a way to do this would be to have notmuch
reply add the appropriate mml #secure tag for encryption to the output
reply template, maybe with something like a --emacs option.  That would
be pretty easy to implement, although it would obviously be very UI
specific.

Another possibility would be for notmuch reply to add some sort of
header to the reply message to indicate that the original was encrypted,
and then do something in emacs to try to read that header and add the
appropriate mml #secure tag.  That would also be easy to implement in
the notmuch CLI, and it would be more UI agnostic, but it would require
a lot more elisp.

Or maybe we could support both?

Any other suggestions?

 Actually the message buffer in which I write replies has Auto
 Encryption Mode enabled, but nothing happens.  

That's unfortunate.  Can you explain exactly how you set this up, and
how it didn't work?

 Till now I investigated customisable variables for notmuch,
 message mode, epg but did not find a way to tell Emacs to sign
 and encrypt an e-mail if the correspondent (signed and) and
 encrypted her/his e-mail.  

It's actually usually mml that is used with message-mode to
sign/encrypt message, not epg.

jamie.


pgpox9JyS9sKp.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Regarding notmuch and Fedora 16

2012-01-03 Thread Peter Portante

Hello folks,

I am interested in using notmuch from within emacs, but have not been 
able to get the latest version of notmuch (0.10.2) to compile under 
Fedora 16:


   [pportant@frodo notmuch-0.10.2]$ make
   Use make V=1 to see the verbose compile lines.
   CC -O2 debugger.o
   In file included from debugger.c:21:0:
   notmuch-client.h:72:5: error: unknown type name 'GMimeSignatureValidity'
   notmuch-client.h:86:5: error: unknown type name 'GMimeCipherContext'
   make: *** [debugger.o] Error 1

It appears that with GMime v2.6 (from v2.4), a change was made to remove 
the use of GMimeSignatureValidity in favor of GMimeSignatureList, and 
renamed GMimeCipherContext to GMimeCryptoContext.


Am I doing something wrong here? Using the wrong version of notmuch 
sources with Fedora 16? Or do I need to get gmime 2.4 installed? I have 
gmime.x86_64 2.5.8-1.fc16 installed, and it appears that provides the 
v2.6 include files for gmime (go figure).


Could there be work already done to solve this?

Thanks, -peter
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Darren McGuicken
On Tue, 3 Jan 2012 20:59:51 +0100, Karel Zak k...@redhat.com wrote:
 Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(

Take a look at id:8762i8hrb9@bookbinder.fernseed.info.  There is a
gmime patch which still applies cleanly to everything up to the current
git head and which will let you build your own Fedora package.  I'm
using it myself with no issues.


pgp89u0Jxr8PR.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Darren McGuicken
On Tue, 03 Jan 2012 13:17:04 -0800, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 On Tue, 3 Jan 2012 20:59:51 +0100, Karel Zak k...@redhat.com wrote:
  Unfortunately, the latest package for Fedora is notmuch-0.5-4.fc15 ;-(
 
 Yikes that's old (0.11 is being released eminently).  There have been
 quite a few important changes since then.  Is there no one actively
 maintaining the fedora package?  Obviously there's not.  Anyone willing
 to take this on?

The problem is probably the use of gmime 2.5+ in Fedora.  We don't
currently seem to have a patchset which allows compilation across both
gmime =2.4 and =2.5, although we can do either/or.

There's also a build of 0.9 in koji:

http://koji.fedoraproject.org/koji/packageinfo?packageID=11257


pgpmj6aX4VqP1.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Regarding notmuch and Fedora 16

2012-01-03 Thread Jameson Graef Rollins
On Tue, 03 Jan 2012 17:09:39 -0500, Peter Portante peter.a.porta...@gmail.com 
wrote:
 I am interested in using notmuch from within emacs, but have not been 
 able to get the latest version of notmuch (0.10.2) to compile under 
 Fedora 16:
 
 [pportant@frodo notmuch-0.10.2]$ make
 Use make V=1 to see the verbose compile lines.
 CC -O2 debugger.o
 In file included from debugger.c:21:0:
 notmuch-client.h:72:5: error: unknown type name 'GMimeSignatureValidity'
 notmuch-client.h:86:5: error: unknown type name 'GMimeCipherContext'
 make: *** [debugger.o] Error 1
 
 It appears that with GMime v2.6 (from v2.4), a change was made to remove 
 the use of GMimeSignatureValidity in favor of GMimeSignatureList, and 
 renamed GMimeCipherContext to GMimeCryptoContext.

Hey, Peter.  Unfortunately notmuch is not yet compatible with gmime 2.6.
gmime 2.5, which is apparently what's in Fedora 16, is the experimental
release of the 2.6 interface.

Updating notmuch to work with gmime 2.6 has been on the todo list for a
while now, and it's obviously getting more urgent.  I've been planning
on looking into it at it as soon as I can, but if anyone else wants to
take a crack at it, I'll be happy to review patches.

jamie.


pgpXuWg54H7ye.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Regarding notmuch and Fedora 16

2012-01-03 Thread Peter Portante
Is there a good test suite for notmuch?

I'll take a crack at it using the latest 0.11 sources and see how far I get.

Thanks, -peter

On Tue, Jan 3, 2012 at 5:21 PM, Jameson Graef Rollins 
jroll...@finestructure.net wrote:

 On Tue, 03 Jan 2012 17:09:39 -0500, Peter Portante 
 peter.a.porta...@gmail.com wrote:
  I am interested in using notmuch from within emacs, but have not been
  able to get the latest version of notmuch (0.10.2) to compile under
  Fedora 16:
 
  [pportant@frodo notmuch-0.10.2]$ make
  Use make V=1 to see the verbose compile lines.
  CC -O2 debugger.o
  In file included from debugger.c:21:0:
  notmuch-client.h:72:5: error: unknown type name
 'GMimeSignatureValidity'
  notmuch-client.h:86:5: error: unknown type name 'GMimeCipherContext'
  make: *** [debugger.o] Error 1
 
  It appears that with GMime v2.6 (from v2.4), a change was made to remove
  the use of GMimeSignatureValidity in favor of GMimeSignatureList, and
  renamed GMimeCipherContext to GMimeCryptoContext.

 Hey, Peter.  Unfortunately notmuch is not yet compatible with gmime 2.6.
 gmime 2.5, which is apparently what's in Fedora 16, is the experimental
 release of the 2.6 interface.

 Updating notmuch to work with gmime 2.6 has been on the todo list for a
 while now, and it's obviously getting more urgent.  I've been planning
 on looking into it at it as soon as I can, but if anyone else wants to
 take a crack at it, I'll be happy to review patches.

 jamie.

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


Re: Regarding notmuch and Fedora 16

2012-01-03 Thread Darren McGuicken
On Tue, 03 Jan 2012 17:09:39 -0500, Peter Portante peter.a.porta...@gmail.com 
wrote:
 I am interested in using notmuch from within emacs, but have not been 
 able to get the latest version of notmuch (0.10.2) to compile under 
 Fedora 16.

Looks like we have a growing Fedora community, yay! :-)

And it's nothing you're doing wrong, per my reply to the other thread
F16 is using the current development version of gmime which has API
differences with the stable version 2.4.  The patch that exists isn't
part of standard notmuch since it in turn breaks 2.4 compatibility.

What's the right way to handle this?  I see 2.6 tarballs on gnome... is
2.6 officially out there and stable?


pgpj2i0FALUjb.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Regarding notmuch and Fedora 16

2012-01-03 Thread Jameson Graef Rollins
On Tue, 3 Jan 2012 17:36:32 -0500, Peter Portante peter.a.porta...@gmail.com 
wrote:
 Is there a good test suite for notmuch?

Hey, Peter.  Yes, there is a very good, extensive test suite for
notmuch.  It can be run with make test

jamie.


pgpwREjQW5rsd.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [ANNOUNCE] mutt with notmuch support

2012-01-03 Thread Jan Pobrislo
On Tue, 3 Jan 2012 13:39:38 +0100
Karel Zak k...@redhat.com wrote:

 
 This is not another curses front-end for notmuch, this is mutt :-)
 
 I have forked mutt to seriously integrate notmuch to this excellent
 e-mail client. I don't want to use symlinks or any other hacks to
 emulate virtual folders. My wish is mutt linked with libnotmuch.

Good to hear!

First, I'll shamelessly plug in my set of scripts that do the dirty work by
using symlinked maildirs to interact with any maildir capable mail reader.
It's mainly intended to be interface from shell, calling out to mutt or any
mail reader only when necessary, so it's somewhat reverse paradigm to yours.

view @ http://webprojekty.cz/ccx/loggerhead/zmuch/files
bzr branch http://webprojekty.cz/ccx/bzr/zmuch

Sadly I had to take hiatus mid-rewrite of it, but several interesting points
came up when I was talking about it with cworth and others.

We agreed that we wanted to standardize several features currently present in
emacs UI, so we can share configuration among several implementations. Most
important of these were:

saved searches
--

This is the feature I started writing my scripts for. I wanted to refer by a
simple shorthand to complex queries. I know emacs UI has some notion of
remembered queries, but I haven't really bothered trying it out. I assume you
will want to represent these as separate mailboxes, maybe shown using the
sidebar patch, so one has quick overview what's new in which ML.

The way I do this is that command:

$ zmuch search :foss and not :notmuch

will expand to:

$ notmuch search ( to:lists.xmms.se or ( to:cairo-annou...@cairographics.org
or to:ca...@cairographics.org ) or ( to:notmuch@notmuchmail.org or
to:notmuch-requ...@notmuchmail.org ) ) and not (
to:notmuch@notmuchmail.org or to:notmuch-requ...@notmuchmail.org )

Which would be bit too much to type by hand, even for so few lists.
This would be using .notmuch-config with something like this:

[zmuch_searches]
xmms2=to:lists.xmms.se
cairo=to:cairo-annou...@cairographics.org or to:ca...@cairographics.org
foss=:xmms2 or :cairo or :notmuch

Subset of this issue is the question: How to display overview of such saved
queries in a sensible manner? Mutt probably can't go beyond unread/total
number of messages for each query and that's actually what I have currently
implemented. Given the config:

[interesting]
query=is:unread and not ( is:spam or is:mute )

[zmuch_show]
selected=twisted;notmuch;gentoo-cs;cajovna;system;inbox

it would show number of interesting/total messages for each of the listed
saved query. Much nicer generalisation was then discussed on IRC, where you
could use regular saved search instead of separate [interesting] entry,
allowing you to have several such queries, eg. for displaying
unread/flagged/muted/total or anything your heart desires.

way to call notmuch
---

This might be feature you'll be probably missing due to using libnotmuch
directly instead of calling out executable as emacs UI does, but I find it
really useful to be able to layer functionality unix-style. Not only you can
run remote notmuch via ssh, but also my saved search implementation does this
by expanding arguments passed to the notmuch executable and as such is usable
from any UI that has configurable executable to call instead of notmuch.

colors
--

Again dunno how much this applies to mutt, as it has it's own coloring
paradigm, but I find it neat to be able to do something like this globally:

[tag_colors]
flagged=%F{red}
mute=%B%F{black}
spam=%F{magenta}
unread=%F{cyan}
replied=%F{yellow}
sent=%F{green}
attachment=%B

This is syntax that zsh uses for it's print/prompt formatting and is obviously
ANSI VT specific (%B is for bold/standout). GUI lovers will probably want #RGB
scheme too.


HTH bring up some good ideas and discussion.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch