all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Most painless way to set an editing checkpoint?
@ 2010-07-26 21:56 Sean McAfee
  2010-07-26 22:34 ` Tim X
  0 siblings, 1 reply; 2+ messages in thread
From: Sean McAfee @ 2010-07-26 21:56 UTC (permalink / raw)
  To: help-gnu-emacs

Sometimes I want to embark on a series of editing operations that I'm
not sure I'll end up keeping.  None of the various ways I've used to
revert to a previous state are entirely satisfactory:

1.  Just undo everything.  It can be difficult to know when to stop,
especially when the changes are scattered throughout the file.

2.  Save the current buffer contents in a temporary file.  But then you
have to remember to delete it afterwards, as well as apply some
buffer-association boilerplate in the meantime.

3.  Stuff the entire buffer contents into a register.  This solution
probably has the least overhead, but I worry that I'll accidentally
overwrite it.  I can use a register I don't otherwise use very often,
but then a small but annoying fraction of my attention is occupied
remembering which register it is.  This solution also becomes less
feasible the more files I want to simultaneously apply this treatment
to.

Any other suggestions?


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

* Re: Most painless way to set an editing checkpoint?
  2010-07-26 21:56 Most painless way to set an editing checkpoint? Sean McAfee
@ 2010-07-26 22:34 ` Tim X
  0 siblings, 0 replies; 2+ messages in thread
From: Tim X @ 2010-07-26 22:34 UTC (permalink / raw)
  To: help-gnu-emacs

Sean McAfee <eefacm@gmail.com> writes:

> Sometimes I want to embark on a series of editing operations that I'm
> not sure I'll end up keeping.  None of the various ways I've used to
> revert to a previous state are entirely satisfactory:
>
> 1.  Just undo everything.  It can be difficult to know when to stop,
> especially when the changes are scattered throughout the file.
>
> 2.  Save the current buffer contents in a temporary file.  But then you
> have to remember to delete it afterwards, as well as apply some
> buffer-association boilerplate in the meantime.
>
> 3.  Stuff the entire buffer contents into a register.  This solution
> probably has the least overhead, but I worry that I'll accidentally
> overwrite it.  I can use a register I don't otherwise use very often,
> but then a small but annoying fraction of my attention is occupied
> remembering which register it is.  This solution also becomes less
> feasible the more files I want to simultaneously apply this treatment
> to.
>
> Any other suggestions?

What about using one of the version control backends. From your
description, some of the features of git would possibly provide you with
the type of workflow you describe without polluting the repository with
too many commits as you have its 'staging' mechanism to take advantage
of.

Tim
-- 
tcross (at) rapttech dot com dot au


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

end of thread, other threads:[~2010-07-26 22:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 21:56 Most painless way to set an editing checkpoint? Sean McAfee
2010-07-26 22:34 ` Tim X

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.