[PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.

2010-06-03 Thread Carl Worth
On Tue,  4 May 2010 15:53:29 +0100, David Edmondson  wrote:
> - Insert a blank line before a citation if there isn't one,
> - Insert a blank line after a citation if there isn't one.

Committed.

> Better than the last version.

Thanks for the follow-up.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.

2010-06-03 Thread Carl Worth
On Tue,  4 May 2010 15:53:29 +0100, David Edmondson d...@dme.org wrote:
 - Insert a blank line before a citation if there isn't one,
 - Insert a blank line after a citation if there isn't one.

Committed.

 Better than the last version.

Thanks for the follow-up.

-Carl

-- 
carl.d.wo...@intel.com


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


[PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.

2010-05-04 Thread David Edmondson
Add:
- Insert a blank line before a citation if there isn't one,
- Insert a blank line after a citation if there isn't one.
---

Better than the last version.

 emacs/notmuch-wash.el |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 46e1824..26a3f88 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -214,7 +214,17 @@ Perform four transformations on the message body:
   ;; text.
   (goto-char (point-min))
   (while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t)
-(replace-match "\\2")))
+(replace-match "\\2"))
+
+  ;; Insert a blank line before a citation if there isn't one.
+  (goto-char (point-min))
+  (while (re-search-forward "\\(^[^>]+\\)\n>" nil t)
+(replace-match "\\1\n\n>"))
+
+  ;; Insert a blank line after a citation if there isn't one.
+  (goto-char (point-min))
+  (while (re-search-forward "\\(^>.+\\)\n\\([^>]\\)" nil t)
+(replace-match "\\1\n\n\\2")))

 ;;

-- 
1.7.0



[PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.

2010-05-04 Thread David Edmondson
On Tue,  4 May 2010 14:45:14 +0100, David Edmondson  wrote:
> Add:
> - Insert a blank line before a citation if there isn't one,
> - Insert a blank line after a citation if there isn't one.

Don't use this, it matches too often.

dme.
-- 
David Edmondson, http://dme.org
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.

2010-05-04 Thread David Edmondson
Add:
- Insert a blank line before a citation if there isn't one,
- Insert a blank line after a citation if there isn't one.
---
 emacs/notmuch-wash.el |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 46e1824..5347ddc 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -214,7 +214,17 @@ Perform four transformations on the message body:
   ;; text.
   (goto-char (point-min))
   (while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t)
-(replace-match "\\2")))
+(replace-match "\\2"))
+
+  ;; Insert a blank line before a citation if there isn't one.
+  (goto-char (point-min))
+  (while (re-search-forward "\\(^[^>].+\\)\n>" nil t)
+(replace-match "\\1\n\n>"))
+
+  ;; Insert a blank line after a citation if there isn't one.
+  (goto-char (point-min))
+  (while (re-search-forward "\\(^>.+\\)\n\\([^>]\\)" nil t)
+(replace-match "\\1\n\n\\2")))

 ;;

-- 
1.7.0



Re: [PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.

2010-05-04 Thread David Edmondson
On Tue,  4 May 2010 14:45:14 +0100, David Edmondson d...@dme.org wrote:
 Add:
 - Insert a blank line before a citation if there isn't one,
 - Insert a blank line after a citation if there isn't one.

Don't use this, it matches too often.

dme.
-- 
David Edmondson, http://dme.org


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


[PATCH] emacs: More functionality for `notmuch-wash-tidy-citations'.

2010-05-04 Thread David Edmondson
Add:
- Insert a blank line before a citation if there isn't one,
- Insert a blank line after a citation if there isn't one.
---

Better than the last version.

 emacs/notmuch-wash.el |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 46e1824..26a3f88 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -214,7 +214,17 @@ Perform four transformations on the message body:
   ;; text.
   (goto-char (point-min))
   (while (re-search-forward \\(^[ ]*\n\\)\\(^$\\|^[^].*\\) nil t)
-(replace-match \\2)))
+(replace-match \\2))
+
+  ;; Insert a blank line before a citation if there isn't one.
+  (goto-char (point-min))
+  (while (re-search-forward \\(^[^]+\\)\n nil t)
+(replace-match \\1\n\n))
+
+  ;; Insert a blank line after a citation if there isn't one.
+  (goto-char (point-min))
+  (while (re-search-forward \\(^.+\\)\n\\([^]\\) nil t)
+(replace-match \\1\n\n\\2)))
 
 ;;
 
-- 
1.7.0

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