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_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32190 invoked from network); 19 Jul 2021 11:58:28 -0000 Received: from tb-ob21.topicbox.com (173.228.157.67) by inbox.vuxu.org with ESMTPUTF8; 19 Jul 2021 11:58:28 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob21.topicbox.com (Postfix) with ESMTP id 262D321C95 for ; Mon, 19 Jul 2021 07:58:26 -0400 (EDT) (envelope-from bounce.mM2dfbf5d65c86fcf89c315484.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 098922D6D779; Mon, 19 Jul 2021 07:58:26 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); 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=prosimetrum.com; spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.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=message-id:date:from:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding:list-help :list-id:list-post:list-subscribe:reply-to:list-unsubscribe; s= sysmsg-1; t=1626695905; bh=/VmlZQqaMdr1nHsvKwuenqllfC/BPQlYvBnwA EFVhbk=; b=Shyjr6rb1ICvOxQReUoFshm/sGnTF8jfqcLcv5qdwUagQDbiPAka6 YOBuJsFZr25NZClFe7Bl4abEtFnHnktSf1HxcELIozCKzBuLxwgSovxYfgZ5rMBA 8chkRSJbhSPE3p6bkbNf78Z7beAqCkMAJSF9kqjJ4cXwI2XJS0lTKM= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1626695905; b=eT5O5sC7cPCD+WIkEcgLxDvFU6a4rBSa9ohA9NFQm061ocIAc4 EV6Zho5tHQJdPekJSjsI9kEnYF91WI3e7oSzkAtYOYY9RJ/x2ug6xUBEuvE9x1M5 Zls7Mp7RAaI9R6c0R1o1zOfXTFzhULU4lCrDpy2RLYXFX385NSMdtpBkA= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); 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=prosimetrum.com; spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.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-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); 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=prosimetrum.com; iprev=pass smtp.remote-ip=125.236.209.157 (asquith.prosimetrum.com); spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=asquith.prosimetrum.com policy.ptr=asquith.prosimetrum.com; x-return-mx=pass header.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-return-mx=pass smtp.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=message-id :date:from:to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:list-unsubscribe; s=dkim-1; bh=Aldxf4I8 clIs9GmaA3WCOHwjKa7qRtfcgMnonzFjkIQ=; b=FrWnkKyhg8bGIG+7mBkQDYgr FrVm/xuMcVz0SAiQJ4MLnRL3BFO9zYwAVWrwn27c4iyucXTD1bu2DiiwyvND9Lil /ocbWFp3hbGhBxHT0SvAYjIhkhnuUG1dEAhJZoyXYMRrl8ufOaPbo1uFdCsTAQ51 ex1iv/QYebpPNgyldws= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id A6B882D6D35C for <9fans@9fans.net>; Mon, 19 Jul 2021 07:58:15 -0400 (EDT) (envelope-from umbraticus@prosimetrum.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id B89454DB141; Mon, 19 Jul 2021 07:58:15 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1626695895; b=HiphsogACu3XlLwtYlZJhMHvVo3E+dWpoibrhY/V+o3FMyTj+C T/W+0PwM8OYIW6F2fMTk0AwECCY3Qo+8eyczjDNbfUT+v0JLc1wkghip6m6z39iC GLQLmn3jWRt2p+mHRINvH5cyGRj/8vTfchOgm7t8LwTKbFGf/6u87HTiGyYFSUIq FPtv9j9Jv9DZGR5GBlpZ2gdGchlv9aASZRSWtW8xpB7qigjiBq23cWoo/HW/hlCm z0PvfpWe501SxI4RVKLgd1alPl5yJ5BfeXXYoLIK6MXvowQRShxwUR6rFYcDAfVN /bmtXtfXezBfomKyCbVPi7sHQoF8xQtjV6qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:date:from:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding; s=arcseal; t=1626695895; bh=UJfG24+uvTmNFXaK8BYHRT2XJBnDFInQ2giovt2S23c=; b= ZdL4Indm51P2gDS5905nkBQfIzqd2Hab0VLh8X4udHLA7bvfjL9MiW37vKzWK3be 8cqcRDqEvnMrW8KyRYwmw3QIHljJNOS6FZooMlF/jkogVLsC9n/1ovm0MdYprnu7 8U5pTTt1Yh2lK2sqMDbdB7Zckm7SuHzcwCafcGryU/SKIO21st+ycyzwxZK+ybNY fs+0mFu9k9Rc78poHLdO70mMMQJ6y8DGQfqVOUau/k3Ziob2vrMxxsuvPFyyYvg0 ur3FoVuke26zMQ0CbNN7FnEcx7HAvgTkLsFRv5yr8yD36G9/Tc9oxM7FJJZPTkMw i7M22oairPzJUdbuZeF8kQ== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); 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=prosimetrum.com; iprev=pass smtp.remote-ip=125.236.209.157 (asquith.prosimetrum.com); spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=asquith.prosimetrum.com policy.ptr=asquith.prosimetrum.com; x-return-mx=pass header.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-return-mx=pass smtp.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvtddrfedtgddvfeculddtuddrgeduhedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghn shhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtne cunecujfgurhepkfffhffvufgjgggtgfesthejjedttddtvdenucfhrhhomhepuhhmsghr rghtihgtuhhssehprhhoshhimhgvthhruhhmrdgtohhmnecuggftrfgrthhtvghrnhepvd etvdekheehheetleegteejffekffekudettedufedtveffgffgkefhgeejteegnecukfhp peduvdehrddvfeeirddvtdelrdduheejnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehinhgvthepuddvhedrvdefiedrvddtledrudehjedphhgvlhhopegrshhquhhi thhhrdhprhhoshhimhgvthhruhhmrdgtohhmpdhmrghilhhfrhhomhepoehumhgsrhgrth hitghushesphhrohhsihhmvghtrhhumhdrtghomheq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (prosimetrum.com: 125.236.209.157 is authorized to use 'umbraticus@prosimetrum.com' in 'mfrom' identity (mechanism 'mx' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="umbraticus@prosimetrum.com"; helo=asquith.prosimetrum.com; client-ip=125.236.209.157 Received: from asquith.prosimetrum.com (asquith.prosimetrum.com [125.236.209.157]) by tb-mx1.topicbox.com (Postfix) with ESMTP for <9fans@9fans.net>; Mon, 19 Jul 2021 07:58:14 -0400 (EDT) (envelope-from umbraticus@prosimetrum.com) Message-ID: Date: Mon, 19 Jul 2021 23:59:56 +1200 From: umbraticus@prosimetrum.com To: 9fans@9fans.net Subject: Re: [9fans] Command to set samterm label In-Reply-To: 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: 9c483082-e888-11eb-8794-e95e100d56ae Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZjFlMjExZGFmODIzYzBlMC1NMmRmYmY1ZDY1Yzg2ZmNmODljMzE1?= =?UTF-8?B?NDg0Pg==?= 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:M2dfbf5d65c86fcf89c315484:1:azpw7tGzzFSCcKVSsJsPnEaJUMs7TpzLju83KatC0o4 Sorry, didn't mean to come off as insisting you had to do it my way (I am guilty of hacking all kinds of things into my own samterm); just wanted to point out there are other ways besides adding a new command to sam. > The next step is add an option (or better an environment variable) > to use the rio snarf buffer directly. There is a patch for this floating around somewhere: perhaps whoever wrote it can chime in. Below is a quick illustration of the other thought I had, having label reflect the most recently topped buffer, in case you are or anyone else is interested. umbraticus diff -u /sys/src/cmd/samterm/main.c ./main.c --- /sys/src/cmd/samterm/main.c Thu Apr 30 10:24:09 2020 +++ ./main.c Mon Jul 19 23:36:12 2021 @@ -150,6 +150,7 @@ current(Flayer *nw) { Text *t; + int fd; =20 if(which) flborder(which, 0); @@ -160,8 +161,13 @@ buttons(Up); t =3D (Text *)nw->user1; t->front =3D nw-&t->l[0]; - if(t !=3D &cmd) + if(t !=3D &cmd){ work =3D nw; + if((fd =3D open("/dev/label", OWRITE)) >=3D 0){ + fprint(fd, "sam %s", (char*)name[whichmenu(= t->tag)] + 1); + close(fd); + } + } } which =3D nw; } @@ -170,11 +176,15 @@ closeup(Flayer *l) { Text *t=3D(Text *)l->user1; - int m; + int m, fd; =20 m =3D whichmenu(t->tag); if(m < 0) return; + if((fd =3D open("/dev/label", OWRITE)) >=3D 0){ + write(fd, "sam", 4); + close(fd); + } flclose(l); if(l =3D=3D which){ which =3D 0; ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tf1e211daf823c0e0-M2dfbf= 5d65c86fcf89c315484 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription