unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Masatake YAMATO <jet@gyve.org>
Cc: emacs-devel@gnu.org
Subject: running mm-destroy-parts when (mm-display-part handle) returns inline
Date: Fri, 12 Nov 2004 03:09:30 +0900 (JST)	[thread overview]
Message-ID: <20041112.030930.112599232.jet@gyve.org> (raw)
In-Reply-To: <20041027.141808.202854715.jet@gyve.org>

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  <jet@gyve.org>

	* 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."

      parent reply	other threads:[~2004-11-11 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27  5:18 type of port of url Masatake YAMATO
2004-10-28  6:25 ` Richard Stallman
2004-11-01 17:40   ` Masatake YAMATO
2004-11-11 18:09 ` Masatake YAMATO [this message]

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20041112.030930.112599232.jet@gyve.org \
    --to=jet@gyve.org \
    --cc=emacs-devel@gnu.org \
    /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://git.savannah.gnu.org/cgit/emacs.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).