From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daimrod Newsgroups: gmane.emacs.bugs Subject: bug#17772: [PATCH] Dangling channels' buffer Date: Sat, 14 Jun 2014 10:04:04 +0900 Message-ID: <878up0b8u3.fsf@tanger.home> References: <87k38lay6k.fsf@tanger.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402707929 16289 80.91.229.3 (14 Jun 2014 01:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Jun 2014 01:05:29 +0000 (UTC) Cc: Ryan Yeske , Leo Liu , 17772@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 14 03:05:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WvcPG-0007uX-C9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Jun 2014 03:05:18 +0200 Original-Received: from localhost ([::1]:33803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvcPF-0001Gp-TI for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jun 2014 21:05:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvcP6-0001CR-Uf for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 21:05:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvcP1-0006I4-1u for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 21:05:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvcP0-0006Hg-Vj for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 21:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WvcP0-0006rk-JH for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 21:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daimrod Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Jun 2014 01:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17772-submit@debbugs.gnu.org id=B17772.140270785826310 (code B ref 17772); Sat, 14 Jun 2014 01:05:02 +0000 Original-Received: (at 17772) by debbugs.gnu.org; 14 Jun 2014 01:04:18 +0000 Original-Received: from localhost ([127.0.0.1]:47072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WvcOH-0006qI-Pu for submit@debbugs.gnu.org; Fri, 13 Jun 2014 21:04:18 -0400 Original-Received: from mail-pd0-f181.google.com ([209.85.192.181]:65318) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WvcOF-0006pv-Cv for 17772@debbugs.gnu.org; Fri, 13 Jun 2014 21:04:16 -0400 Original-Received: by mail-pd0-f181.google.com with SMTP id v10so1717630pde.26 for <17772@debbugs.gnu.org>; Fri, 13 Jun 2014 18:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=uIm3Ees+INYVLM9i3aHGIDwvq2xB6/97aSXffvLpADU=; b=KKIrAGK5UCQe2er/nJIY/h/xmevZmvJpF9TXdRki0e9cjc6JmXl+B/8rRmS6kNvBhh 1aTV9LuUUGAWw2bJepOATfMhBOJNaVQ4MZywbB3GnvfR7FTe04SeNRhRtm5bT/O2O5xf K/SJMNtIlILBM5QjQcQwV5cvKuTZytvB9muOIDPp6dQ0RdsvjEGFPnB1zGUw5Lt7SxsM x2rfrXjeodhka2tlJhKZ0V8fyf1bcA/Yq3fNgmmYm4MTjHs8hbYBugLdn3eUt4tdWIRp BZzMs1iqIXwT1+tIj8To0Y9d2C3D8lt8y7xS+nMeUD/hr1/WmUqiifIn8BeDVAjQ3FJ6 Q3xA== X-Received: by 10.68.173.1 with SMTP id bg1mr7128480pbc.13.1402707849229; Fri, 13 Jun 2014 18:04:09 -0700 (PDT) Original-Received: from localhost (i118-21-141-133.s30.a048.ap.plala.or.jp. [118.21.141.133]) by mx.google.com with ESMTPSA id kn1sm5819947pbd.13.2014.06.13.18.04.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jun 2014 18:04:08 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 13 Jun 2014 14:36:16 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90363 Archived-At: Stefan Monnier writes: >> server process when it existed, or nil. However, since a78d87e7ed it >> raises an error. > > Please avoid using Git references until we actually switch to Git. > Use dates, for example, instead. Ok, I'll keep this in mind. >> This is a problem if the user kills the server buffer before it kills >> the channels' buffer because it is not possible to kill them after that. >> (The function `rcirc-clean-up-buffer' is called via `kill-buffer-hook' >> and it calls `rcirc-buffer-process'.) > > Your patch doesn't look bad, but I wonder if a better option wouldn't be > to try and better preserve the previous behavior. E.g. with the > patch below. > > WDYT? Fine for me, but you don't need the `or'. > === modified file 'lisp/net/rcirc.el' > --- lisp/net/rcirc.el 2014-05-12 16:06:13 +0000 > +++ lisp/net/rcirc.el 2014-06-13 18:34:01 +0000 > @@ -803,9 +804,8 @@ > "Return the process associated with channel BUFFER. > With no argument or nil as argument, use the current buffer." > (let ((buffer (or buffer (if (buffer-live-p rcirc-server-buffer) > - rcirc-server-buffer > - (error "Server buffer deleted"))))) > - (or (with-current-buffer buffer rcirc-process) > + rcirc-server-buffer)))) + (if buffer + (with-current-buffer buffer rcirc-process) + rcirc-process))) > + (or (if buffer (with-current-buffer buffer rcirc-process)) > rcirc-process))) > > (defun rcirc-server-name (process) > -- Daimrod/Greg