From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 951 invoked from network); 20 Jan 2023 05:26:20 -0000 Received: from tb-ob21.topicbox.com (173.228.157.67) by inbox.vuxu.org with ESMTPUTF8; 20 Jan 2023 05:26:20 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob21.topicbox.com (Postfix) with ESMTP id 8CF4220738 for ; Fri, 20 Jan 2023 00:26:18 -0500 (EST) (envelope-from bounce.mMab8c70f37dc76a709197b202.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 4CE83BB1233; Fri, 20 Jan 2023 00:26:18 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=benghancock.com header.i=@benghancock.com header.b=aN0W9i4V header.a=rsa-sha256 header.s=fm2 x-bits=2048; dkim=pass (2048-bit rsa key sha256) header.d=messagingengine.com header.i=@messagingengine.com header.b=fuVGBRM7 header.a=rsa-sha256 header.s=fm3 x-bits=2048; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=benghancock.com; spf=pass smtp.mailfrom=ben@benghancock.com smtp.helo=wout2-smtp.messagingengine.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1674192378; bh=LasKrBGeefGMo6XB wrBwznZllyo1aTnHtkXimDDCTvU=; b=SEBDPkKnTMQiHLdEM1xAesCvduvvGDiN gEQR2FwDFmDXQzZg/AqHL3NCmSbPDlFcOf+I8M63fqymzHpTTSOFhdq8x+khlm/v Vi/RbInN1KStmTH0yH01u2kNF3uVl5MXwK46Xqyo+n2s8g15WJ+1vuW8k8W0+Q0r Ri0slzq81vw= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1674192378; b=egmQu0CihWtiWjDW3GgO+0AMWw6V3alGMI9BYcCLQbvVHwOLwP /bPWS3w/SY5rJpZ30B09D5UdbCsF+kusPY2y+1/UjJ1SFl5gOKHXJn0g4HJQS5BG z13F1lskCvWcUNBRuSTjjmJm4rdt6WQqwmvll9dhoFG77jrymE2bpFmHw= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=benghancock.com header.i=@benghancock.com header.b=aN0W9i4V header.a=rsa-sha256 header.s=fm2 x-bits=2048; dkim=pass (2048-bit rsa key sha256) header.d=messagingengine.com header.i=@messagingengine.com header.b=fuVGBRM7 header.a=rsa-sha256 header.s=fm3 x-bits=2048; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=benghancock.com; spf=pass smtp.mailfrom=ben@benghancock.com smtp.helo=wout2-smtp.messagingengine.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=pass (2048-bit rsa key sha256) header.d=benghancock.com header.i=@benghancock.com header.b=aN0W9i4V header.a=rsa-sha256 header.s=fm2 x-bits=2048; dkim=pass (2048-bit rsa key sha256) header.d=messagingengine.com header.i=@messagingengine.com header.b=fuVGBRM7 header.a=rsa-sha256 header.s=fm3 x-bits=2048; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=benghancock.com; iprev=pass smtp.remote-ip=64.147.123.25 (wout2-smtp.messagingengine.com); spf=pass smtp.mailfrom=ben@benghancock.com smtp.helo=wout2-smtp.messagingengine.com; x-aligned-from=pass (Address match); x-me-sender=pass policy.xms= 6iXKY3fv31MaBuR6k5jIKNYCLfWCLNwV61-JmsOfL5SY7qGE9uSMkwBC6SHLdWMrGKja3pIavWF5pJxP-e0b5V_Pzi5LB5xH7osUEW4G4GCK7xdbelsmALz-txUWWGGDZuzHPQs8gwFHJA; x-ptr=pass smtp.helo=wout2-smtp.messagingengine.com policy.ptr=wout2-smtp.messagingengine.com; x-return-mx=pass header.domain=benghancock.com policy.is_org=yes (MX Records found: in2-smtp.messagingengine.com,in1-smtp.messagingengine.com); x-return-mx=pass smtp.domain=benghancock.com policy.is_org=yes (MX Records found: in2-smtp.messagingengine.com,in1-smtp.messagingengine.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=10 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=date:from :to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t=1674192378; x=1674278778; bh=Ye3qsJHYKc2NqykiM/HavTVafeOgN9aN 8otxDeSdvnc=; b=g/3136dWapM1u3DikXaMXJKwy7e9Fhb7Zob55GSKc5RFiiO9 DNmeBFffZJzfNamW6LMV8K+UiQ5JDCmGnO0BSLz5m+b4r32yI4BhHUqT+OkqW0Ok pLeXjDPz3ALGkPhWr4ePqpJggO3aAEWDLf0K3PwVGufIf8jlikwqgqkWI8Y= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 44ED6BB0C7E for <9fans@9fans.net>; Fri, 20 Jan 2023 00:26:02 -0500 (EST) (envelope-from ben@benghancock.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 30D28275AD5; Fri, 20 Jan 2023 00:26:02 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1674192362; b=KsagpExV59cJNNqVXTevFGw86D9fw+yyN3vVZ1CpqEVEF6dJOs qfPGVCiluhG0y+sgB1IEGkPYvG4TcEj+BujRR2qL2zVHA9xuRPIj3O+ZKqS5YrLc vi9lgRzIwyt1h2qhjTJ0DK2l2DB0FtzdSlFGDi0iklkXbrvWXThxkoddFuQJYaXG cA0ahIXwYejXoGXwrN1ng12tjFsGy+dXItknEBggc1jkRtqmqNwENF/65FI9ThWj eo7nuLsX8eHVEokfHrwB5CK91FzNZBc6gR+YW5O/Dq2XSNZYgqG2Cy+lCQi7QQZS mxII18WuH7g1SSCQMHzE2+BBli4VCA5RnrGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=arcseal; t=1674192362; bh=eJ4n18T5E0rUL3H3WO7PAnAH2jEXQ3KjZgy i91FgNnA=; b=cgdPUImisKxczJscfos0gJcn7L3uK1EGBmC7gbCxCGZtBdITT/8 uumcPQjC+ac7LI6bLlpQdUb6qdZobSDC+o+O9c+65pNgErNaOa+BPPanxVikvGXO 9IAiWpJvPXcy1e2miat548c/Qoemu/txinQ5dUoEzJGPRejwUJfikh7xtmDVU0YJ HOcGjozZnvgz1p8aZzxwWtk45LNRFMLWIco6Z2cEjJV2uBSgMbmQ7sDBSZO+K6bd NthWI/HjfLpkMZLlRLHl23pjFCSy9iOCNqjVwT0P2Vl6ZTZMEiIi7huUC9tjMFwj bP3F8yJwgLXFOzazYDkRjdyvItQfOipOwTQ== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=pass (2048-bit rsa key sha256) header.d=benghancock.com header.i=@benghancock.com header.b=aN0W9i4V header.a=rsa-sha256 header.s=fm2 x-bits=2048; dkim=pass (2048-bit rsa key sha256) header.d=messagingengine.com header.i=@messagingengine.com header.b=fuVGBRM7 header.a=rsa-sha256 header.s=fm3 x-bits=2048; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=benghancock.com; iprev=pass smtp.remote-ip=64.147.123.25 (wout2-smtp.messagingengine.com); spf=pass smtp.mailfrom=ben@benghancock.com smtp.helo=wout2-smtp.messagingengine.com; x-aligned-from=pass (Address match); x-me-sender=pass policy.xms= 6iXKY3fv31MaBuR6k5jIKNYCLfWCLNwV61-JmsOfL5SY7qGE9uSMkwBC6SHLdWMrGKja3pIavWF5pJxP-e0b5V_Pzi5LB5xH7osUEW4G4GCK7xdbelsmALz-txUWWGGDZuzHPQs8gwFHJA; x-ptr=pass smtp.helo=wout2-smtp.messagingengine.com policy.ptr=wout2-smtp.messagingengine.com; x-return-mx=pass header.domain=benghancock.com policy.is_org=yes (MX Records found: in2-smtp.messagingengine.com,in1-smtp.messagingengine.com); x-return-mx=pass smtp.domain=benghancock.com policy.is_org=yes (MX Records found: in2-smtp.messagingengine.com,in1-smtp.messagingengine.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=10 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvhedrudduuddgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlud dtmdenucfjughrpeffhffvuffkjghfofggtgfgsehtjeertdertddvnecuhfhrohhmpeeu vghnucfjrghntghotghkuceosggvnhessggvnhhghhgrnhgtohgtkhdrtghomheqnecugg ftrfgrthhtvghrnhepfefhteefjefgieefkeekgeeikeduuefgfeeuleffvddvuedvvdef fedtkedvteffnecukfhppeeigedrudegjedruddvfedrvdehnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehinhgvthepieegrddugeejrdduvdefrddvhedphhgvlhho peifohhuthdvqdhsmhhtphdrmhgvshhsrghgihhnghgvnhhgihhnvgdrtghomhdpmhgrih hlfhhrohhmpeeosggvnhessggvnhhghhgrnhgtohgtkhdrtghomheq X-ME-VSScore: 10 X-ME-VSCategory: clean Received-SPF: pass (benghancock.com: Sender is authorized to use 'ben@benghancock.com' in 'mfrom' identity (mechanism 'include:spf.messagingengine.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="ben@benghancock.com"; helo=wout2-smtp.messagingengine.com; client-ip=64.147.123.25 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Fri, 20 Jan 2023 00:26:01 -0500 (EST) (envelope-from ben@benghancock.com) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9B1B432001BB for <9fans@9fans.net>; Fri, 20 Jan 2023 00:26:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 20 Jan 2023 00:26:00 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudduuddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdluddtmdenucfjughrpeffhf fvuffkjghfofggtgfgsehtjeertdertddvnecuhfhrohhmpeeuvghnucfjrghntghotghk uceosggvnhessggvnhhghhgrnhgtohgtkhdrtghomheqnecuggftrfgrthhtvghrnhepfe fhteefjefgieefkeekgeeikeduuefgfeeuleffvddvuedvvdeffedtkedvteffnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsggvnhessggvnh hghhgrnhgtohgtkhdrtghomh X-ME-Proxy: Feedback-ID: i8a3947c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <9fans@9fans.net>; Fri, 20 Jan 2023 00:25:59 -0500 (EST) Date: Thu, 19 Jan 2023 21:25:57 -0800 From: Ben Hancock To: 9fans@9fans.net Subject: Re: [9fans] Script to apply Edit commands in acme Message-ID: <20230119212557.6642fc99@shasta> In-Reply-To: <16741207890.71a19d.319186@composer.9fans.topicbox.com> References: <16738409770.1dB0AB2c.445654@composer.9fans.topicbox.com> <16738599850.198Dc.144883@composer.9fans.topicbox.com> <16741207890.71a19d.319186@composer.9fans.topicbox.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.35; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: f142b930-9882-11ed-a567-ae8085e85006 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UYWY0MDg3NTFiYzZmYjM0NC1NYWI4YzcwZjM3ZGM3NmE3MDkxOTdi?= =?UTF-8?B?MjAyPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mab8c70f37dc76a709197b202:1:5LnnSoRczZn43MY9Q7JE_3ySg9v-Qi4nNYI4rPGYAq8 (Re-posting this message as earlier send appeared to fail; apologies for any duplication.) revrari@mweb.co.za writes: > In sam I can create a script file consisting of a list of edit > commands to apply to the document. [...] I would like to know if such > a script would require the regular #!/bin/rc heading, and how it > would be invoked from within acme. The paradigm is much the same in acme. As noted earlier, the shebang just determines which shell the script will run in; you can choose any shell, or use any executable. You'll just want to make sure that the script is in your $PATH. For example, you could create this as $HOME/bin/lstrip: #! /bin/sh ssam 'x/^ +?/d' Make it executable, then write some text in acme: This is some text that will be cleaned If you select this text, type "|lstrip" in the tag (without the quotes), and Button-2 (middle click) it, you will get the desired effect: This is some text that will be cleaned To operate on the entire window, type "Edit ,|lstrip" and execute that with B2. By the way, as for your other example of cleaning whitespace at the end of a newline (Edit ,x/ +$/d), acme does this by default on Put. The other way you might approach this is just to keep a text file of commonly used commands around. Then you can select the command you want, and mouse-chord B2-B1 on "Edit" in the tag of the desired window to execute that command. - Ben ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Taf408751bc6fb344-Mab8c7= 0f37dc76a709197b202 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription