9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re[2]: [9fans] how people learn things (was architectures)
@ 2001-08-02 11:18 steve.simon
  2001-08-03  9:04 ` Ralph Corderoy
  0 siblings, 1 reply; 2+ messages in thread
From: steve.simon @ 2001-08-02 11:18 UTC (permalink / raw)
  To: 9fans


Hi,

Wasn't this in Kernighan and Pike (The Unix Programming Enviroment) -
waitfile.c I don't have it to hand, but I'am pretty sure its there.

-Steve


____________________Reply Separator____________________
Subject:    Re: [9fans] how people learn things (was architectures)
Author: 9fans@cse.psu.edu
Date:       02/08/01 11:27

Hi,

> Me, too.  I think it would be useful to have a program (script?) that
> invoked a text editor ("sam" in my case) and whenever the source file
> was modified (sam "w" command), fire up troff|proof or whatever
> (including troff macros, etc.) in a *separate* window to show the
> current formatted result.  The idea is to not interrupt the editing
> session to view the result.

This is effectively what I've done in the past on Unix.  Either
instruct your version of vi to execute a command on every write of the
file or have a script watching the file which does `groff ... >x.ps'.

gv, a GhostScript viewer, already has an option to refresh when the
PostScript file changes.  This has the advantage that you remain at the
bottom of page 5 rather than a new window opening on page 1.


Ralph.



----------------------------------------------------------------------
The contents of this communication are confidential to the normal user of
the email address to which it was sent.  If you have received this email
in error, any use, dissemination, forwarding, printing or copying of this
email is strictly prohibited.  If this is the case, please notify the sender
and delete this message.
----------------------------------------------------------------------



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

* Re: Re[2]: [9fans] how people learn things (was architectures)
  2001-08-02 11:18 Re[2]: [9fans] how people learn things (was architectures) steve.simon
@ 2001-08-03  9:04 ` Ralph Corderoy
  0 siblings, 0 replies; 2+ messages in thread
From: Ralph Corderoy @ 2001-08-03  9:04 UTC (permalink / raw)
  To: 9fans

Hi Steve,

> > This is effectively what I've done in the past on Unix.  Either
> > instruct your version of vi to execute a command on every write of
> > the file or have a script watching the file which does `groff ...
> > >x.ps'.
>
> Wasn't this in Kernighan and Pike (The Unix Programming Enviroment) -
> waitfile.c I don't have it to hand, but I'am pretty sure its there.

I've just looked;  you're right.  watchfile, exercises 7-12 and 7-17,
sounds like it does this.

> > gv, a GhostScript viewer, already has an option to refresh when the
> > PostScript file changes.  This has the advantage that you remain at
> > the bottom of page 5 rather than a new window opening on page 1.

This is the particularly handy bit though.


Ralph.


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

end of thread, other threads:[~2001-08-03  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-02 11:18 Re[2]: [9fans] how people learn things (was architectures) steve.simon
2001-08-03  9:04 ` Ralph Corderoy

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