Re: [BUG] Saving attachments containing UTF-8 chars

2012-11-17 Thread Ethan Glasser-Camp
Tomi Ollila tomi.oll...@iki.fi writes: I can verify this bug: I copied 'rawmail' to my mail store and attempted to 'w' the attacment and got the same result (after notmuch new). The saving code first does notmuch show --format=raw id:508953e6.70...@gmail.com which decodes OK on command

Re: [BUG] Saving attachments containing UTF-8 chars

2012-11-18 Thread Ethan Glasser-Camp
Ethan Glasser-Camp ethan.glasser.c...@gmail.com writes: Writing this buffer using C-x C-w encodes it correctly too. So I think this is an emacs MIME problem. We call mm-save-part, which calls mm-save-part-to-file, which calls mm-with-unibyte-buffer. Hmm.. Indeed, it seems that inserting

Re: Add new dump/restore format and batch tagging.

2012-11-18 Thread Ethan Glasser-Camp
da...@tethera.net writes: which was revied by Tomi and Ethan. I think I implemented their suggestions. Actually, I don't think you implemented all of mine. - Patch 4 still has a subject line that ends in a period. I don't think this is mandatory for everyone but some people consider it best

Re: Add new dump/restore format and batch tagging.

2012-11-18 Thread Ethan Glasser-Camp
Ethan Glasser-Camp ethan.glasser.c...@gmail.com writes: - Patch 4 still has a subject line that ends in a period. I don't think this is mandatory for everyone but some people consider it best practice. Best practice, of course, would be to remove the period at the end of the subject line

Re: [PATCH v2] emacs: display tags in notmuch-show with links

2012-11-18 Thread Ethan Glasser-Camp
Damien Cassou damien.cas...@gmail.com writes: This patch obsoletes id:1352565719-12397-1-git-send-email-damien.cas...@gmail.com [PATCH 1/4] emacs: Add a thread's tags to emacs header-line [PATCH 2/4] emacs: Make tags in header-line clickable [PATCH 3/4] emacs: Make tags that appear in

Re: Notmuch scripts (again), now with more usenet

2012-11-18 Thread Ethan Glasser-Camp
Jan Pobrislo c...@webprojekty.cz writes: Hi! I was having some hardware issues and had to migrate the site. It should be all up again and ready for inclusion. Added stuff from last time: * source function actions for zaw (https://github.com/zsh-users/zaw) * LICENSE (CC0) Hi! Sorry for the

Re: On disk tag storage format

2013-10-04 Thread Ethan Glasser-Camp
David Bremner da...@tethera.net writes: It's still a prototype, and there is not much error checking, and there are certain issues not dealt with at all (the ones I thought about are commented). Hi everyone, I'm very interested in running notmuch on all my laptops and having my mail and its

Re: On disk tag storage format

2013-10-06 Thread Ethan Glasser-Camp
Ethan Glasser-Camp ethan.glasser.c...@gmail.com writes: I've modified the script so that it would run by mangling filenames, which is irreversible (the original tried to encode/decode filenames reversibly). Then I got a little carried away, adding --verbose and --dry-run options as well

notmuch synchronization

2010-10-05 Thread Ethan Glasser-Camp
I recently got interested in notmuch again and I wanted to see what the current situation is with regard to synchronization -- specifically multiple machines each running notmuch, but also notmuch with other non-notmuch clients. As far as I can tell, this is "possible" but not easy or clean: -

notmuch release 0.5 now available

2010-11-18 Thread Ethan Glasser-Camp
On 11/12/2010 12:02 AM, Carl Worth wrote: > The major feature in notmuch 0.5 is the ability to automatically > synchronize maildir flags, (so that if a mail file gets marked > externally with the flag 'S' for "seen" then the "unread" tag in the > notmuch database will be automatically removed).

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

2012-10-11 Thread Ethan Glasser-Camp
James Vasile writes: > Added notmuch-enqueue-asynch to replace calls to > notmuch-call-notmuch-process. Calls to notmuch are then queued and > executed asynchronously. If the db is busy and we get an error saying > it was locked, keep trying until the db is no longer busy. Errors go > in a

More ideas about logging.

2012-10-12 Thread Ethan Glasser-Camp
Austin Clements writes: > The trouble with this approach is that the OS doesn't have to flush > logfile to the disk platters in any particular order relative to the > updates to Xapian. So, after someone trips over your plug, you could > come back with Xapian saying you have 500 log entries

[PATCH 1/2] test: add check for filename argument for test_expect_equal_file

2012-10-12 Thread Ethan Glasser-Camp
Dmitry Kurochkin writes: > Actually, we can do both: check file name for consistent diff order > (from expected to actual) and use file names that the caller provides. Hi! Reviewing the patch queue a little bit here. It seems like this patch ended up getting dropped because the other approach

[PATCH v2] emacs: Add more processing of displayed headers.

2012-10-12 Thread Ethan Glasser-Camp
Hi! Just going through the patch queue. This is definitely a nice effect, but I'm not sure of the approach. It doesn't indent the message's tags, and it doesn't work when you resize the window. (You can get some very ugly wrapping if you put your mind to it.) Is there no better way to do this

[PATCH] test: another test wrt ignoring user-specified files and directories

2012-10-12 Thread Ethan Glasser-Camp
From: Pieter Praet <pie...@praet.org> Demonstrates that *every* file/directory which matches one of the values in 'new.ignore' will be ignored, independent of its depth/location in the mail store. Signed-off-by: Ethan Glasser-Camp --- This is the trivial modification of Pieter's

[PATCH] test: handle filenames that have directories in them

2012-10-12 Thread Ethan Glasser-Camp
Since $TEST_DIRECTORY is an absolute path, any filenames generated with it will be complete paths. Only use the basename to generate suffixes for filenames. Signed-off-by: Ethan Glasser-Camp --- Discovered this while reviewing the patch queue. test/emacs generates filenames using $TEST_DIRECTORY

[PATCH v3 2/2] test: Update test to match previous patch.

2012-10-12 Thread Ethan Glasser-Camp
David Edmondson writes: > Indentation now uses tabs where possible. Hi! Just working through the patch queue. This patch is tagged notmuch::moreinfo, although it seems like the rest of the series may have been tagged notmuch::stale or notmuch::pushed. It's a little hard to figure out, because

[PATCH v2 3/7] emacs: rename `notmuch-show-toggle-headers' to `notmuch-show-toggle-visibility-headers'

2012-10-12 Thread Ethan Glasser-Camp
Pieter Praet writes: > * emacs/notmuch-show.el > > (notmuch-show-toggle-headers): > Rename to `notmuch-show-toggle-visibility-headers'. This patch, and its predecessors, all look great to me. The following patches were already marked "stale" (and indeed they don't apply). But it looks

[PATCH v4 2/9] parse-time-string: add a date/time parser to notmuch

2012-10-15 Thread Ethan Glasser-Camp
Jani Nikula writes: Hi! I commend you for your work and persistence. This represents a lot of work and I think it's good enough to be merged. I would certainly love to see "last" and "ago" supported but this patch series, and this patch especially, is cumbersome enough that I'd really rather it

[PATCH 3/4] Private strsep implementation

2012-10-15 Thread Ethan Glasser-Camp
Vladimir.Marek at oracle.com writes: > From: Vladimir Marek > > strsep is not available on Solaris 10, so we stole the one used by > mutt. Hi! Just going through the patch queue. This patch looks fine to me, but it no longer applies cleanly to master. Can you rebase it? It'll have my +1. Ethan

[PATCH 1/2] test: emacs mailto: URI handling

2012-10-15 Thread Ethan Glasser-Camp
Jameson Graef Rollins writes: > This adds a test for proposed rfc6068 "mailto:; URI handling. The > proposed function would be called 'notmuch-mua-mailto'. The test > provides an example mailto: string that should test some subset of the > rfc6068 specification:

[PATCH v8 0/8] reworked crypto toggle, plus a few other toggles

2012-10-15 Thread Ethan Glasser-Camp
Pieter Praet writes: > Great work! > > Here's some tests. Hi! These look fine to me. With Mark's review (id:"87k41e45hi.fsf at qmul.ac.uk"), I'm removing the needs-review tag. Ethan

[PATCH 3/3] new: don't read unchanged directories from disk

2012-10-15 Thread Ethan Glasser-Camp
Sascha Silbe writes: > Previously, notmuch new listed all directories on disk, even if they > were unchanged from the state recorded in the database. This could take > a huge amount of time for large numbers of mails as it would list each > individual mail. > > By iterating over the

[PATCH v2 2/6] test: emacs: new test "notmuch-show: change tags of all messages in current buffer"

2012-10-15 Thread Ethan Glasser-Camp
Pieter Praet writes: > * test/emacs: > > New subtest "notmuch-show: change tags of all messages in current buffer": > `notmuch-show-tag-all' ("*") changes tags of *all* messages in current > buffer. > --- > test/emacs | 15 +++ > 1 files changed, 15 insertions(+), 0

[PATCH v2 4/6] emacs: add optional predicate arg to `notmuch-show-mapc'

2012-10-15 Thread Ethan Glasser-Camp
Pieter Praet writes: > * emacs/notmuch-show.el (notmuch-show-mapc): > > If provided with optional argument PREDICATE, only call > FUNCTION if calling PREDICATE returns non-nil. > > Also correct original docstring: 's/thread/buffer/'. > --- This patch was marked stale, but isn't. >

[PATCH v2 4/6] emacs: add optional predicate arg to `notmuch-show-mapc'

2012-10-15 Thread Ethan Glasser-Camp
Mark Walters writes: > The original function feels a little fragile to me as to what happens if > predicate or function move point. Eg what happens if function collapses > the message: where does point go, and so where does > notmuch-show-goto-message-next go. Is this just my naivete as a lisp >

[PATCH v2 5/6] emacs: simplify `notmuch-show-get-messages-ids{, -search}'

2012-10-16 Thread Ethan Glasser-Camp
Mark Walters writes: > I like the use of separator rather than hard-wiring " or ". My personal > preference would be to make that change but keep the two functions > separate (my "C"ness makes me like functions that have clear return > types!) But I am happy with the change too. I agree with

[PATCH 1/2] Add notmuch_database_flush method

2012-10-17 Thread Ethan Glasser-Camp
Adrien Bustany writes: > This method explicitly flushes the pending modifications to disk. It is > useful if your program has various threads, each with a read only DB and > one writer thread with a read/write DB. In that case, you most likely > want the writer to sync the changes to disk so

[PATCH 1/3] test: emacs: toggle eliding of non-matching messages in `notmuch-show'

2012-10-17 Thread Ethan Glasser-Camp
From: Pieter Praet <pie...@praet.org> See commits 44a544ed, 866ce8b1, 668b66ec. Signed-off-by: Ethan Glasser-Camp --- I am embarrassed to admit I didn't try to apply these patches before I removed the needs-review tag. This one didn't apply. Here's the trivial fix. The tests are still

[PATCH v2 3/7] emacs: rename `notmuch-show-toggle-headers' to `notmuch-show-toggle-visibility-headers'

2012-10-17 Thread Ethan Glasser-Camp
Ethan Glasser-Camp writes: > This patch, and its predecessors, all look great to me. But a note: many of the first lines in your commit messages ("{show, hide} message headers") contain tabs. I hate tabs. Is this intentional? I have noticed it on other patches you've sen

[PATCH] test: Move tests from emacs to emacs-show

2012-10-17 Thread Ethan Glasser-Camp
otmuch-show'" Signed-off-by: Ethan Glasser-Camp --- I screwed up with git commit --amend or something on the last patch, so David Bremner suggested that I take advantage of the situation to write this patch, which does something useful as a side effect. test/emacs

[PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t

2012-10-19 Thread Ethan Glasser-Camp
Adrien Bustany writes: > The code of the patches in unchanged, but the formatting issues are now > hopefully fixed. These look fine to me, and they're pretty trivial. Ethan

Notmuch scripts (again), now with more usenet

2012-10-19 Thread Ethan Glasser-Camp
ccx at webprojekty.cz writes: > Hello, for quite some time my set of scripts just lied in my repo and > waited for polish before release. So tonight I finally managed to update > the docs, remove old stuff, rewrite some unfortunate things etc. > > One notable addition is slrn2maildir script which

[PATCH 3/7] go: Allow notmuch objects to be garbage collected

2012-10-19 Thread Ethan Glasser-Camp
Adrien Bustany writes: > This makes notmuch appropriately free the underlying notmuch C objects > when garbage collecting their Go wrappers. To make sure we don't break > the underlying links between objects (for example, a notmuch_messages_t > being GC'ed before a notmuch_message_t belonging to

[PATCH 7/8] lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t

2012-10-19 Thread Ethan Glasser-Camp
Peter Wang writes: > Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can > cover all four values of search --exclude in the cli. This series looks good to me. It's a nice clean up and a nice new feature. Patches all apply. However, I'm getting test failures like: FAIL Search,

[PATCH] Add NEWS item for multipart/alternative toggle

2012-10-19 Thread Ethan Glasser-Camp
Users who relied on notmuch-show-all-multipart/alternative-parts might need to know that it is now buffer-local. Signed-off-by: Ethan Glasser-Camp --- Hi! I'm trying to figure out the status of this patch series, which seems to have fallen through the cracks. It looks like Jani's solution exists

[PATCH v2] emacs: add function to toggle display of all multipart/alternative parts

2012-10-19 Thread Ethan Glasser-Camp
Mark Walters writes: > Some messages are sent as multipart/alternative but the alternatives > contain different information. This allows the user to cycle which > part to view. By default this is bound to 'W'. > --- > > This version at least uses the notmuch escaping for message-id which > makes

[PATCH 7/8] lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t

2012-10-19 Thread Ethan Glasser-Camp
Ethan Glasser-Camp writes: > It looks like you have better wording for patch 4/8 so I'd like to see > you resend it. > > I'm marking patches 3, 4, and 7 as moreinfo. Please resubmit! It turns out that patch 4 already has a v2 in the thread, but I didn't see it due to some kind

[PATCH] emacs: functions to import sender or recipient into BBDB

2012-10-19 Thread Ethan Glasser-Camp
Daniel Bergey writes: > From a show buffer, bbdb/notmuch-snarf-from imports the sender into > bbdb. bbdb/notmuch-snarf-to attempts to import all recipients. BBDB > displays a buffer with each contact; C-g displays the next contact, or > returns to the notmuch-show buffer. > > This is my first

[PATCH v2 (Draft)] emacs: split async json parser into utility function

2012-10-19 Thread Ethan Glasser-Camp
Mark Walters writes: > Split out the json parser into a utility function. > --- > > Most of this patch is code movement: but I don't see how to arrange the > patch to show that. Hi! This looks like a straightforward patch and if it will make notmuch-pick more efficient, I'm in favor. I tagged

[PATCH 1/4] show: indicate length of omitted body content (json)

2012-10-19 Thread Ethan Glasser-Camp
Peter Wang writes: > If a leaf part's body content is omitted, return the content length in > --format=json output. This information may be used by the consumer, > e.g. to decide whether to download a large attachment over a slow link. It looks like this patch series was thoroughly reviewed

[PATCH v2 3/3] test: conform to content length, encoding fields

2012-10-19 Thread Ethan Glasser-Camp
Peter Wang writes: > Update tests to expect content-length and content-transfer-encoding > fields in show --format=json output, for leaf parts with omitted body > content. These three patches all look fine to me, except for the following problem. > diff --git a/test/json b/test/json > index

[PATCH 1/2] test: add emacs show mode test for toggling display of multipart/alternative

2012-10-19 Thread Ethan Glasser-Camp
Jameson Graef Rollins writes: > +diff OUTPUT.{text,html} >OUTPUT.diff > +cat +7,9c7,10 > +< [ text/html (not shown) ] > +< [ text/plain ] > +< This is the text/plain part of a multipart/alternative. > +--- > +> [ text/html ] > +> This is the text/html part of a

random corpus generator, v3

2012-10-20 Thread Ethan Glasser-Camp
david at tethera.net writes: > This obsoletes the series at: > > id:"134431-4301-1-git-send-email-bremner at debian.org" > > Changes since v2: > > - clean up new test-binaries and objects > > - remove the "set -o pipefail" leftover from debugging. Possibly this > makes sense as a

[PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t

2012-10-20 Thread Ethan Glasser-Camp
Jani Nikula writes: > On Wed, 17 Oct 2012, Adrien Bustany wrote: >> The code of the patches in unchanged, but the formatting issues are now >> hopefully fixed. > > Hi Adrien, please check at what version flush and reopen have been > introduced to xapian. If they are new-ish (I don't know,

[PATCHv3] notmuch-show: include Bcc header in json output

2012-10-20 Thread Ethan Glasser-Camp
Michal Nazarewicz writes: > From: Michal Nazarewicz > > With this change, emacs users can use notmuch-message-headers > variable to configure notmuch-show display Bcc header. > --- This patch looks pretty straightforward and has seen a certain amount of review so I'm taking off needs-review.

[PATCH V3 1/2] test/smtp-dummy: add --background option and functionality

2012-10-20 Thread Ethan Glasser-Camp
Tomi Ollila writes: > From: Tomi Ollila > > When shell executes background process using '&' the scheduling of > that new process is arbitrary. It could be that smtp-dummy doesn't > get execution time to listen() it's server socket until some other > process attempts to connect() to it. The

[PATCH] lib: fix warnings when building with clang

2012-10-20 Thread Ethan Glasser-Camp
Jani Nikula writes: > Building notmuch with CC=clang and CXX=clang++ produces the warnings: > > CC -O2 lib/tags.o > lib/tags.c:43:5: warning: expression result unused [-Wunused-value] > talloc_steal (tags, list); > ^ > /usr/include/talloc.h:345:143: note: expanded

[PATCH v3] test: conform to content length, encoding fields

2012-10-21 Thread Ethan Glasser-Camp
Peter Wang writes: > Update tests to expect content-length and content-transfer-encoding > fields in show --format=json output, for leaf parts with omitted body > content. OK, this whole series looks good to me. Ethan

[PATCH 7/8] lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t

2012-10-21 Thread Ethan Glasser-Camp
Peter Wang writes: > Does it help if you add a "sleep 1" before the second generate_message > call, i.e. on line 35? It turns out that this test failure is sporadic (perhaps due to the fact that I'm running on tmpfs) and exists even before this series. Doing "sleep 1" makes it go away, but that

[PATCH] test: new: Fix intermittent test failures with --debug

2012-10-21 Thread Ethan Glasser-Camp
are the same. Fix the failures by sorting the output of notmuch --debug and comparing this to a hand-sorted version of its output. Signed-off-by: Ethan Glasser-Camp --- test/new | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/new b/test/new index cc2af72..587aa11

[PATCH v3 2/3] emacs: Rename incremental JSON internal variables.

2012-10-23 Thread Ethan Glasser-Camp
Mark Walters writes: > This patch just renames the internal variables for the JSON parser now > it is no longer specific to search mode. It also fixes up the white > space after the previous patch. There should be no functional changes. This series looks very good to me. I still have a couple

[PATCH] test: Fix HTML rendering test

2012-10-24 Thread Ethan Glasser-Camp
Austin Clements writes: > The test designed to exercise Emacs' rendering of HTML emails > containing images inadvertently assumed w3m was available under Emacs > 23. The real point of this test was to exercise Emacs 24's shr > renderer, so if shr isn't available, we now fall back to html2text,

[PATCH] test: Fix HTML rendering test

2012-10-25 Thread Ethan Glasser-Camp
Austin Clements writes: > Quoth Ethan Glasser-Camp on Oct 24 at 9:59 pm: >> Austin Clements writes: > > Emacs seems to have as many ways to convert HTML to text as there are > people trying to run this test. What's the value of > mm-text-html-renderer for you in Emacs 24?

[PATCH] Support OpenBSD

2012-10-25 Thread Ethan Glasser-Camp
Austin Clements writes: > OpenBSD's build flags are identical to FreeBSD, except that libraries > need to be explicitly linked against libc. No code changes are > necessary. > > From: Cody Cutler > --- OK, looks fine. Ethan

[PATCH 1/2] tag: Disallow adding malformed tags to messages

2012-10-27 Thread Ethan Glasser-Camp
Tomi Ollila writes: > LGTM (NEWS too) Yep! Removing needs-review. Ethan

[PATCH 1/3] emacs: Introduce generic boolean term escaping function

2012-10-27 Thread Ethan Glasser-Camp
Tomi Ollila writes: > These 3 patches LGTM. Me too. But I wouldn't be averse to some tests :) Ethan

[PATCH 1/3] contrib: add notmuch-pick.el file itself

2012-10-27 Thread Ethan Glasser-Camp
Mark Walters writes: > +(defvar notmuch-pick-json-parser nil > + "Incremental JSON parser for the search process filter.") > + > +(defun notmuch-pick-process-filter (proc string) > + "Process and filter the output of \"notmuch show\" (for pick)" > + (let ((results-buf (process-buffer proc)) >

[PATCH (draft) 1/2] emacs: allow the user to toggle the visibility of multipart/alternative parts

2012-10-27 Thread Ethan Glasser-Camp
Mark Walters writes: > This patch adds a keybinding to the buttons in the notmuch-show emacs > buffer to allow the user to toggle the visibility of each part of a > message in the show buffer. This is particularly useful for > multipart/alternative parts where the parts are not really >

[PATCH v2 0/2] include Reply-To headers in json output

2012-11-05 Thread Ethan Glasser-Camp
Peter Wang writes: > This obsoletes the series 1340508470-16606-1-git-send-email-novalazy at > gmail.com > Only json output is affected now. > > Peter Wang (2): > show: include Reply-To header in json output > test: add test for showing Reply-To headers LGTM. Removed needs-review, added

[PATCH] fix notmuch_database_open call in addrlookup

2012-11-05 Thread Ethan Glasser-Camp
James Vasile writes: > What's the best way to submit changes to addrlookup? Right now, it is > out of date vs the latest libnotmuch. The addrlookup repo is vala code > but the wiki [1] points to a generated c file [2]. > > [1]

[PATCH 1/1] uncrustify.cfg: added 3 new types for uncrustify to know

2012-11-05 Thread Ethan Glasser-Camp
Tomi Ollila writes: > Added FILE, notmuch_show_params_t and sprinter_t to be > types when uncrustifying sources. This affect spacing > when uncrustify is deciding for type declaration instead > of binary multiplication operation. This looks good to me. If you had plenty of time and no more

emacs: Handling external dependencies

2012-11-13 Thread Ethan Glasser-Camp
Damien Cassou writes: > 4) distribute the dependency with the rest of notmuch (in a separate > "fallback-libs/" directory) and load it only when requiring the > library with the standard load-path does not work. Jonas Bernoulli > gave me a way to do that: > > , > | (or (require 'THE-LIB nil

[PATCH v2] emacs: display tags in notmuch-show with links

2012-11-13 Thread Ethan Glasser-Camp
Damien Cassou writes: > +(defun notmuch-tagger-present-tags (tags headerline) > + "Return a property list which nicely presents all TAGS. > + > +If HEADERLINE is non-nil the returned list will be ready for > +inclusion in the buffer's header-line. HEADERLINE must be nil in > +all other cases."

[PATCH v2 0/3] Better id: link buttonization

2012-11-13 Thread Ethan Glasser-Camp
Austin Clements writes: > This is v2 of id:"1351650561-7331-1-git-send-email-amdragon at mit.edu". > This makes Jani's suggested additions to the regexp and adds support > for RFC 2392 mid: links, as suggested by Sascha. This series looks fine to me. Ethan

[PATCH v2] test: Fix HTML rendering test

2012-11-13 Thread Ethan Glasser-Camp
Austin Clements writes: > The test designed to exercise Emacs' rendering of HTML emails > containing images inadvertently assumed w3m was available under Emacs > 23. The real point of this test was to check that Emacs 24's shr > renderer didn't crash when given img tags, so use shr if it's >

[PATCH] test: add nontrivial test for restore --accumulate.

2012-11-16 Thread Ethan Glasser-Camp
david at tethera.net writes: > From: David Bremner > > It seems we have never tested the case that restore --accumulate > actually adds tags. I noticed this when I started optimizing and no > tests failed. > > I also had to modify the next test. Perhaps a seperate patch could > make these tests

[PATCH 2/2] test: add nontrivial test for restore --accumulate.

2012-11-17 Thread Ethan Glasser-Camp
david at tethera.net writes: > From: David Bremner > > It seems we have never tested the case that restore --accumulate > actually adds tags. I noticed this when I started optimizing and no > tests failed. > > The bracketing with "restore --input=dump.expected" are to make sure > we start in a

[BUG] Saving attachments containing UTF-8 chars

2012-11-18 Thread Ethan Glasser-Camp
Tomi Ollila writes: > I can verify this bug: I copied 'rawmail' to my mail store and attempted > to 'w' the attacment and got the same result (after notmuch new). > > The saving code first does > notmuch show --format=raw id:"508953E6.70006 at gmail.com" > which decodes OK on command line, and

[BUG] Saving attachments containing UTF-8 chars

2012-11-18 Thread Ethan Glasser-Camp
Ethan Glasser-Camp writes: > Writing this buffer using C-x C-w encodes it correctly too. So I think > this is an emacs MIME problem. We call mm-save-part, which calls > mm-save-part-to-file, which calls mm-with-unibyte-buffer. Hmm.. > > Indeed, it seems that inserting this charac

[PATCH 2/2] emacs: less guessing of character set in messages

2012-11-18 Thread Ethan Glasser-Camp
Tomi Ollila writes: > The macro with-current-notmuch-show-message executes command > `notmuch show --format=raw id:...` which just outputs the contents > of the mail file verbatim (into temporary buffer). In case e.g. utf-8 > locale is used the temporary buffer has buffer-file-coding-system as >

Add new dump/restore format and batch tagging.

2012-11-18 Thread Ethan Glasser-Camp
david at tethera.net writes: > which was revied by Tomi and Ethan. I think I implemented their > suggestions. Actually, I don't think you implemented all of mine. - Patch 4 still has a subject line that ends in a period. I don't think this is mandatory for everyone but some people consider it

Add new dump/restore format and batch tagging.

2012-11-18 Thread Ethan Glasser-Camp
Ethan Glasser-Camp writes: > - Patch 4 still has a subject line that ends in a period. I don't think > this is mandatory for everyone but some people consider it best > practice. Best practice, of course, would be to remove the period at the end of the subject line. Patch 12 als

[PATCH v2] emacs: display tags in notmuch-show with links

2012-11-18 Thread Ethan Glasser-Camp
Damien Cassou writes: > This patch obsoletes > id:1352565719-12397-1-git-send-email-damien.cassou at gmail.com > > [PATCH 1/4] emacs: Add a thread's tags to emacs header-line > [PATCH 2/4] emacs: Make tags in header-line clickable > [PATCH 3/4] emacs: Make tags that appear in `notmuch-show'

Notmuch scripts (again), now with more usenet

2012-11-18 Thread Ethan Glasser-Camp
Jan Pobrislo writes: > Hi! I was having some hardware issues and had to migrate the site. It should > be all up again and ready for inclusion. > > Added stuff from last time: > * source function & actions for zaw (https://github.com/zsh-users/zaw) > * LICENSE (CC0) Hi! Sorry for the delay, real

On disk tag storage format

2013-10-04 Thread Ethan Glasser-Camp
David Bremner writes: > It's still a prototype, and there is not much error checking, and there > are certain issues not dealt with at all (the ones I thought about are > commented). Hi everyone, I'm very interested in running notmuch on all my laptops and having my mail and its tags be

On disk tag storage format

2013-10-07 Thread Ethan Glasser-Camp
Ethan Glasser-Camp writes: > I've modified the script so that it would run by mangling filenames, > which is irreversible (the original tried to encode/decode filenames > reversibly). Then I got a little carried away, adding --verbose and > --dry-run options as well as removing a cou

Distributed Notmuch

2012-01-08 Thread Ethan Glasser-Camp
Hi guys, It's kind of academic for me right now because I'm mostly just using one computer, but one reason I've hesitated to switch over entirely to notmuch is that it's hard to distribute across many machines. The last time I wrote the list about this, David Bremner pointed me to gitmuch in

[PATCH] Document the dependency on dtach in the test suite

2012-01-16 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> dtach (and before that, screen) are used to run emacs with more verisimilitude, but this is only mentioned in the NEWS. Mention this in the test/README file, to make it easier to find out why a bunch of tests are failing/skipped. Sign

[PATCH v2] Document external dependencies in the test suite

2012-01-16 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> Add an explicit note to the README explaining what programs are necessary and the perhaps-surprising behavior of skipping tests if they aren't present. Signed-off-by: Ethan Glasser-Camp --- v2 suggested by Dmitry Kurochkin: docume

[PATCH v2] Document external dependencies in the test suite

2012-01-16 Thread Ethan Glasser-Camp
On 01/16/2012 04:09 PM, Xavier Maillard wrote: > Looks good but just a nit: what is the meaning of the '1' ? It's a manpage-like indication that these are standalone programs and not, say, libraries or system calls :) Not that I expect there to be library dependencies for just the test suite,

[PATCH 1/2] moved _notmuch_get_list () and _notmuch_set_list () up in file

2012-01-27 Thread Ethan Glasser-Camp
On 01/27/2012 05:42 AM, Tomi Ollila wrote: > On Thu, 26 Jan 2012 13:03:46 +, Jani Nikula wrote: >> On Thu, 26 Jan 2012 12:11:57 +0200, Tomi Ollila >> wrote: >>> Moved _notmuch_get_list () and _notmuch_set_list () to a location >>> in notmuch-config.c so that new functions that will be

[PATCH] Free the results of scandir()

2012-02-06 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> scandir() returns "strings allocated via malloc(3)" which are then "collected in array namelist which is allocated via malloc(3)". Currently we just free the array namelist. Instead, free all the entries of namelist, and

[PATCH v2] Free the results of scandir()

2012-02-07 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> scandir() returns "strings allocated via malloc(3)" which are then "collected in array namelist which is allocated via malloc(3)". Currently we just free the array namelist. Instead, free all the entries of namelist, and

[PATCH] Free the results of scandir()

2012-02-07 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> scandir() returns "strings allocated via malloc(3)" which are then "collected in array namelist which is allocated via malloc(3)". Currently we just free the array namelist. Instead, free all the entries of namelist, and

[PATCH] Free the results of scandir()

2012-02-07 Thread Ethan Glasser-Camp
On 02/07/2012 05:10 AM, Dmitry Kurochkin wrote: > Please use --subject-prefix='PATCH vN' parameter when sending new > versions of patches. Also, sending new versions as replies to the first > email in the original thread makes it easier to track. Oops! Thanks again. Ethan

[RFC PATCH 00/13] Modular message store code

2012-02-15 Thread Ethan Glasser-Camp
Hi guys, I'm submitting as RFC this patch series, which introduces the idea of a "mailstore", a "class" that defines how to access mail, instead of currently assuming it's always some Maildir-ish hierarchy that contains a bunch of mail. This was listed as a wishlist item on

[RFC PATCH 01/13] Create configuration paramater database.type

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This will be used to allow different backends to be developed to allow access to mail that isn't stored in Maildirs. Signed-off-by: Ethan Glasser-Camp --- notmuch-client.h |7 ++ notmuch-config.c

[RFC PATCH 02/13] Add the concept of a mailstore in its absolute minimal sense

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This introduces (and uses) the mailstore parameter to the notmuch_message_file_open API, and passes this through wherever it will be needed. This requires touching a lot of places just to change one API. We end up

[RFC PATCH 03/13] Introduce mailstore in the python bindings

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> Signed-off-by: Ethan Glasser-Camp --- bindings/python/notmuch/database.py | 31 +- bindings/python/notmuch/globals.py |3 ++ bindings/python/notmuch/mailstore.py | 38 +++

[RFC PATCH 04/13] Replace remaining places where fopen occurs

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> Because mail might no longer be on disk, other uses of fopen(2) need to be replaced with calls to notmuch_mailstore_open. This isn't all of them, but these are the ones that involve touching the API in a lot of different places. This

[RFC PATCH 06/13] Pass mailstore to _notmuch_message_index_file

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This is the last place where fopen(2) was used and had to be replaced. Signed-off-by: Ethan Glasser-Camp --- lib/database.cc |2 +- lib/index.cc |5 +++-- lib/notmuch-private.h |3 ++- 3 files changed, 6 inse

[RFC PATCH 07/13] notmuch-new: pull out useful bits of add_files_recursive

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This is part of notmuch-new refactor phase 1: make add_files stuff safe for other backends. add_files_recursive is essentially a maildir-crawling function that periodically adds files to the database or adds filenames to remove

[RFC PATCH 08/13] count_files and add_files shall be generic

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> Rename current count_files and add_files to maildir_count_files and maildir_add_files. This allows the possibility, at least, of having other backends. Signed-off-by: Ethan Glasser-Camp --- notmuch-new.c

[RFC PATCH 09/13] Mailstore also provides a "rename" function

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This is used only in notmuch_message_tags_to_maildir_flags, to update a message's filename when its tags change. For mailstores where this doesn't make sense, they can of course define rename to be a NOOP. Signed-off-by: Ethan Glasse

[RFC PATCH 10/13] Introduce concept of mailstore "constructor"

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> Right now this is a fancy no-op because maildir doesn't need any special data, but getting the API right is good. A constructor can fail, so return a notmuch_status_t. Signed-off-by: Ethan Glasser-Camp --- lib/mailstore.c

[RFC PATCH 11/13] Add a close function to mailstore

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This is a useful way to signal to mailstores that the resources associated with an existing FILE* are no longer being used and they can be cleaned up. For maildir, of course, this is just a call to fclose(), but for other mailstores this

[RFC PATCH 12/13] Close files using notmuch_mailstore_close instead of fclose

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This requires a little bit of juggling in lib/sha1.c. Wrapper functions provide the FILE*. Instead of closing the file immediately ourselves, we let the wrapper functions close it. Signed-off-by: Ethan Glasser-Camp --- lib/message-file.c

[RFC PATCH 13/13] First crack at a CouchDB mailstore

2012-02-15 Thread Ethan Glasser-Camp
From: Ethan Glasser-Camp <et...@betacantrips.com> This introduces new parameters to notmuch-config to store the CouchDB URL and the "name" of the database. Signed-off-by: Ethan Glasser-Camp --- Makefile.local |3 + lib/mailstore.c | 109 +

[RFC PATCH 00/13] Modular message store code

2012-03-01 Thread Ethan Glasser-Camp
On 02/15/2012 07:56 PM, Mark Walters wrote: > Obviously I have not looked at the patch set in detail yet but I have a > quick question. Since you are allowing more general filenames anyway > couldn't you encode mailstore in filename? Eg > mbox://some-path[:byte-postion], or "imap://server..." > >

<    1   2   3   >