unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: micah anderson <micah@riseup.net>
To: "Andreas Klöckner" <lists@informa.tiker.net>, notmuch@notmuchmail.org
Subject: Re: [patch] store folder information
Date: Thu, 28 Jan 2010 04:55:55 +1300	[thread overview]
Message-ID: <87ljfjfsok.fsf@lillypad.riseup.net> (raw)
In-Reply-To: <200912141421.52561.lists@informa.tiker.net>

[-- Attachment #1: Type: text/plain, Size: 3137 bytes --]


Hi Andreas,

I'm just writing because of the patch you sent to the notmuch list on
December 15th. It seems like many people are wanting this functionality,
I know I am myself and Carl has also indicated the same. However, there
were a couple of minor suggestions for improvements for your patch that
have not seen a reply from you yet. I'm particularly eager to see this
get accepted upstream, and it sounds like the changes necessary to do so
are relatively minor.

I'm wondering what your plans are for addressing these issues? I've come
to depend on this functionality, and would love to see it incorporated
upstream! 

Specifically these were:

1. Unrelated whitespace:

On December 16th,2009 Ruben Pollan <meskio@sindominio.net> wrote:

> [meskio@blackspot:src/notmuch.orig]$ git apply ~/0001-Preseve-folder-information-when-indexing.patch
> /home/meskio/0001-Preseve-folder-information-when-indexing.patch:136: trailing whitespace.
>		 status notmuch_database_add_message (notmuch, next,
> /home/meskio/0001-Preseve-folder-information-when-indexing.patch:137: trailing whitespace.
>							folder_base_name,
> warning: 2 lines add whitespace errors.
>
> It's just whitespaces at the end of the lines.

2. An unrelated hunk creeping in:

On Tue, 15 Dec 2009 13:22:19 -0800, Carl Worth <cworth@cworth.org> wrote:
> On Mon, 14 Dec 2009 14:21:50 -0500, Andreas Kl=C3=B6ckner <lists@informa.=
tiker.net> wrote:
> >
> > @@ -116,6 +116,8 @@ skip_re_in_subject (const char *subject)
> >  	    s++;
> >  	if (strncasecmp (s, "re:", 3) =3D=3D 0)
> >  	    s +=3D 3;
> > +        else if (strncasecmp (s, "aw:", 3) =3D=3D 0)
> > +	    s +=3D 3;
> >  	else
> >  	    break;
> >      }
>=20
> This hunk looks unrelated to the rest. Could you submit that separately,
> please?


3. Redundant trailing directory name traversal:

> > +    gchar *full_folder_name =3D NULL;
> > +    gchar *folder_base_name =3D NULL;
> > +
> > +    /* Find name of "folder" containing the email. */
> > +    full_folder_name =3D g_strdup(path);
> > +    while (1)
> > +    {
> > +        folder_base_name =3D g_path_get_basename(full_folder_name);
>
> The trailing directory name is available already during the
> traversal. So you don't need to search it back out again. See the patch
> in the following message:
>
> 	id:87fx8bygi7.fsf@linux.vnet.ibm.com
>
> which simply passes the trailing directory name along, (but skipping a
> name of "cur" or "new" while traversing).

4. supporting hierarchical folders (perhaps this is a later improvement
that does not need to be added before the original patch is accepted?):

> Beyond that, though, I imagine some people have hierarchical folders as
> well, so it probably makes sense to store them as well.
>
> To do that, it's probably just a matter of calling gen_terms on the
> complete filename. I haven't tested, but doing that should allow
> Xapian's phrase searching to do the right thing for something like:
>
> 	filename:portion/of/the/path/name

5. Probably the patch needs to be rebased off of master at this point.

Micah

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  parent reply	other threads:[~2010-01-27 19:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 19:21 [patch] store folder information Andreas Klöckner
2009-12-15 12:16 ` Ruben Pollan
2009-12-15 19:57   ` Marten Veldthuis
2009-12-15 21:22 ` Carl Worth
2010-01-27 15:55 ` micah anderson [this message]
2010-01-28 15:24   ` Michal Sojka
2010-01-28 15:25     ` [PATCH 1/2] Skip German "aw:" prefix in subjects Michal Sojka
2010-01-28 15:25     ` [PATCH 2/2] Preserve folder information when indexing Michal Sojka
2010-01-28 17:13       ` micah anderson
2010-01-29  9:49         ` Michal Sojka
2010-02-02 15:01           ` [PATCHv2] " Michal Sojka
2010-02-02 16:20             ` Jameson Rollins
2010-02-02 16:52               ` Jameson Rollins
2010-02-02 17:48               ` Arvid Picciani
2010-02-02 18:22                 ` Jameson Rollins
2010-02-02 18:42                   ` Arvid Picciani
2010-02-02 21:31                   ` micah anderson
2010-02-02 22:25                     ` Michal Sojka
2010-02-02 22:36                       ` Jameson Rollins
2010-02-03  9:58                       ` Sebastian Spaeth
2010-02-02 20:43                 ` Michal Sojka
2010-02-03  7:56                 ` Sebastian Spaeth

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=87ljfjfsok.fsf@lillypad.riseup.net \
    --to=micah@riseup.net \
    --cc=lists@informa.tiker.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).