post-tag hook?

2015-02-25 Thread Christophe-Marie Duquesne
Ah! Clever, I like the idea of using mtime.
-- next part --
An HTML attachment was scrubbed...
URL: 



post-tag hook?

2015-02-25 Thread Christophe-Marie Duquesne
Hi,

Is there a way to run a command every time a message gets tagged?

I would like to keep in sync tags and folder names. The problem is that it
requires a full scan of the notmuch db, which is slow. If I was running
this script only on messages that got retagged since like run of my script
it would be much faster. Unfortunately I don't find a way to mark/save
these messages in a notmuch hook.

I found an old thread from 2012, where somebody mentionned they implemented
a post-tag hook. Was this ever integrated?

Cheers,
Christophe-Marie
-- next part --
An HTML attachment was scrubbed...
URL: 



Re: post-tag hook?

2015-02-25 Thread Christophe-Marie Duquesne
Ah! Clever, I like the idea of using mtime.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


post-tag hook?

2015-02-24 Thread Christophe-Marie Duquesne
Hi,

Is there a way to run a command every time a message gets tagged?

I would like to keep in sync tags and folder names. The problem is that it
requires a full scan of the notmuch db, which is slow. If I was running
this script only on messages that got retagged since like run of my script
it would be much faster. Unfortunately I don't find a way to mark/save
these messages in a notmuch hook.

I found an old thread from 2012, where somebody mentionned they implemented
a post-tag hook. Was this ever integrated?

Cheers,
Christophe-Marie
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Better Gmail handling by not using Notmuch tags

2012-09-14 Thread Christophe-Marie Duquesne
On Fri, Sep 14, 2012 at 10:37 AM, Rainer M Krug  wrote:
> An API seems to be the way to go, but that one only concerns the settings, 
> not retrieving
> information about individual emails.

Oops. It seems that I misread that.

> But that is definetly a job for somebody else - I am just throwing ideas out.

It was a general "you".


Better Gmail handling by not using Notmuch tags

2012-09-14 Thread Christophe-Marie Duquesne
You may want to have a look to the google mail API [1]

[1]: https://developers.google.com/google-apps/email-settings/


Re: Better Gmail handling by not using Notmuch tags

2012-09-14 Thread Christophe-Marie Duquesne
You may want to have a look to the google mail API [1]

[1]: https://developers.google.com/google-apps/email-settings/
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Better Gmail handling by not using Notmuch tags

2012-09-14 Thread Christophe-Marie Duquesne
On Fri, Sep 14, 2012 at 10:37 AM, Rainer M Krug r.m.k...@gmail.com wrote:
 An API seems to be the way to go, but that one only concerns the settings, 
 not retrieving
 information about individual emails.

Oops. It seems that I misread that.

 But that is definetly a job for somebody else - I am just throwing ideas out.

It was a general you.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[alot] announcing v0.3.3

2012-09-12 Thread Christophe-Marie Duquesne
On Sun, Sep 9, 2012 at 5:34 PM, Patrick Totzke  
wrote:
> Good news everyone!

I could not help but read the rest of your announcement in the voice
of professor Farnsworth.


Re: [alot] announcing v0.3.3

2012-09-12 Thread Christophe-Marie Duquesne
On Sun, Sep 9, 2012 at 5:34 PM, Patrick Totzke patricktot...@gmail.com wrote:
 Good news everyone!

I could not help but read the rest of your announcement in the voice
of professor Farnsworth.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Alternative (raw) message store (i.e. instead of maildir)

2012-08-14 Thread Christophe-Marie Duquesne
On Tue, Aug 14, 2012 at 8:11 PM, Christophe-Marie Duquesne  
wrote:
> one could complete this work with an
> interface to couchdb for offlineimap

*I meant for notmuch


Alternative (raw) message store (i.e. instead of maildir)

2012-08-14 Thread Christophe-Marie Duquesne
On Tue, Aug 14, 2012 at 7:05 PM, Ciprian Dorin Craciun
 wrote:
> I proposed -- better said queried if possible or at least wanted
> -- to have an internal interface (SPI) that any mail store would have
> to implement in order to be indexed and used by notmuch. I guess the
> interface would be quite lightweight, and would need just the
> following:
> * open store;
> * create a cursor iterating through all the emails, yielding only the 
> keys;
> * read the envelope (as a byte blob) of a particular key; (used
> only for displaying thread lists, etc.;)
> * read the body (as a byte blob) of a particular key;
> * maybe create a cursor iterating over all those emails that have
> changed since a particular timestamp;

Someone wrote a fork of offlineimap to store mail in couchdb [1]. The
same couchdb can be mounted with fuse as a maildir [2] for mutt.
According to the author [3], the fuse interface is read only. Assuming
your proposal was implemented, one could complete this work with an
interface to couchdb for offlineimap and get all the features
previously requested.

[1]: https://github.com/theodoreb/offlineimap
[2]: https://github.com/theodoreb/couchdb-maildir-fuse
[3]: http://theodoreb.net/resume


Re: Alternative (raw) message store (i.e. instead of maildir)

2012-08-14 Thread Christophe-Marie Duquesne
On Tue, Aug 14, 2012 at 7:05 PM, Ciprian Dorin Craciun
ciprian.crac...@gmail.com wrote:
 I proposed -- better said queried if possible or at least wanted
 -- to have an internal interface (SPI) that any mail store would have
 to implement in order to be indexed and used by notmuch. I guess the
 interface would be quite lightweight, and would need just the
 following:
 * open store;
 * create a cursor iterating through all the emails, yielding only the 
 keys;
 * read the envelope (as a byte blob) of a particular key; (used
 only for displaying thread lists, etc.;)
 * read the body (as a byte blob) of a particular key;
 * maybe create a cursor iterating over all those emails that have
 changed since a particular timestamp;

Someone wrote a fork of offlineimap to store mail in couchdb [1]. The
same couchdb can be mounted with fuse as a maildir [2] for mutt.
According to the author [3], the fuse interface is read only. Assuming
your proposal was implemented, one could complete this work with an
interface to couchdb for offlineimap and get all the features
previously requested.

[1]: https://github.com/theodoreb/offlineimap
[2]: https://github.com/theodoreb/couchdb-maildir-fuse
[3]: http://theodoreb.net/resume
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Alternative (raw) message store (i.e. instead of maildir)

2012-08-14 Thread Christophe-Marie Duquesne
On Tue, Aug 14, 2012 at 8:11 PM, Christophe-Marie Duquesne c...@chmd.fr wrote:
 one could complete this work with an
 interface to couchdb for offlineimap

*I meant for notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: ANN: Speedee, a web-based notmuch client

2012-07-10 Thread Christophe-Marie Duquesne
On Tue, Jul 10, 2012 at 7:14 AM, Peter Keen peter.k...@bugsplat.info wrote:
 let me know what you think!

This is awesome, I love it!
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


incrontab?

2012-04-12 Thread Christophe-Marie Duquesne
This is a quick guess: maybe you monitor a file while its inode is
changing. Do you (or a process) move /var/log/mail.log while
monitoriing it? I suggest you have a look to
http://permalink.gmane.org/gmane.comp.sysutils.incron/16, it helped me
to understand better incron...


Re: incrontab?

2012-04-12 Thread Christophe-Marie Duquesne
This is a quick guess: maybe you monitor a file while its inode is
changing. Do you (or a process) move /var/log/mail.log while
monitoriing it? I suggest you have a look to
http://permalink.gmane.org/gmane.comp.sysutils.incron/16, it helped me
to understand better incron...
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


About the json output and the number of results shown.

2011-01-13 Thread Christophe-Marie Duquesne
> Alternatively, you could use the python bindings to libnotmuch and call
> the functions directly. You could do that in a unthreaded or threaded
> fashion...

I've had a look to the python libnotmuch documentation. My problem
with this API is that, unless I did not read it correctly, if I use
one of its functions in a threaded fashion, I still have to wait for
this function to finish until I get results. When using the command
line tool, I can process the text as it gets printed on stdout, and I
have data to show to the user even though notmuch has not finished to
output it...


Re: About the json output and the number of results shown.

2011-01-13 Thread Christophe-Marie Duquesne
 Alternatively, you could use the python bindings to libnotmuch and call
 the functions directly. You could do that in a unthreaded or threaded
 fashion...

I've had a look to the python libnotmuch documentation. My problem
with this API is that, unless I did not read it correctly, if I use
one of its functions in a threaded fashion, I still have to wait for
this function to finish until I get results. When using the command
line tool, I can process the text as it gets printed on stdout, and I
have data to show to the user even though notmuch has not finished to
output it...
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


About the json output and the number of results shown.

2011-01-12 Thread Christophe-Marie Duquesne
Hi,

The notmuch command line tool has an option that seems very
interesting to me: --output=json

In several languages, and especially in python, json is as easy to parse as:
>>> res = json.load(stream)
If your stream contains valid json, you then get all your data in res
and you can immediately use it.

With notmuch, some commands can bring a lot of results, and can take
some time to return. That is why when I began to write a curse
interface to notmuch, I added a mechanism to spawn these commands in
background and gather the results asynchronously. Sadly, this makes me
unable to use the built-in python json parser: As long as the output
has not finished, the data on the stream is not valid json since it
lacks at least the closing bracket '}'. As a consequence, I find
easier not to use json and parse the data as it arrives.

So I am wondering: what is the point of having a tool that is able to
output json and ending in not using it? Is there a solution to make
the json output more useable? One solution I've been thinking about
would be to add an option: the range of results to show (something
like --range=25:50). Is it doable easily? I mean: if results are not
guaranteed to be in a given order, that would obviously be an issue.
Same if finding the results 25:50 is exactly as long as finding the
results 1:50. Otherwise, if it is doable, I guess this mail is a
feature request. In any case, do you have any proposal for making
sense of this json output without modifications in the notmuch CLI?

Cheers,
Christophe-Marie Duquesne


About the json output and the number of results shown.

2011-01-12 Thread Christophe-Marie Duquesne
Hi,

The notmuch command line tool has an option that seems very
interesting to me: --output=json

In several languages, and especially in python, json is as easy to parse as:
 res = json.load(stream)
If your stream contains valid json, you then get all your data in res
and you can immediately use it.

With notmuch, some commands can bring a lot of results, and can take
some time to return. That is why when I began to write a curse
interface to notmuch, I added a mechanism to spawn these commands in
background and gather the results asynchronously. Sadly, this makes me
unable to use the built-in python json parser: As long as the output
has not finished, the data on the stream is not valid json since it
lacks at least the closing bracket '}'. As a consequence, I find
easier not to use json and parse the data as it arrives.

So I am wondering: what is the point of having a tool that is able to
output json and ending in not using it? Is there a solution to make
the json output more useable? One solution I've been thinking about
would be to add an option: the range of results to show (something
like --range=25:50). Is it doable easily? I mean: if results are not
guaranteed to be in a given order, that would obviously be an issue.
Same if finding the results 25:50 is exactly as long as finding the
results 1:50. Otherwise, if it is doable, I guess this mail is a
feature request. In any case, do you have any proposal for making
sense of this json output without modifications in the notmuch CLI?

Cheers,
Christophe-Marie Duquesne
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Introducing ner: an ncurses based notmuch ui

2010-11-01 Thread Christophe-Marie Duquesne
This is definetely good news! I am very happy with this frontend and I can at
last use notmuch to read my mail. This makes me wonder if I'll go on
developping my python front-end... Maybe if I have some time. Thank you this!


I've begun to write notmuch-ncurse.py

2010-11-01 Thread Christophe-Marie Duquesne
On Mon, Nov 1, 2010 at 1:11 PM, Sebastian Spaeth  
wrote:
> On Mon, 1 Nov 2010 01:11:47 +0100, Christophe-Marie Duquesne  gmail.com> wrote:
>
> Very cool. Not wanting to promote my own things, but is there a reason
> you use the notmuch binary and parse that output rather than using the
> python bindings that come included with notmuch?

I was simply not aware of this binding... Reading your api, I could
not find out if the queries were ran asynchronously. Is it possible?
If so, that would indeed be worth giving it a try.

Meanwhile, as a matter of personal taste, I must say I like more
having processes communicating through pipes and raw text, unix-style,
than using bindings. So I think I'll switch only if I get a
significant reduction of the complexity of the code in exchange.

Best regards,
Christophe-Marie


I've begun to write notmuch-ncurse.py

2010-11-01 Thread Christophe-Marie Duquesne
Hi list,

I've begun to write a python ncurse interface for notmuch. It is
certainly not useable, but at least I have some code to share. My goal
is to produce a hackable gmail in a console (side bar with
labels/shortcuts to pre-registered researches + a main panel to view
research results and mails). It has to feature asynchronous commands
calls to keep the interface responsive, to have vim-like default
keybindings, and ideally to somehow support the mouse.

I've also set myself some goals in order to keep it hackable:
- don't use object oriented design (it may sound silly, but I want to
see if it is possible to write clean python code in an purely
imperative style)
- keep the code short (never exceed 1000 loc)
- don't have a config file (but users should be able to modify the
code directly and it has to remain easy)

FYI, right now, there are 356 lines of code. Those who want to help
are welcome, provided we share similar goals.

[1] - https://bitbucket.org/chmduquesne/notmuch-curses

Cheers,
Christophe-Marie Duquesne


Re: I've begun to write notmuch-ncurse.py

2010-11-01 Thread Christophe-Marie Duquesne
On Mon, Nov 1, 2010 at 1:11 PM, Sebastian Spaeth sebast...@sspaeth.de wrote:
 On Mon, 1 Nov 2010 01:11:47 +0100, Christophe-Marie Duquesne 
 chm.duque...@gmail.com wrote:

 Very cool. Not wanting to promote my own things, but is there a reason
 you use the notmuch binary and parse that output rather than using the
 python bindings that come included with notmuch?

I was simply not aware of this binding... Reading your api, I could
not find out if the queries were ran asynchronously. Is it possible?
If so, that would indeed be worth giving it a try.

Meanwhile, as a matter of personal taste, I must say I like more
having processes communicating through pipes and raw text, unix-style,
than using bindings. So I think I'll switch only if I get a
significant reduction of the complexity of the code in exchange.

Best regards,
Christophe-Marie
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Where should I pull notmuch from?

2010-10-28 Thread Christophe-Marie Duquesne
On Thu, Oct 28, 2010 at 1:37 PM, Sebastian Spaeth  
wrote:
> On Thu, 28 Oct 2010 01:21:31 +0200, Christophe-Marie Duquesne wrote:
>> If I understand correctly, notmuchsync could do this job. However, as
>> it depends on python<=2.5 and as I am running archlinux (which
>> switched to python3 recently), this is not my prefered method.
>
> Feel free to help making notmuchsync p3k compliant. I don't know in
> which ways it would fail, so help is appreciated.
>
> Sebastian
>


To be honest, I did not even try. I'll give that a look.

-- 
Christophe-Marie Duquesne
06 84 14 26 82 - mobile
04 76 57 48 06 - g-scop
04 97 04 27 33 - amadeus


Where should I pull notmuch from?

2010-10-28 Thread Christophe-Marie Duquesne
Hi,

Being new to notmuch, I am trying to understand how to get a notmuch
that would sync the tags modifications with the maildir it watches (so
that read/archive operations can be sinced to my gmail account through
offlineimap).

If I understand correctly, notmuchsync could do this job. However, as
it depends on python<=2.5 and as I am running archlinux (which
switched to python3 recently), this is not my prefered method. I have
seen from older posts that some work has been done directly on
notmuch: 
http://notmuch.198994.n3.nabble.com/PATCH-0-4-Maildir-synchronization-v2-td1694007.html#a1694007

Are this patches pulled on the official notmuch or should I use Michal
Sojka's git repository?

Thank you,
Christophe-Marie


Re: Where should I pull notmuch from?

2010-10-28 Thread Christophe-Marie Duquesne
On Thu, Oct 28, 2010 at 1:37 PM, Sebastian Spaeth sebast...@sspaeth.de wrote:
 On Thu, 28 Oct 2010 01:21:31 +0200, Christophe-Marie Duquesne wrote:
 If I understand correctly, notmuchsync could do this job. However, as
 it depends on python=2.5 and as I am running archlinux (which
 switched to python3 recently), this is not my prefered method.

 Feel free to help making notmuchsync p3k compliant. I don't know in
 which ways it would fail, so help is appreciated.

 Sebastian



To be honest, I did not even try. I'll give that a look.

-- 
Christophe-Marie Duquesne
06 84 14 26 82 - mobile
04 76 57 48 06 - g-scop
04 97 04 27 33 - amadeus
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Where should I pull notmuch from?

2010-10-27 Thread Christophe-Marie Duquesne
Hi,

Being new to notmuch, I am trying to understand how to get a notmuch
that would sync the tags modifications with the maildir it watches (so
that read/archive operations can be sinced to my gmail account through
offlineimap).

If I understand correctly, notmuchsync could do this job. However, as
it depends on python=2.5 and as I am running archlinux (which
switched to python3 recently), this is not my prefered method. I have
seen from older posts that some work has been done directly on
notmuch: 
http://notmuch.198994.n3.nabble.com/PATCH-0-4-Maildir-synchronization-v2-td1694007.html#a1694007

Are this patches pulled on the official notmuch or should I use Michal
Sojka's git repository?

Thank you,
Christophe-Marie
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch