From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Newsgroups: gmane.emacs.devel Subject: Re: comint-output-filter-functions and multi-line input Date: Wed, 19 Oct 2022 01:22:54 +0200 Message-ID: References: <87y1tgqhmc.fsf@localhost> <87k04xfz7f.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5170"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ihor Radchenko , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 19 01:24:42 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okvww-000191-5d for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Oct 2022 01:24:42 +0200 Original-Received: from localhost ([::1]:60926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okvwu-0006G1-UY for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Oct 2022 19:24:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okvvO-0005Tp-Ff for emacs-devel@gnu.org; Tue, 18 Oct 2022 19:23:06 -0400 Original-Received: from mr85p00im-zteg06022001.me.com ([17.58.23.193]:47856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okvvJ-0006eY-GS for emacs-devel@gnu.org; Tue, 18 Oct 2022 19:23:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1666135378; bh=GjNABtbT1fyFftWQsUJLw/4EseG2kvrcu9rtjEfxxes=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=oznO3/k1CXleOEmHwiQQ2FemA4wN92ZrNKteDGhvYnOQhn8NInHe+OLa6RhRhS0Te ho6ODuNQiruINGVe/ytZ0vO86eb+Lmaxhz8lOW2EiNVbW5jALCBQB1u3n7pTkIOS+W l/OVHkhHFxl9g7awNgI3EOXqIGhFADhc3jfYnkOybdy2aHJCwxejQUoz7H7ZZftAHK NqZE/IIkHXG8S1oJUjaWYLK6ilA8UUeTuCDIFQowkaQNDDFSk5qzZqys0mr7XcwCAp D0+6zL7a87a0bnlYKAyvBkx7dIyBFy5pnMcNhjM+PPNUXjua3sjVfyoi16/TuUjSZR 9D0bTJPZt78cw== Original-Received: from Rudolfs-MacBook-Air.local (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-zteg06022001.me.com (Postfix) with ESMTPSA id 6D2CD800B35; Tue, 18 Oct 2022 23:22:57 +0000 (UTC) In-Reply-To: <87k04xfz7f.fsf@localhost> X-Proofpoint-ORIG-GUID: uBgZPNJCgNtJ02_PLpM-7aLMHWa3ueDP X-Proofpoint-GUID: uBgZPNJCgNtJ02_PLpM-7aLMHWa3ueDP X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.816,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2022-01-18=5F01:2022-01-14=5F01,2022-01-18=5F01,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 clxscore=1031 suspectscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210180132 Received-SPF: pass client-ip=17.58.23.193; envelope-from=salutis@me.com; helo=mr85p00im-zteg06022001.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:298092 Archived-At: Ihor Radchenko writes: > #+RESULTS: > : > > > hello > ^ ^ ^ > excessive empty output lines [...] Given ... #### (comint-run "/bin/bash") ... the following ... #### (with-current-buffer "*bash*" #### (insert "if true #### then #### echo hello #### fi") #### (comint-send-input)) ... outputs ... #### $ if true #### then #### echo hello #### fi #### > > > hello Not good. Similarly, ... #### (with-current-buffer "*bash*" #### (dolist (line (list "if true" #### "then" #### "echo hello" #### "fi")) #### (insert line) #### (comint-send-input))) ... also gives the same output. (I took this as a minimal working bug reproducer). After investigating, I found that ... #### (with-current-buffer "*bash*" #### (let ((comint-process-echoes t)) #### (dolist (line (list "if true" #### "then" #### "echo hello" #### "fi")) #### (insert line) #### (comint-send-input)))) ... outputs (perhaps the desired) ... $ if true > then > echo hello > fi hello Would this help? Rudy --=20 "Logic is a science of the necessary laws of thought, without which no employment of the understanding and the reason takes place." -- Immanuel Kant, 1785 Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25 84103 Bratislava Slovakia