From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <95A35504-71C5-4D0E-ABEB-5B545B689F35@bitblocks.com> <20150326220530.44ECEB827@mail.bitblocks.com> Date: Fri, 3 Apr 2015 09:24:14 -0700 Message-ID: From: Skip Tavakkolian To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a11c1eac60e346e0512d4614b Subject: Re: [9fans] easier refreshing of acme wins Topicbox-Message-UUID: 4cab3910-ead9-11e9-9d60-3106f5b1d025 --001a11c1eac60e346e0512d4614b Content-Type: text/plain; charset=UTF-8 wouldn't something like this work? in the example i (clumsily) find the .go files, remove them and then B them in again. % for (i in `{9p ls acme|grep '[1-9]+'}) { x = `{9p read acme/$i/tag|sed -n -e 's/^([^ ]*\.go) .*$/\1/p' } if (! ~ $x '') { echo del | 9p write acme/$i/ctl B $x } } On Fri, Apr 3, 2015 at 6:16 AM, Mathieu Lonjaret wrote: > Yes, I had seen that thread, but I explained I don't want the same > thing as what you're asking for. I do not want to refresh them all in > one command. I want to selectively refresh some of them, but in an > easier fashion than having to type Get for each of them. > > > On 28 March 2015 at 08:19, Aram Santogidis wrote: > > Hi, > > > > I posted a similar question in the list few days back > > http://marc.info/?l=9fans&m=142721596630272&w=1 > > > > and one solution that was suggested by Antons and works fine for me is > the > > following. > > > > Edit X:^... [^+].*[^\/]$: e > > > > Cheers, > > Aram > > > > On Thu, Mar 26, 2015 at 11:05 PM, Bakul Shah > wrote: > >> > >> > >> On Thu, 26 Mar 2015 18:49:51 -0000 Paul Lalonde < > paul.a.lalonde@gmail.com> > >> wrote: > >> > The feature direction I'd like when working with Git is for the window > >> > of a > >> > git-changed file to become un-editable. This would require adding the > >> > idea > >> > of a un-editable window, which is probably a bad idea. > >> > >> Not sure what you mean. If you git {pull,checkout,merge,...}, > >> files you have been editing (but not yet saved) may already > >> require merging. You may be better off using some client side > >> git hook that checks the state of acme edited files and tries > >> to do the right thing (not that I have ever used these hooks). > >> > >> > Meanwhile I use the script below to generate X commands to reload > >> > changed > >> > windows. If I had a little more gumption (and less fear) I'd pipe the > >> > last > >> > output to make acme execute the Edits. > >> > > >> > #!/bin/bash > >> > cd `git rev-parse --git-dir`/.. > >> > git diff --name-only HEAD~ | sed s+^+`pwd`/+ | sort > /tmp/foobar > >> > 9p read acme/index | awk '{print $6}' | sort | comm -12 - > /tmp/foobar | > >> > sed 's+\(.*\)+Edit X=\1=,r+' > >> > >> Nice! > >> > > > > --001a11c1eac60e346e0512d4614b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
wouldn't something like this work? =C2=A0in the e= xample i (clumsily) find the .go files, remove them and then B them in agai= n.

% for (i in `{9p ls acme|grep '[1-9]+'}= ) {
x =3D `{9p= read acme/$i/tag|sed -n -e 's/^([^ ]*\.go) .*$/\1/p' }
<= span class=3D"" style=3D"white-space:pre"> if (! ~ $x '') {<= /div>
echo del | 9p= write acme/$i/ctl
<= /span>B $x
}
}

On Fri, Apr 3, 2015 at 6:16 AM, Mathieu Lonjaret <= ;mathieu.lo= njaret@gmail.com> wrote:
Ye= s, I had seen that thread, but I explained I don't want the same
thing as what you're asking for. I do not want to refresh them all in one command. I want to selectively refresh some of them, but in an
easier fashion than having to type Get for each of them.


On 28 March 2015 at 08:19, Aram Santogidis <gnubuntux@gmail.com> wrote:
> Hi,
>
> I posted a similar question in the list few days back
> http://marc.info/?l=3D9fans&m=3D142721596630272= &w=3D1
>
> and one solution that was suggested by Antons and works fine for me is= the
> following.
>
> Edit X:^... [^+].*[^\/]$: e
>
> Cheers,
> Aram
>
> On Thu, Mar 26, 2015 at 11:05 PM, Bakul Shah <bakul@bitblocks.com> wrote:
>>
>>
>> On Thu, 26 Mar 2015 18:49:51 -0000 Paul Lalonde <paul.a.lalonde@gmail.com>
>> wrote:
>> > The feature direction I'd like when working with Git is f= or the window
>> > of a
>> > git-changed file to become un-editable.=C2=A0 This would requ= ire adding the
>> > idea
>> > of a un-editable window, which is probably a bad idea.
>>
>> Not sure what you mean. If you git {pull,checkout,merge,...},
>> files you have been editing (but not yet saved) may already
>> require merging. You may be better off using some client side
>> git hook that checks the state of acme edited files and tries
>> to do the right thing (not that I have ever used these hooks).
>>
>> > Meanwhile I use the script below to generate X commands to re= load
>> > changed
>> > windows.=C2=A0 If I had a little more gumption (and less fear= ) I'd pipe the
>> > last
>> > output to make acme execute the Edits.
>> >
>> > #!/bin/bash
>> > cd `git rev-parse --git-dir`/..
>> > git diff --name-only HEAD~ | sed s+^+`pwd`/+ | sort > /tmp= /foobar
>> > 9p read acme/index | awk '{print $6}' | sort | comm -= 12 - /tmp/foobar=C2=A0 |
>> > sed 's+\(.*\)+Edit X=3D\1=3D,r+'
>>
>> Nice!
>>
>


--001a11c1eac60e346e0512d4614b--