all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daimrod <daimrod@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Ryan Yeske <rcyeske@gmail.com>, Leo Liu <sdl.web@gmail.com>,
	17772@debbugs.gnu.org
Subject: bug#17772: [PATCH] Dangling channels' buffer
Date: Sat, 14 Jun 2014 10:20:07 +0900	[thread overview]
Message-ID: <874mzob83c.fsf@tanger.home> (raw)
In-Reply-To: <878up0b8u3.fsf@tanger.home> (daimrod@gmail.com's message of "Sat, 14 Jun 2014 10:04:04 +0900")

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

Daimrod <daimrod@gmail.com> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> 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.

Here is a new patch with your proposal:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-net-rcirc.el-rcirc-buffer-process-Return-the-pr.patch --]
[-- Type: text/x-diff, Size: 1327 bytes --]

From af9d16684d8449cfb006f70c4c2c1fe228e737fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <gregoire.jadi@gmail.com>
Date: Sat, 14 Jun 2014 10:10:59 +0900
Subject: [PATCH] * lisp/net/rcirc.el (rcirc-buffer-process): Return the
 process   associated with the channel, or nil if it doesn't exit.

Since 2014-04-09, the current behavior was to raise an error if the
process didn't exist. This restore the previous behavior.
---
 lisp/net/rcirc.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 41cc002..73a6395 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -803,10 +803,10 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
   "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-process)))
+			       rcirc-server-buffer))))
+    (if buffer
+        (with-current-buffer buffer rcirc-process)
+      rcirc-process)))
 
 (defun rcirc-server-name (process)
   "Return PROCESS server name, given by the 001 response."
-- 
1.8.0.2722.gc0242e5


[-- Attachment #3: Type: text/plain, Size: 19 bytes --]



-- 
Daimrod/Greg

  reply	other threads:[~2014-06-14  1:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 10:41 bug#17772: [PATCH] Dangling channels' buffer Daimrod
2014-06-13 18:36 ` Stefan Monnier
2014-06-14  1:04   ` Daimrod
2014-06-14  1:20     ` Daimrod [this message]
2014-06-30  2:59       ` Leo Liu

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=874mzob83c.fsf@tanger.home \
    --to=daimrod@gmail.com \
    --cc=17772@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rcyeske@gmail.com \
    --cc=sdl.web@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.