Gnus development mailing list
 help / color / mirror / Atom feed
From: Lloyd Zusman <ljz@asfast.com>
Cc: Hrvoje Niksic <hniksic@srce.hr>
Subject: Re: *Group* buffer disaster fix
Date: 21 Oct 1998 13:06:46 -400	[thread overview]
Message-ID: <lt4ssxkfo9.fsf@asfast.com> (raw)
In-Reply-To: Hrvoje Niksic's message of "21 Oct 1998 18:40:29 +0200"

Hrvoje Niksic <hniksic@srce.hr> writes:

> [ ... ]

> > Why do we need to do a `kill-buffer' in this routine at all when
> > `(mapcar 'mm-destroy-part gnus-article-mime-handles)' is already
> > being done within `gnus-summary-exit' and `gnus-group-exit-hook'?
> 
> Because we want the "*mm*" buffer to go away as soon as we're done
> with it.  Also, the code killing the buffer was already there -- no
> `+' before it.  I only added the unwind-protect bit.

I know that you didn't add the `kill-buffer'.

I was wondering if the `mapcar' that gets invoked later might break
something, since the reference to the ` *mm*' buffer will be put into
the mime handle alist for future deletion, even though that buffer
gets killed here.

However, I just now figured out that this is probably not a problem,
since `mm-destroy-part' only does a `kill-buffer' if `buffer-live-p'
succeeds on the buffer referenced in this alist.  Hence, in this case,
we're safe to do the `kill-buffer' on the ` *mm*' buffer *and* to add
a reference to this killed buffer to the alist.

Now, as long as we're sure that no other code tries to do something to
this killed `* mm*' buffer in the alist prior to the `mapcar' call,
then we're OK.

-- 
 Lloyd Zusman
 ljz@asfast.com


  reply	other threads:[~1998-10-21 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-21 14:30 Hrvoje Niksic
1998-10-21 16:25 ` Lloyd Zusman
1998-10-21 16:40   ` Hrvoje Niksic
1998-10-21 17:06     ` Lloyd Zusman [this message]
1998-10-21 17:49       ` Hrvoje Niksic
1998-10-22  1:59       ` Lars Magne Ingebrigtsen
1998-10-22  3:14         ` Lloyd Zusman
1998-10-24  4:32           ` Lars Magne Ingebrigtsen
1998-10-22  1:56 ` Lars Magne Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=lt4ssxkfo9.fsf@asfast.com \
    --to=ljz@asfast.com \
    --cc=hniksic@srce.hr \
    /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.
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 NNTP newsgroup(s).