From: "Alexey I. Froloff" <raorn@raorn.name>
To: David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] lib: Add a new prefix "list" to the search-terms syntax
Date: Tue, 30 Apr 2013 13:52:14 +0400 [thread overview]
Message-ID: <20130430095213.GA2861@raorn.name> (raw)
In-Reply-To: <87vc74vn2n.fsf@zancas.localnet>
[-- Attachment #1: Type: text/plain, Size: 1943 bytes --]
On Mon, Apr 29, 2013 at 10:12:16PM -0300, David Bremner wrote:
> > + begin_list_id = strrchr (list_id_header, '<');
> > + if (!begin_list_id) {
> > + fprintf (stderr, "Warning: Not indexing mailformed List-Id tag.\n");
> > + return;
> > + }
> - I guess this should say "malformed".
My bad. English is not my native language ;-)
> - I got about 1800 lines of such messages when indexing 280k
> messages. That might strike some people as excessive. On the otherhand
> I guess we need to re-think error reporting overall.
If I understand correctly, this code belongs to library and
should not print anything neither on stderr nor stdout. OTOH,
surrounding functions do print messages on error, so I just did
as other do.
> What do you think about printing filename or message-id here its
> easier to double check that it is not a bug?
Giving Message-Id makes sense.
> > + void *local = talloc_new (message);
> we should handle ENOMEM here, I think.
There are 16 talloc_new() calls and ENOMEM is not handled
anywhere.
> > + /* _notmuch_message_add_term() may return
> > + * NOTMUCH_PRIVATE_STATUS_TERM_TOO_LONG here. We can't fix it, but
> > + * this is not a reason to exit with error... */
> > + if (_notmuch_message_add_term (message, "list", list_id))
> > + fprintf (stderr, "Warning: Not indexing List-Id: <%s>\n", list_id);
> This should say why the indexing failed.
There should be strerror-like function, then can give description
for a given status code.
> - We need a couple tests for this code; tests/search should give some
> hints how to proceed.
OK
> - We need a patch for NEWS, explaining what people need to do take
> advantage of the new functionality. I think that adding new prefixes
> to an existing database is OK, but I'd welcome confirmation.
OK
--
Regards, --
Sir Raorn. --- http://thousandsofhate.blogspot.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2013-04-30 9:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 13:46 [PATCH] lib: Add a new prefix "list" to the search-terms syntax Alexey I. Froloff
2013-04-06 11:54 ` David Bremner
2013-04-08 10:03 ` Alexey I. Froloff
2013-04-08 21:56 ` David Bremner
2013-04-09 8:30 ` Alexey I. Froloff
2013-04-09 23:16 ` Alexey I. Froloff
2013-04-30 1:12 ` David Bremner
2013-04-30 9:52 ` Alexey I. Froloff [this message]
2013-05-04 0:54 ` David Bremner
2013-10-17 14:17 ` Jani Nikula
2013-12-17 18:03 ` Kirill A. Shutemov
2013-12-17 19:46 ` Kirill A. Shutemov
2014-01-01 12:04 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130430095213.GA2861@raorn.name \
--to=raorn@raorn.name \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).