From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Earl Newsgroups: gmane.emacs.help Subject: Re: What's your favourite *under_publicized* editing feature ofEmacs? Date: Wed, 23 Feb 2011 12:22:58 -0700 Organization: XMission http://xmission.com/ Message-ID: <87tyfutv1p.fsf@notengoamigos.org> References: <1578157c-17a0-41ea-9420-9330f68b10fe@glegroupsg2000goo.googlegroups.com> <87ei6zpbor.fsf@rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1298490045 11910 80.91.229.12 (23 Feb 2011 19:40:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Feb 2011 19:40:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 23 20:40:40 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PsKZj-00026J-J4 for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Feb 2011 20:40:39 +0100 Original-Received: from localhost ([127.0.0.1]:49739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsKZi-0004pZ-Si for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Feb 2011 14:40:39 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!xmission!nnrp.xmission!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs,comp.lang.lisp Original-Lines: 86 Original-NNTP-Posting-Host: 67.214.244.122 Original-X-Trace: news.xmission.com 1298488959 8582 67.214.244.122 (23 Feb 2011 19:22:39 GMT) Original-X-Complaints-To: abuse@xmission.com Original-NNTP-Posting-Date: Wed, 23 Feb 2011 19:22:39 +0000 (UTC) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAABGdBTUEAALGPC/xhBQAAAAFz UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlw SFlzAAASmwAAEpsB4JJZDAAAAAl2cEFnAAAAMAAAADAAzu6MVwAAAaFJREFUSMe1VtuxxSAIzIz9 2Iyl2Aj1bBX0k5+LrwjGjJyPy2ROwtGNBJbVCwwwy1UNoOL3f+SBxkj15Lr4NsboN24DWMZxYQNA TjGmjC1gswJiqBbpDeANYMwXBFyAFB5L7ADMBcoSDgAFBSDHR2tA8ABMSB4AawB76pAnILsKx2lm 1VfpgUi3kxrySylRHdmQj40Jva2/jl8EY3Twv/phhsC9nIQR0hnAOUptYsL3RxvAk+YIH2AWsvTH GYBgKn8GaPYm5jNANaCQ8WfAzyH9x0crFfGl9X4QVdg8gEqN2KjBHi6V/iBq6iyAxTqd+Yvupwai VwM9LZkxQ6otihmS6H+mHlK5URwi0UQgWxHoxS5JagBSed7IzJRCallS2pg2QsamcGUFNSHgLZUv augJIUualv1Bv6+yVat1oeMq92s/mBBWQJH7dQX7CnpvWWs/4CazpHlB2RR1BFSzNGdIaTbbLil8 U76BKKU0GztapXP3C78bNYQ6MTQybY8OkIaITf9HPzyHkXE4YXs4mf5VDz+jAepj3RTQ3Ubv0SPy 9AcCrfKh0TBgvgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxMS0wMS0wM1QxMDo1MDo1NC0wNzowMIgC s0IAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTAtMDQtMDVUMTM6MjQ6NDgtMDY6MDCtwF/YAAAAAElF TkSuQmCC User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:anIx38n7GJPUrZacEMc2wIIXBmU= Original-Xref: usenet.stanford.edu gnu.emacs.help:185245 comp.emacs:101091 comp.lang.lisp:299869 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:79404 Archived-At: On Wed, Feb 23 2011, Cthun wrote: > On 23/02/2011 12:22 AM, Tim X wrote: >> Cthun writes: >> >>> On 22/02/2011 2:47 PM, Alan Mackenzie wrote: >>>> There seems to be a contradiction between those last two >>>> paragraphs. Saving buffers and finding files are relatively rare >>>> operations which thus shouldn't be given very easy to press key >>>> sequences like C-s and C-o. >>> >>> Where do you live where software never crashes and the electricity >>> never goes out? Most of us learn to save very frequently to limit >>> how much we'll have to do over again if the power goes out or >>> whatever. >> >> Most of us use smart editors that auto-save regularly and free the >> user form having to do this manually all the time. > > Ah, auto-save, another fruitful source of trouble. I don't think that I have ever had problems with auto save. Especially with the sort of plain text documents that Emacs deals with. > Auto-save has two design alternatives. One, it just acts like the user > hit control-S, every some interval. This is what I set up. In fact, I have an entire directory (under ~/.emacs.d/backup) full of old save files. I don't think that I have ever actually fished a file out of there, Emacs' recover-session stuff has always been more than good enough, but it is nice to know that they exist. > This runs into trouble if you do something drastic you later want to > undo. Actually, Emacs warns you before it makes drastic changes to an autosave file. This at least gives you the opportunity to do something about it. > Sure you can fork the file, but if you forget ... and then there's > forking it "dangerously" -- first you make a big deletion, and then > you hit alt, f, a for save-as to save the drastically-changed version > under a new name, but pow, an autosave happens to occur *after* the > deletion and *before* the save-as. So much for being able to undo > it... The solution, of course, is to manually save *before* the fork. I real life I don't think that this is much of a problem, especially with Emacs which has infinite undo and which tends to be a very stable piece of software. What's more, Emacs is flexible enough that you can easily set up whatever sort of auto-save functionality that you think you want. If you feel like your data is so critical that you want it saved in a version control system and pushed off to a new machine every 5 minutes Emacs can do that. It has an auto-save-hook that you can add code to, and it has all sorts of built in machinery for committing to version control, saving files on remote machines, etc. > The other option is auto-save to some temporary file, or a sequence of > numbered files. Of course if you have a power outage or something now > you have to go hunting for where the darn thing saved > these. Depending, they may even be vulnerable to being erased by an > automatic temp file cleanup script before you get to them. Emacs does not (by default) save auto-save files somewhere where they are likely to get cleaned up. I suppose you could set up your system in such a way as to jeopardize these files, but you can not hardly blame Emacs for that. Another alternative, of course, is to simply save the file whenever you feel you have something worth saving. C-x C-s is not exactly hard to type. C-x v v would probably even commit the changes to version control. > Sequences of numbered files used to risk filling up the filesystem, > too, but not with text files in this day and age. On the bright side Emacs can be made to do whatever makes you the happiest. Very few other programs have anywhere near that sort of flexibility. For most folks, however, the defaults are what they want. I don't like having the auto-save files clutter up my directories, so I customized a single variable to save them in a central location. That seems easy enough to me. Jason