From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18006 Path: main.gmane.org!not-for-mail From: Hrvoje Niksic Newsgroups: gmane.emacs.gnus.general Subject: Re: I fixed it, but I need Lars ... (Was: *Group* buffer disappearance) Date: 21 Oct 1998 14:40:08 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035156606 3870 80.91.224.250 (20 Oct 2002 23:30:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:30:06 +0000 (UTC) Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id IAA21425 for ; Wed, 21 Oct 1998 08:42:16 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id HAB15643; Wed, 21 Oct 1998 07:41:45 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 21 Oct 1998 07:41:45 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id HAA22328 for ; Wed, 21 Oct 1998 07:41:24 -0500 (CDT) Original-Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id IAA21359 for ; Wed, 21 Oct 1998 08:40:51 -0400 (EDT) Original-Received: (from hniksic@localhost) by jagor.srce.hr (8.9.0/8.9.0) id OAA00149; Wed, 21 Oct 1998 14:40:09 +0200 (MET DST) Original-To: ding@gnus.org X-Attribution: Hrvoje X-Face: &{dT~)Pu6V<0y?>3p$;@vh\`C7xB~A0T-J%Og)J,@-1%q6Q+, gs<-9M#&`I8cJp2b1{vPE|~+JE+gx;a7%BG{}nY^ehK1"q#rG O,Rn1A_Cy%t]V=Brv7h writes: > Note that the problem had to do with the `(current-buffer)' call > immediately following `(funcall method)'. When the method is > `mailcap-save-binary-file', this method causes the current buffer to > change (see below for a listing of `mailcap-save-binary-file'). > Therefore, we need to use `cur' here instead of `(current-buffer)', > just like in the rest of this routine (`mm-display-external'). Killing `cur' doesn't look right. The buffer you really want to kill is the "*mm*" buffer, not the current buffer before that. How about this: --- mm-decode.el.orig Wed Oct 21 14:32:26 1998 +++ mm-decode.el Wed Oct 21 14:35:45 1998 @@ -220,8 +220,10 @@ (buffer-disable-undo) (mm-set-buffer-file-coding-system 'no-conversion) (insert-buffer-substring cur) - (funcall method) - (mm-handle-set-undisplayer handle (current-buffer))) + (let ((mm (current-buffer))) + (unwind-protect + (funcall method) + (mm-handle-set-undisplayer handle mm)))) (let* ((dir (make-temp-name (expand-file-name "emm." mm-tmp-directory))) (filename (mail-content-type-get (mm-handle-disposition handle) 'filename)) I used `unwind-protect' so that if a signal occurs during the method, the undisplayer still gets set. (What I don't understand is why the undisplayer method still doesn't get *called* when I press C-g.) > Note that the final line of this routine kills the current buffer, > However, when this routine is being called from within > `mm-display-external', the current buffer is one of the ` *mm*' > buffers. Do we really want this ` *mm*' buffer to be killed as part > of the routine which saves the binary file? Yes. The *mm* buffer is temporary stuff used for decoding MIME. We don't want buffers with random binary contents to stick around, I think. -- Hrvoje Niksic | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- "Psychos _do not_ explode when sunlight hits them."