all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Markus Triska <markus.triska@gmx.at>
To: emacs-pretest-bug@gnu.org
Subject: bug#1251: 23.0.60; `process-status' does not work with buffer names
Date: Sat, 25 Oct 2008 19:14:16 +0200 (CEST)	[thread overview]
Message-ID: <20081025171416.86510B45CE5@mt-computer.local> (raw)


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






             reply	other threads:[~2008-10-25 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <877i7siie0.fsf@cyd.mit.edu>
2008-10-25 17:14 ` Markus Triska [this message]
2008-10-25 19:11   ` bug#1251: 23.0.60; `process-status' does not work with buffer names 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

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=20081025171416.86510B45CE5@mt-computer.local \
    --to=markus.triska@gmx.at \
    --cc=1251@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /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.