From: Bakul Shah <bakul@bitblocks.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Acme and Git
Date: Wed, 15 Feb 2017 14:09:14 -0800 [thread overview]
Message-ID: <357D1DAA-CC66-417F-BB78-354EAD66BE4C@bitblocks.com> (raw)
In-Reply-To: <CA+POUVhjTiReJA8OKp3fSA19Q4TOcx4eETS8sDixAwb3xkXHgw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]
go get 9fans.net/go/acme/Watch <http://9fans.net/go/acme/Watch>
It watches the current dir and runs a given command if any file in this dir changes. Actually think of Watch more as inspiration!
You may be better off relying on git — watch .git/HEAD (changes when you switch branches) and watch what it is pointing to (changes when there is a commit or pull etc.), figure out what changed, which acme windows are relevant and update their body. There is still the issue of what to do if a file that changed has been edited. Or the file has been deleted or renamed. And there is a potential race — you may be editing a window when window body gets switched underneath! It may be better to print commands to do all this and leave it upto the user.
May be add a reload command that reads a window's tag and reload its body from the opened file.
> On Feb 15, 2017, at 11:32 AM, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:
>
> Do you have a pointer to Russ's Watch? I quick dig shows I have poor Google-fu.
> Paul
>
> On Wed, Feb 15, 2017 at 12:23 PM Bakul Shah <bakul@bitblocks.com <mailto:bakul@bitblocks.com>> wrote:
> May be use Russ'es Watch command?
>
> > On Feb 15, 2017, at 5:05 AM, Paul Lalonde <paul.a.lalonde@gmail.com <mailto:paul.a.lalonde@gmail.com>> wrote:
> >
> > I know I'm not the only acme user who uses Git extensively :-)
> > Is there some way to tell if a file is changed on disk that is open in an editor window? I frequently change branches and I often find myself editing stale versions. I notice when comes time to Put, but that's a bit late.
> >
> > Any tips to share?
> >
> > Paul
>
>
[-- Attachment #2: Type: text/html, Size: 2958 bytes --]
next prev parent reply other threads:[~2017-02-15 22:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 13:05 Paul Lalonde
2017-02-15 14:34 ` Steve Simon
2017-02-15 14:41 ` Sigrid Haflinadóttir
2017-02-15 17:21 ` Bakul Shah
2017-02-15 19:32 ` Paul Lalonde
2017-02-15 21:29 ` Micah Stetson
2017-02-15 22:09 ` Bakul Shah [this message]
2017-02-16 2:01 ` Erik Quanstrom
2017-02-16 13:05 ` Paul Lalonde
2017-02-16 15:33 ` Bakul Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=357D1DAA-CC66-417F-BB78-354EAD66BE4C@bitblocks.com \
--to=bakul@bitblocks.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).