9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] acme automatic dump
@ 2013-06-12  9:33 roger peppe
  2013-06-13 13:16 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: roger peppe @ 2013-06-12  9:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

My laptop has been a bit flaky recently
which has brought this issue to the fore for me
(nothing like a few hours' lost work to prompt
some action!)

If my computer crashes, it would be great
if I didn't lose all my unsaved work in acme.

I'm thinking of adding some way to automatically
executing a Dump on a periodic basis.

I can think of at least two approaches:

1) implement the functionality inside acme itself
(e.g. with a command-line flag)

2) implement a way of triggering a dump through
the fs interface (e.g. by adding a root-level ctl
file and allowing a "dump" message).

The second is probably less work, but is harder
to get just right (you'd probably want a way to
check if anything has changed too, to avoid
needless churn when acme's sitting idle).

Has anyone already done something like this?
Any strong thoughts on which of the above
approaches is preferable, if any?



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

* Re: [9fans] acme automatic dump
  2013-06-12  9:33 [9fans] acme automatic dump roger peppe
@ 2013-06-13 13:16 ` erik quanstrom
  0 siblings, 0 replies; 2+ messages in thread
From: erik quanstrom @ 2013-06-13 13:16 UTC (permalink / raw)
  To: 9fans

> 1) implement the functionality inside acme itself
> (e.g. with a command-line flag)
> 
> 2) implement a way of triggering a dump through
> the fs interface (e.g. by adding a root-level ctl
> file and allowing a "dump" message).
> 
> The second is probably less work, but is harder
> to get just right (you'd probably want a way to
> check if anything has changed too, to avoid
> needless churn when acme's sitting idle).

if acme simply set a bit on dump "cleansincedump" and cleared that
bit on any edit, then a conditional dump if not clean would prevent
any churn, and seems like it could be pretty straightforward.
it would also solve one of my pet peeves—having to
confirm quitting acme right after a dump because there are
"changed files".

- erik



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

end of thread, other threads:[~2013-06-13 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-12  9:33 [9fans] acme automatic dump roger peppe
2013-06-13 13:16 ` erik quanstrom

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