unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1251: 23.0.60; `process-status' does not work with buffer names
@ 2008-10-25 17:14 ` Markus Triska
  2008-10-25 19:11   ` Stefan Monnier
  2008-10-28 20:25   ` bug#1251: marked as done (23.0.60; `process-status' does not work with buffer names) Emacs bug Tracking System
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Triska @ 2008-10-25 17:14 UTC (permalink / raw)
  To: emacs-pretest-bug


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@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






^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#1251: 23.0.60; `process-status' does not work with buffer names
  2008-10-25 17:14 ` bug#1251: 23.0.60; `process-status' does not work with buffer names Markus Triska
@ 2008-10-25 19:11   ` Stefan Monnier
  2008-10-28 20:25   ` bug#1251: marked as done (23.0.60; `process-status' does not work with buffer names) Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2008-10-25 19:11 UTC (permalink / raw)
  To: Markus Triska; +Cc: emacs-pretest-bug, 1251

> 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.


        Stefan






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1251: marked as done (23.0.60; `process-status' does not work with buffer names)
  2008-10-25 17:14 ` bug#1251: 23.0.60; `process-status' does not work with buffer names Markus Triska
  2008-10-25 19:11   ` Stefan Monnier
@ 2008-10-28 20:25   ` Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2008-10-28 20:25 UTC (permalink / raw)
  To: Chong Yidong

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


Your message dated Tue, 28 Oct 2008 16:17:43 -0400
with message-id <877i7siie0.fsf@cyd.mit.edu>
and subject line Re: 23.0.60; `process-status' does not work with buffer names
has caused the Emacs bug report #1251,
regarding 23.0.60; `process-status' does not work with buffer names
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1251: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1251
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4029 bytes --]

From: Markus Triska <markus.triska@gmx.at>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.60; `process-status' does not work with buffer names
Date: Sat, 25 Oct 2008 19:14:16 +0200 (CEST)
Message-ID: <20081025171416.86510B45CE5@mt-computer.local>


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@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



[-- Attachment #3: Type: message/rfc822, Size: 1388 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: Markus Triska <markus.triska@gmx.at>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 1251-done@emacsbugs.donarmstrong.com
Subject: Re: 23.0.60; `process-status' does not work with buffer names
Date: Tue, 28 Oct 2008 16:17:43 -0400
Message-ID: <877i7siie0.fsf@cyd.mit.edu>

> > 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.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-28 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <877i7siie0.fsf@cyd.mit.edu>
2008-10-25 17:14 ` bug#1251: 23.0.60; `process-status' does not work with buffer names Markus Triska
2008-10-25 19:11   ` Stefan Monnier
2008-10-28 20:25   ` bug#1251: marked as done (23.0.60; `process-status' does not work with buffer names) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).