From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Howard Newsgroups: gmane.emacs.help Subject: Process filters =?utf-8?Q?=E2=80=94?= line at a time? Date: Wed, 28 Aug 2024 14:53:07 -0800 Message-ID: <87frqomf8s.fsf@librehacker.com> 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="5208"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Mailing List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 29 00:54:00 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1sjRY7-0001Bn-8b for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 29 Aug 2024 00:53:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjRXW-0000M8-Kv; Wed, 28 Aug 2024 18:53:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjRXU-0000Lz-G2 for help-gnu-emacs@gnu.org; Wed, 28 Aug 2024 18:53:20 -0400 Original-Received: from mx.kolabnow.com ([212.103.80.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sjRXQ-0005a9-5v for help-gnu-emacs@gnu.org; Wed, 28 Aug 2024 18:53:20 -0400 Original-Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 6F2A1F2E2F for ; Thu, 29 Aug 2024 00:53:14 +0200 (CEST) Authentication-Results: ext-mx-out013.mykolab.com (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20240523; t=1724885591; x=1726699992; bh=pCKj4ZhNPXtVKm0rssfySHGZ7XptwActXkslz5O9dQo=; b=lX06rxCkfmVh ofuqeK4vyZPDEorHYdwB006wHBXCuNDunCllJlTQs6+zgtCru3WVeEwoGHUB+vve lWs1htQPh8WNRXE9rospdKp7D+fMvgWomS8ACasXg0LRH0m+uwi/7OIiR22yw7/L azW4HcAsxOzLkqiCfjRb5AULYmMr6zh88fNcj012Ad4YN5hvjhMLH4OE7cHpvhhj 72USCZXmlf+n30ydlSBQeWCCNkjlj3x4ARTnOYip45yhv418hYH8Gw9Mpr0Xqt+I PfXkhr0rOBE61Xi3DJTUEYnICp1YrSA0RZVHMbXoiLHM+HcSSujeu3pmef1IcGzd i/rWdnr2Dg== X-Virus-Scanned: amavis at mykolab.com Original-Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out013.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id aYWikL0ABlwh for ; Thu, 29 Aug 2024 00:53:11 +0200 (CEST) Original-Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id 7DA0CF2E2E for ; Thu, 29 Aug 2024 00:53:10 +0200 (CEST) Original-Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id BAF4820CCEDA for ; Thu, 29 Aug 2024 00:53:10 +0200 (CEST) Received-SPF: none client-ip=212.103.80.155; envelope-from=christopher@librehacker.com; helo=mx.kolabnow.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147841 Archived-At: Hi, I maintain a legacy system that communicates over a 9600 7E1 RS-232 con= nection. I want to use Emacs to automate some things that normally involvin= g hours of sitting in front of the terminal and a lot of keystrokes. Curren= tly 29.4 is installed on the computer attached to the serial port. I've made a good start using serial-term and serial-process-configure to se= tup my terminal, with the idea of using process-send-string to send command= s, and a process filter to analyze the output. However, I need to analyze t= he output a line a time, to know what commands to send, and my understandin= g is that process filters do not necessarily give you a whole line at a tim= e. I was wondering if there was some Emacs abstraction or approach that mig= ht be helpful here, so that I could focusing on matching lines of data, wit= hout getting all caught up in the intricacies of buffering and character pr= ocessing. Or maybe some way to configure the process so that the process fi= lter always delivers a line at a time. --=20 =F0=9F=93=9B Christopher Howard =F0=9F=9A=80 gemini://gem.librehacker.com =F0=9F=8C=90 http://gem.librehacker.com =D7=91=D7=A8=D7=90=D7=A9=D7=99=D7=AA =D7=91=D7=A8=D7=90 =D7=90=D7=9C=D7=94= =D7=99=D7=9D =D7=90=D7=AA =D7=94=D7=A9=D7=9E=D7=99=D7=9D =D7=95=D7=90=D7=AA= =D7=94=D7=90=D7=A8=D7=A5