[PATCH v2 2/2] emacs: support text/calendar mime type

Jani Nikula jani at nikula.org
Mon Feb 20 23:52:54 PST 2012


On Thu,  9 Feb 2012 14:46:03 +0000, Jani Nikula <jani at nikula.org> wrote:
> Replace text/x-vcalendar with text/calendar, while maintaining support
> and backwards compatibility for text/x-vcalendar.

David (B, not E), while 1/2 needs work, this 2/2 is independent and IMHO
could go in.

BR,
Jani.


> 
> Code by David Edmondson <dme at dme.org>
> ---
>  emacs/notmuch-show.el |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 5f643f1..33a4f18 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -711,7 +711,7 @@ current buffer, if possible."
>  	(run-hook-with-args 'notmuch-show-insert-text/plain-hook msg depth))))
>    t)
>  
> -(defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth declared-type)
> +(defun notmuch-show-insert-part-text/calendar (msg part content-type nth depth declared-type)
>    (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename))
>    (insert (with-temp-buffer
>  	    (insert (notmuch-show-get-bodypart-content msg part nth))
> @@ -729,6 +729,10 @@ current buffer, if possible."
>  	      result)))
>    t)
>  
> +;; For backwards compatibility.
> +(defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth declared-type)
> +  (notmuch-show-insert-part-text/calendar msg part content-type nth depth declared-type))
> +
>  (defun notmuch-show-insert-part-application/octet-stream (msg part content-type nth depth declared-type)
>    ;; If we can deduce a MIME type from the filename of the attachment,
>    ;; do so and pass it on to the handler for that type.
> -- 
> 1.7.1
> 


More information about the notmuch mailing list