9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Acme, dump, and $HOME
@ 2014-01-13 16:42 Paul Lalonde
  2014-01-13 16:49 ` dexen deVries
  2014-01-13 16:57 ` Charles Forsyth
  0 siblings, 2 replies; 13+ messages in thread
From: Paul Lalonde @ 2014-01-13 16:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

Can anyone explain to me the rationale of Dump dropping acme.dump in $HOME
instead of $PWD?
I know I can pass it a different filename, but it seems odd to put it in
$HOME instead of where acme is called from.
My use case is this: I'm working on two projects, and so want to maintain
two long-term "sessions".  Dump does most of what I need when I move from
one to the other, but if I don't chord in the project root directory to
save the dump to, I kill my other project session.
A one line change to looking at $PWD instead of $HOME makes acme much more
useful for my case, but am I missing an important other use?

Paul

[-- Attachment #2: Type: text/html, Size: 735 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 16:42 [9fans] Acme, dump, and $HOME Paul Lalonde
@ 2014-01-13 16:49 ` dexen deVries
  2014-01-13 18:29   ` Paul Lalonde
  2014-01-13 16:57 ` Charles Forsyth
  1 sibling, 1 reply; 13+ messages in thread
From: dexen deVries @ 2014-01-13 16:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Monday 13 of January 2014 08:42:22 Paul Lalonde wrote:
> Can anyone explain to me the rationale of Dump dropping acme.dump in $HOME
> instead of $PWD?
> I know I can pass it a different filename, but it seems odd to put it in
> $HOME instead of where acme is called from.
> My use case is this: I'm working on two projects, and so want to maintain
> two long-term "sessions".  Dump does most of what I need when I move from
> one to the other, but if I don't chord in the project root directory to
> save the dump to, I kill my other project session.
> A one line change to looking at $PWD instead of $HOME makes acme much more
> useful for my case, but am I missing an important other use?


from acme(1):

Dump Write the state of acme to the file name, if specified, or 
$home/acme.dump by default.


i.e., Dump takes one optional argument: file pathname.


-- 
dexen deVries

[[[↓][→]]]




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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 16:42 [9fans] Acme, dump, and $HOME Paul Lalonde
  2014-01-13 16:49 ` dexen deVries
@ 2014-01-13 16:57 ` Charles Forsyth
  2014-01-13 18:30   ` Paul Lalonde
  2014-01-16  5:39   ` b.
  1 sibling, 2 replies; 13+ messages in thread
From: Charles Forsyth @ 2014-01-13 16:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

On 13 January 2014 16:42, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:

> Can anyone explain to me the rationale of Dump dropping acme.dump in $HOME
> instead of $PWD?


alternatively, if started with acme -l dumpfile, why not write it back to
the same file?

[-- Attachment #2: Type: text/html, Size: 558 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 16:49 ` dexen deVries
@ 2014-01-13 18:29   ` Paul Lalonde
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Lalonde @ 2014-01-13 18:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]

Yes, I understand the current behaviour.  I don't understand why $home was
privileged this way, instead of the startup directory.  So for instance, if
I drop the dump filename in the top-level tag, and chord it against dump, I
get the right thing - it's deposited in the directory where acme was
started.  I just don't understand why "acme.dump" should go to $home by
default, when everything else in the editor is relative to the window
directory.


On Mon, Jan 13, 2014 at 8:49 AM, dexen deVries <dexen.devries@gmail.com>wrote:

> On Monday 13 of January 2014 08:42:22 Paul Lalonde wrote:
> > Can anyone explain to me the rationale of Dump dropping acme.dump in
> $HOME
> > instead of $PWD?
> > I know I can pass it a different filename, but it seems odd to put it in
> > $HOME instead of where acme is called from.
> > My use case is this: I'm working on two projects, and so want to maintain
> > two long-term "sessions".  Dump does most of what I need when I move from
> > one to the other, but if I don't chord in the project root directory to
> > save the dump to, I kill my other project session.
> > A one line change to looking at $PWD instead of $HOME makes acme much
> more
> > useful for my case, but am I missing an important other use?
>
>
> from acme(1):
>
> Dump Write the state of acme to the file name, if specified, or
> $home/acme.dump by default.
>
>
> i.e., Dump takes one optional argument: file pathname.
>
>
> --
> dexen deVries
>
> [[[↓][→]]]
>
>
>

[-- Attachment #2: Type: text/html, Size: 2053 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 16:57 ` Charles Forsyth
@ 2014-01-13 18:30   ` Paul Lalonde
  2014-01-13 18:53     ` Bence Fábián
                       ` (2 more replies)
  2014-01-16  5:39   ` b.
  1 sibling, 3 replies; 13+ messages in thread
From: Paul Lalonde @ 2014-01-13 18:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

That seems even more magical, I think.

I've been running with Dump's $HOME lookup changed to $PWD for a few days
now with nary a glitch.
Unless someone tells me otherwise I'll start pushing for a patch :-)

Paul


On Mon, Jan 13, 2014 at 8:57 AM, Charles Forsyth
<charles.forsyth@gmail.com>wrote:

>
> On 13 January 2014 16:42, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:
>
>> Can anyone explain to me the rationale of Dump dropping acme.dump in
>> $HOME instead of $PWD?
>
>
> alternatively, if started with acme -l dumpfile, why not write it back to
> the same file?
>

[-- Attachment #2: Type: text/html, Size: 1261 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 18:30   ` Paul Lalonde
@ 2014-01-13 18:53     ` Bence Fábián
  2014-01-13 19:01       ` Paul Lalonde
  2014-01-13 19:17     ` Charles Forsyth
  2014-01-13 21:39     ` Pete
  2 siblings, 1 reply; 13+ messages in thread
From: Bence Fábián @ 2014-01-13 18:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

Because this way there is one default dump file.
Maybe it should be $home/lib/acme.dump
But when i turn on my terminal it runs acme -l $home/acme.dump
automatically. And before i turn it off i just press dump.
If I need to preserve a state for longer i can do
Dump otherfile. For me this seems the saner behaviour.

tl;dr I'm against your patch, sorry


2014/1/13 Paul Lalonde <paul.a.lalonde@gmail.com>

> That seems even more magical, I think.
>
> I've been running with Dump's $HOME lookup changed to $PWD for a few days
> now with nary a glitch.
> Unless someone tells me otherwise I'll start pushing for a patch :-)
>
> Paul
>
>
> On Mon, Jan 13, 2014 at 8:57 AM, Charles Forsyth <
> charles.forsyth@gmail.com> wrote:
>
>>
>> On 13 January 2014 16:42, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:
>>
>>> Can anyone explain to me the rationale of Dump dropping acme.dump in
>>> $HOME instead of $PWD?
>>
>>
>> alternatively, if started with acme -l dumpfile, why not write it back to
>> the same file?
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2105 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 18:53     ` Bence Fábián
@ 2014-01-13 19:01       ` Paul Lalonde
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Lalonde @ 2014-01-13 19:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]

Your described behaviour is unaffected by the patch unless you are running
acme (automatically) from another directory.

Paul


On Mon, Jan 13, 2014 at 10:53 AM, Bence Fábián <begnoc@gmail.com> wrote:

> Because this way there is one default dump file.
> Maybe it should be $home/lib/acme.dump
> But when i turn on my terminal it runs acme -l $home/acme.dump
> automatically. And before i turn it off i just press dump.
> If I need to preserve a state for longer i can do
> Dump otherfile. For me this seems the saner behaviour.
>
> tl;dr I'm against your patch, sorry
>
>
> 2014/1/13 Paul Lalonde <paul.a.lalonde@gmail.com>
>
>> That seems even more magical, I think.
>>
>> I've been running with Dump's $HOME lookup changed to $PWD for a few days
>> now with nary a glitch.
>> Unless someone tells me otherwise I'll start pushing for a patch :-)
>>
>> Paul
>>
>>
>> On Mon, Jan 13, 2014 at 8:57 AM, Charles Forsyth <
>> charles.forsyth@gmail.com> wrote:
>>
>>>
>>> On 13 January 2014 16:42, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:
>>>
>>>> Can anyone explain to me the rationale of Dump dropping acme.dump in
>>>> $HOME instead of $PWD?
>>>
>>>
>>> alternatively, if started with acme -l dumpfile, why not write it back
>>> to the same file?
>>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 2650 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 18:30   ` Paul Lalonde
  2014-01-13 18:53     ` Bence Fábián
@ 2014-01-13 19:17     ` Charles Forsyth
  2014-01-13 19:18       ` erik quanstrom
                         ` (2 more replies)
  2014-01-13 21:39     ` Pete
  2 siblings, 3 replies; 13+ messages in thread
From: Charles Forsyth @ 2014-01-13 19:17 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

On 13 January 2014 18:30, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:

> That seems even more magical, I think.
>

The idea is that the dump file is a snapshot of a particular state, and it
made sense to me to update
the given state, instead of putting it back in the default file despite
being given an explicit state.
That seemed to me a bit contrary.

[-- Attachment #2: Type: text/html, Size: 747 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 19:17     ` Charles Forsyth
@ 2014-01-13 19:18       ` erik quanstrom
  2014-01-13 19:19       ` erik quanstrom
  2014-01-13 19:36       ` Paul Lalonde
  2 siblings, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2014-01-13 19:18 UTC (permalink / raw)
  To: 9fans

> The idea is that the dump file is a snapshot of a particular state, and it
> made sense to me to update
> the given state, instead of putting it back in the default file despite
> being given an explicit state.
> That seemed to me a bit contrary.

agree.

- erik



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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 19:17     ` Charles Forsyth
  2014-01-13 19:18       ` erik quanstrom
@ 2014-01-13 19:19       ` erik quanstrom
  2014-01-13 19:36       ` Paul Lalonde
  2 siblings, 0 replies; 13+ messages in thread
From: erik quanstrom @ 2014-01-13 19:19 UTC (permalink / raw)
  To: 9fans

>
> The idea is that the dump file is a snapshot of a particular state, and it
> made sense to me to update
> the given state, instead of putting it back in the default file despite
> being given an explicit state.
> That seemed to me a bit contrary.

also if a snapshot is wanted, then we have a tool for that: cp(1).  :-)

- erik



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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 19:17     ` Charles Forsyth
  2014-01-13 19:18       ` erik quanstrom
  2014-01-13 19:19       ` erik quanstrom
@ 2014-01-13 19:36       ` Paul Lalonde
  2 siblings, 0 replies; 13+ messages in thread
From: Paul Lalonde @ 2014-01-13 19:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

It certainly addresses my use case.  I'll give it a spin when I next have 5
minutes to mess with it.

Paul



On Mon, Jan 13, 2014 at 11:17 AM, Charles Forsyth <charles.forsyth@gmail.com
> wrote:

>
> On 13 January 2014 18:30, Paul Lalonde <paul.a.lalonde@gmail.com> wrote:
>
>> That seems even more magical, I think.
>>
>
> The idea is that the dump file is a snapshot of a particular state, and it
> made sense to me to update
> the given state, instead of putting it back in the default file despite
> being given an explicit state.
> That seemed to me a bit contrary.
>

[-- Attachment #2: Type: text/html, Size: 1305 bytes --]

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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 18:30   ` Paul Lalonde
  2014-01-13 18:53     ` Bence Fábián
  2014-01-13 19:17     ` Charles Forsyth
@ 2014-01-13 21:39     ` Pete
  2 siblings, 0 replies; 13+ messages in thread
From: Pete @ 2014-01-13 21:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 2014年01月13日 18:30, Paul Lalonde wrote:
> I've been running with Dump's $HOME lookup changed to $PWD for a few days
> now with nary a glitch.

I think using $PWD might give you a few problems.  I had written a
wrapper script around acme that bound ./acme.dump over $home/acme.dump,
and when ./ happens to be inside a remote filesystem, acme would get
upset if it suddenly became inaccessible due to flaky wifi or something,
and of course the time that you want a dump the most is when you can't
save your work by other means.

I've switched to just binding dumps from a directory in $home.  If you
want to do some guessing of the dump name or something, I don't suspect
that it'd take more than about 10 or 20 lines of rc to do it.



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

* Re: [9fans] Acme, dump, and $HOME
  2014-01-13 16:57 ` Charles Forsyth
  2014-01-13 18:30   ` Paul Lalonde
@ 2014-01-16  5:39   ` b.
  1 sibling, 0 replies; 13+ messages in thread
From: b. @ 2014-01-16  5:39 UTC (permalink / raw)
  To: 9fans

On 1/13/14, 11:57 AM, Charles Forsyth wrote:
>
> On 13 January 2014 16:42, Paul Lalonde <paul.a.lalonde@gmail.com
> <mailto:paul.a.lalonde@gmail.com>> wrote:
>
>     Can anyone explain to me the rationale of Dump dropping acme.dump in
>     $HOME instead of $PWD?
>
>
> alternatively, if started with acme -l dumpfile, why not write it back
> to the same file?

I had written a rather quick patch to do that very thing for p9p acme:

http://pastebin.com/raw.php?i=n7dZiQrS

I'm sure it could be done better, but here's the patch regardless.



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

end of thread, other threads:[~2014-01-16  5:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 16:42 [9fans] Acme, dump, and $HOME Paul Lalonde
2014-01-13 16:49 ` dexen deVries
2014-01-13 18:29   ` Paul Lalonde
2014-01-13 16:57 ` Charles Forsyth
2014-01-13 18:30   ` Paul Lalonde
2014-01-13 18:53     ` Bence Fábián
2014-01-13 19:01       ` Paul Lalonde
2014-01-13 19:17     ` Charles Forsyth
2014-01-13 19:18       ` erik quanstrom
2014-01-13 19:19       ` erik quanstrom
2014-01-13 19:36       ` Paul Lalonde
2014-01-13 21:39     ` Pete
2014-01-16  5:39   ` b.

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