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: Fri, 13 Jun 2014 19:41:55 +0900 Message-ID: <87k38lay6k.fsf@tanger.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1402656199 25462 80.91.229.3 (13 Jun 2014 10:43:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Jun 2014 10:43:19 +0000 (UTC) To: 17772@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 13 12:43:12 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 1WvOwv-0007k7-Pg for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jun 2014 12:43:10 +0200 Original-Received: from localhost ([::1]:57985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvOwv-0006Ni-Dl for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jun 2014 06:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvOwq-0006Nb-1G for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 06:43:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvOwo-0005qd-VU for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 06:43:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvOwo-0005qV-Rd for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 06:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WvOwo-0003AE-7t for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 06:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daimrod Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jun 2014 10:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140265614312090 (code B ref -1); Fri, 13 Jun 2014 10:43:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jun 2014 10:42:23 +0000 Original-Received: from localhost ([127.0.0.1]:46224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WvOwA-00038u-3M for submit@debbugs.gnu.org; Fri, 13 Jun 2014 06:42:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57865) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WvOw5-00038U-3i for submit@debbugs.gnu.org; Fri, 13 Jun 2014 06:42:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvOvy-00057k-Ru for submit@debbugs.gnu.org; Fri, 13 Jun 2014 06:42:11 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvOvy-00057d-PR for submit@debbugs.gnu.org; Fri, 13 Jun 2014 06:42:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvOvx-0006LB-SD for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 06:42:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvOvx-00056u-0c for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 06:42:09 -0400 Original-Received: from mail-pb0-x234.google.com ([2607:f8b0:400e:c01::234]:45575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvOvw-00056U-On for bug-gnu-emacs@gnu.org; Fri, 13 Jun 2014 06:42:08 -0400 Original-Received: by mail-pb0-f52.google.com with SMTP id rr13so2050749pbb.25 for ; Fri, 13 Jun 2014 03:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=UejLSBeXJcyAbVhd5wyGY0LLG0PkYqq2wRhRW9DGVlE=; b=txrpjvbP6pMa3aV5YqDixi3SK7mksClTCvtahsqMJaLKn2sdZ8jPkcPJxj1P8A5UCJ gg83OCbdLktDwtEXfpU0uTbtPcdU9EajTISWtLGTlU2KkoS0RWmndvlqAXcy3JgWCDUh y0eY13l1RnlFhWTGcge41IlPOAOlJP1hb47pbb2G9sUAFQ9gjMv7OsQFgvj8wpA/l4sK WwOjRdM83+rg46rcQz46FiBHrhxBWh30eGp9TFnM4jPxvW0pn2Uz/ATVsdGG35mRuoY+ JpeQRVo5IEbBtrl7ZloGHv/vGic0RIpd/AmMmNCzQVAmrzP7YIokKe8zQ3+8oxr7tEf7 s0hw== X-Received: by 10.66.190.167 with SMTP id gr7mr2072499pac.75.1402656127307; Fri, 13 Jun 2014 03:42:07 -0700 (PDT) Original-Received: from localhost ([2001:2f8:200:1:e206:e6ff:fecb:5a]) by mx.google.com with ESMTPSA id yv7sm19498744pac.33.2014.06.13.03.42.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jun 2014 03:42:06 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:90319 Archived-At: --=-=-= Content-Type: text/plain Hi, In the attached patch, I propose a fix for the recent change of the function `rcirc-buffer-process'. This function used to return the rcirc server process when it existed, or nil. However, since a78d87e7ed it raises an error. 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'.) WDYT? Regards, --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-net-rcirc.el-rcirc-clean-up-buffer-Explicitly-c.patch >From 2ce0be284dc8830c3153d60cb0b01e082ab1c5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= Date: Fri, 13 Jun 2014 18:31:31 +0900 Subject: [PATCH] * lisp/net/rcirc.el (rcirc-clean-up-buffer): Explicitly check for the `rcirc-server-buffer' Since a78d87e7ed, `rcirc-buffer-process' raises an error instead of returning nil when the `rcirc-server-buffer' doesn't exist. Because of this, it was impossible to delete channels' buffer once the `rcirc-server-buffer' has been deleted. --- lisp/net/rcirc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 41cc002..57a90de 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1158,7 +1158,7 @@ with it." (defun rcirc-clean-up-buffer (reason) (let ((buffer (current-buffer))) (rcirc-clear-activity buffer) - (when (and (rcirc-buffer-process) + (when (and (buffer-live-p rcirc-server-buffer) (rcirc--connection-open-p (rcirc-buffer-process))) (with-rcirc-server-buffer (setq rcirc-buffer-alist -- 1.8.0.2722.gc0242e5 --=-=-= Content-Type: text/plain -- Daimrod/Greg --=-=-=--