unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Aaron Ecay <aaronecay@gmail.com>,
	Robert Horn <rjhorn@alum.mit.edu>,
	notmuch@notmuchmail.org
Subject: Re: bug related to ical
Date: Wed, 26 Sep 2012 09:57:57 +0300	[thread overview]
Message-ID: <m2r4ppfeyy.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87d319b899.fsf@gmail.com>

On Wed, Sep 26 2012, Aaron Ecay wrote:

> The problem is in the ‘notmuch-show-insert-part-text/calendar’
> function.  The call to ‘icalendar--convert-ical-to-diary’ does not
> create a buffer visiting the temp file, so the call to ‘set-buffer’
> fails.  The following patch fixes the problem.
>
> The ical->diary conversion also doesn’t seem to work – the calendar
> attachment shows up as an empty part – but I guess that’s a separate
> issue (and not addressed by the patch).
>
> I guess that part insertion handlers should be called inside a
> ‘condition-case’, so that an error inside of one can be recovered from,
> and doesn’t entirely derail the insertion of the messages in the buffer.
> (I actually made this patch because I was so annoyed that Olivier’s
> buggy test attachment made it impossible for me to read Tomi’s reply.)

My reply was:

--8<----8<----8<----8<----8<----8<----8<----8<----8<--
   Hi

   I am "top-posting" as the content is not from Olivier's mail
   id:"87d31artti.fsf@inf-8657.int-evry.fr" but from my email
   id:"m2ipb2tjl8.fsf@guru.guru-group.fi"...

   For some reason notmuch emacs client references to my email instead
   of Olivier's when pressing 'V', any of the stash commands, reply or
   so on. Maybe that has something to do accessing the ical content
   (i.e. emacs client access the ical part from wrong message).

   Do others experience the same behaviour ?

   Tomi
--8<----8<----8<----8<----8<----8<----8<----8<----8<--

When I hand-applied Aaron's patch and re-evaluated 
(defun notmuch-show-insert-part-text/calendar ...) and reopened
this thread those things I mentioned above started to work OK :)

Aaron: could you provide the patch in format suitable for git-am
so it could be easily applied (and hopefully quickly, provided
that we get reviewers to look at it immediately :)

Tomi

>
> ----- cut here -----
>
> diff --git i/emacs/notmuch-show.el w/emacs/notmuch-show.el
> index ce5ea6f..4c89d7e 100644
> --- i/emacs/notmuch-show.el
> +++ w/emacs/notmuch-show.el
> @@ -746,7 +746,7 @@ message at DEPTH in the current thread."
>  	      (icalendar--convert-ical-to-diary
>  	       (icalendar--read-element nil nil)
>  	       file t)
> -	      (set-buffer (get-file-buffer file))
> +	      (set-buffer (find-file-noselect file))
>  	      (setq result (buffer-substring (point-min) (point-max)))
>  	      (set-buffer-modified-p nil)
>  	      (kill-buffer (current-buffer))
>
> ----- cut here -----
>
> -- 
> Aaron Ecay
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

  reply	other threads:[~2012-09-26  6:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 17:47 bug related to ical Robert Horn
2012-09-25 10:52 ` Olivier Berger
2012-09-25 11:42   ` Tomi Ollila
2012-09-25 15:44     ` Olivier Berger
2012-09-26  5:53       ` Tomi Ollila
2012-09-26  6:36 ` Aaron Ecay
2012-09-26  6:57   ` Tomi Ollila [this message]
2012-10-03 13:30   ` Tomi Ollila
2012-10-03 14:06     ` Tomi Ollila
2012-10-21  7:03       ` Olivier Berger
2012-10-28 15:02         ` Olivier Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r4ppfeyy.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=aaronecay@gmail.com \
    --cc=notmuch@notmuchmail.org \
    --cc=rjhorn@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).