9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Ethan Gardener" <eekee57@fastmail.fm>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] Alternative to fine-grained mouse usage?
Date: Fri, 02 Jul 2021 19:06:05 +0100	[thread overview]
Message-ID: <31c74da4-12f5-4236-ab6b-69cde447bb34@www.fastmail.com> (raw)
In-Reply-To: <B8DF2E84-2B05-4E11-BC65-2676048F20FA@hotmail.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

On Fri, Jul 2, 2021, at 4:03 PM, silas poulson wrote:
>> On 1 Jul 2021, at 18:48, Ethan Gardener <eekee57@fastmail.fm> wrote:
>> sam -d can't display line numbers
> 
> You can sort of display them via
> 
> ,x {
> p
> }
> 
> Though it’s ugly and annoyingly can’t apply sam’s regex to remove the character locations.

My mail client swallowed the line with the equals sign until I tried to reply. If that's happening to anyone else, it's on a line on its own between the opening brace and the p.

It does work, but yeah, it's a bit on the ugly side. I can get line & char numbers onto the same lines as the text, but only on the ends of the lines which is even uglier. It's this:

,x/.*/ {
p
}

The regexp selects whole lines without the newlines. Reversing the order of = and p has no effect.

(This reminds me why I switched to Forth: I can program my editor properly instead of being constrained by a domain-specific language. But part of the problem was I couldn't get my head around Sam's C code. It probably didn't help that I started with terminal-editor communication; that was likely the deep end of the pool.)

In any case, Plan 9's ed has a nice "browse" command which sam can't match. I used to issue "0bn", then just "b" once per page. Or, if you don't want line numbers, leave out the "n".
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T716c5aa0e2aa8a27-M93aa1a889014993c1e185d24
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 3942 bytes --]

  reply	other threads:[~2021-07-02 18:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  1:15 Dworkin Muller
2021-07-01  2:51 ` umbraticus
2021-07-01  4:36   ` Paul Lalonde
2021-07-01  5:05     ` umbraticus
2021-07-01 10:36       ` hiro
2021-07-03  9:09   ` Dworkin Muller
2021-07-03  9:31     ` hiro
2021-07-01 11:12 ` igor
2021-07-01 17:48 ` Ethan Gardener
2021-07-01 18:01   ` Sigrid Solveig Haflínudóttir
2021-07-01 21:59     ` [9fans] Sam tricks (was: Alternative to fine-grained mouse usage?) Silas McCroskey
2021-07-02 15:03   ` [9fans] Alternative to fine-grained mouse usage? silas poulson
2021-07-02 18:06     ` Ethan Gardener [this message]
2021-07-02 18:54       ` Silas McCroskey
2021-07-03  2:29         ` umbraticus
2021-07-03 11:52           ` Ethan Gardener
2021-07-03 11:48         ` Ethan Gardener
2021-07-03 16:32       ` silas poulson
2021-07-03 21:33         ` Ethan Gardener
2021-07-03 23:19           ` Dworkin Muller
2021-07-04  9:42             ` Ethan Gardener
2021-07-02  2:20 ` Cyber Fonic
2021-07-07  3:14 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
2021-07-12  4:01   ` Dworkin Muller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31c74da4-12f5-4236-ab6b-69cde447bb34@www.fastmail.com \
    --to=eekee57@fastmail.fm \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).