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

Thomas Schwinge thomas at schwinge.name
Thu Feb 3 09:27:07 PST 2011


Hallo!

On Thu, 3 Feb 2011 12:06:20 -0500, Austin Clements <amdragon at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110203/4b4df877/attachment.pgp>


More information about the notmuch mailing list