9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Re: Sam & Acme & 8c questions
@ 2002-06-18 17:03 rog
  0 siblings, 0 replies; 9+ messages in thread
From: rog @ 2002-06-18 17:03 UTC (permalink / raw)
  To: 9fans

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

i seem to remember that under nextstep the algorithm was something
like:

	while the mouse is below the window:
		at some repetition interval t, adjust the current y-coordinate
		so that the y-coord that was previously "under" the mouse
		is now at the bottom of the window.

that gives a fairly natural proportionality to the thing.  of course,
it's not that simple in acme/rio style text windows, where the
scrolling is proportional to the amount of data shown, not the
vertical space taken by the data.


[-- Attachment #2: Type: message/rfc822, Size: 1507 bytes --]

To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: Sam & Acme & 8c questions
Date: Tue, 18 Jun 2002 11:58:03 -0400
Message-ID: <ceafca5fdc7e10b6a02f9ca1d0d4c0c6@plan9.bell-labs.com>

in acme the speed for autoscroll is
proportional to how far out of the window
the mouse is.

that seems to work very well except when
acme is at the bottom of the screen.
then it's much nicer to scroll up.

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

* Re: [9fans] Re: Sam & Acme & 8c questions
@ 2002-06-20  0:18 okamoto
  0 siblings, 0 replies; 9+ messages in thread
From: okamoto @ 2002-06-20  0:18 UTC (permalink / raw)
  To: 9fans

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

Or just change that acme window to another. :-)

Kenji


[-- Attachment #2: Type: message/rfc822, Size: 2165 bytes --]

From: "Douglas A. Gwyn" <DAGwyn@null.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: Sam & Acme & 8c questions
Date: Wed, 19 Jun 2002 16:18:02 GMT
Message-ID: <3D109EFA.4E66F98A@null.net>

Russ Cox wrote:
> in acme the speed for autoscroll is
> proportional to how far out of the window
> the mouse is.

Unfortunately, when editing I usually like to use a full-screen
window.  Maybe something involving the scroll bar would be
workable?

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

* Re: [9fans] Re: Sam & Acme & 8c questions
  2002-06-18 15:58 Russ Cox
@ 2002-06-19 16:18 ` Douglas A. Gwyn
  0 siblings, 0 replies; 9+ messages in thread
From: Douglas A. Gwyn @ 2002-06-19 16:18 UTC (permalink / raw)
  To: 9fans

Russ Cox wrote:
> in acme the speed for autoscroll is
> proportional to how far out of the window
> the mouse is.

Unfortunately, when editing I usually like to use a full-screen
window.  Maybe something involving the scroll bar would be
workable?


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

* Re: [9fans] Re: Sam & Acme & 8c questions
@ 2002-06-18 18:35 rob pike, esq.
  0 siblings, 0 replies; 9+ messages in thread
From: rob pike, esq. @ 2002-06-18 18:35 UTC (permalink / raw)
  To: 9fans

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

That sounds just like the algorithm used in /sys/src/libframe/frselect.c,
used by acme and rio.  There's nothing proportional to it; it's just N lines
every delta T, where N is the number of lines between the mouse and the
edge of the frame.

-rob

[-- Attachment #2: Type: message/rfc822, Size: 3534 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 520 bytes --]

i seem to remember that under nextstep the algorithm was something
like:

	while the mouse is below the window:
		at some repetition interval t, adjust the current y-coordinate
		so that the y-coord that was previously "under" the mouse
		is now at the bottom of the window.

that gives a fairly natural proportionality to the thing.  of course,
it's not that simple in acme/rio style text windows, where the
scrolling is proportional to the amount of data shown, not the
vertical space taken by the data.


[-- Attachment #2.1.2: Type: message/rfc822, Size: 1507 bytes --]

To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: Sam & Acme & 8c questions
Date: Tue, 18 Jun 2002 11:58:03 -0400
Message-ID: <ceafca5fdc7e10b6a02f9ca1d0d4c0c6@plan9.bell-labs.com>

in acme the speed for autoscroll is
proportional to how far out of the window
the mouse is.

that seems to work very well except when
acme is at the bottom of the screen.
then it's much nicer to scroll up.

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

* Re: [9fans] Re: Sam & Acme & 8c questions
@ 2002-06-18 15:58 Russ Cox
  2002-06-19 16:18 ` Douglas A. Gwyn
  0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2002-06-18 15:58 UTC (permalink / raw)
  To: 9fans

in acme the speed for autoscroll is
proportional to how far out of the window
the mouse is.

that seems to work very well except when
acme is at the bottom of the screen.
then it's much nicer to scroll up.



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

* Re: [9fans] Re: Sam & Acme & 8c questions
  2002-06-17 13:49 Russ Cox
@ 2002-06-18  9:31 ` Douglas A. Gwyn
  0 siblings, 0 replies; 9+ messages in thread
From: Douglas A. Gwyn @ 2002-06-18  9:31 UTC (permalink / raw)
  To: 9fans

Russ Cox wrote:
> the command k to mark the value of dot, put the text cursor
> at the end of the region, enter the command ',.

Aha, I forgot about k and ' -- I've used those before but
tend to forget and reverted to a more primitive approach.

I have toyed with the idea of making (the BRL version of)
sam autoscroll, but getting the speed right seems to have
been a problem in other implementations of autoscroll;
does anyone have a good algorithm for that?


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

* Re: [9fans] Re: Sam & Acme & 8c questions
@ 2002-06-17 13:49 Russ Cox
  2002-06-18  9:31 ` Douglas A. Gwyn
  0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2002-06-17 13:49 UTC (permalink / raw)
  To: 9fans

> > Question 1.  In sam (or acme) how can I select more lines
> > than can fit on the screen?
>
> In sam, put the text cursor at the start of the region, enter
> the command .= (or maybe just =) to display the value of dot,
> put the text cursor at the end of the region, enter the command
> {start_dot_value},. to select the region.

In sam, put the text cursor at the start of the region, enter
the command k to mark the value of dot, put the text cursor
at the end of the region, enter the command
',. to select the region.

Russ



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

* Re: [9fans] Re: Sam & Acme & 8c questions
@ 2002-06-17 11:10 forsyth
  0 siblings, 0 replies; 9+ messages in thread
From: forsyth @ 2002-06-17 11:10 UTC (permalink / raw)
  To: 9fans

> Question 1.  In sam (or acme) how can I select more lines
> than can fit on the screen?

in acme, slide the mouse down beneath the bottom of the
frame (or window) when selecting text, and it will scroll
up.  (move above the frame or window if going backwards.)

you can also select using addresses, much as
in sam.



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

* [9fans] Re: Sam & Acme & 8c questions
  2002-06-17  9:14 [9fans] " Blake McBride
@ 2002-06-17 10:52 ` Douglas A. Gwyn
  0 siblings, 0 replies; 9+ messages in thread
From: Douglas A. Gwyn @ 2002-06-17 10:52 UTC (permalink / raw)
  To: 9fans

Blake McBride wrote:
> Comment:  If you start sam with a single file argument it
> would be VERY convinient to have sam automatically
> open and display that file taking up its entire data area.

Agreed.  You have the source; when you figure out how to do it
let us all know.

> Question 1.  In sam (or acme) how can I select more lines
> than can fit on the screen?

In sam, put the text cursor at the start of the region, enter
the command .= (or maybe just =) to display the value of dot,
put the text cursor at the end of the region, enter the command
{start_dot_value},. to select the region.

> Question 3:  Most C compilers (or actually their pre-processors)
> have some standard defines so that your program can tell what
> it's being compiled for at compile time (like _unix_ or __WIN32).
> Does the Plan 9 compiler have some standard defines?

Not that I know of, but you can add to CFLAGS in your Makefiles
-D__plan9_version__=4 or some such.


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

end of thread, other threads:[~2002-06-20  0:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-18 17:03 [9fans] Re: Sam & Acme & 8c questions rog
  -- strict thread matches above, loose matches on Subject: below --
2002-06-20  0:18 okamoto
2002-06-18 18:35 rob pike, esq.
2002-06-18 15:58 Russ Cox
2002-06-19 16:18 ` Douglas A. Gwyn
2002-06-17 13:49 Russ Cox
2002-06-18  9:31 ` Douglas A. Gwyn
2002-06-17 11:10 forsyth
2002-06-17  9:14 [9fans] " Blake McBride
2002-06-17 10:52 ` [9fans] " Douglas A. Gwyn

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