Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Felix Geller
Hi Dmitry, thank you for the comments. I included an updated patch that also includes Daniel's comment regarding the default value. I didn't change the when though--not because of personal reasons ;)--but because it is used for determining indentation of multi-parts. Cheers, Felix On Mon,

Re: [python] querystrings as unicode literals?

2011-07-11 Thread Sebastian Spaeth
On Thu, 7 Jul 2011 12:37:00 +0100, Patrick Totzke patricktot...@googlemail.com wrote: Hi! Something strange goes on when I use unicode literals as querystrings: Database().create_query(u'teststring') yields different results than Database().create_query('teststring').. Now it should not be

[PATCH] python: Encode query string as a utf-8 byte array

2011-07-11 Thread Sebastian Spaeth
If we pass in an unicode instance as query string, we would probably get weird behavior (and indeed do so, see mail id:20110707113700.GA16347@megatron). If a unicode instance is passed in, make sure we encode it properly to an utf-8 encoded byte string. Signed-off-by: Sebastian Spaeth

[PATCH v2] python: Encode query string as a utf-8 byte array

2011-07-11 Thread Sebastian Spaeth
If we pass in an unicode instance as query string, we would probably get weird behavior (and indeed do so, see mail id:20110707113700.GA16347@megatron). If a unicode instance is passed in, make sure we encode it properly to an utf-8 encoded byte string. Signed-off-by: Sebastian Spaeth

Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Dmitry Kurochkin
On Mon, 11 Jul 2011 11:24:57 +0200, Felix Geller fgel...@gmail.com wrote: Hi Dmitry, thank you for the comments. I included an updated patch that also includes Daniel's comment regarding the default value. Another thing that would be nice to have is a test for this feature. Regards,

Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Felix Geller
On Mon, 11 Jul 2011 13:55:24 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: On Mon, 11 Jul 2011 11:24:57 +0200, Felix Geller fgel...@gmail.com wrote: Hi Dmitry, thank you for the comments. I included an updated patch that also includes Daniel's comment regarding the default

[PATCH] emacs: NEWS entry for user-defined sections

2011-07-11 Thread Daniel Schoepe
--- NEWS | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index f3fefad..98a6b28 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,16 @@ +Notmuch 0.7 (-MM-DD) +=== +New emacs-interface features +

Re: notmuch Digest, Vol 20, Issue 57

2011-07-11 Thread Sebastian Spaeth
On Wed, 06 Jul 2011 20:46:48 +0200, Daniel Schoepe daniel.scho...@googlemail.com wrote: One problem is that maildir doesn't support tags, so we would have to switch to a format that does or somehow store them in the maildir, in which case we would also have to adapt offlineimap or a similar

Re: notmuch Digest, Vol 20, Issue 57

2011-07-11 Thread Daniel Schoepe
On Mon, 11 Jul 2011 15:22:24 +0200, Sebastian Spaeth sebast...@sspaeth.de wrote: Support for tags is mentioned in the RFC for IMAP, but it's optional. As far as I know, must servers today support them though. I can't speak for Gmail, but all major servers, ie Cyrus, Dovecot, and even

Encodings

2011-07-11 Thread Sebastian Spaeth
Hi all, after I was notified about how notmuch's python bindings perform differently depending on whether we hand it (byte-based) ASCII strings or unicode, I tried to disentangle what encodings to expect and send it to. The answer is that things are very implicit. notmuch.h speaks of strings but

[PATCH 0/2] lib: Don't always move from maildir new/ to maildir cur/

2011-07-11 Thread Louis Rilling
Hello, Here is an alternative, as we discussed earlier. This is enough to keep me using mutt's ability to show the new status, and to allow me to test notmuch with my real emails. Altough my notmuch config uses [new] tags=new; [maildir] synchronize_flags=true

[PATCH 1/2] tags_to_maildir_flags: Cleanup double assignement

2011-07-11 Thread Louis Rilling
The for loop right after already does the job. Signed-off-by: Louis Rilling l.rill...@av7.net --- lib/message.cc |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index d993cde..64b6cf8 100644 --- a/lib/message.cc +++ b/lib/message.cc @@

[PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Louis Rilling
notmuch_message_tags_to_maildir_flags() unconditionally moves messages from maildir directory new/ to maildir directory cur/, which makes messages lose their new status in the MUA. However some users want to keep this new status after, for instance, an auto-tagging of new messages. However, as

Re: Encodings

2011-07-11 Thread Carl Worth
On Mon, 11 Jul 2011 16:04:17 +0200, Sebastian Spaeth sebast...@sspaeth.de wrote: The answer is that things are very implicit. notmuch.h speaks of strings but never mentions encodings Much of this was intentional on my part. For example, I intentionally avoided restrictions on what could be

Re: [PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Jameson Graef Rollins
On Mon, 11 Jul 2011 10:42:04 +0200, Felix Geller fgel...@gmail.com wrote: I added a variable to toggle message indentation in Emacs. Hi, Felix. Thanks for submitting this patch. I think it's a good idea. I have a couple of comments below, a couple of which echo what Dmitry has already pointed

[PATCH] Feature request: nicknames for senders

2011-07-11 Thread Jason Woofenden
I implemented a feature I wanted: nicknames for the list of senders on the search view. At first I just added a setting with my full name and had it replace that with me. But then I figured it'd be better to allow the user to specify a list of replacements, and instead made a more general

[PATCH] vim: add setting to shorten/fix sender names

2011-07-11 Thread Jason Woofenden
Add a new setting: g:notmuch_nicknames (dictionary) When reformatting the list of senders in the search view, replace any names matching keys in g:notmuch_nicknames with the corresponding values. --- vim/plugin/notmuch.vim | 19 ++- 1 files changed, 18 insertions(+), 1

Slowness (search opens every email file?)

2011-07-11 Thread Jason Woofenden
Hi all, I'm having a great time patching up the vim frontend, but I've got an issue that is in the backend, and seems far above my head at this point: notmuch search tag:foo is slow! (when my e-mail files are not already in the disk cache) I saw on my activity monitor applet that it was using

problems with symbol hiding on Debian Squeeze i386

2011-07-11 Thread David Bremner
Julien Valroth reported on IRC that he had problems with the initial call of 'notmuch new' crashing with terminate called after throwing an instance of 'Xapian::InvalidArgumentError' I confirmed that the following quick and dirty patch seems to fix the problem. --- a/lib/Makefile.local +++

Re: [PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Austin Clements
I worry that this may compound the confusion caused by mutt's handling of the new flag, but I suppose people aren't likely to manipulate any of the other maildir-synchronized flags without also marking the message as seen. At any rate, the change is certainly correct technically. A few nits

Re: [PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter'

2011-07-11 Thread Austin Clements
Quoth Pieter Praet on Jul 11 at 10:43 pm: TL;DR: I can haz regex pl0x? Oof, what a pain. I'm happy to change the output format of search; I hadn't realized how difficult it would be to parse. In fact, I'm not sure it's even parsable by regexp, because the message ID's themselves could contain

Re: Slowness (search opens every email file?)

2011-07-11 Thread Patrick Totzke
Hi Jason, On Mon, Jul 11, 2011 at 03:07:21PM -0400, Jason Woofenden wrote: notmuch search tag:foo is slow! yes, i've just used the vim ui for the first time and i agreee, its sluggish, searching for * takes a while. (when my e-mail files are not already in the disk cache) I saw on my

Re: Slowness (search opens every email file?)

2011-07-11 Thread Austin Clements
On Mon, Jul 11, 2011 at 3:07 PM, Jason Woofenden ja...@jasonwoof.com wrote: notmuch search tag:foo is slow! (when my e-mail files are not already in the disk cache) I saw on my activity monitor applet that it was using mostly i/o, and started to wonder if it was opening every e-mail. I

[PATCH v2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Louis Rilling
notmuch_message_tags_to_maildir_flags() unconditionally moves messages from maildir directory new/ to maildir directory cur/, which makes messages lose their new status in the MUA. However some users want to keep this new status after, for instance, an auto-tagging of new messages. However, as

Re: [PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Austin Clements
Quoth Louis Rilling on Jul 12 at 12:38 am: On 11/07/11 16:07 -0400, Austin Clements wrote: I worry that this may compound the confusion caused by mutt's handling of the new flag, but I suppose people aren't likely to manipulate any of the other maildir-synchronized flags without also

Re: [PATCH v2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Austin Clements
LGTM. Quoth Louis Rilling on Jul 12 at 12:41 am: notmuch_message_tags_to_maildir_flags() unconditionally moves messages from maildir directory new/ to maildir directory cur/, which makes messages lose their new status in the MUA. However some users want to keep this new status after, for

[PATCH] debian: strictly depend on the same version of libnotmuch

2011-07-11 Thread David Bremner
On Sun, 10 Jul 2011 17:12:19 -0400, Daniel Kahn Gillmor wrote: Non-text part: multipart/mixed Non-text part: multipart/signed > On 07/10/2011 08:53 AM, David Bremner wrote: > > | The underlying issue is that the libnotmuch interface is not > > | entirely captured by the set of exported symbols.

[PATCH] debian: strictly depend on the same version of libnotmuch

2011-07-11 Thread Daniel Kahn Gillmor
On 07/10/2011 10:36 PM, David Bremner wrote: >> This suggests to me that we may need to be bumping the SONAME when the >> query string format changes, no? > > If we follow the same rules as with symbols, then only when it breaks > backwards compatability. Right, but what breaks backwards

vim front-end patches by Jason

2011-07-11 Thread Jason Woofenden
OK, everybody, here's my first set of patches. They all cleanup the vim front-end. I started with the little stuff, to get my feet wet. Here's what's coming: [PATCH 1/5] vim: fix space key: now archives (did opposite) [PATCH 2/5] vim: fix from list reformatting in search view [PATCH 3/5] vim:

[PATCH 2/5] vim: fix from list reformatting in search view

2011-07-11 Thread Jason Woofenden
This patch rewrites the reformatting of the from list so it shows full capitalized names when available (without truncating them as the old code did) and removes the pipe characters that appear between some names. The old code appears to assume from list (the list of senders in the thread) coming

[PATCH 1/5] vim: fix space key: now archives (did opposite)

2011-07-11 Thread Jason Woofenden
In vim, in the message view, space is supposed to remove the "unread" and "inbox" tags, but was sometimes adding them instead. This patch assures that they are always removed by this binding. --- vim/plugin/notmuch.vim |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 4/5] vim: fix (hack) cig/cit parsing within multipart/*

2011-07-11 Thread Jason Woofenden
The vim front-end isn't written to handle nested parts. This patch doesn't change that, it just changes the code to pretend that multipart/* sections end immediately. This makes the parsing code think that all sections are top-level, and are thus parsed well enough. The lovely result of this is

[PATCH 3/5] vim: fix on-screen instructions for show-signature

2011-07-11 Thread Jason Woofenden
Also change a passed parameter to be consistent with the current binding. This parameter appears to be unused. --- vim/plugin/notmuch.vim |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index e4b22d3..3982008 100644 ---

[PATCH 5/5] vim: fix citation/signature fold lengths

2011-07-11 Thread Jason Woofenden
Before they'd often miss the last line --- vim/plugin/notmuch.vim | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index 2095547..12a0f88 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -747,8

[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Felix Geller
art content-end depth)) (setq message-end (point-max-marker)) -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 202 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110711/0b97f29c/attachment.pgp>

[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Dmitry Kurochkin
Hi Felix. On Mon, 11 Jul 2011 10:42:04 +0200, Felix Geller wrote: > Hi, > > I added a variable to toggle message indentation in Emacs. > > Please let me know what you think. > I like the change. Though I do not think I would use it without chronological sorting. Comments on the code below.

[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Daniel Schoepe
c: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110711/093d09f2/attachment.pgp>

[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Felix Geller
quot; date ") (" @@ -733,7 +739,8 @@ current buffer, if possible." (setq content-end (point-marker)) ;; Indent according to the depth in the thread. -(indent-rigidly content-start content-end depth) +(when notmuch-show-indent-messages-in-thread + (indent-rigidly content-start content-end depth)) (setq message-end (point-max-marker)) -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 202 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110711/c06d16f6/attachment.pgp>

[PATCH] python: Encode query string as a utf-8 byte array

2011-07-11 Thread Sebastian Spaeth
If we pass in an unicode instance as query string, we would probably get weird behavior (and indeed do so, see mail id:"20110707113700.GA16347 at megatron"). If a unicode instance is passed in, make sure we encode it properly to an utf-8 encoded byte string. Signed-off-by: Sebastian Spaeth ---

[PATCH v2] python: Encode query string as a utf-8 byte array

2011-07-11 Thread Sebastian Spaeth
If we pass in an unicode instance as query string, we would probably get weird behavior (and indeed do so, see mail id:"20110707113700.GA16347 at megatron"). If a unicode instance is passed in, make sure we encode it properly to an utf-8 encoded byte string. Signed-off-by: Sebastian Spaeth ---

[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Dmitry Kurochkin
On Mon, 11 Jul 2011 11:24:57 +0200, Felix Geller wrote: > Hi Dmitry, > > thank you for the comments. I included an updated patch that also > includes Daniel's comment regarding the default value. > Another thing that would be nice to have is a test for this feature. Regards, Dmitry > I

[PATCH] Emacs: Add variable to toggle message indentation in a thread

2011-07-11 Thread Felix Geller
art nil > >"Should the sub-parts of a multipart/* part be indented?" > >;; dme: Not sure which is a good default. > > @@ -237,8 +242,9 @@ 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 depth) > > - (notmuch-show-clean-address (plist-get headers :From)) > > +(when notmuch-show-indent-messages-in-thread > > + (insert (notmuch-show-spaces-n depth))) > > +(insert (notmuch-show-clean-address (plist-get headers :From)) > > " (" > > date > > ") (" > > @@ -733,7 +739,8 @@ current buffer, if possible." > > (setq content-end (point-marker)) > > > > ;; Indent according to the depth in the thread. > > -(indent-rigidly content-start content-end depth) > > +(when notmuch-show-indent-messages-in-thread > > + (indent-rigidly content-start content-end depth)) > > > > (setq message-end (point-max-marker)) > > -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 202 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110711/2f498710/attachment.pgp>

[PATCH] emacs: NEWS entry for user-defined sections

2011-07-11 Thread Daniel Schoepe
--- NEWS | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index f3fefad..98a6b28 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,16 @@ +Notmuch 0.7 (-MM-DD) +=== +New emacs-interface features +

notmuch Digest, Vol 20, Issue 57

2011-07-11 Thread Sebastian Spaeth
ne. Sebastian -- 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/20110711/8ad36281/attachment.pgp>

Encodings

2011-07-11 Thread Sebastian Spaeth
simply ignore them. Sebastian -- 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/20110711/0c5a127e/attachment.pgp>

[PATCH 0/2] lib: Don't always move from maildir new/ to maildir cur/

2011-07-11 Thread Louis Rilling
Hello, Here is an alternative, as we discussed earlier. This is enough to keep me using mutt's ability to show the "new" status, and to allow me to test notmuch with my real emails. Altough my notmuch config uses [new] tags=new; [maildir] synchronize_flags=true

[PATCH 1/2] tags_to_maildir_flags: Cleanup double assignement

2011-07-11 Thread Louis Rilling
The for loop right after already does the job. Signed-off-by: Louis Rilling --- lib/message.cc |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index d993cde..64b6cf8 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1172,8 +1172,6 @@

[PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Louis Rilling
notmuch_message_tags_to_maildir_flags() unconditionally moves messages from maildir directory "new/" to maildir directory "cur/", which makes messages lose their "new" status in the MUA. However some users want to keep this "new" status after, for instance, an auto-tagging of new messages.

Encodings

2011-07-11 Thread Carl Worth
ype: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110711/c0bb71c7/attachment.pgp>

[PATCH] Feature request: nicknames for senders

2011-07-11 Thread Jason Woofenden
I implemented a feature I wanted: nicknames for the list of senders on the search view. At first I just added a setting with my full name and had it replace that with "me". But then I figured it'd be better to allow the user to specify a list of replacements, and instead made a more general

[PATCH] vim: add setting to shorten/fix sender names

2011-07-11 Thread Jason Woofenden
Add a new setting: g:notmuch_nicknames (dictionary) When reformatting the list of senders in the search view, replace any names matching keys in g:notmuch_nicknames with the corresponding values. --- vim/plugin/notmuch.vim | 19 ++- 1 files changed, 18 insertions(+), 1

Slowness (search opens every email file?)

2011-07-11 Thread Jason Woofenden
Hi all, I'm having a great time patching up the vim frontend, but I've got an issue that is in the backend, and seems far above my head at this point: notmuch search tag:foo is slow! (when my e-mail files are not already in the disk cache) I saw on my activity monitor applet that it was using

problems with symbol hiding on Debian Squeeze i386

2011-07-11 Thread David Bremner
s scrubbed... Name: not available Type: application/pgp-signature Size: 315 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110711/7b9a1fe2/attachment.pgp>

[PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Austin Clements
I worry that this may compound the confusion caused by mutt's handling of the new flag, but I suppose people aren't likely to manipulate any of the other maildir-synchronized flags without also marking the message as seen. At any rate, the change is certainly correct technically. A few nits

[PATCH v2] emacs: bad regexp @ `notmuch-search-process-filter'

2011-07-11 Thread Austin Clements
Quoth Pieter Praet on Jul 11 at 10:43 pm: > TL;DR: I can haz regex pl0x? Oof, what a pain. I'm happy to change the output format of search; I hadn't realized how difficult it would be to parse. In fact, I'm not sure it's even parsable by regexp, because the message ID's themselves could contain

Slowness (search opens every email file?)

2011-07-11 Thread Patrick Totzke
ery matches a lot of messages. Could this be done by asyncronously writing to the buffer somehow? best, /p -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://notmuchmail

Slowness (search opens every email file?)

2011-07-11 Thread Austin Clements
On Mon, Jul 11, 2011 at 3:07 PM, Jason Woofenden wrote: > notmuch search tag:foo is slow! > > (when my e-mail files are not already in the disk cache) > > I saw on my activity monitor applet that it was using mostly i/o, > and started to wonder if it was opening every e-mail. I little work > with

[PATCH 2/2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Austin Clements
Quoth Louis Rilling on Jul 12 at 12:38 am: > On 11/07/11 16:07 -0400, Austin Clements wrote: > > I worry that this may compound the confusion caused by mutt's handling > > of the new flag, but I suppose people aren't likely to manipulate any > > of the other maildir-synchronized flags without also

[PATCH v2] tags_to_maildir_flags: Don't rename if no flags change

2011-07-11 Thread Austin Clements
LGTM. Quoth Louis Rilling on Jul 12 at 12:41 am: > notmuch_message_tags_to_maildir_flags() unconditionally moves messages from > maildir directory "new/" to maildir directory "cur/", which makes messages > lose > their "new" status in the MUA. However some users want to keep this "new" > status