9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Highlighting in Acme
@ 2002-04-11 18:48 rob pike, esq.
  2002-04-11 19:01 ` Dharani Vilwanathan
  2002-04-11 19:17 ` Dan Cross
  0 siblings, 2 replies; 8+ messages in thread
From: rob pike, esq. @ 2002-04-11 18:48 UTC (permalink / raw)
  To: 9fans

You can fix the silly acme bug by adding the second condition
in this if from number() in /sys/src/cmd/acme/addr.c

	Forward:
		while(line>0 && q1<t->file->nc)
			if(textreadc(t, q1++) == '\n' || q1==t->file->nc)
				if(--line > 0)
					q0 = q1;

When the new distribution happens, very soon I hope, this and many other
bugs will be fixed, along with the addition of lots of new ones.

-rob



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Highlighting in Acme
  2002-04-11 18:48 [9fans] Highlighting in Acme rob pike, esq.
@ 2002-04-11 19:01 ` Dharani Vilwanathan
  2002-04-11 19:17 ` Dan Cross
  1 sibling, 0 replies; 8+ messages in thread
From: Dharani Vilwanathan @ 2002-04-11 19:01 UTC (permalink / raw)
  To: 9fans

Rob,

> You can fix the silly acme bug by adding the second condition
> in this if from number() in /sys/src/cmd/acme/addr.c
>
> Forward:
> while(line>0 && q1<t->file->nc)
> if(textreadc(t, q1++) == '\n' || q1==t->file->nc)
> if(--line > 0)
> q0 = q1;
>
> When the new distribution happens, very soon I hope, this and many other
> bugs will be fixed, along with the addition of lots of new ones.

Thanks for the quick response and fix.

Regards
dharani




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Highlighting in Acme
  2002-04-11 18:48 [9fans] Highlighting in Acme rob pike, esq.
  2002-04-11 19:01 ` Dharani Vilwanathan
@ 2002-04-11 19:17 ` Dan Cross
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Cross @ 2002-04-11 19:17 UTC (permalink / raw)
  To: 9fans

> When the new distribution happens, very soon I hope, this and many other
> bugs will be fixed, along with the addition of lots of new ones.

Does this man that Plan 9 is approaching some kind of steady state
of equalibrium where the number of bugs fixed is exactly equal to
the number of bugs introduced in any given release?

	- Dan C.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Highlighting in Acme
@ 2002-04-11 18:43 rob pike, esq.
  0 siblings, 0 replies; 8+ messages in thread
From: rob pike, esq. @ 2002-04-11 18:43 UTC (permalink / raw)
  To: 9fans

OK, I think it all works if the file has a newline on the end.
Without the newline, 3-#0 is mishandled by acme.  I'll keep
digging.

-rob


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Highlighting in Acme
@ 2002-04-11 18:40 rob pike, esq.
  0 siblings, 0 replies; 8+ messages in thread
From: rob pike, esq. @ 2002-04-11 18:40 UTC (permalink / raw)
  To: 9fans

>    % echo '2-#0+#5,3-#0+#4' > /mnt/acme/9/addr
>    echo: write error: bad address syntax

The syntax error is because you need to say echo -n.
Then you get
	echo: write error: address out of range
because of some stupid bug that stops 3-#0 working
right even though 2-#0 works fine.  I'm digging.

-rob



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Highlighting in Acme
  2001-06-20 10:46 rog
@ 2002-04-11 18:35 ` Dharani Vilwanathan
  0 siblings, 0 replies; 8+ messages in thread
From: Dharani Vilwanathan @ 2002-04-11 18:35 UTC (permalink / raw)
  To: 9fans

rog,

Sorry for bringing up this topic too late. I had a question on Acme
highlighting and you answered it long back.

I tried this option and it didnt seem to work for me with the file
interface. It does work with the right button.

This is what I did. I created a 3 line file say test1:

    % cat test1
    1234567890
    1234567890
    1234567890

Then I opened this file in acme and wrote the following:

    % echo '2-#0+#5,3-#0+#4' > /mnt/acme/9/addr
    echo: write error: bad address syntax
    % echo ':2-#0+#5,3-#0+#4' > /mnt/acme/9/addr
    echo: write error: bad address syntax

Both the writes are failing. Sweeping ":2-#0+#5,3-#0+#4" with right button
pressed works, however.

Am I making any mistake?

Next, I noticed limbo compiler produces something like "test.b:10.5..." in
test.s output. But Acme didnt recognize this addressing properly. Is it that
the corresponding code is not in Acme yet? If so, when will it be available?
Will it be available in both Plan 9 and Inferno versions?

Actually this is an elegant addition to Acme. Addressing a text with
lpos1:cpos1 and lpos2:cpos2 is appealing. This will make things clean.

Thanks
dharani


> bell-labs.com!dharani wrote:
> > If I have to highlight a portion of text, say character 4 to 8 in line
5, in
> > a window in Acme, how can I do it through Acme interface?
>
> when you say "Acme interface" i don't know whether you mean the Acme
> user interface or the Acme program (filesystem) interface.
>
> you've chosen a task that's possible, but not elegant from the user
> interface:  right button click on the text:
> :5-#0+#4,5-#0+#8
> or alternatively:
> :5-#0+#4;+#4
>
> you can give an arbitrary sam-style address there.
> given that the Limbo compiler holds file positions in line.charpos
> format, i was considering adding a hack to my local acme
> that would understand:
>
> :5.4,5.8
>
> and then the compiler could spit out more detailed positions
> that acme could understand (having the compiler spit
> out:
>
> file.b:100-#0+#20,101-#0+#30: some error
>
> seems a bit uncomfortable).
> if you want to do this through the filesystem interface,
> write the address to the addr file, and write "dot=addr" to
> the ctl file.
>
> read the manual.
>
>   cheers,
>     rog.
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [9fans] Highlighting in Acme
@ 2001-06-20 10:46 rog
  2002-04-11 18:35 ` Dharani Vilwanathan
  0 siblings, 1 reply; 8+ messages in thread
From: rog @ 2001-06-20 10:46 UTC (permalink / raw)
  To: 9fans

bell-labs.com!dharani wrote:
> If I have to highlight a portion of text, say character 4 to 8 in line 5, in
> a window in Acme, how can I do it through Acme interface?

when you say "Acme interface" i don't know whether you mean the Acme
user interface or the Acme program (filesystem) interface.

you've chosen a task that's possible, but not elegant from the user
interface:  right button click on the text:
	:5-#0+#4,5-#0+#8
or alternatively:
	:5-#0+#4;+#4

you can give an arbitrary sam-style address there.
given that the Limbo compiler holds file positions in line.charpos
format, i was considering adding a hack to my local acme
that would understand:

	:5.4,5.8

and then the compiler could spit out more detailed positions
that acme could understand (having the compiler spit
out:

	file.b:100-#0+#20,101-#0+#30: some error

seems a bit uncomfortable).
if you want to do this through the filesystem interface,
write the address to the addr file, and write "dot=addr" to
the ctl file.

read the manual.

  cheers,
    rog.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [9fans] Highlighting in Acme
  2001-06-19 18:30 [9fans] Inferno plug-in security erik quanstrom
@ 2001-06-19 20:58 ` Dharani Vilwanathan
  0 siblings, 0 replies; 8+ messages in thread
From: Dharani Vilwanathan @ 2001-06-19 20:58 UTC (permalink / raw)
  To: 9fans

Hi,

If I have to highlight a portion of text, say character 4 to 8 in line 5, in
a window in Acme, how can I do it through Acme interface?

Thanks
dharani




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-04-11 19:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-11 18:48 [9fans] Highlighting in Acme rob pike, esq.
2002-04-11 19:01 ` Dharani Vilwanathan
2002-04-11 19:17 ` Dan Cross
  -- strict thread matches above, loose matches on Subject: below --
2002-04-11 18:43 rob pike, esq.
2002-04-11 18:40 rob pike, esq.
2001-06-20 10:46 rog
2002-04-11 18:35 ` Dharani Vilwanathan
2001-06-19 18:30 [9fans] Inferno plug-in security erik quanstrom
2001-06-19 20:58 ` [9fans] Highlighting in Acme Dharani Vilwanathan

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).