unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* $(date ...)..$(date ...) request from Emacs
@ 2013-08-24 10:44 Bastien
  2013-08-24 10:49 ` Tomi Ollila
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2013-08-24 10:44 UTC (permalink / raw)
  To: notmuch

Hi again,

notmuch search $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)

works wonders from the command line, but not from within Emacs:

M-x notmuch-search RET $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)

[Sat Aug 24 12:39:15 2013]
A Xapian exception occurred performing query: Unknown range operation
Query string was: $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)
command: notmuch search --format\=sexp --format-version\=1 --sort\=newest-first \$\(date\ \+\%s\ -d\ 2009-10-01\)..\$\(date\ \+\%s\ -d\ 2009-10-02\)
exit status: 1
stderr:
A Xapian exception occurred performing query: Unknown range operation
Query string was: $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)

I see --format=sexp -- does that mean we need to protect those
kinds of requests somehow?

Thanks for your help!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: $(date ...)..$(date ...) request from Emacs
  2013-08-24 10:44 $(date ...)..$(date ...) request from Emacs Bastien
@ 2013-08-24 10:49 ` Tomi Ollila
  2013-08-24 12:20   ` Suvayu Ali
  0 siblings, 1 reply; 4+ messages in thread
From: Tomi Ollila @ 2013-08-24 10:49 UTC (permalink / raw)
  To: Bastien, notmuch

On Sat, Aug 24 2013, Bastien <bzg@altern.org> wrote:

> Hi again,
>
> notmuch search $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)
>
> works wonders from the command line, but not from within Emacs:
>
> M-x notmuch-search RET $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)

there is no shell expansion done to the string... 

... however

M-x notmuch-search RET date:2009-10-01..2009-10-02

should do it (provided you have at least notmuch 0.15 (or so))

Tomi


>
> [Sat Aug 24 12:39:15 2013]
> A Xapian exception occurred performing query: Unknown range operation
> Query string was: $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)
> command: notmuch search --format\=sexp --format-version\=1 --sort\=newest-first \$\(date\ \+\%s\ -d\ 2009-10-01\)..\$\(date\ \+\%s\ -d\ 2009-10-02\)
> exit status: 1
> stderr:
> A Xapian exception occurred performing query: Unknown range operation
> Query string was: $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)
>
> I see --format=sexp -- does that mean we need to protect those
> kinds of requests somehow?
>
> Thanks for your help!
>
> -- 
>  Bastien
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: $(date ...)..$(date ...) request from Emacs
  2013-08-24 10:49 ` Tomi Ollila
@ 2013-08-24 12:20   ` Suvayu Ali
  2013-08-25  7:04     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Suvayu Ali @ 2013-08-24 12:20 UTC (permalink / raw)
  To: notmuch

Hello Bastien!

On Sat, Aug 24, 2013 at 01:49:48PM +0300, Tomi Ollila wrote:
> On Sat, Aug 24 2013, Bastien <bzg@altern.org> wrote:
> 
> > Hi again,
> >
> > notmuch search $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)
> >
> > works wonders from the command line, but not from within Emacs:
> >
> > M-x notmuch-search RET $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02)
> 
> there is no shell expansion done to the string... 
> 
> ... however
> 
> M-x notmuch-search RET date:2009-10-01..2009-10-02
> 
> should do it (provided you have at least notmuch 0.15 (or so))

To add to that, notmuch now also understands relative dates, and many
other date expressions.  Check out the 'Date and time search' section in
`man notmuch-search-terms'.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: $(date ...)..$(date ...) request from Emacs
  2013-08-24 12:20   ` Suvayu Ali
@ 2013-08-25  7:04     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-08-25  7:04 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: public-notmuch-gxuj+Tv9EO5zyzON3hdc1g



Hi Suvayu :)

Suvayu Ali <fatkasuvayu+linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
writes:

> To add to that, notmuch now also understands relative dates, and many
> other date expressions.  Check out the 'Date and time search' section in
> `man notmuch-search-terms'.

Wonderful, thanks for the hint!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-26 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-24 10:44 $(date ...)..$(date ...) request from Emacs Bastien
2013-08-24 10:49 ` Tomi Ollila
2013-08-24 12:20   ` Suvayu Ali
2013-08-25  7:04     ` Bastien

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).