unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* say when undo reaches last save
@ 2003-04-26 22:08 Dan Jacobson
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Jacobson @ 2003-04-26 22:08 UTC (permalink / raw)


Idea: you know how we usually do edit, save, edit, save ...
Well, when hitting the undo button, C-/, it would be nice to know when
we have reached at least the most recent previous save depth!

Sure, if we haven't saved recently, then we just hit undo until we see
the ** change into a -- in the modeline.

But, let's say we are lest happy with this compile of the file and
want to backtrack to the previous version just a few steps ago, and no
further.  Well, just hitting undo, there is just those "Undo!"
messages in the mimbuffer, no hint of when we pass the undo that
marked the last save.

No voices from the peanut gallery saying "just save a .bak", please.
-- 
http://jidanni.org/ Taiwan(04)25854780

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

* Re: say when undo reaches last save
       [not found] <mailman.5238.1051404409.21513.bug-gnu-emacs@gnu.org>
@ 2003-04-28 15:21 ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2003-04-28 15:21 UTC (permalink / raw)


Dan Jacobson wrote:

> Idea: you know how we usually do edit, save, edit, save ...
> Well, when hitting the undo button, C-/, it would be nice to know when
> we have reached at least the most recent previous save depth!
> 
> Sure, if we haven't saved recently, then we just hit undo until we see
> the ** change into a -- in the modeline.
> 
> But, let's say we are lest happy with this compile of the file and
> want to backtrack to the previous version just a few steps ago, and no
> further.  Well, just hitting undo, there is just those "Undo!"
> messages in the mimbuffer, no hint of when we pass the undo that
> marked the last save.
> 
> No voices from the peanut gallery saying "just save a .bak", please.

1. M-x revert-buffer RET (aka <menu-bar> <files> <revert-buffer>)

2. M-x find-alternate-file RET (aka C-x C-v)

3. Try this:

(defadvice undo (after buffer-modified-message activate)
   "If undoing the changes leaves the buffer unmodified (as it is is on disk),
display a message."
   (if (not (buffer-modified-p))
       (message "Buffer unmodified since its file was last read or saved")))

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

end of thread, other threads:[~2003-04-28 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-26 22:08 say when undo reaches last save Dan Jacobson
     [not found] <mailman.5238.1051404409.21513.bug-gnu-emacs@gnu.org>
2003-04-28 15:21 ` Kevin Rodgers

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).