Re: trouble searching with unix timestamps

2018-01-29 Thread Matthew Lear
Wonderful! Thanks Jani.

> Alternatively, you can use @ in date: queries, although this
> seems to be completely undocumented:

I guess this relates to similar syntax requirements of date -d in that a
unix timestamp is required to be preceded by an @

# date -d 1517152333
date: invalid date ‘1517152333’
# date -d @1517152333
Sun Jan 28 15:12:13 GMT 2018

On Mon, Jan 29, 2018 at 4:03 PM, Jani Nikula  wrote:

> On Mon, 29 Jan 2018, Matthew Lear  wrote:
> > Hi. I've noticed that I'm unable to notmuch search using date with unix
> > timestamps (ie number of seconds since Jan 1st 1970 UTC). I get a xapian
> > error. The notmuch man pages state that searching using
> > 'date:..'
> > where "each timestamp is a number representing the number of seconds
> since
> > 1970-01-01 00:00:00 UTC" is supported, so I'm wondering what's wrong with
> > my installation.
>
> The man page could use some clarification.
>
> The .. syntax predates the date:
> prefix, and needs to be given as-is:
>
> $ notmuch search 1517152333..1517238733
>
> Alternatively, you can use @ in date: queries, although this
> seems to be completely undocumented:
>
> $ notmuch search date:@1517152333..@1517238733
>
> HTH,
> Jani.
>
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: trouble searching with unix timestamps

2018-01-29 Thread Jani Nikula
On Mon, 29 Jan 2018, Matthew Lear  wrote:
> Hi. I've noticed that I'm unable to notmuch search using date with unix
> timestamps (ie number of seconds since Jan 1st 1970 UTC). I get a xapian
> error. The notmuch man pages state that searching using
> 'date:..'
> where "each timestamp is a number representing the number of seconds since
> 1970-01-01 00:00:00 UTC" is supported, so I'm wondering what's wrong with
> my installation.

The man page could use some clarification.

The .. syntax predates the date:
prefix, and needs to be given as-is:

$ notmuch search 1517152333..1517238733

Alternatively, you can use @ in date: queries, although this
seems to be completely undocumented:

$ notmuch search date:@1517152333..@1517238733

HTH,
Jani.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


trouble searching with unix timestamps

2018-01-29 Thread Matthew Lear
Hi. I've noticed that I'm unable to notmuch search using date with unix
timestamps (ie number of seconds since Jan 1st 1970 UTC). I get a xapian
error. The notmuch man pages state that searching using
'date:..'
where "each timestamp is a number representing the number of seconds since
1970-01-01 00:00:00 UTC" is supported, so I'm wondering what's wrong with
my installation.

* notmuch config get built_with.field_processor
true
* xapian-config - xapian-core 1.4.4
* notmuch 0.26+8~ga727e7d

Here's an example:

# date +%s
1517238733

# date -d @1517238733
Mon Jan 29 15:12:13 GMT 2018

# date -d @1517152333
Sun Jan 28 15:12:13 GMT 2018


# notmuch search date:1517152333..1517238733
notmuch search: A Xapian exception occurred
A Xapian exception occurred parsing query: Didn't understand date
specification '1517152333..1517238733'
Query string was: date:1517152333..1517238733

Yet I can do:

# notmuch search date:yesterday..today
or
# notmuch search date:1/28/2018..1/29/2018
or
# notmuch search date:20180128..20180129

..and all show 216 results.

Any thoughts as to why Xapian doesn't like this type of query? Is it just
me? :-)

Thanks,
--  Matt
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Select a different sender (From) at reply time

2018-01-29 Thread David Edmondson
On Monday, 2018-01-29 at 12:18:15 +0100, Lele Gaifax wrote:

> David Edmondson  writes:
>
>> The way that I do this is shown here:
>>  http://dme.org/data/notmuch/notmuch-sender.el
>
> Thank you David, I will ad[ao]pt your solution!
>
>> I always remove the initial “From” generated by notmuch and choose one
>> when I hit “send”. In some cases the choice is automatic, but otherwise
>> there is a prompt.
>
> What is the reason for the explicit dme:notmuch-message-setup-hook, given that
> dme:notmuch-message-send-hook replaces the "From:" header by its own?

It's probably historical - I've used variants of this code for many
years.

At one point the code in the send hook would observe an existing From
address (so you can add one by hand to override the hook), but I never
found myself using that and so removed it.

dme.
-- 
You know your green from your red.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Select a different sender (From) at reply time

2018-01-29 Thread Lele Gaifax
David Edmondson  writes:

> The way that I do this is shown here:
>   http://dme.org/data/notmuch/notmuch-sender.el

Thank you David, I will ad[ao]pt your solution!

> I always remove the initial “From” generated by notmuch and choose one
> when I hit “send”. In some cases the choice is automatic, but otherwise
> there is a prompt.

What is the reason for the explicit dme:notmuch-message-setup-hook, given that
dme:notmuch-message-send-hook replaces the "From:" header by its own?

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  | -- Fortunato Depero, 1929.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Select a different sender (From) at reply time

2018-01-29 Thread David Edmondson
On Sunday, 2018-01-28 at 19:13:18 +0100, Lele Gaifax wrote:

> Hi all,
>
> I'd like to automatically force a particular sender when replying to a message
> belonging to a mailing list I'm subscribed.
>
> I'm using the GNU/Emacs MUA, and looking around I found the tip at
> https://notmuchmail.org/emacstips/#index3h2, but I fail to see how to
> recognize the "destination" address, in other words how to determine that "I'm
> replying to a message that belongs to /that/ ML" within the advice, to replace
> the sender only in that case.

The way that I do this is shown here:
http://dme.org/data/notmuch/notmuch-sender.el

I always remove the initial “From” generated by notmuch and choose one
when I hit “send”. In some cases the choice is automatic, but otherwise
there is a prompt.

dme.
-- 
Please forgive me if I act a little strange, for I know not what I do.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Select a different sender (From) at reply time

2018-01-29 Thread Lele Gaifax
Hi all,

I'd like to automatically force a particular sender when replying to a message
belonging to a mailing list I'm subscribed.

I'm using the GNU/Emacs MUA, and looking around I found the tip at
https://notmuchmail.org/emacstips/#index3h2, but I fail to see how to
recognize the "destination" address, in other words how to determine that "I'm
replying to a message that belongs to /that/ ML" within the advice, to replace
the sender only in that case.

Thanks in advance for any hint,
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  | -- Fortunato Depero, 1929.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch