From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Devon Sean McCullough Newsgroups: gmane.emacs.bugs Subject: bug#4542: doc bug in lisp/comint.el Date: Wed, 23 Sep 2009 19:47:23 -0700 (PDT) Message-ID: <200909240247.n8O2lNGq046509@jovi.net> Reply-To: Devon Sean McCullough , 4542@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1253765112 24378 80.91.229.12 (24 Sep 2009 04:05:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2009 04:05:12 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 24 06:05:04 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MqfZn-0003oz-Lo for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Sep 2009 06:05:04 +0200 Original-Received: from localhost ([127.0.0.1]:45388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqfZm-0000Wa-RF for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Sep 2009 00:05:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mqez9-00056M-7I for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:27:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mqez4-000562-NA for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:27:10 -0400 Original-Received: from [199.232.76.173] (port=39713 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mqez4-00055x-ID for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:27:06 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:36760) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mqez3-0007NZ-Se for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:27:06 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8O3R3DH021278; Wed, 23 Sep 2009 20:27:03 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8O3P5jC020934; Wed, 23 Sep 2009 20:25:05 -0700 Resent-Date: Wed, 23 Sep 2009 20:25:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Devon Sean McCullough Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 24 Sep 2009 03:25:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4542 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125376219019690 (code B ref -1); Thu, 24 Sep 2009 03:25:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 24 Sep 2009 03:16:30 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8O3GSUb019687 for ; Wed, 23 Sep 2009 20:16:30 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mqeom-0002H5-Dw for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:16:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mqeoi-0002GV-UL for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:16:28 -0400 Original-Received: from [199.232.76.173] (port=59367 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mqeoi-0002GS-Pn for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:16:24 -0400 Original-Received: from jovi.net ([66.161.136.54]:1290) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mqeoh-0005CL-1o for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 23:16:24 -0400 Original-Received: from jovi.net (localhost [127.0.0.1]) by jovi.net (8.14.1/8.14.1) with ESMTP id n8O2loj5046527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Sep 2009 22:47:50 -0400 (EDT) (envelope-from Devon@Jovi.Net) Original-Received: (from devon@localhost) by jovi.net (8.14.1/8.14.1/Submit) id n8O2lNGq046509; Wed, 23 Sep 2009 19:47:23 -0700 (PDT) (envelope-from Devon@Jovi.Net) X-Authentication-Warning: jovi.net: devon set sender to Devon@Jovi.Net using -f Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; envelope-from= Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; helo= X-DCC-dcc.uncw.edu-Metrics: grant.org 1201; Body=2 Fuz1=2 Fuz2=2 X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 23 Sep 2009 23:27:10 -0400 X-Mailman-Approved-At: Thu, 24 Sep 2009 00:04:58 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31433 Archived-At: Three lines in comint.el read like a hilarious game of "telephone" ... STARTFILE is the name of a file to send the contents of to the process. STARTFILE is the name of a file to send the contents of the process to. Runs the given COMMAND with SWITCHES with output to STARTFILE. ... going from confusing to incoherent to false. Patch follows. Peace --Devon /~\ \ / Health Care X not warfare / \ --- comint.el.~1.392.~ 2009-08-30 15:24:05.000000000 -0700 +++ comint.el 2009-09-23 18:01:50.000000000 -0700 @@ -686,7 +686,7 @@ via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP connection to be opened via `open-network-stream'. If there is already a running process in that buffer, it is not restarted. Optional fourth arg -STARTFILE is the name of a file to send the contents of to the process. +STARTFILE names a file of initial input to send to the process. If PROGRAM is a string, any more args are arguments to PROGRAM." (or (fboundp 'start-file-process) @@ -709,7 +709,7 @@ via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP connection to be opened via `open-network-stream'. If there is already a running process in that buffer, it is not restarted. Optional third arg -STARTFILE is the name of a file to send the contents of the process to. +STARTFILE names a file of initial input to send to the process. If PROGRAM is a string, any more args are arguments to PROGRAM." (apply #'make-comint-in-buffer name nil program startfile switches)) @@ -728,7 +728,7 @@ (defun comint-exec (buffer name command startfile switches) "Start up a process named NAME in buffer BUFFER for Comint modes. -Runs the given COMMAND with SWITCHES with output to STARTFILE. +Runs the given COMMAND with SWITCHES and initial input from STARTFILE. Blasts any old process running in the buffer. Doesn't set the buffer mode. You can use this to cheaply run a series of processes in the same Comint buffer. The hook `comint-exec-hook' is run after each exec." @@ -746,7 +746,7 @@ ;; Jump to the end, and set the process mark. (goto-char (point-max)) (set-marker (process-mark proc) (point)) - ;; Feed it the startfile. + ;; First feed it from startfile. (cond (startfile ;;This is guaranteed to wait long enough ;;but has bad results if the comint does not prompt at all