Re: [notmuch] tag dir proposal [was: Re: Git as notmuch object store]

Subject: Re: [notmuch] tag dir proposal [was: Re: Git as notmuch object store]

Date: Thu, 28 Jan 2010 19:22:00 +1300

To: martin f krafft

Cc: notmuch

From: James Westby


On Thu, 28 Jan 2010 18:34:21 +1300, martin f krafft <madduck@madduck.net> wrote:
> also sprach James Westby <jw+debian@jameswestby.net> [2010.01.28.1828 +1300]:
> > Are you trying to use thread: such that it could be passed to
> > notmuch show to see the conversation?
> > 
> > That's not going to work so well if so.
> 
> Why not? Works fine for me with the vim plugin...

lib/message.cc:560

static void                                                                   
thread_id_generate (thread_id_t *thread_id)                                   
{
    static int seeded = 0;
    FILE *dev_random;
    uint32_t value;                                                           
    char *s;
    int i;
                                                                              
    if (! seeded) {
    dev_random = fopen ("/dev/random", "r");                                  
    if (dev_random == NULL) {
        srand (time (NULL));                                                  
    } else {
        fread ((void *) &value, sizeof (value), 1, dev_random);               
        srand (value);
        fclose (dev_random); 
    }
    seeded = 1;
    }                                                                         
    
    s = thread_id->str;
    for (i = 0; i < NOTMUCH_THREAD_ID_DIGITS; i += 8) {                       
    value = rand ();
    sprintf (s, "%08x", value);                                               
    s += 8;                                                                   
    }
}

so it works fine for you, however I have no idea which thread you are
talking about.

Thanks,

James

Thread: