all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using date ranges in emacs notmuch search
@ 2011-07-23 18:29 suvayu ali
  2011-07-25 15:55 ` Michal Sojka
  2011-07-25 19:06 ` Andreas Röhler
  0 siblings, 2 replies; 7+ messages in thread
From: suvayu ali @ 2011-07-23 18:29 UTC (permalink / raw)
  To: Emacs mailing list

Hi Emacs users,

I was wondering if someone could point me how to correctly specify date
ranges in an emacs notmuch search. So far I tried these two variations:

To see all emails from the last 3 months I tried:

1. "$(($(date +%s)-5270400))..$(date +%s)" - This completes w/o an error
   but doesn't return any messages.
2. $(($(date +%s)-5270400))..$(date +%s) (w/o the quotes) - This doesn't
   return any messages either but returns an error code of 1.

Strangely, from the command line both searches return valid messages.
What am I doing wrong? Thanks for any help or comments.

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Using date ranges in emacs notmuch search
  2011-07-23 18:29 Using date ranges in emacs notmuch search suvayu ali
@ 2011-07-25 15:55 ` Michal Sojka
  2011-07-25 16:09   ` suvayu ali
  2011-07-25 19:06 ` Andreas Röhler
  1 sibling, 1 reply; 7+ messages in thread
From: Michal Sojka @ 2011-07-25 15:55 UTC (permalink / raw)
  To: suvayu ali, Emacs mailing list

On Sat, 23 Jul 2011, suvayu ali wrote:
> Hi Emacs users,
> 
> I was wondering if someone could point me how to correctly specify date
> ranges in an emacs notmuch search. So far I tried these two variations:
> 
> To see all emails from the last 3 months I tried:
> 
> 1. "$(($(date +%s)-5270400))..$(date +%s)" - This completes w/o an error
>    but doesn't return any messages.
> 2. $(($(date +%s)-5270400))..$(date +%s) (w/o the quotes) - This doesn't
>    return any messages either but returns an error code of 1.
> 
> Strangely, from the command line both searches return valid messages.
> What am I doing wrong? Thanks for any help or comments.

Hi,

$(...) is shell syntax and Emacs interface does not use shell to
evaluate these operators. Unfortunately, there is currently no way in
Emacs interface to perform date calculation. There is a few patches
pending for allowing that, but so far no one was merged.

-Michal

P.S. You should better ask this kind of questions in notmuch mailing
list.



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

* Re: Using date ranges in emacs notmuch search
  2011-07-25 15:55 ` Michal Sojka
@ 2011-07-25 16:09   ` suvayu ali
  0 siblings, 0 replies; 7+ messages in thread
From: suvayu ali @ 2011-07-25 16:09 UTC (permalink / raw)
  To: Michal Sojka; +Cc: Emacs mailing list

Hi Michal,

On Mon, Jul 25, 2011 at 5:55 PM, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> $(...) is shell syntax and Emacs interface does not use shell to
> evaluate these operators. Unfortunately, there is currently no way in
> Emacs interface to perform date calculation. There is a few patches
> pending for allowing that, but so far no one was merged.
>

Thank you very much for clarifying that Michal.

> -Michal
>
> P.S. You should better ask this kind of questions in notmuch mailing
> list.

I will try that in the future.

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Using date ranges in emacs notmuch search
  2011-07-23 18:29 Using date ranges in emacs notmuch search suvayu ali
  2011-07-25 15:55 ` Michal Sojka
@ 2011-07-25 19:06 ` Andreas Röhler
  2011-07-25 19:32   ` suvayu ali
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Röhler @ 2011-07-25 19:06 UTC (permalink / raw)
  To: help-gnu-emacs

Am 23.07.2011 20:29, schrieb suvayu ali:
> Hi Emacs users,
>
> I was wondering if someone could point me how to correctly specify date
> ranges in an emacs notmuch search. So far I tried these two variations:
>
> To see all emails from the last 3 months I tried:
>
> 1. "$(($(date +%s)-5270400))..$(date +%s)" - This completes w/o an error
>     but doesn't return any messages.
> 2. $(($(date +%s)-5270400))..$(date +%s) (w/o the quotes) - This doesn't
>     return any messages either but returns an error code of 1.
>
> Strangely, from the command line both searches return valid messages.
> What am I doing wrong? Thanks for any help or comments.
>

M-! echo $(($(date +%s)-5270400))..$(date +%s)

makes some nice output...



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

* Re: Using date ranges in emacs notmuch search
  2011-07-25 19:06 ` Andreas Röhler
@ 2011-07-25 19:32   ` suvayu ali
  2011-07-26  6:39     ` Andreas Röhler
  0 siblings, 1 reply; 7+ messages in thread
From: suvayu ali @ 2011-07-25 19:32 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: help-gnu-emacs

On Mon, Jul 25, 2011 at 9:06 PM, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:
> M-! echo $(($(date +%s)-5270400))..$(date +%s)
>
> makes some nice output...

I am not sure what you mean. The notmuch command would be:

notmuch search "$(($(date +%s)-5270400))..$(date +%s)"

My issue was this command works on the terminal, not in the emacs
frontend to notmuch. The problem is, as Michal mentioned, the emacs
interface does not use the shell.

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Using date ranges in emacs notmuch search
  2011-07-25 19:32   ` suvayu ali
@ 2011-07-26  6:39     ` Andreas Röhler
  2011-07-26  9:51       ` suvayu ali
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Röhler @ 2011-07-26  6:39 UTC (permalink / raw)
  To: suvayu ali; +Cc: help-gnu-emacs

Am 25.07.2011 21:32, schrieb suvayu ali:
> On Mon, Jul 25, 2011 at 9:06 PM, Andreas Röhler
> <andreas.roehler@easy-emacs.de>  wrote:
>> M-! echo $(($(date +%s)-5270400))..$(date +%s)
>>
>> makes some nice output...
>
> I am not sure what you mean. The notmuch command would be:
>
> notmuch search "$(($(date +%s)-5270400))..$(date +%s)"
>
> My issue was this command works on the terminal, not in the emacs
> frontend to notmuch. The problem is, as Michal mentioned, the emacs
> interface does not use the shell.
>

Maybe pre-process resp. advice the Emacs interface?

Andreas



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

* Re: Using date ranges in emacs notmuch search
  2011-07-26  6:39     ` Andreas Röhler
@ 2011-07-26  9:51       ` suvayu ali
  0 siblings, 0 replies; 7+ messages in thread
From: suvayu ali @ 2011-07-26  9:51 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: help-gnu-emacs

On Tue, Jul 26, 2011 at 8:39 AM, Andreas Röhler
<andreas.roehler@easy-emacs.de> wrote:
>> The problem is, as Michal mentioned, the emacs
>> interface does not use the shell.
>>
>
> Maybe pre-process resp. advice the Emacs interface?
>

That sounds like a very promising idea. I'll try that.

Thanks a lot Andreas.

-- 
Suvayu

Open source is the future. It sets us free.



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

end of thread, other threads:[~2011-07-26  9:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-23 18:29 Using date ranges in emacs notmuch search suvayu ali
2011-07-25 15:55 ` Michal Sojka
2011-07-25 16:09   ` suvayu ali
2011-07-25 19:06 ` Andreas Röhler
2011-07-25 19:32   ` suvayu ali
2011-07-26  6:39     ` Andreas Röhler
2011-07-26  9:51       ` suvayu ali

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.