Re: [PATCH 2/2] notmuch.el:notmuch-search-process-filter: Rewritten. Cope with incomplete lines.

Subject: Re: [PATCH 2/2] notmuch.el:notmuch-search-process-filter: Rewritten. Cope with incomplete lines.

Date: Thu, 03 Feb 2011 18:27:07 +0100

To: Austin Clements

Cc: notmuch@notmuchmail.org

From: Thomas Schwinge


Hallo!

On Thu, 3 Feb 2011 12:06:20 -0500, Austin Clements <amdragon@mit.edu> wrote:
> Is there a reason you keep the remaining data in a string instead of
> taking the more idiomatic elisp approach of leaving it in the process
> buffer?  In fact, the code would probably be simpler if you
> immediately appended the string to the process buffer like a normal
> process-filter and then peeled things away using buffer-oriented
> regexp functions like looking-at.  Elisp is a lot better at
> manipulating buffers than it is at manipulating strings.

Ha, I hear you -- this is what I meant to do originally.  But then, the
save-in-string approach (even though I always considered keeping state in
the string a bit ugly) seemed more simple to me.  As I said: writing
elisp code is not my primary profession...  :-) (Perhaps I should buy a
book about it, or something.)  Now that you confirmed my original idea,
I'll see about re-writing the code accordingly, so thanks for the input!


Grüße,
 Thomas
part-000.sig (application/pgp-signature)

Thread: