[PATCH v2] emacs: Add support for saved search accelerators

2014-07-13 Thread Mark Walters
> Quoth David Bremner on Jul 13 at 11:20 am: >> Austin Clements writes: >> >> > The right answer might be something between notmuch-go and dme's >> > patch. Currently notmuch-go uses a hard-coded set of searches, while >> > dme's patch derives them from the saved searches. >> >> I'm not really

Re: [PATCH v2] emacs: Add support for saved search accelerators

2014-07-13 Thread Mark Walters
> Quoth David Bremner on Jul 13 at 11:20 am: >> Austin Clements writes: >> >> > The right answer might be something between notmuch-go and dme's >> > patch. Currently notmuch-go uses a hard-coded set of searches, while >> > dme's patch derives them from the saved searches. >> >> I'm not really

Remote xapian database

2014-06-26 Thread Mark Walters
On Thu, 26 Jun 2014, admin at softded.net wrote: > Hello, > > Xapian have remote database mode: > http://xapian.org/docs/remote.html > > Do you plan use it in future? I have more then 8 million letters and my > xapian db use 50 gb store :) I don't think we have any plans to do that. However, assu

Re: Remote xapian database

2014-06-26 Thread Mark Walters
On Thu, 26 Jun 2014, ad...@softded.net wrote: > Hello, > > Xapian have remote database mode: > http://xapian.org/docs/remote.html > > Do you plan use it in future? I have more then 8 million letters and my > xapian db use 50 gb store :) I don't think we have any plans to do that. However, assumin

[PATCH v2] emacs: set default in notmuch-read-query

2014-06-23 Thread Mark Walters
This adds the current query as a "default value" to notmuch-read-qeury. The default value is available via a down-arrow as opposed to history which is available from the up arrow. Note if a user presses return in the minibuffer this value is not returned. The implementation is simple but notmuch-

[PATCH] dump: make dump take Xapian write lock

2014-06-23 Thread Mark Walters
Dump currently only takes the read lock. Xapian can cope with some changes while maintaining a read snapshot but with more changes it fails. Currently notmuch just gives a xapian error. To avoid this we take the write lock when dumping. This prevents other notmuch processes from modifying the xapi

[PATCH v2] emacs: set default in notmuch-read-query

2014-06-23 Thread Mark Walters
This adds the current query as a "default value" to notmuch-read-qeury. The default value is available via a down-arrow as opposed to history which is available from the up arrow. Note if a user presses return in the minibuffer this value is not returned. The implementation is simple but notmuch-

[PATCH] dump: make dump take Xapian write lock

2014-06-23 Thread Mark Walters
Dump currently only takes the read lock. Xapian can cope with some changes while maintaining a read snapshot but with more changes it fails. Currently notmuch just gives a xapian error. To avoid this we take the write lock when dumping. This prevents other notmuch processes from modifying the xapi

notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new?

2014-06-13 Thread Mark Walters
Hi On Thu, 12 Jun 2014, David Bremner wrote: > Mark Walters writes: > > >>> mjw1009 suggested to change NOTMUCH_DATABASE_MODE_READ_ONLY on line >>> 215 of notmuch-dump.c to NOTMUCH_DATABASE_MODE_READ_WRITE >>> >>> I'm wondering if thi

Re: notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new?

2014-06-12 Thread Mark Walters
Hi On Thu, 12 Jun 2014, David Bremner wrote: > Mark Walters writes: > > >>> mjw1009 suggested to change NOTMUCH_DATABASE_MODE_READ_ONLY on line >>> 215 of notmuch-dump.c to NOTMUCH_DATABASE_MODE_READ_WRITE >>> >>> I'm wondering if thi

nmh + notmuch: expected to work?

2014-06-11 Thread Mark Walters
Hello On Tue, 10 Jun 2014, Eric Gillespie wrote: > I'm a long-time nmh user, and I heard notmuch was supposed to > handle mh folders, so I gave it a shot. > > It's crazy slow. The first 'notmuch new' took 4 hours, but maybe > that's expected. However, every 'notmuch new' takes 4 - 10 > hours.

Re: nmh + notmuch: expected to work?

2014-06-11 Thread Mark Walters
Hello On Tue, 10 Jun 2014, Eric Gillespie wrote: > I'm a long-time nmh user, and I heard notmuch was supposed to > handle mh folders, so I gave it a shot. > > It's crazy slow. The first 'notmuch new' took 4 hours, but maybe > that's expected. However, every 'notmuch new' takes 4 - 10 > hours.

[PATCH] emacs: tree/show remove duplicate function

2014-06-07 Thread Mark Walters
tree overrides notmuch-show-get-prop so that it can use many of the utility function directly. Now that tree is in mainline the version from tree can be moved to show and the original overridden show version dropped. --- I should have done this ages ago but forgot about it. Best wishes Mark em

[PATCH] emacs: tree/show remove duplicate function

2014-06-07 Thread Mark Walters
tree overrides notmuch-show-get-prop so that it can use many of the utility function directly. Now that tree is in mainline the version from tree can be moved to show and the original overridden show version dropped. --- I should have done this ages ago but forgot about it. Best wishes Mark em

[PATCH v2] emacs: Add support for saved search accelerators

2014-06-06 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sat, May 10 2014, Aaron Ecay wrote: >> 2014ko maiatzak 8an, Mark Walters-ek idatzi zuen: >>> >>> Hi >>> >>> This version looks good to me. >>> >>> The only slight query I have is wh

[PATCH] emacs: search archive tweak

2014-06-06 Thread Mark Walters
notmuch-search-archive-thread moves to the next line after tagging. In the normal case this makes sense, but if the region is active, it tags the whole region and then it doesn't really. Thus only move to the next line if region is not active. --- In response to the request in the parent message.

[PATCH] lib: resurrect support for single-message mbox files

2014-06-06 Thread Mark Walters
On Thu, 05 Jun 2014, Jani Nikula wrote: > This is effectively a revert of > > commit 6812136bf576d894591606d9e10096719054d1f9 > Author: Jani Nikula > Date: Mon Mar 31 00:21:48 2014 +0300 > > lib: drop support for single-message mbox files > > The intention was to drop support for indexing

an emacs macro

2014-06-06 Thread Mark Walters
On Thu, 05 Jun 2014, Tom Hirschowitz wrote: > Hi all, > > I'm trying to define a macro for notmuch/emacs which in show-mode would > > - prompt the user for tags (possibly starting with "+"), > > - tag the shown message with these tags plus an additional fixed tag, >say "+local". > > I know

notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new?

2014-06-06 Thread Mark Walters
On Fri, 06 Jun 2014, Maarten Aertsen wrote: > Hi everyone, > > (summary of IRC-conversation just now) > I did: > - run notmuch new (and afew -t) in cron, every two minutes > - run notmuch dump in cron, every 12 hours > > I expected: > - notmuch dump to complete, possibly causing notmuch new

Re: [PATCH v2] emacs: Add support for saved search accelerators

2014-06-06 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sat, May 10 2014, Aaron Ecay wrote: >> 2014ko maiatzak 8an, Mark Walters-ek idatzi zuen: >>> >>> Hi >>> >>> This version looks good to me. >>> >>> The only slight query I have is wh

[PATCH] emacs: search archive tweak

2014-06-06 Thread Mark Walters
notmuch-search-archive-thread moves to the next line after tagging. In the normal case this makes sense, but if the region is active, it tags the whole region and then it doesn't really. Thus only move to the next line if region is not active. --- In response to the request in the parent message.

Re: [PATCH] lib: resurrect support for single-message mbox files

2014-06-06 Thread Mark Walters
On Thu, 05 Jun 2014, Jani Nikula wrote: > This is effectively a revert of > > commit 6812136bf576d894591606d9e10096719054d1f9 > Author: Jani Nikula > Date: Mon Mar 31 00:21:48 2014 +0300 > > lib: drop support for single-message mbox files > > The intention was to drop support for indexing

Re: an emacs macro

2014-06-06 Thread Mark Walters
On Thu, 05 Jun 2014, Tom Hirschowitz wrote: > Hi all, > > I'm trying to define a macro for notmuch/emacs which in show-mode would > > - prompt the user for tags (possibly starting with "+"), > > - tag the shown message with these tags plus an additional fixed tag, >say "+local". > > I know

Re: notmuch dump: taking write-lock to protect from concurrent (cronned) notmuch new?

2014-06-06 Thread Mark Walters
On Fri, 06 Jun 2014, Maarten Aertsen wrote: > Hi everyone, > > (summary of IRC-conversation just now) > I did: > - run notmuch new (and afew -t) in cron, every two minutes > - run notmuch dump in cron, every 12 hours > > I expected: > - notmuch dump to complete, possibly causing notmuch new

Deduplication ?

2014-06-02 Thread Mark Walters
Tomi Ollila writes: > On Mon, Jun 02 2014, Mark Walters wrote: > >> Vladimir Marek writes: >> >>> Hi, >>> >>> I want to import bigger chunk of archived messages into my notmuch >>> database. It's about 100k messages. The problem is,

Deduplication ?

2014-06-02 Thread Mark Walters
Mark Walters writes: > Vladimir Marek writes: > >>> > I want to import bigger chunk of archived messages into my notmuch >>> > database. It's about 100k messages. The problem is, that I most probably >>> > have quite a lot of those messages in t

Deduplication ?

2014-06-02 Thread Mark Walters
Vladimir Marek writes: >> > I want to import bigger chunk of archived messages into my notmuch >> > database. It's about 100k messages. The problem is, that I most probably >> > have quite a lot of those messages in the DB. Basically I would like to >> > add only those I don't have already. >> >

Deduplication ?

2014-06-02 Thread Mark Walters
Vladimir Marek writes: > Hi, > > I want to import bigger chunk of archived messages into my notmuch > database. It's about 100k messages. The problem is, that I most probably > have quite a lot of those messages in the DB. Basically I would like to > add only those I don't have already. > > Ther

[PATCH v1] emacs: Forwarded messages should not have modified buffers

2014-06-02 Thread Mark Walters
Tomi Ollila writes: > On Mon, Jun 02 2014, David Edmondson wrote: > >> When the user begins forwarding a message, the resulting composition >> buffer should not be marked as modified, in order that it can >> immediately be killed without prompting. >> --- > > LGTM. > > Tomi and me. +1 Mark >

Re: Deduplication ?

2014-06-02 Thread Mark Walters
Tomi Ollila writes: > On Mon, Jun 02 2014, Mark Walters wrote: > >> Vladimir Marek writes: >> >>> Hi, >>> >>> I want to import bigger chunk of archived messages into my notmuch >>> database. It's about 100k messages. The problem is,

Re: Deduplication ?

2014-06-02 Thread Mark Walters
Mark Walters writes: > Vladimir Marek writes: > >>> > I want to import bigger chunk of archived messages into my notmuch >>> > database. It's about 100k messages. The problem is, that I most probably >>> > have quite a lot of those messages in t

Re: Deduplication ?

2014-06-02 Thread Mark Walters
Vladimir Marek writes: >> > I want to import bigger chunk of archived messages into my notmuch >> > database. It's about 100k messages. The problem is, that I most probably >> > have quite a lot of those messages in the DB. Basically I would like to >> > add only those I don't have already. >> >

Re: Deduplication ?

2014-06-02 Thread Mark Walters
Vladimir Marek writes: > Hi, > > I want to import bigger chunk of archived messages into my notmuch > database. It's about 100k messages. The problem is, that I most probably > have quite a lot of those messages in the DB. Basically I would like to > add only those I don't have already. > > Ther

Re: [PATCH v1] emacs: Forwarded messages should not have modified buffers

2014-06-02 Thread Mark Walters
Tomi Ollila writes: > On Mon, Jun 02 2014, David Edmondson wrote: > >> When the user begins forwarding a message, the resulting composition >> buffer should not be marked as modified, in order that it can >> immediately be killed without prompting. >> --- > > LGTM. > > Tomi and me. +1 Mark >

Cannot apply multiple tags to a selection in search view

2014-05-26 Thread Mark Walters
Hi I think notmuch-search-tag (and other tagging functions) were cleaned up for 0.17: in particular their interactive behaviour changed. notmuch-search-tag now only looks at the region if called interactively. I think the following would do what you want (define-key notmuch-search-mode-map "d"

Re: Cannot apply multiple tags to a selection in search view

2014-05-25 Thread Mark Walters
Hi I think notmuch-search-tag (and other tagging functions) were cleaned up for 0.17: in particular their interactive behaviour changed. notmuch-search-tag now only looks at the region if called interactively. I think the following would do what you want (define-key notmuch-search-mode-map "d"

Improving spam-tagging keybinding function to act on region in emacs

2014-05-22 Thread Mark Walters
On Wed, 07 May 2014, Olivier Berger wrote: > Hi. > > Mark Walters writes: > >> Hello >> >> As this section was rather outdated I have updated to modern notmuch. (In >> fact the lisp snippets should work back to at least 0.13) >> >> On Tue

[PATCH v1] emacs: Add `notmuch-show-toggle-citation-visibility', bound to '>'

2014-05-22 Thread Mark Walters
On Tue, 20 May 2014, David Edmondson wrote: > Add a function and key-binding to toggle the collapsing of citations > within the current message. Hi I like the idea. It seems a little odd to want to toggle the citations closing some and opening others. I wonder whether the following action would

Re: Improving spam-tagging keybinding function to act on region in emacs

2014-05-22 Thread Mark Walters
On Wed, 07 May 2014, Olivier Berger wrote: > Hi. > > Mark Walters writes: > >> Hello >> >> As this section was rather outdated I have updated to modern notmuch. (In >> fact the lisp snippets should work back to at least 0.13) >> >> On Tue

Re: [PATCH v1] emacs: Add `notmuch-show-toggle-citation-visibility', bound to '>'

2014-05-22 Thread Mark Walters
On Tue, 20 May 2014, David Edmondson wrote: > Add a function and key-binding to toggle the collapsing of citations > within the current message. Hi I like the idea. It seems a little odd to want to toggle the citations closing some and opening others. I wonder whether the following action would

[PATCH] emacs: make sure tagging on an empty query is harmless

2014-05-21 Thread Mark Walters
Currently notmuch-tag throws a "wrong-type-argument stringp nil" if passed a nil query-string. Catch this and provide a more useful error message. This fixes a case in notmuch-tree (if you try to tag when at the end of the buffer). Secondly, as pointed out by David (dme) `notmuch-search-find-stabl

[PATCH] emacs: make sure tagging on an empty query is harmless

2014-05-21 Thread Mark Walters
Currently notmuch-tag throws a "wrong-type-argument stringp nil" if passed a nil query-string. Catch this and provide a more useful error message. This fixes a case in notmuch-tree (if you try to tag when at the end of the buffer). Secondly, as pointed out by David (dme) `notmuch-search-find-stabl

[PATCH v1] emacs: `notmuch-search-find-stable-query-region' should never return an empty query.

2014-05-21 Thread Mark Walters
On Tue, 20 May 2014, David Edmondson wrote: > On Mon, May 19 2014, Mark Walters wrote: >> On Mon, 19 May 2014, David Edmondson wrote: >>> `notmuch-search-find-stable-query-region' is expected to examine the >>> region between `beg' and `end' to genera

Re: [PATCH v1] emacs: `notmuch-search-find-stable-query-region' should never return an empty query.

2014-05-20 Thread Mark Walters
On Tue, 20 May 2014, David Edmondson wrote: > On Mon, May 19 2014, Mark Walters wrote: >> On Mon, 19 May 2014, David Edmondson wrote: >>> `notmuch-search-find-stable-query-region' is expected to examine the >>> region between `beg' and `end' to genera

[PATCH v1] emacs: `notmuch-search-find-stable-query-region' should never return an empty query.

2014-05-19 Thread Mark Walters
On Mon, 19 May 2014, David Edmondson wrote: > `notmuch-search-find-stable-query-region' is expected to examine the > region between `beg' and `end' to generate a query that can be used to > include all threads in that region. If the region contains no threads, > it should throw an error rather th

Re: [PATCH v1] emacs: `notmuch-search-find-stable-query-region' should never return an empty query.

2014-05-19 Thread Mark Walters
On Mon, 19 May 2014, David Edmondson wrote: > `notmuch-search-find-stable-query-region' is expected to examine the > region between `beg' and `end' to generate a query that can be used to > include all threads in that region. If the region contains no threads, > it should throw an error rather th

[PATCH v3 7/9] test: Update the test output to accord with the reply changes

2014-05-13 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Replying to a message with multiple parts will now typically include > content from several parts (whereas previously only the first part was > used). Update the expected output from the emacs reply tests > accordingly. I will reply here rather than t

[PATCH v3 0/9] emacs: Improve the cited message included in replies

2014-05-13 Thread Mark Walters
On Tue, 13 May 2014, David Edmondson wrote: > Firstly, I don't think that the code resulting from this patch series is > beyond improvement - the intention was really only that it be better > than the current implementation. > > On Mon, May 12 2014, Mark Walters wrote: &g

Re: [PATCH v3 7/9] test: Update the test output to accord with the reply changes

2014-05-13 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Replying to a message with multiple parts will now typically include > content from several parts (whereas previously only the first part was > used). Update the expected output from the emacs reply tests > accordingly. I will reply here rather than t

Re: [PATCH v3 0/9] emacs: Improve the cited message included in replies

2014-05-13 Thread Mark Walters
On Tue, 13 May 2014, David Edmondson wrote: > Firstly, I don't think that the code resulting from this patch series is > beyond improvement - the intention was really only that it be better > than the current implementation. > > On Mon, May 12 2014, Mark Walters wrote: &g

[PATCH v3 4/9] emacs/mua: Generate improved cited text for replies

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Use the message display code to generate message text to cite in > replies. So this is the key change. I am trying to work out what the actual changes are here: in your commit message for the test update 7/9 you say that the old code only output the

[PATCH v3 5/9] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart'

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > No code uses the 'no-buttons argument to > `notmuch-show-insert-bodypart', so remove it. > --- > emacs/notmuch-show.el | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > in

[PATCH v3 3/9] emacs/show: Accommodate the lack of part header buttons

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Various pieces of code assumed (reasonably) that part header buttons > are present. Modify them to avoid problems if no part headers were > inserted. Despite your reservations on irc this looks fine to me. MW > --- > emacs/notmuch-show.el | 88 >

[PATCH v3 2/9] emacs/show: Allow the user to decide when part headers should be inserted

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Make the function that determines whether a part header should be > inserted a user controlled, with some example functions. > --- > emacs/notmuch-show.el | 21 +++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > > diff --git a/

[PATCH v3 1/9] emacs/show: Re-arrange determination if a part header is necessary

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Move the determination of whether a part header is required to a > distinct function. > --- > emacs/notmuch-show.el | 25 ++--- > 1 file changed, 18 insertions(+), 7 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notm

[PATCH v3 0/9] emacs: Improve the cited message included in replies

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > emacs: Improve the cited message included in replies > > I tried to do things in small increments to make it easier to review. > > v2: > - Don't run the text/plain hooks when generating the message to quote. > > v3: > - Remove the 'no-button code, as

[PATCH 6/7] emacs: hello: add highlight newly arrived messages option

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sun, May 11 2014, Mark Walters wrote: >> This adds a function that highlights searches which have newly arrived >> messages (ones which arrived since the previous refresh of >> notmuch-hello). It does that by getting a

[PATCH 2/7] emacs: hello: allow saved search display functions

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sun, May 11 2014, Mark Walters wrote: >> Extend the saved search plist to include a :display-function property >> that can customise the display of the saved search. It can change the >> count string displayed and the name stri

Re: [PATCH v3 4/9] emacs/mua: Generate improved cited text for replies

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Use the message display code to generate message text to cite in > replies. So this is the key change. I am trying to work out what the actual changes are here: in your commit message for the test update 7/9 you say that the old code only output the

Re: [PATCH v3 5/9] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart'

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > No code uses the 'no-buttons argument to > `notmuch-show-insert-bodypart', so remove it. > --- > emacs/notmuch-show.el | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > in

Re: [PATCH v3 3/9] emacs/show: Accommodate the lack of part header buttons

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Various pieces of code assumed (reasonably) that part header buttons > are present. Modify them to avoid problems if no part headers were > inserted. Despite your reservations on irc this looks fine to me. MW > --- > emacs/notmuch-show.el | 88 >

Re: [PATCH v3 2/9] emacs/show: Allow the user to decide when part headers should be inserted

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Make the function that determines whether a part header should be > inserted a user controlled, with some example functions. > --- > emacs/notmuch-show.el | 21 +++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > > diff --git a/

Re: [PATCH v3 1/9] emacs/show: Re-arrange determination if a part header is necessary

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > Move the determination of whether a part header is required to a > distinct function. > --- > emacs/notmuch-show.el | 25 ++--- > 1 file changed, 18 insertions(+), 7 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notm

Re: [PATCH v3 0/9] emacs: Improve the cited message included in replies

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > emacs: Improve the cited message included in replies > > I tried to do things in small increments to make it easier to review. > > v2: > - Don't run the text/plain hooks when generating the message to quote. > > v3: > - Remove the 'no-button code, as

[PATCH v2] emacs: Improve the cited message included in replies

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sat, May 10 2014, Mark Walters wrote: >> On Thu, 08 May 2014, David Edmondson wrote: >>> emacs: Improve the cited message included in replies >>> >>> v2: >>> - Don't run the text/plain hooks

Re: [PATCH 6/7] emacs: hello: add highlight newly arrived messages option

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sun, May 11 2014, Mark Walters wrote: >> This adds a function that highlights searches which have newly arrived >> messages (ones which arrived since the previous refresh of >> notmuch-hello). It does that by getting a

Re: [PATCH 2/7] emacs: hello: allow saved search display functions

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sun, May 11 2014, Mark Walters wrote: >> Extend the saved search plist to include a :display-function property >> that can customise the display of the saved search. It can change the >> count string displayed and the name stri

Re: [PATCH v2] emacs: Improve the cited message included in replies

2014-05-12 Thread Mark Walters
On Mon, 12 May 2014, David Edmondson wrote: > On Sat, May 10 2014, Mark Walters wrote: >> On Thu, 08 May 2014, David Edmondson wrote: >>> emacs: Improve the cited message included in replies >>> >>> v2: >>> - Don't run the text/plain hooks

[PATCH 7/7] emacs: hello: add option to omit count for a search

2014-05-11 Thread Mark Walters
This omits the count for the specific search. This makes notmuch-hello faster, particularly for large complex saved searches. --- emacs/notmuch-hello.el |7 +++ 1 file changed, 7 insertions(+) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 265b879..b3b539d 100644 --- a

[PATCH 6/7] emacs: hello: add highlight newly arrived messages option

2014-05-11 Thread Mark Walters
This adds a function that highlights searches which have newly arrived messages (ones which arrived since the previous refresh of notmuch-hello). It does that by getting a full list of matching message ids and checking whether any new messages have appeared. Thus it will be slow on large saved sear

[PATCH 5/7] emacs: hello: require cl

2014-05-11 Thread Mark Walters
We will use cl at runtime in the next patch so require cl (rather than just having it eval-when-compile). We require it in notmuch-lib anyway so this is no loss in requiring it here too. --- emacs/notmuch-hello.el |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs/no

[PATCH 4/7] emacs: hello: add a threads-and-messages function

2014-05-11 Thread Mark Walters
This is an example of a possible display function. It displays the count for a search as messages/threads. This will be slow on a large search but could be useful for a small search. It also extends and renames the existing (unused) notmuch-saved-search-count function to count threads if wanted. T

[PATCH 3/7] emacs: hello: store previous saved-search results

2014-05-11 Thread Mark Walters
This adds a variable which keeps track of the previous saved search results. It is stored as a plist with keys being the saved searches. The result the saved search display function gave last time is passed to the display-function as the the keyword :old argument. This is useful for display functi

[PATCH 2/7] emacs: hello: allow saved search display functions

2014-05-11 Thread Mark Walters
Extend the saved search plist to include a :display-function property that can customise the display of the saved search. It can change the count string displayed and the name string. Thus the user can customise so that a particular search: does not show a count (and is thus hello is faster), show

[PATCH 1/7] emacs: hello: separate out the saved-search display function

2014-05-11 Thread Mark Walters
Separate the code that prints a saved-search and count into its own function. --- emacs/notmuch-hello.el | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 3de5238..0a7004c 100644 --- a/emacs/

[PATCH 0/7] emacs: hello: custom display of saved searches

2014-05-11 Thread Mark Walters
ed by the saved searches themselves. I think this is OK (because plist uses eq not equal) but would like a confirmation. Finally, some of this infrastructure could be used to do async counts at a later stage. I have some preliminary patches, but that is all rather more fragile. Best wishes Mark Mar

[PATCH 6/7] emacs: hello: add highlight newly arrived messages option

2014-05-11 Thread Mark Walters
This adds a function that highlights searches which have newly arrived messages (ones which arrived since the previous refresh of notmuch-hello). It does that by getting a full list of matching message ids and checking whether any new messages have appeared. Thus it will be slow on large saved sear

[PATCH 7/7] emacs: hello: add option to omit count for a search

2014-05-11 Thread Mark Walters
This omits the count for the specific search. This makes notmuch-hello faster, particularly for large complex saved searches. --- emacs/notmuch-hello.el |7 +++ 1 file changed, 7 insertions(+) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 265b879..b3b539d 100644 --- a

[PATCH 5/7] emacs: hello: require cl

2014-05-11 Thread Mark Walters
We will use cl at runtime in the next patch so require cl (rather than just having it eval-when-compile). We require it in notmuch-lib anyway so this is no loss in requiring it here too. --- emacs/notmuch-hello.el |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs/no

[PATCH 4/7] emacs: hello: add a threads-and-messages function

2014-05-11 Thread Mark Walters
This is an example of a possible display function. It displays the count for a search as messages/threads. This will be slow on a large search but could be useful for a small search. It also extends and renames the existing (unused) notmuch-saved-search-count function to count threads if wanted. T

[PATCH 3/7] emacs: hello: store previous saved-search results

2014-05-11 Thread Mark Walters
This adds a variable which keeps track of the previous saved search results. It is stored as a plist with keys being the saved searches. The result the saved search display function gave last time is passed to the display-function as the the keyword :old argument. This is useful for display functi

[PATCH 0/7] emacs: hello: custom display of saved searches

2014-05-11 Thread Mark Walters
ed by the saved searches themselves. I think this is OK (because plist uses eq not equal) but would like a confirmation. Finally, some of this infrastructure could be used to do async counts at a later stage. I have some preliminary patches, but that is all rather more fragile. Best wishes Mark Mar

[PATCH 2/7] emacs: hello: allow saved search display functions

2014-05-11 Thread Mark Walters
Extend the saved search plist to include a :display-function property that can customise the display of the saved search. It can change the count string displayed and the name string. Thus the user can customise so that a particular search: does not show a count (and is thus hello is faster), show

[PATCH 1/7] emacs: hello: separate out the saved-search display function

2014-05-11 Thread Mark Walters
Separate the code that prints a saved-search and count into its own function. --- emacs/notmuch-hello.el | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 3de5238..0a7004c 100644 --- a/emacs/

[PATCH v2] emacs: Improve the cited message included in replies

2014-05-10 Thread Mark Walters
On Thu, 08 May 2014, David Edmondson wrote: > emacs: Improve the cited message included in replies > > v2: > - Don't run the text/plain hooks when generating the message to quote. > In principle I like this approach: keeping show and reply closely linked seems good. At the moment, as you say, th

Re: [PATCH v2] emacs: Improve the cited message included in replies

2014-05-10 Thread Mark Walters
On Thu, 08 May 2014, David Edmondson wrote: > emacs: Improve the cited message included in replies > > v2: > - Don't run the text/plain hooks when generating the message to quote. > In principle I like this approach: keeping show and reply closely linked seems good. At the moment, as you say, th

[RFC PATCH] emacs: show: mark messages unread if seen in buffer

2014-05-09 Thread Mark Walters
This adds a function that marks messages unread if they are "seen" that is a user configurable amount of them has been visible in the buffer. To use set notmuch-show-mark-read-function to #'notmuch-show-do-seen --- This adds the functionality to do my previous mark unread logic (see id:139593

[PATCH v1 0/3] emacs: Allow saving of threads and messages

2014-05-09 Thread Mark Walters
Hi I think the functionality is well worth having ("|" cat - > a-file is ugly!). However, I am not sure about this approach. The first two patches are fine, although I think I like constructing a query then quoting rather than quoting bits of a query and bolting them together (even the both work

[PATCH v4 0/2] emacs: show: redesign unread/read logic

2014-05-09 Thread Mark Walters
On Fri, 09 May 2014, David Edmondson wrote: > On Fri, May 09 2014, Mark Walters wrote: >> This is v4 of this set. v3 is at >> id:139593-13297-1-git-send-email-markwalters1009 at gmail.com >> >> David (dme) was not keen on the logic in the previous patch so I have

[RFC PATCH] emacs: show: mark messages unread if seen in buffer

2014-05-09 Thread Mark Walters
This adds a function that marks messages unread if they are "seen" that is a user configurable amount of them has been visible in the buffer. To use set notmuch-show-mark-read-function to #'notmuch-show-do-seen --- This adds the functionality to do my previous mark unread logic (see id:139593

Re: [PATCH v1 0/3] emacs: Allow saving of threads and messages

2014-05-09 Thread Mark Walters
Hi I think the functionality is well worth having ("|" cat - > a-file is ugly!). However, I am not sure about this approach. The first two patches are fine, although I think I like constructing a query then quoting rather than quoting bits of a query and bolting them together (even the both work

Re: [PATCH v4 0/2] emacs: show: redesign unread/read logic

2014-05-09 Thread Mark Walters
On Fri, 09 May 2014, David Edmondson wrote: > On Fri, May 09 2014, Mark Walters wrote: >> This is v4 of this set. v3 is at >> id:139593-13297-1-git-send-email-markwalters1...@gmail.com >> >> David (dme) was not keen on the logic in the previous patch so I have >

[PATCH v4 2/2] emacs: show: add an update seen function to post-command-hook

2014-05-09 Thread Mark Walters
Add a function for updating seen messages to the post-command-hook. This function calls a customizable (by eg defcustom) function with parameters the start and end of the current window and that function can decide what to mark read based on that and the current point. Since this is in the post-co

[PATCH v4 1/2] test: make test_emacs call post-command-hook

2014-05-09 Thread Mark Walters
From: David Bremner The unread/read changes will use the post-command-hook. test_emacs does not call the post-command-hook. This adds a notmuch-test-progn which takes a list of commands as argument and executes them in turn but runs the post-command-hook after each one. The caller can batch oper

[PATCH v4 0/2] emacs: show: redesign unread/read logic

2014-05-09 Thread Mark Walters
read/unread logic mentioned in id:87a9atmpkf.fsf at qmul.ac.uk are fixed. The first patch is unchanged. Since the new mark-read function is small it folded neatly into the patch removing the old unread logic. Finally, as with previous versions, all tests pass. Best wishes Mark Mark Walte

[PATCH v4 2/2] emacs: show: add an update seen function to post-command-hook

2014-05-08 Thread Mark Walters
Add a function for updating seen messages to the post-command-hook. This function calls a customizable (by eg defcustom) function with parameters the start and end of the current window and that function can decide what to mark read based on that and the current point. Since this is in the post-co

[PATCH v4 1/2] test: make test_emacs call post-command-hook

2014-05-08 Thread Mark Walters
From: David Bremner The unread/read changes will use the post-command-hook. test_emacs does not call the post-command-hook. This adds a notmuch-test-progn which takes a list of commands as argument and executes them in turn but runs the post-command-hook after each one. The caller can batch oper

[PATCH v4 0/2] emacs: show: redesign unread/read logic

2014-05-08 Thread Mark Walters
nread logic mentioned in id:87a9atmpkf@qmul.ac.uk are fixed. The first patch is unchanged. Since the new mark-read function is small it folded neatly into the patch removing the old unread logic. Finally, as with previous versions, all tests pass. Best wishes Mark Mark Walters (2):

[PATCH v2] emacs: Add support for saved search accelerators

2014-05-08 Thread Mark Walters
Hi This version looks good to me. The only slight query I have is which key to bind it to: Austin used g in notmuch-go and this uses j. Austin said on irc that he chose g because it wasn't bound and matched gmail's shortcut. Personally I like j (as it starts fewer words than g) and given that w

[Patch v3 0/3] emacs: show: redesign unread/read logic

2014-05-08 Thread Mark Walters
On Thu, 08 May 2014, David Edmondson wrote: > On Wed, May 07 2014, Mark Walters wrote: >> A message is marked read if: >> >> 1) if you navigate to a message using n/p (next/prev open message) >> >> 2) if you navigate to it using N/P (next/prev message) regard

<    1   2   3   4   5   6   7   8   9   10   >