diff options
author | Russ Cox <rsc@swtch.com> | 2014-04-30 12:14:29 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2014-04-30 12:14:29 -0400 |
commit | 4a3fb87264f8bc03fc62f00ef335056f30d18023 (patch) | |
tree | 77d52013a1fbb6fd967c1e146d5ddbf5ca0c065d /src/cmd/acme/acme.c | |
parent | 833216fef8b946895956737d205bcad7031bf06f (diff) | |
download | plan9port-4a3fb87264f8bc03fc62f00ef335056f30d18023.tar.gz plan9port-4a3fb87264f8bc03fc62f00ef335056f30d18023.tar.bz2 plan9port-4a3fb87264f8bc03fc62f00ef335056f30d18023.zip |
acme: add log file in acme root directory
Reading /mnt/acme/log reports a log of window create,
put, and delete events, as they happen. It blocks until the
next event is available.
Example log output:
8 new /Users/rsc/foo.go
8 put /Users/rsc/foo.go
8 del /Users/rsc/foo.go
This lets acme-aware programs react to file writes, for example
compiling code, running a test, or updating an import block.
TBR=r
R=r
https://codereview.appspot.com/89560044
Diffstat (limited to 'src/cmd/acme/acme.c')
-rw-r--r-- | src/cmd/acme/acme.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c index 1005bae9..c45bc28d 100644 --- a/src/cmd/acme/acme.c +++ b/src/cmd/acme/acme.c @@ -303,6 +303,7 @@ readfile(Column *c, char *s) winresize(w, w->r, FALSE, TRUE); textscrdraw(&w->body); textsetselect(&w->tag, w->tag.file->b.nc, w->tag.file->b.nc); + xfidlog(w, "new"); } char *ignotes[] = { @@ -866,6 +867,7 @@ newwindowthread(void *v) recvp(cnewwindow); w = makenewwindow(nil); winsettag(w); + xfidlog(w, "new"); sendp(cnewwindow, w); } } |