[PATCH] emacs: Improve `notmuch-hello' display on ttys.

2012-01-11 Thread Ivy Foster
On 11 Jan 2012, at  8:27 am +, David Edmondson wrote:
> On Tue, 10 Jan 2012 22:45:47 +0200, Jani Nikula  wrote:
> > On Tue, 10 Jan 2012 22:41:49 +0200, Jani Nikula  wrote:
> > > On Tue, 10 Jan 2012 16:18:21 +, David Edmondson  
> > > wrote:
> > > > I have a vague recollection that someone reported a bug where
> > > > `(window-width)' was not the right value to use if `line-number-mode' is
> > > > enabled, but I can't find it again now. (Someone should build an email
> > > > client that allows easy searching.)
> > > 
> > > Do you perhaps mean this: id:"87k47nlpzb.fsf at nausicaa.localdomain"
> > 
> > [Now also to the list. Got bitten by my own patch binding 'r' to
> > reply-to-sender. Perhaps it's really too drastic to change that now...]
> 
> Yes, that one.
> 
> Ivy: Are you likely to add a test and re-submit the patch?

Sorry, I've gone back to using mutt. Notmuch is a pretty
cool project, but ultimately mail archiving is just not a
tool I need right now.

Good luck, though!

Ivy


[PATCH 3/3] Add notmuch-hello-mode-hook

2011-10-30 Thread Ivy Foster
On Sun, 30 Oct 2011 11:06:38 +0100, Thomas Jost  
wrote:
> On Sat, 29 Oct 2011 12:35:04 -0400, Ivy Foster  
> wrote:
> > The following patch adds a mode-hook to
> > notmuch-hello-mode. Not much else to say, really.

> I agree it's useful, but
> id:"1317643438-31272-5-git-send-email-schnouki at schnouki.net"
> ;) (the hooks are not run from the same place though)

Hmm, good point. Whoops again. I guess the question comes
down to run-hooks or run-mode-hooks, then. I'll be sure to
be more careful about browsing through the archive first, in
the future.

> > Would people find hooks for before and/or after adding
> > the tags useful?

> There are such hooks already:
> notmuch-{after,before}-tag-hook. Or do you mean something
> different?

Oh, I meant populating the hello buffer with the list of
tags, not around adding or removing a message's tags.

iff
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111030/85ed80d5/attachment-0001.pgp>


[Patch] Fix Emacs interface bug dealing with invisible text

2011-10-30 Thread Ivy Foster
On Sun, 30 Oct 2011 10:58:55 +0100, Thomas Jost  
wrote:
> Thanks for this patch. I haven't tested it, but I will!

Fair enough (-:

> However, I'm wondering something: wasn't this issue
> already addressed in Dmitry's patch series that I rebased
> and reposted almost a month ago, specifically patches 9/13
> to 12/13?

Whoops! I didn't realize a fix was already pending. I
suppose I should've looked through the mail archive first.
Guess I got a little over-enthusiastic. Sorry about that!
Yes, those would appear to handle the same issue.

Ivy


Re: [Patch] Fix Emacs interface bug dealing with invisible text

2011-10-30 Thread Ivy Foster
On Sun, 30 Oct 2011 10:58:55 +0100, Thomas Jost schno...@schnouki.net wrote:
 Thanks for this patch. I haven't tested it, but I will!

Fair enough (-:

 However, I'm wondering something: wasn't this issue
 already addressed in Dmitry's patch series that I rebased
 and reposted almost a month ago, specifically patches 9/13
 to 12/13?

Whoops! I didn't realize a fix was already pending. I
suppose I should've looked through the mail archive first.
Guess I got a little over-enthusiastic. Sorry about that!
Yes, those would appear to handle the same issue.

Ivy
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 3/3] Add notmuch-hello-mode-hook

2011-10-30 Thread Ivy Foster
On Sun, 30 Oct 2011 11:06:38 +0100, Thomas Jost schno...@schnouki.net wrote:
 On Sat, 29 Oct 2011 12:35:04 -0400, Ivy Foster joyfulg...@archlinux.us 
 wrote:
  The following patch adds a mode-hook to
  notmuch-hello-mode. Not much else to say, really.

 I agree it's useful, but
 id:1317643438-31272-5-git-send-email-schno...@schnouki.net
 ;) (the hooks are not run from the same place though)

Hmm, good point. Whoops again. I guess the question comes
down to run-hooks or run-mode-hooks, then. I'll be sure to
be more careful about browsing through the archive first, in
the future.

  Would people find hooks for before and/or after adding
  the tags useful?

 There are such hooks already:
 notmuch-{after,before}-tag-hook. Or do you mean something
 different?

Oh, I meant populating the hello buffer with the list of
tags, not around adding or removing a message's tags.

iff


pgpjBQ8BgOn1c.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 3/3] Add notmuch-hello-mode-hook

2011-10-29 Thread Ivy Foster
The following patch adds a mode-hook to notmuch-hello-mode.
Not much else to say, really.

Would people find hooks for before and/or after adding the
tags useful? Or hooks elsewhere in this mode (or other
modes)?

iff

Signed-off-by: Ivy Foster 
>From e8cdead0222fc85dd01d8a0185b54aed5e0a6e1e Mon Sep 17 00:00:00 2001
From: Ivy Foster <joyfulg...@archlinux.us>
Date: Fri, 28 Oct 2011 23:47:16 -0400
Subject: [PATCH 3/3] Added notmuch-hello-mode-hook

---
 emacs/notmuch-hello.el |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 1a213f0..13356c5 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -118,6 +118,11 @@ Typically \",\" in the US and UK and \".\" in Europe."
   :group 'notmuch
   :type 'string)

+(defcustom notmuch-hello-mode-hook nil
+  "Functions called after entering `notmuch-hello-mode'."
+  :group 'notmuch
+  :type 'hook)
+
 (defvar notmuch-hello-url "http://notmuchmail.org;
   "The `notmuch' web site.")

@@ -337,6 +342,7 @@ Complete list of currently available key bindings:
  (use-local-map notmuch-hello-mode-map)
  (setq major-mode 'notmuch-hello-mode
mode-name "notmuch-hello")
+ (run-mode-hooks 'notmuch-hello-mode-hook)
  ;;(setq buffer-read-only t)
 )

-- 
1.7.7.1



[Patch 2/3] Respect window margins in notmuch-hello.el

2011-10-29 Thread Ivy Foster
Hello again, folks,

The following patch makes notmuch take window margins into
account when calculating the width of the notmuch-hello
window in Emacs. As a side benefit (so that I only had to
write the code once), I've added a named function to return
said width.

Folks using linum-mode should still probably get a copy of
linum-off.el and disable linum for notmuch-hello, though,
since it doesn't set the margin until after the buffer is
done being created, causing text to overflow across the
edge. Alternately, take a look at my next message, with yet
another patch.

Enjoy!

iff

Signed-off-by: Ivy Foster 
>From 0c1a0fa0858e3c22b416ce6bd9ad623198217d34 Mon Sep 17 00:00:00 2001
From: Ivy Foster <joyfulg...@archlinux.us>
Date: Fri, 28 Oct 2011 23:18:14 -0400
Subject: [PATCH 2/3] Respect margins in new named window-width function

This patch removes a function which is duplicated
several times in notmuch-hello.el, improving
readability. Also, factors in  window margins
when calculating width.
---
 emacs/notmuch-hello.el |   28 ++--
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 65fde75..1a213f0 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -213,25 +213,27 @@ should be. Returns a cons cell `(tags-per-line width)'."
 (cond
  ((integerp notmuch-column-control)
   (max 1
-   (/ (- (window-width) notmuch-hello-indent)
+   (/ (notmuch-hello-available-width)
   ;; Count is 9 wide (8 digits plus space), 1 for the space
   ;; after the name.
   (+ 9 1 (max notmuch-column-control widest)

  ((floatp notmuch-column-control)
-  (let* ((available-width (- (window-width) notmuch-hello-indent))
- (proposed-width (max (* available-width 
notmuch-column-control) widest)))
-(floor available-width proposed-width)))
+  (let ((proposed-width (max
+(* (notmuch-hello-available-width)
+   notmuch-column-control)
+widest)))
+(floor (notmuch-hello-available-width) proposed-width)))

  (t
   (max 1
-   (/ (- (window-width) notmuch-hello-indent)
+   (/ (notmuch-hello-available-width)
   ;; Count is 9 wide (8 digits plus space), 1 for the space
   ;; after the name.
   (+ 9 1 widest)))

 (cons tags-per-line (/ (max 1
-   (- (window-width) notmuch-hello-indent
+   (- (notmuch-hello-available-width)
   ;; Count is 9 wide (8 digits plus
   ;; space), 1 for the space after the
   ;; name.
@@ -458,7 +460,7 @@ Complete list of currently available key bindings:
(widget-create 'editable-field
   ;; Leave some space at the start and end of the
   ;; search boxes.
-  :size (max 8 (- (window-width) notmuch-hello-indent
+  :size (max 8 (- (notmuch-hello-available-width)
   (length "Search: ")))
   :action (lambda (widget  ignore)
 (notmuch-hello-search (widget-value widget
@@ -481,12 +483,13 @@ Complete list of currently available key bindings:
   ;; Don't let the search boxes be
   ;; less than 8 characters wide.
   :size (max 8
- (- (window-width)
+ (-
+  
(notmuch-hello-available-width)
 ;; Leave some space
 ;; at the start and
 ;; end of the
 ;; boxes.
-(* 2 notmuch-hello-indent)
+  notmuch-hello-indent
 ;; 1 for the space
 ;; before the
 ;; `[save]' button. 6
@@ -540,7 +543,7 @@ Complete list of currently available key bindings:
  (widget-insert "Edit saved searches with the `edit' button.\n"))
(widget-insert "Hit RET or click on a saved search or tag name to view 
matching threads.\n")
(widget-insert "`=' refreshes this screen. `s' jumps to the search 

[Patch 2/3] Respect window margins in notmuch-hello.el

2011-10-29 Thread Ivy Foster
Hello again, folks,

The following patch makes notmuch take window margins into
account when calculating the width of the notmuch-hello
window in Emacs. As a side benefit (so that I only had to
write the code once), I've added a named function to return
said width.

Folks using linum-mode should still probably get a copy of
linum-off.el and disable linum for notmuch-hello, though,
since it doesn't set the margin until after the buffer is
done being created, causing text to overflow across the
edge. Alternately, take a look at my next message, with yet
another patch.

Enjoy!

iff

Signed-off-by: Ivy Foster joyfulg...@archlinux.us
From 0c1a0fa0858e3c22b416ce6bd9ad623198217d34 Mon Sep 17 00:00:00 2001
From: Ivy Foster joyfulg...@archlinux.us
Date: Fri, 28 Oct 2011 23:18:14 -0400
Subject: [PATCH 2/3] Respect margins in new named window-width function

This patch removes a function which is duplicated
several times in notmuch-hello.el, improving
readability. Also, factors in  window margins
when calculating width.
---
 emacs/notmuch-hello.el |   28 ++--
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 65fde75..1a213f0 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -213,25 +213,27 @@ should be. Returns a cons cell `(tags-per-line width)'.
 (cond
  ((integerp notmuch-column-control)
   (max 1
-   (/ (- (window-width) notmuch-hello-indent)
+   (/ (notmuch-hello-available-width)
   ;; Count is 9 wide (8 digits plus space), 1 for the space
   ;; after the name.
   (+ 9 1 (max notmuch-column-control widest)
 
  ((floatp notmuch-column-control)
-  (let* ((available-width (- (window-width) notmuch-hello-indent))
- (proposed-width (max (* available-width 
notmuch-column-control) widest)))
-(floor available-width proposed-width)))
+  (let ((proposed-width (max
+(* (notmuch-hello-available-width)
+   notmuch-column-control)
+widest)))
+(floor (notmuch-hello-available-width) proposed-width)))
 
  (t
   (max 1
-   (/ (- (window-width) notmuch-hello-indent)
+   (/ (notmuch-hello-available-width)
   ;; Count is 9 wide (8 digits plus space), 1 for the space
   ;; after the name.
   (+ 9 1 widest)))
 
 (cons tags-per-line (/ (max 1
-   (- (window-width) notmuch-hello-indent
+   (- (notmuch-hello-available-width)
   ;; Count is 9 wide (8 digits plus
   ;; space), 1 for the space after the
   ;; name.
@@ -458,7 +460,7 @@ Complete list of currently available key bindings:
(widget-create 'editable-field
   ;; Leave some space at the start and end of the
   ;; search boxes.
-  :size (max 8 (- (window-width) notmuch-hello-indent
+  :size (max 8 (- (notmuch-hello-available-width)
   (length Search: )))
   :action (lambda (widget rest ignore)
 (notmuch-hello-search (widget-value widget
@@ -481,12 +483,13 @@ Complete list of currently available key bindings:
   ;; Don't let the search boxes be
   ;; less than 8 characters wide.
   :size (max 8
- (- (window-width)
+ (-
+  
(notmuch-hello-available-width)
 ;; Leave some space
 ;; at the start and
 ;; end of the
 ;; boxes.
-(* 2 notmuch-hello-indent)
+  notmuch-hello-indent
 ;; 1 for the space
 ;; before the
 ;; `[save]' button. 6
@@ -540,7 +543,7 @@ Complete list of currently available key bindings:
  (widget-insert Edit saved searches with the `edit' button.\n))
(widget-insert Hit RET or click on a saved search or tag name to view 
matching threads.\n)
(widget-insert `=' refreshes this screen. `s' jumps to the search box. 
`q' to quit.\n)
-   (let

[PATCH 3/3] Add notmuch-hello-mode-hook

2011-10-29 Thread Ivy Foster
The following patch adds a mode-hook to notmuch-hello-mode.
Not much else to say, really.

Would people find hooks for before and/or after adding the
tags useful? Or hooks elsewhere in this mode (or other
modes)?

iff

Signed-off-by: Ivy Foster joyfulg...@archlinux.us
From e8cdead0222fc85dd01d8a0185b54aed5e0a6e1e Mon Sep 17 00:00:00 2001
From: Ivy Foster joyfulg...@archlinux.us
Date: Fri, 28 Oct 2011 23:47:16 -0400
Subject: [PATCH 3/3] Added notmuch-hello-mode-hook

---
 emacs/notmuch-hello.el |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 1a213f0..13356c5 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -118,6 +118,11 @@ Typically \,\ in the US and UK and \.\ in Europe.
   :group 'notmuch
   :type 'string)
 
+(defcustom notmuch-hello-mode-hook nil
+  Functions called after entering `notmuch-hello-mode'.
+  :group 'notmuch
+  :type 'hook)
+
 (defvar notmuch-hello-url http://notmuchmail.org;
   The `notmuch' web site.)
 
@@ -337,6 +342,7 @@ Complete list of currently available key bindings:
  (use-local-map notmuch-hello-mode-map)
  (setq major-mode 'notmuch-hello-mode
mode-name notmuch-hello)
+ (run-mode-hooks 'notmuch-hello-mode-hook)
  ;;(setq buffer-read-only t)
 )
 
-- 
1.7.7.1

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[Patch] Fix Emacs interface bug dealing with invisible text

2011-10-28 Thread Ivy Foster
Hey, folks,

I'm new to notmuch, but like much of what I've tried so far.
Thanks to all the contributors!

The following patch fixes a bug I've noticed in Emacs's
notmuch-show mode. Specifically, if you:

- have certain kinds of washing turned on (I've noticed
  it with signature hiding), and

- are looking at the last or only message in a thread

If you then hit Space (`notmuch-show-advance-or-archive') to
move on, Emacs will fail to advance and/or archive the
message, due to being kicked out of area of the invisible
text before it can do what it's gotta do.

The patch should fix the problem at the root, which seems to
be with notmuch-show-move-past-invisible-[forward|backward].

So far, I'm the only tester. However, I have added a
signature to the end of this message for your convenience.
(-:

Share & Enjoy!

Signed-off-by: Ivy Foster 
>From 61ac45b32b70f2e789004359e219bfe6b77c701e Mon Sep 17 00:00:00 2001
From: Ivy Foster <joyfulg...@archlinux.us>
Date: Fri, 28 Oct 2011 19:30:45 -0400
Subject: [PATCH 1/1] Move past invisible text properly in Emacs

move-past-invisible-text-* in notmuch-show were
interacting oddly with hidden text at the end of
a thread, such as a washed signature block.
---
 emacs/notmuch-show.el |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 440e089..f14696b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1017,12 +1017,16 @@ All currently available key bindings:
 t))

 (defun notmuch-show-move-past-invisible-forward ()
-  (while (point-invisible-p)
-(forward-char)))
+  (let ((disable-point-adjustment t))
+(goto-char (1+ (point)))
+(while (invisible-p (point))
+  (goto-char (1+ (point))

 (defun notmuch-show-move-past-invisible-backward ()
-  (while (point-invisible-p)
-(backward-char)))
+  (let ((disable-point-adjustment t))
+(goto-char (1- (point)))
+(while (invisible-p (point))
+  (goto-char (1- (point))

 ;; Functions relating to the visibility of messages and their
 ;; components.
@@ -1160,7 +1164,7 @@ which this thread was originally shown."
  ;; go to the end, walk back over invisible text and then see if
  ;; point is visible.
  ((save-excursion
-   (goto-char (- end-of-this-message 1))
+   (goto-char end-of-this-message)
(notmuch-show-move-past-invisible-backward)
(> (point) (window-end)))
   ;; The bottom of this message is not visible - scroll.
-- 
1.7.7.1

P.S.: I also tried this with (point-invisible-p) instead of
  (invisible-p (point)), but for whatever reason, it
  didn't work. That may be something to look into as
  well.

-- 
Quid me anxius sum?
[ What? Me, worry? ]


[Patch] Fix Emacs interface bug dealing with invisible text

2011-10-28 Thread Ivy Foster
Hey, folks,

I'm new to notmuch, but like much of what I've tried so far.
Thanks to all the contributors!

The following patch fixes a bug I've noticed in Emacs's
notmuch-show mode. Specifically, if you:

- have certain kinds of washing turned on (I've noticed
  it with signature hiding), and

- are looking at the last or only message in a thread

If you then hit Space (`notmuch-show-advance-or-archive') to
move on, Emacs will fail to advance and/or archive the
message, due to being kicked out of area of the invisible
text before it can do what it's gotta do.

The patch should fix the problem at the root, which seems to
be with notmuch-show-move-past-invisible-[forward|backward].

So far, I'm the only tester. However, I have added a
signature to the end of this message for your convenience.
(-:

Share  Enjoy!

Signed-off-by: Ivy Foster joyfulg...@archlinux.us
From 61ac45b32b70f2e789004359e219bfe6b77c701e Mon Sep 17 00:00:00 2001
From: Ivy Foster joyfulg...@archlinux.us
Date: Fri, 28 Oct 2011 19:30:45 -0400
Subject: [PATCH 1/1] Move past invisible text properly in Emacs

move-past-invisible-text-* in notmuch-show were
interacting oddly with hidden text at the end of
a thread, such as a washed signature block.
---
 emacs/notmuch-show.el |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 440e089..f14696b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1017,12 +1017,16 @@ All currently available key bindings:
 t))

 (defun notmuch-show-move-past-invisible-forward ()
-  (while (point-invisible-p)
-(forward-char)))
+  (let ((disable-point-adjustment t))
+(goto-char (1+ (point)))
+(while (invisible-p (point))
+  (goto-char (1+ (point))

 (defun notmuch-show-move-past-invisible-backward ()
-  (while (point-invisible-p)
-(backward-char)))
+  (let ((disable-point-adjustment t))
+(goto-char (1- (point)))
+(while (invisible-p (point))
+  (goto-char (1- (point))

 ;; Functions relating to the visibility of messages and their
 ;; components.
@@ -1160,7 +1164,7 @@ which this thread was originally shown.
  ;; go to the end, walk back over invisible text and then see if
  ;; point is visible.
  ((save-excursion
-   (goto-char (- end-of-this-message 1))
+   (goto-char end-of-this-message)
(notmuch-show-move-past-invisible-backward)
( (point) (window-end)))
   ;; The bottom of this message is not visible - scroll.
-- 
1.7.7.1

P.S.: I also tried this with (point-invisible-p) instead of
  (invisible-p (point)), but for whatever reason, it
  didn't work. That may be something to look into as
  well.

-- 
Quid me anxius sum?
[ What? Me, worry? ]
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


search for date received possible?

2011-10-23 Thread Ivy Foster
On Sun, 23 Oct 2011 23:42:54 +0200, Gregor Zattler  wrote:
> On Sun, 23 Oct 2011 12:47:41 -0400, Ivy Foster  
> wrote:
> > On Sun, 23 Oct 2011 16:53:29 +0200, Gregor Zattler  
> > wrote:
> > > is it possible to limit searches to date received
> > > ranges instead of date (sent) ranges?

> > If your mail is delivered by procmail, I know you can
> > insert arbitrary headers as part of the mail-processing
> > stage, generally using formail.

> There are already Received:-Headers in emails which
> contain the date when the mail was received. 

True; I just figured a unique one would be easier to search
for, since (at least in mail I receive) there are generally
several "Received:" headers.

> How do I search on arbitrary headers? This is especially
> difficult since date specifications are so complex.

You should be able to search for any free-form text just by
leaving out the "from:", "to:", etc., prefix. To be honest,
however, I'm new to notmuch myself and still learning my way
around.

iff

-- 
For every action, there is an equal and opposite criticism.
-- Harrison
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111023/c5ab7f96/attachment.pgp>


search for date received possible?

2011-10-23 Thread Ivy Foster
On Sun, 23 Oct 2011 16:53:29 +0200, Gregor Zattler  wrote:
> Hi notmuch users, notmuch developers,

Howdy,

> is it possible to limit searches to date received ranges
> instead of date (sent) ranges?

If your mail is delivered by procmail, I know you can insert
arbitrary headers as part of the mail-processing stage,
generally using formail. Such a recipe could look something
like this:

  NOW=$(date)
  :0 fhw
  | /usr/bin/formail -a "X-Date-Received: " $NOW

Hope that works out for you.

Ivy
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



Re: search for date received possible?

2011-10-23 Thread Ivy Foster
On Sun, 23 Oct 2011 16:53:29 +0200, Gregor Zattler telegr...@gmx.net wrote:
 Hi notmuch users, notmuch developers,

Howdy,

 is it possible to limit searches to date received ranges
 instead of date (sent) ranges?

If your mail is delivered by procmail, I know you can insert
arbitrary headers as part of the mail-processing stage,
generally using formail. Such a recipe could look something
like this:

  NOW=$(date)
  :0 fhw
  | /usr/bin/formail -a X-Date-Received:  $NOW

Hope that works out for you.

Ivy


pgpaoxs9Vodyz.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: search for date received possible?

2011-10-23 Thread Ivy Foster
On Sun, 23 Oct 2011 23:42:54 +0200, Gregor Zattler telegr...@gmx.net wrote:
 On Sun, 23 Oct 2011 12:47:41 -0400, Ivy Foster joyfulg...@archlinux.us 
 wrote:
  On Sun, 23 Oct 2011 16:53:29 +0200, Gregor Zattler telegr...@gmx.net 
  wrote:
   is it possible to limit searches to date received
   ranges instead of date (sent) ranges?

  If your mail is delivered by procmail, I know you can
  insert arbitrary headers as part of the mail-processing
  stage, generally using formail.

 There are already Received:-Headers in emails which
 contain the date when the mail was received. 

True; I just figured a unique one would be easier to search
for, since (at least in mail I receive) there are generally
several Received: headers.

 How do I search on arbitrary headers? This is especially
 difficult since date specifications are so complex.

You should be able to search for any free-form text just by
leaving out the from:, to:, etc., prefix. To be honest,
however, I'm new to notmuch myself and still learning my way
around.

iff

-- 
For every action, there is an equal and opposite criticism.
-- Harrison


pgpP7TC8awArp.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch