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 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-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 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-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, 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] Sam & Acme & 8c questions
@ 2002-06-17  9:14 Blake McBride
  2002-06-17 10:52 ` [9fans] " Douglas A. Gwyn
  0 siblings, 1 reply; 9+ messages in thread
From: Blake McBride @ 2002-06-17  9:14 UTC (permalink / raw)
  To: 9fans

Okay, I'm getting into this.  I used sam for a while and
got used to it but going in and out was a pain - enter acme.
Anyway, I have some questions and comments.

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.
This would make quick edits a lot easier.  You could just
type sam file.c and just start editing it.  Calling sam, selecting
the single file, specifing the window size each time is a real
pain.  Perhaps if more than one file is specified it should
just auto-display the first and allow manual selection of the
other files.  Perhaps this should be done with a command
line optional argument (although I don't think so).

Question 1.  In sam (or acme) how can I select more lines
than can fit on the screen?  For example let's say I'm editing
a file with 1000 lines and 40 are being displayed (because
that is all that will fit).  Let's say I want to snarf an 80 line
function.  How can I do that?

Question 2:  If I start a new copy of acme it isn't defaulting
an rc shell window like it is when the system boots.  This is
fine, but how do I start one?

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?

Thanks a lot.

Blake McBride
blake@intega-online.com


^ 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 18:35 [9fans] Re: Sam & Acme & 8c questions rob pike, esq.
  -- strict thread matches above, loose matches on Subject: below --
2002-06-20  0:18 okamoto
2002-06-18 17:03 rog
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).