python cnotmuch -> notmuch
I believe that Carl pursues an evil plan of converting unsuspicious mercurial users to git. At least that is what I suspect when he asked whether it would make sense to get my cnotmuch python bindings into the notmuch repo. :-) Well, here it is, I converted my good old bitbucket hg repo to git, so he can merge it (but thanks to the good old hg-git plugin I did not even had to leave mercurial once, so the evil part of his plan failed miserably :-)) http://github.com/spaetz/python-notmuch respectively: git at github.com:spaetz/python-notmuch.git Carl, I did not update the .hgignore to be .gitignore yet. I recommend to just ignore *.pyc and the docs/html dir (just have a look at .hgignore). As for the directory to stick this in, I don't care. Does "bindings/python" make sense? Also, I have a debian dir to produce a .deb package, not sure what to do with that. I took the opportunity to change the semantics and did away with the "c" in cnotmuch. Carl felt comfortable to just name it 'notmuch' and I am happy to oblige. So rather than the ugly "from cnotmuch.notmuch import Database" this works not simply with "import notmuch" or "from notmuch import Database". I'll still need to think about how I should handle the transition on the python package page, but fortunately the current user base of cnotmuch is still not too big :-). Sorry for the long blurb, I know I should not distract Carl from merging David's patches... :-) Sebastian
"bouncing" messages
On Sun, 18 Apr 2010 22:06:39 +0200, Xavier Maillard wrote: > On Fri, 16 Apr 2010 10:34:53 +0200, Peter Wiersig london087.server4you.de> wrote: > > On Thu, 15 Apr 2010 17:27:17 -0400, Jameson Rollins > finestructure.net> wrote: > > > Does anyone know how to "bounce" a message, > > > > pipe the message to "sendmail user at axample.com" > > > > Well, ok, mutt adds "Resent-*" headers to the bounced message, so there > > it's not unaltered. > > Kudos to you Peter, that will help me a lot too. It would be great if this became a key to make this easier. In mutt, that key is 'b', which prompts you who you should send the message to. That key is already bound to showing the body in notmuch, but I'm sure there are other options. m -- 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/20100419/a8642896/attachment.pgp>
Difference between search and filter
On Tue, 20 Apr 2010 00:23:01 +0200, Xavier Maillard wrote: > GNU Emacs interface comes with 2 functions I am not sure I am > using correctly. > > What's the difference between searching and filtering exactly (s > and f) ? It seems to me that they deserve the same purpose. The search command executes a new global search. It will display all threads from the database with messages that match the search terms. The filter command refines the current search. It will take the current search and filter it down to those threads with messages match the search terms. The filter command is a convenience function for taking the current search terms, appending "and " and then running a new global search. Does that make sense? -Carl -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100419/feff5ba6/attachment.pgp>
pull request
On Mon, 19 Apr 2010 11:07:40 -0700, Carl Worth wrote: > On Mon, 19 Apr 2010 09:27:39 +0100, David Edmondson wrote: > > I've got some misgivings about this one. First, notmuch-search-hook is > a hook for the user to manipulate, while the hl-line-mode functionality > is something that should be on by default. That is, if the user happens > to set the search-hook then the hl-line-mode shouldn't magically > disappear. I forgot. The user is expected to use add-hook which avoids this very problem. So this patch is fine. -Carl -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100419/d4786a07/attachment.pgp>
pull request
On Mon, 19 Apr 2010 09:27:39 +0100, David Edmondson wrote: > This is the same set rebased onto 0.2. Thanks for these, David! > commit 8586a86b9dd4ed2406a2fbda6c08bdc6a598cfd8 > debian: git should ignore packaging intermediate files I committed an alternate version of this, (with a new debian/.gitignore file). I used more wildcarding too. And I couldn't actually find how to make all these files appear. If you need more ignores, just let me know (and let me know what commands trigger those, since I'm curious). > commit f5de1bb5b4216a1950f6aa5f471c9964e4d0e521 > emacs/notmuch-show.el: Avoid passing unintended format strings to > `message' Thanks. I've committed this. > commit 4159baa2166a3410663adc200f91145edf8e0e13 > > emacs/notmuch.el: Enable `hl-line-mode' in `notmuch-search-mode' I've got some misgivings about this one. First, notmuch-search-hook is a hook for the user to manipulate, while the hl-line-mode functionality is something that should be on by default. That is, if the user happens to set the search-hook then the hl-line-mode shouldn't magically disappear. Meanwhile, I *am* getting hl-line-mode in notmuch-search-mode already. I'm not sure where that's coming from. (I also don't know what's up with the current "options '(hl-line-mode)" which doesn't seem right.) > commit 53c4e64943d09b07e75c9258fc9f954c87a490d6 > json: Avoid calling strlen(NULL) That commit message describes this hunk of the patch: > +if (str == NULL) > + str = ""; > + > return (json_quote_chararray (ctx, str, strlen (str))); But this other hunk looks independent. What's going on here? > -if (len == 0) > - return (char *)"\"\""; > - So I haven't committed this piece yet. That brings me up to the big JSON rewrite, which I'll start testing and review in a separate reply. -Carl -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100419/6484ea7c/attachment-0001.pgp>
[notmuch] Bulk message tagging
On Sat, 17 Apr 2010 08:43:19 -0700, Carl Worth wrote: > In fact, until we have some sort of daemon that we can feed > arbitrarily-long lists to, that's what we should do. Thinking about loud... What if the sub-commands which accept potentially long argument lists (most of them?) sprouted a '--stdin' option, which caused them to read the (remaining) argument list from stdin rather than looking at argv? It seems that this would be simpler change than full daemon support. So: notmuch show id:foo at bar.baz could become: echo id:foo at bar.baz | notmuch show --stdin dme. -- David Edmondson, http://dme.org
pull request
On Sun, 11 Apr 2010 11:29:29 +0100, David Edmondson wrote: > Carl, please consider the following (from the 'for-cworth' branch of > git://github.com/dme/notmuch.git) for 0.2. I hope to have some more UI > changes merged next week. This is the same set rebased onto 0.2. commit 8586a86b9dd4ed2406a2fbda6c08bdc6a598cfd8 Author: David Edmondson Date: Sat Apr 10 09:02:32 2010 +0100 debian: git should ignore packaging intermediate files commit f5de1bb5b4216a1950f6aa5f471c9964e4d0e521 Author: David Edmondson Date: Mon Mar 22 14:50:20 2010 + emacs/notmuch-show.el: Avoid passing unintended format strings to `message' If the text being stashed included %, `message' was unhappy and complained. commit 4159baa2166a3410663adc200f91145edf8e0e13 Author: David Edmondson Date: Wed Mar 24 15:50:11 2010 + emacs/notmuch.el: Enable `hl-line-mode' in `notmuch-search-mode' commit 53c4e64943d09b07e75c9258fc9f954c87a490d6 Author: David Edmondson Date: Tue Apr 6 08:24:00 2010 +0100 json: Avoid calling strlen(NULL) MIME parts may have no filename, which previously resulted in calling strlen(NULL). commit 7dedc95af671173a57bafd973604614c03121ce6 Author: David Edmondson Date: Sun Apr 11 08:58:43 2010 +0100 emacs: JSON based implementation Re-implement notmuch-show.el using the JSON output format of the notmuch command. Most functionality is retained - HTML display is noticeably missing. commit 514e14c42e214718768a1ec94cb869cd3eb47114 Author: David Edmondson Date: Mon Mar 22 16:49:16 2010 + emacs: Move body markup to a separate file Move the citation and signature markup for text/plain parts to a new file (notmuch-wash.el) and call it using a hook mechanism rather than directly. commit 2b6201fbf9209a875f216d48c30b95a6f583c575 Author: David Edmondson Date: Thu Apr 1 16:25:20 2010 +0100 emacs: Add more functions to clean up text/plain parts Add: - notmuch-wash-wrap-long-lines: Wrap lines longer than the width of the current window whilst maintaining any citation prefix. - notmuch-wash-tidy-citations: Tidy up citations by: - compress repeated otherwise blank citation lines, - remove otherwise blank citation lines at the head and tail of a citation and remove blank lines between attribution statements and the citation, - notmuch-wash-compress-blanks: Compress repeated blank lines and remove leading and trailing blank lines. Enable all of the functions by default by adding them to `notmuch-show-insert-text/plain-hook'. With the wrapping features for text/plain parts enabled, word wrapping of the buffer leads to an unappealing display of text, so disable it. commit c7872f5e1f11cfa10d93cb818c5f6f6c0835b918 Author: David Edmondson Date: Tue Mar 23 10:06:00 2010 + emacs/notmuch-show.el: Improved part labelling If a text/plain part is not the first part in a message, add a label in order that a user can see that multiple parts are present. If a part has a 'filename' attribute, include it in any label describing the part. commit 951db85a55a1893e766b26de1377dda5b4573366 Author: David Edmondson Date: Tue Mar 23 11:54:05 2010 + emacs: Use `mm-display-part' when possible For parts that the mm-decode/mm-view functions can inline and we have the content, use `mm-display-part' to insert the part in the buffer. commit 5c060ded87ec4dc479625348708ef73852d60b36 Author: David Edmondson Date: Tue Mar 23 11:54:05 2010 + emacs: Use mailcap.el to guess the type of application/octet-stream parts Use the mailcap functionality to guess a MIME type for attachments of type application/octet-stream and, presuming successful, feed the attachment back into the display code with the determine type. This is mostly useless at the moment, as the JSON output from notmuch does not include the content of application/octet-stream parts, so they cannot be displayed even if the guess is a good one. commit 5fcbb528384b7bda838f7c77434def15f85c7382 Author: David Edmondson Date: Thu Apr 1 18:33:46 2010 +0100 emacs: Display all body parts using `notmuch part --part=' Use the `notmuch part' command to access body parts not currently included in the JSON output and display those body parts appropriately. commit 9e193a3998b7503e35d21013c71cc4ecaf6c9d50 Author: David Edmondson Date: Thu Mar 25 12:26:49 2010 + emacs/notmuch-wash.el: Add `notmuch-wash-inline-patch' `notmuch-wash-inline-patch' attempts to convert inline patches to fake attachments, in order that diff-mode highlighting can be applied to the patch. It should be added to `notmuch-show-insert-text/plain-hook', usually before `notmuch-wash-markup-citations'. Due to the scope for error in detecting inline patches (and their extent), this function is not enabled by default. commit
Notmuch success: Xapian database corrupt
On 2010-04-18, John Fremlin wrote: > Processed 58 files (19 files/sec.) That seems exceptionally low. I get about 60-70 files/sec on a laptop hard disk. > > Is there any way to recover the database? I am no expert with xapian databases, and that might seem obvious, but you did a notmuch dump to save your tags, did you? If that works you can nuke your database directory and after a notmuch new (1-2 days?!!) you can notmuch restore your tags. This way, at least, you won't have any data loss. Sebastian
[PATCH] Try to provide search buffers with titles from notmuch-folders.
This patch has been obsoleted by the one sent in message: x2hb22065d01004182055vc111d42az357076f93b6cb72a at mail.gmail.com Servilio
Re: Notmuch success: Xapian database corrupt
On 2010-04-18, John Fremlin wrote: Processed 58 files (19 files/sec.) That seems exceptionally low. I get about 60-70 files/sec on a laptop hard disk. Is there any way to recover the database? I am no expert with xapian databases, and that might seem obvious, but you did a notmuch dump to save your tags, did you? If that works you can nuke your database directory and after a notmuch new (1-2 days?!!) you can notmuch restore your tags. This way, at least, you won't have any data loss. Sebastian ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: pull request
On Sun, 11 Apr 2010 11:29:29 +0100, David Edmondson d...@dme.org wrote: Carl, please consider the following (from the 'for-cworth' branch of git://github.com/dme/notmuch.git) for 0.2. I hope to have some more UI changes merged next week. This is the same set rebased onto 0.2. commit 8586a86b9dd4ed2406a2fbda6c08bdc6a598cfd8 Author: David Edmondson d...@dme.org Date: Sat Apr 10 09:02:32 2010 +0100 debian: git should ignore packaging intermediate files commit f5de1bb5b4216a1950f6aa5f471c9964e4d0e521 Author: David Edmondson d...@dme.org Date: Mon Mar 22 14:50:20 2010 + emacs/notmuch-show.el: Avoid passing unintended format strings to `message' If the text being stashed included %, `message' was unhappy and complained. commit 4159baa2166a3410663adc200f91145edf8e0e13 Author: David Edmondson d...@dme.org Date: Wed Mar 24 15:50:11 2010 + emacs/notmuch.el: Enable `hl-line-mode' in `notmuch-search-mode' commit 53c4e64943d09b07e75c9258fc9f954c87a490d6 Author: David Edmondson d...@dme.org Date: Tue Apr 6 08:24:00 2010 +0100 json: Avoid calling strlen(NULL) MIME parts may have no filename, which previously resulted in calling strlen(NULL). commit 7dedc95af671173a57bafd973604614c03121ce6 Author: David Edmondson d...@dme.org Date: Sun Apr 11 08:58:43 2010 +0100 emacs: JSON based implementation Re-implement notmuch-show.el using the JSON output format of the notmuch command. Most functionality is retained - HTML display is noticeably missing. commit 514e14c42e214718768a1ec94cb869cd3eb47114 Author: David Edmondson d...@dme.org Date: Mon Mar 22 16:49:16 2010 + emacs: Move body markup to a separate file Move the citation and signature markup for text/plain parts to a new file (notmuch-wash.el) and call it using a hook mechanism rather than directly. commit 2b6201fbf9209a875f216d48c30b95a6f583c575 Author: David Edmondson d...@dme.org Date: Thu Apr 1 16:25:20 2010 +0100 emacs: Add more functions to clean up text/plain parts Add: - notmuch-wash-wrap-long-lines: Wrap lines longer than the width of the current window whilst maintaining any citation prefix. - notmuch-wash-tidy-citations: Tidy up citations by: - compress repeated otherwise blank citation lines, - remove otherwise blank citation lines at the head and tail of a citation and remove blank lines between attribution statements and the citation, - notmuch-wash-compress-blanks: Compress repeated blank lines and remove leading and trailing blank lines. Enable all of the functions by default by adding them to `notmuch-show-insert-text/plain-hook'. With the wrapping features for text/plain parts enabled, word wrapping of the buffer leads to an unappealing display of text, so disable it. commit c7872f5e1f11cfa10d93cb818c5f6f6c0835b918 Author: David Edmondson d...@dme.org Date: Tue Mar 23 10:06:00 2010 + emacs/notmuch-show.el: Improved part labelling If a text/plain part is not the first part in a message, add a label in order that a user can see that multiple parts are present. If a part has a 'filename' attribute, include it in any label describing the part. commit 951db85a55a1893e766b26de1377dda5b4573366 Author: David Edmondson d...@dme.org Date: Tue Mar 23 11:54:05 2010 + emacs: Use `mm-display-part' when possible For parts that the mm-decode/mm-view functions can inline and we have the content, use `mm-display-part' to insert the part in the buffer. commit 5c060ded87ec4dc479625348708ef73852d60b36 Author: David Edmondson d...@dme.org Date: Tue Mar 23 11:54:05 2010 + emacs: Use mailcap.el to guess the type of application/octet-stream parts Use the mailcap functionality to guess a MIME type for attachments of type application/octet-stream and, presuming successful, feed the attachment back into the display code with the determine type. This is mostly useless at the moment, as the JSON output from notmuch does not include the content of application/octet-stream parts, so they cannot be displayed even if the guess is a good one. commit 5fcbb528384b7bda838f7c77434def15f85c7382 Author: David Edmondson d...@dme.org Date: Thu Apr 1 18:33:46 2010 +0100 emacs: Display all body parts using `notmuch part --part=n' Use the `notmuch part' command to access body parts not currently included in the JSON output and display those body parts appropriately. commit 9e193a3998b7503e35d21013c71cc4ecaf6c9d50 Author: David Edmondson d...@dme.org Date: Thu Mar 25 12:26:49 2010 + emacs/notmuch-wash.el: Add `notmuch-wash-inline-patch' `notmuch-wash-inline-patch' attempts to convert inline patches to fake attachments, in order that diff-mode highlighting can be applied to the patch. It should be added to
Re: [notmuch] Bulk message tagging
On Sat, 17 Apr 2010 08:43:19 -0700, Carl Worth cwo...@cworth.org wrote: In fact, until we have some sort of daemon that we can feed arbitrarily-long lists to, that's what we should do. Thinking about loud... What if the sub-commands which accept potentially long argument lists (most of them?) sprouted a '--stdin' option, which caused them to read the (remaining) argument list from stdin rather than looking at argv? It seems that this would be simpler change than full daemon support. So: notmuch show id:f...@bar.baz could become: echo id:f...@bar.baz | notmuch show --stdin dme. -- David Edmondson, http://dme.org ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: bouncing messages
On Fri, 16 Apr 2010 10:34:53 +0200, Peter Wiersig fri...@london087.server4you.de wrote: On Thu, 15 Apr 2010 17:27:17 -0400, Jameson Rollins jroll...@finestructure.net wrote: Does anyone know how to bounce a message, pipe the message to sendmail u...@axample.com Well, ok, mutt adds Resent-* headers to the bounced message, so there it's not unaltered. Kudos to you Peter, that will help me a lot too. Xavier ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: pull request
On Mon, 19 Apr 2010 11:07:40 -0700, Carl Worth cwo...@cworth.org wrote: On Mon, 19 Apr 2010 09:27:39 +0100, David Edmondson d...@dme.org wrote: I've got some misgivings about this one. First, notmuch-search-hook is a hook for the user to manipulate, while the hl-line-mode functionality is something that should be on by default. That is, if the user happens to set the search-hook then the hl-line-mode shouldn't magically disappear. I forgot. The user is expected to use add-hook which avoids this very problem. So this patch is fine. -Carl pgpAWlzSiaFnG.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
python cnotmuch - notmuch
I believe that Carl pursues an evil plan of converting unsuspicious mercurial users to git. At least that is what I suspect when he asked whether it would make sense to get my cnotmuch python bindings into the notmuch repo. :-) Well, here it is, I converted my good old bitbucket hg repo to git, so he can merge it (but thanks to the good old hg-git plugin I did not even had to leave mercurial once, so the evil part of his plan failed miserably :-)) http://github.com/spaetz/python-notmuch respectively: g...@github.com:spaetz/python-notmuch.git Carl, I did not update the .hgignore to be .gitignore yet. I recommend to just ignore *.pyc and the docs/html dir (just have a look at .hgignore). As for the directory to stick this in, I don't care. Does bindings/python make sense? Also, I have a debian dir to produce a .deb package, not sure what to do with that. I took the opportunity to change the semantics and did away with the c in cnotmuch. Carl felt comfortable to just name it 'notmuch' and I am happy to oblige. So rather than the ugly from cnotmuch.notmuch import Database this works not simply with import notmuch or from notmuch import Database. I'll still need to think about how I should handle the transition on the python package page, but fortunately the current user base of cnotmuch is still not too big :-). Sorry for the long blurb, I know I should not distract Carl from merging David's patches... :-) Sebastian ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Difference between search and filter
Hi, GNU Emacs interface comes with 2 functions I am not sure I am using correctly. What's the difference between searching and filtering exactly (s and f) ? It seems to me that they deserve the same purpose. Regards, Xavier ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: Difference between search and filter
On Tue, 20 Apr 2010 00:23:01 +0200, Xavier Maillard x...@gnu.org wrote: GNU Emacs interface comes with 2 functions I am not sure I am using correctly. What's the difference between searching and filtering exactly (s and f) ? It seems to me that they deserve the same purpose. The search command executes a new global search. It will display all threads from the database with messages that match the search terms. The filter command refines the current search. It will take the current search and filter it down to those threads with messages match the search terms. The filter command is a convenience function for taking the current search terms, appending and new-search-terms and then running a new global search. Does that make sense? -Carl pgpyvNUG4BskX.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch