[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
running mm-destroy-parts when (mm-display-part handle) returns inline
From: |
Masatake YAMATO |
Subject: |
running mm-destroy-parts when (mm-display-part handle) returns inline |
Date: |
Fri, 12 Nov 2004 03:09:30 +0900 (JST) |
Dear Sir,
I'm trying url-mm-callback in the url package with
emacs-w3m web browser.
When (mm-display-part handle) returns inline, follwoing
code sequence are executed:
(display-buffer (current-buffer))
(mm-destroy-parts handle)
As the result, the user see nothing.
The inline handler renders the result on the (current-buffer).
The rendering result is destroyed by (mm-destroy-parts handle).
I don't know whether this is the special case of emacs-w3m or not.
However, the attached patch will fix my problem. I think the impact
of this patch is small; and the patch helps all inline handlers
which manages rendered items on the (current-buffer).
BTW, is there any document about the url package?
Regards,
Masatake YAMATO
2004-11-12 Masatake YAMATO <address@hidden>
* url.el (url-mm-callback): Call `mm-destroy-parts'
when the buffer is killed.
Index: lisp/url/url.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/url/url.el,v
retrieving revision 1.6
diff -u -r1.6 url.el
--- lisp/url/url.el 16 Oct 2004 15:02:46 -0000 1.6
+++ lisp/url/url.el 11 Nov 2004 18:05:40 -0000
@@ -207,7 +207,10 @@
(message "Viewing externally")
(kill-buffer (current-buffer)))
(display-buffer (current-buffer))
- (mm-destroy-parts handle)))))
+ (add-hook 'kill-buffer-hook
+ `(lambda () (mm-destroy-parts ',handle))
+ nil
+ t)))))
(defun url-mm-url (url)
"Retrieve URL and pass to the appropriate viewing application."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- running mm-destroy-parts when (mm-display-part handle) returns inline,
Masatake YAMATO <=