[PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-11-07 Thread Tomi Ollila
On Wed, Nov 07 2012, Tomi Ollila  wrote:

> On Thu, Oct 04 2012, Tomi Ollila wrote:
>
>> In case text/calendar content contained "folded" data (i.e. line
>> continues to next line which begins with whitespace...
>>
>> or
>>
>> The text/calendar content is inside separate (application/octet-stream)
>> content and the text/calendar entry there contains carriage returns...
>>
>> ... The parsing of text/calendar content failed so badly that in
>> addition to just not showing the calendar content the rest of content
>> handling of the thread aborted.
>>
>> In this change the input calendar content is unfolded extending the
>> unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
>> removal.
>> ---
>
> I wrote comments on this patch but apparently I did not save my buffer
> before git-send-email'ing it -- so here are the comments:
>
>
> This obsoletes id:1349333712-18347-1-git-send-email-tomi.ollila at iki.fi
> Commit message is changed to reflect change in pushed patch 
> id:1350826509-12119-1-git-send-email-tomi.ollila at iki.fi
> also, '\\r?' part in regexp was removed.
>
> Note the difference how id:87d31artti.fsf at inf-8657.int-evry.fr
> is inserted before and after this change.

OH NO, I replied to wrong email. this was reply to my old, obsolete
patch. 

Sorry about these ;/.

> Tomi

Tomi


[PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-11-07 Thread Tomi Ollila
On Thu, Oct 04 2012, Tomi Ollila wrote:

> In case text/calendar content contained "folded" data (i.e. line
> continues to next line which begins with whitespace...
>
> or
>
> The text/calendar content is inside separate (application/octet-stream)
> content and the text/calendar entry there contains carriage returns...
>
> ... The parsing of text/calendar content failed so badly that in
> addition to just not showing the calendar content the rest of content
> handling of the thread aborted.
>
> In this change the input calendar content is unfolded extending the
> unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
> removal.
> ---

I wrote comments on this patch but apparently I did not save my buffer
before git-send-email'ing it -- so here are the comments:


This obsoletes id:1349333712-18347-1-git-send-email-tomi.ollila at iki.fi
Commit message is changed to reflect change in pushed patch 
id:1350826509-12119-1-git-send-email-tomi.ollila at iki.fi
also, '\\r?' part in regexp was removed.

Note the difference how id:87d31artti.fsf at inf-8657.int-evry.fr
is inserted before and after this change.


Tomi


[PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-11-07 Thread Tomi Ollila
In case text/calendar content contained "folded" data (i.e. line
continues to next line which begins with whitespace...

or

The text/calendar content is inside separate (application/octet-stream)
content and the text/calendar entry there contains carriage returns...

... The parsing of text/calendar content fails and next method of
inserting the content is used (if any), usually providing less readable
output.

In this change the input calendar content is unfolded extending the
unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
removal.
---

This obsoletes id:1349333712-18347-1-git-send-email-tomi.ollila at iki.fi
Commit message is changed to reflect change in pushed patch 
id:1350826509-12119-1-git-send-email-tomi.ollila at iki.fi
also, '\\r?' part in regexp was removed.

Note the difference how id:87d31artti.fsf at inf-8657.int-evry.fr
is inserted before and after this change.

 emacs/notmuch-show.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index d061367..d51345e 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -750,6 +750,11 @@ message at DEPTH in the current thread."
(goto-char (point-min))
(let ((file (make-temp-file "notmuch-ical"))
  result)
+ ;; `icalendar--get-unfolded-buffer' unfolds with "\r?\n[ \t]".
+ ;; This unfolding extends that by removing other CRs too.
+ (while (re-search-forward "\\(\r\\|\n[ \t]\\)" nil t)
+   (replace-match "" nil nil))
+ (goto-char (point-min))
  (icalendar--convert-ical-to-diary
   (icalendar--read-element nil nil)
   file t)
-- 
1.8.0



[PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-11-07 Thread Tomi Ollila
In case text/calendar content contained folded data (i.e. line
continues to next line which begins with whitespace...

or

The text/calendar content is inside separate (application/octet-stream)
content and the text/calendar entry there contains carriage returns...

... The parsing of text/calendar content fails and next method of
inserting the content is used (if any), usually providing less readable
output.

In this change the input calendar content is unfolded extending the
unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
removal.
---

This obsoletes id:1349333712-18347-1-git-send-email-tomi.oll...@iki.fi
Commit message is changed to reflect change in pushed patch 
id:1350826509-12119-1-git-send-email-tomi.oll...@iki.fi
also, '\\r?' part in regexp was removed.

Note the difference how id:87d31artti@inf-8657.int-evry.fr
is inserted before and after this change.

 emacs/notmuch-show.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index d061367..d51345e 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -750,6 +750,11 @@ message at DEPTH in the current thread.
(goto-char (point-min))
(let ((file (make-temp-file notmuch-ical))
  result)
+ ;; `icalendar--get-unfolded-buffer' unfolds with \r?\n[ \t].
+ ;; This unfolding extends that by removing other CRs too.
+ (while (re-search-forward \\(\r\\|\n[ \t]\\) nil t)
+   (replace-match  nil nil))
+ (goto-char (point-min))
  (icalendar--convert-ical-to-diary
   (icalendar--read-element nil nil)
   file t)
-- 
1.8.0

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


Re: [PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-11-07 Thread Tomi Ollila
On Thu, Oct 04 2012, Tomi Ollila wrote:

 In case text/calendar content contained folded data (i.e. line
 continues to next line which begins with whitespace...

 or

 The text/calendar content is inside separate (application/octet-stream)
 content and the text/calendar entry there contains carriage returns...

 ... The parsing of text/calendar content failed so badly that in
 addition to just not showing the calendar content the rest of content
 handling of the thread aborted.

 In this change the input calendar content is unfolded extending the
 unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
 removal.
 ---

I wrote comments on this patch but apparently I did not save my buffer
before git-send-email'ing it -- so here are the comments:


This obsoletes id:1349333712-18347-1-git-send-email-tomi.oll...@iki.fi
Commit message is changed to reflect change in pushed patch 
id:1350826509-12119-1-git-send-email-tomi.oll...@iki.fi
also, '\\r?' part in regexp was removed.

Note the difference how id:87d31artti@inf-8657.int-evry.fr
is inserted before and after this change.


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


Re: [PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-11-07 Thread Tomi Ollila
On Wed, Nov 07 2012, Tomi Ollila tomi.oll...@iki.fi wrote:

 On Thu, Oct 04 2012, Tomi Ollila wrote:

 In case text/calendar content contained folded data (i.e. line
 continues to next line which begins with whitespace...

 or

 The text/calendar content is inside separate (application/octet-stream)
 content and the text/calendar entry there contains carriage returns...

 ... The parsing of text/calendar content failed so badly that in
 addition to just not showing the calendar content the rest of content
 handling of the thread aborted.

 In this change the input calendar content is unfolded extending the
 unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
 removal.
 ---

 I wrote comments on this patch but apparently I did not save my buffer
 before git-send-email'ing it -- so here are the comments:


 This obsoletes id:1349333712-18347-1-git-send-email-tomi.oll...@iki.fi
 Commit message is changed to reflect change in pushed patch 
 id:1350826509-12119-1-git-send-email-tomi.oll...@iki.fi
 also, '\\r?' part in regexp was removed.

 Note the difference how id:87d31artti@inf-8657.int-evry.fr
 is inserted before and after this change.

OH NO, I replied to wrong email. this was reply to my old, obsolete
patch. 

Sorry about these ;/.

 Tomi

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


[PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-10-04 Thread Tomi Ollila
In case text/calendar content contained "folded" data (i.e. line
continues to next line which begins with whitespace...

or

The text/calendar content is inside separate (application/octet-stream)
content and the text/calendar entry there contains carriage returns...

... The parsing of text/calendar content failed so badly that in
addition to just not showing the calendar content the rest of content
handling of the thread aborted.

In this change the input calendar content is unfolded extending the
unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
removal.
---
 emacs/notmuch-show.el |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 86130ce..2a07e28 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -750,6 +750,11 @@ message at DEPTH in the current thread."
(goto-char (point-min))
(let ((file (make-temp-file "notmuch-ical"))
  result)
+ ;; `icalendar--get-unfolded-buffer' unfolds with "\r?\n[ \t]".
+ ;; This unfolding extends that by removing other CRs too.
+ (while (re-search-forward "\\(\r\\|\r?\n[ \t]\\)" nil t)
+   (replace-match "" nil nil))
+ (goto-char (point-min))
  (icalendar--convert-ical-to-diary
   (icalendar--read-element nil nil)
   file t)
-- 
1.7.1



[PATCH 1/1] notmuch-show.el: extended icalendar unfolding with single CR removal

2012-10-04 Thread Tomi Ollila
In case text/calendar content contained folded data (i.e. line
continues to next line which begins with whitespace...

or

The text/calendar content is inside separate (application/octet-stream)
content and the text/calendar entry there contains carriage returns...

... The parsing of text/calendar content failed so badly that in
addition to just not showing the calendar content the rest of content
handling of the thread aborted.

In this change the input calendar content is unfolded extending the
unfolding code used in `icalendar--get-unfolded-buffer` with single CRs
removal.
---
 emacs/notmuch-show.el |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 86130ce..2a07e28 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -750,6 +750,11 @@ message at DEPTH in the current thread.
(goto-char (point-min))
(let ((file (make-temp-file notmuch-ical))
  result)
+ ;; `icalendar--get-unfolded-buffer' unfolds with \r?\n[ \t].
+ ;; This unfolding extends that by removing other CRs too.
+ (while (re-search-forward \\(\r\\|\r?\n[ \t]\\) nil t)
+   (replace-match  nil nil))
+ (goto-char (point-min))
  (icalendar--convert-ical-to-diary
   (icalendar--read-element nil nil)
   file t)
-- 
1.7.1

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