From: Ali Polatel <alip@exherbo.org>
To: Fernando Carrijo <fcarrijo@yahoo.com.br>
Cc: notmuch@notmuchmail.org
Subject: Re: [RFC/PATCH] Add search-files command
Date: Wed, 13 Jan 2010 15:11:27 +0200 [thread overview]
Message-ID: <20100113131127.GA14681@harikalardiyari> (raw)
In-Reply-To: <874omq6up2.fsf@yahoo.com.br>
[-- Attachment #1: Type: text/plain, Size: 2641 bytes --]
Fernando Carrijo yazmış:
> Hi Ali,
Hey Fernando,
> On Wed, 13 Jan 2010 12:24:22 +0200, Ali Polatel <alip@exherbo.org> wrote:
<snip>
> > diff --git a/notmuch-search-files.c b/notmuch-search-files.c
> > new file mode 100644
> > index 0000000..b48783a
> > --- /dev/null
> > +++ b/notmuch-search-files.c
> > @@ -0,0 +1,107 @@
> > +/* notmuch - Not much of an email program, (just index and search)
> > + *
> > + * Copyright © 2009 Carl Worth
>
> I almost certainly should not be speaking in the name of Carl, but a
> few weeks ago he replied with the following words to a message which
> somehow raised the discussion of copyright holding in notmuch source
> code:
>
> "Please feel free to retain your own copyright. I certainly don't
> deserve anything being assigned to me."
>
> The message-id of his reply is: 873a34tf8b.fsf@yoom.home.cworth.org,
> just in the case you want to check the context in which it occurred.
>
Thanks, I don't really care about who owns the copyright as long as it's
open source but I'll change it if that's what Carl wishes.
<snip>
> > + if (*query_str == '\0') {
> > + fprintf (stderr, "Error: notmuch search-files requires at least one search term.\n");
>
> Could we break this line so that it did not go beyond the column limit
> set by the coding conventions? Maybe we should go one step further and
> import the file CODING_STYLE from cairo into notmuch's repository.
>
Sure, I didn't know much about the coding style and as you said there's
no document about it in notmuch's repository.
> > + return 1;
> > + }
> > +
> > + query = notmuch_query_create (notmuch, query_str);
> > + if (query == NULL) {
> > + fprintf (stderr, "Out of memory\n");
> > + return 1;
> > + }
> > +
> > + notmuch_query_set_sort (query, sort);
> > +
> > + do_search_files (query);
> > +
> > + notmuch_query_destroy (query);
> > + notmuch_database_close (notmuch);
>
> It is not something of major importance, but I realized that the
> function notmuch_config_close is only being called when notmuch is
> executed with no arguments. As we know, the kernel shall close all
> open file descriptors upon program termination, but wouldn't it be
> better if we did it explicitly? Or did I overlook something?
>
Nope, it's good coding practise to free all resources before exit, I
didn't do it for config because neither the search command does it.
I'll send an updated patch soonish and I'll also send a separate patch
for notmuch-search.c as well.
> Kind regards,
> Fernando Carrijo.
>
--
Regards,
Ali Polatel
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-01-13 13:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 10:24 [RFC/PATCH] Add search-files command Ali Polatel
2010-01-13 12:44 ` Fernando Carrijo
2010-01-13 13:11 ` Ali Polatel [this message]
2010-01-13 13:17 ` [RFC/PATCH v2] " Ali Polatel
2010-01-13 22:52 ` Jameson Rollins
2010-01-14 6:36 ` Ali Polatel
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=20100113131127.GA14681@harikalardiyari \
--to=alip@exherbo.org \
--cc=fcarrijo@yahoo.com.br \
--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).