GNU bug report logs - #1251
23.0.60; `process-status' does not work with buffer names

Previous Next

Package: emacs;

Reported by: Markus Triska <markus.triska <at> gmx.at>

Date: Sat, 25 Oct 2008 17:20:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Markus Triska <markus.triska <at> gmx.at>
Subject: bug#1251 closed by Chong Yidong <cyd <at> stupidchicken.com> (Re: 
 23.0.60; `process-status' does not work with buffer names)
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1251: 23.0.60; `process-status' does not work with buffer names

It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.


-- 
1251: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1251
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: Markus Triska <markus.triska <at> gmx.at>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,
        1251-done <at> debbugs.gnu.org
Subject: Re: 23.0.60; `process-status' does not work with buffer names
Date: Tue, 28 Oct 2008 16:17:43 -0400
> > Contrary to what its info entry says, process-status does not work if
> > its argument is a buffer name; in emacs -Q, evaluating the form:
>
> I think we should fix the info entry, rather than the code.

Yes, we can't accept buffer names in process-status because it already
treats strings as process names.

I've updated the lisp manual.  Thanks for spotting this.

[Message part 3 (message/rfc822, inline)]
From: Markus Triska <markus.triska <at> gmx.at>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; `process-status' does not work with buffer names
Date: Sat, 25 Oct 2008 19:14:16 +0200 (CEST)
Contrary to what its info entry says, process-status does not work if
its argument is a buffer name; in emacs -Q, evaluating the form:

   (let* ((buffer "bc-buf")
          (bc (start-process "bc" buffer "/usr/bin/bc")))
     (mapcar 'process-status (list buffer (get-buffer buffer))))

yields:

     (nil run)

The following patch fixes this problem for me:

2008-10-25  Markus Triska  <markus.triska <at> gmx.at>

	* process.c (Fprocess_status): Accept buffer names.
	Update docstring to match info description.

diff --git a/src/process.c b/src/process.c
index b8e390e..4a238f7 100644
--- a/src/process.c
+++ b/src/process.c
@@ -828,18 +828,15 @@ closed -- for a network stream connection that is closed.
 connect -- when waiting for a non-blocking connection to complete.
 failed -- when a non-blocking connection has failed.
 nil -- if arg is a process name and no such process exists.
-PROCESS may be a process, a buffer, the name of a process, or
-nil, indicating the current buffer's process.  */)
+PROCESS may be a process, a buffer, a process name, a buffer name, or
+nil, indicating the current buffer's process. */)
      (process)
      register Lisp_Object process;
 {
   register struct Lisp_Process *p;
   register Lisp_Object status;
 
-  if (STRINGP (process))
-    process = Fget_process (process);
-  else
-    process = get_process (process);
+  process = get_process (process);
 
   if (NILP (process))
     return process;


In GNU Emacs 23.0.60.14 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
 of 2008-10-25 on mt-computer.local
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t



This bug report was last modified 16 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.