unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jason Earl <jearl@notengoamigos.org>
To: help-gnu-emacs@gnu.org
Subject: Re: What's your favourite *under_publicized* editing feature ofEmacs?
Date: Wed, 23 Feb 2011 16:54:29 -0700	[thread overview]
Message-ID: <874o7utih6.fsf@notengoamigos.org> (raw)
In-Reply-To: ik4148$ctu$1@speranza.aioe.org

On Wed, Feb 23 2011, Cthun wrote:

> On 23/02/2011 2:22 PM, Jason Earl wrote:
>> On Wed, Feb 23 2011, Cthun wrote:
>>> 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.
>
> Oh, wonderful.
>
> Do you know what I'd do if I was in the middle of typing some stuff
> into a text editor after just having deleted a bunch of stuff and then
> suddenly a box popped up saying something about autosaving and drastic
> changes and yadda yadda yadda but I didn't have time to read it before
> one of my enter keypresses (intended for the actual document I was
> typing into when the box interrupted me) triggers one of the dialog's
> buttons (which?) and it disappears again (and does who knows what to
> my hard drive?).
>
> I'd delete that editor and go get a new one, that's what. :)

So would I, but, of course, that's not what Emacs does.  It just turns
off auto-save and warns you in the mini-buffer.  Here's the message:

    Buffer foo.txt has shrunk a lot; auto save disabled in that buffer
    until next real save

Emacs' auto-save is triggered by default on idle, so it should never
happen while you are typing.  However, even if it does, it is not going
to get in your way.

And, like all things Emacs, if you do not like the default you can
change it easily.

>> The solution, of course, is to manually save *before* the fork.
>
> Yes, but the reality is that people will sometimes forget to do so, or
> in that order.

It would seem to me that you would basically have to be the sort of
person that *relies* on the auto-save feature to do things in any other
order.  If I am manually going fork a file then it seems like I would
want to make sure that I forked from a known good spot.

I used to work on a help desk and my experience says that most people
don't even know that their editor has an auto-save (or how to get the
auto-save files it creates) until something tragic happens.  They
certainly don't expect their editor to magically save the correct state
of a file that they didn't manually save.

>> I real life I don't think that this is much of a problem, especially
>> with Emacs which has infinite undo
>
> Infinite undo? On what planet? When I experimented with it, back in
> college, I found the undo to just toggle undo/redo like Windows
> Notepad's. (I ended up experimenting also with LSD and mescaline and
> decided on none of the above.)

I thought it was infinite undo, but according to the manual the default
limit is 12,000,000 bytes.  Needless to say, I have never actually ran
out of undo information.

>> 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're a computer programmer with time to spare reprogramming the
> editor instead of actually doing your job, perhaps.

I'm just saying that, if you care about auto-save as much as you seem to
care about auto-save, that Emacs gives you options that other tools do
not.  Personally, other than changing where Emacs saves its auto-save
files I just stick with the defaults.

I personally think that Emacs' superior auto-save features would be a
strange reason for choosing Emacs, but who am I to judge.

>> Emacs can do that.  It has an auto-save-hook that you can add code to
>
> and ten million ways to subtly or drastically-but-irrecoverably fuck
> things up if you make some subtle mistake doing so, no doubt.
>
> Thanks, but no thanks.

Obviously any time you are writing code you have the opportunity to code
something that doesn't work.  On the other hand, computers are far less
likely to "forget" a step than you or I are.  Automation is generally a
good thing.

>> Another alternative, of course, is to simply save the file whenever
>> you feel you have something worth saving.
>
> Well, there you go, then. That's exactly what I was originally
> advocating! So, you've come around to agreeing with me at last.
>
> Ah, progress ...



>>> 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.
>
> Can it be made to cut itself, scream like a thing tortured, and then
> die? ;)

That seems like an odd thing to want from a text editor, but yes, you
can teach emacs to do that.  I even tested it.

--8<---------------cut here---------------start------------->8---
(defun die! ()
  (save-buffers-kill-emacs t))

(defun scream ()
  (message "Arrgggh!"))

(defun cut-yourself ()
  (interactive)
  (message "I am bleeding")
  (sleep-for 5)
  (scream)
  (sleep-for 5)
  (die!))
--8<---------------cut here---------------end--------------->8---

>> Very few other programs have anywhere near that sort of flexibility.
>
> If I want that much flexibility I'll look at that Russian mail-order
> catalog. There *is* something to be said for structure and stability
> in fundamental, daily-use tools. And standards-adherence.

Emacs has been adhering to the same standards almost as long as I have
been alive.

>> For most folks, however, the defaults are what they want.
>
> Wait a minute. I thought you just said that the Emacs defaults are
> what most people want. But that's clearly impossible, so I can only
> presume that your post got garbled in transit. Care to repost whatever
> you'd said at this point?

Emacs' defaults for auto-save are what most people want.


  reply	other threads:[~2011-02-23 23:54 UTC|newest]

Thread overview: 179+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27  8:33 What's your favourite *under_publicized* editing feature of Emacs? Le Wang
2011-01-27  9:29 ` Deniz Dogan
2011-01-27 12:03 ` Wang Lei
2011-01-27 14:13   ` suvayu ali
2011-01-27 14:12 ` Ken Goldman
2011-01-27 18:11 ` Erik Iverson
     [not found] ` <mailman.0.1296137574.27610.help-gnu-emacs@gnu.org>
2011-01-27 22:23   ` Joe Fineman
2011-01-28  6:40     ` Jason Rumney
2011-01-28 18:25       ` What's your favourite *under_publicized* editing feature ofEmacs? Drew Adams
     [not found]       ` <mailman.12.1296239161.1176.help-gnu-emacs@gnu.org>
2011-02-22 14:49         ` Xah Lee
2011-02-22 16:27           ` despen
2011-02-23  3:52             ` Glenn Morris
2011-02-22 19:47           ` Alan Mackenzie
2011-02-23  0:21             ` Xah Lee
2011-02-23  2:06             ` Cthun
2011-02-23  2:33               ` Rafe Kettler
2011-02-23  5:19                 ` Cthun
2011-02-23  7:07                   ` Tim X
2011-02-23 13:28                     ` Keyboarding [Re: What's your favourite *under_publicized* editing feature ofEmacs?] Xah Lee
2011-02-23 15:39                     ` What's your favourite *under_publicized* editing feature ofEmacs? Cthun
2011-02-23 19:50                       ` Óscar Fuentes
2011-02-23 22:57                       ` Tim X
2011-02-24  0:04                         ` trebol55555
2011-02-24  3:48                         ` Cthun
2011-02-23  9:23                   ` Brendan Halpin
2011-02-23 17:15                   ` Rafe Kettler
2011-02-23 18:33                     ` Ilya Zakharevich
2011-02-23 18:47                       ` Deniz Dogan
2011-02-23 22:08                       ` Cthun
2011-02-23 22:07                     ` Cthun
2011-02-23 23:46                       ` Pascal J. Bourguignon
2011-02-24  3:53                         ` Cthun
2011-02-24  3:58                     ` Stefan Monnier
2011-02-24  7:06                       ` Leo
2011-02-24 15:58                       ` Richard Riley
2011-02-24 17:20                         ` despen
2011-02-24 14:43                     ` fortunatus
2011-02-24 16:43                       ` Xah Lee
2011-02-24 17:48                         ` Eric Schulte
2011-02-24 18:38                           ` Cthun
2011-02-24 23:14                           ` Xah Lee
2011-02-25  1:44                             ` javax.swing.JSnarker
2011-02-25  7:16                             ` Alan Mackenzie
2011-02-25 12:11                               ` rusi
2011-02-25 18:54                                 ` Alan Mackenzie
2011-02-25 23:19                                   ` Thien-Thi Nguyen
2011-02-26  4:01                                   ` rusi
2011-02-24 18:37                       ` javax.swing.JSnarker
2011-02-24 22:04                       ` Deniz Dogan
2011-02-23  7:16                 ` D Herring
2011-02-23  5:22               ` Tim X
2011-02-23 15:13                 ` Cthun
2011-02-23 18:06                   ` Eli Zaretskii
2011-02-23 19:22                   ` Jason Earl
2011-02-23 22:18                     ` Cthun
2011-02-23 23:54                       ` Jason Earl [this message]
2011-02-24  4:05                         ` Cthun
2011-02-24  5:19                   ` PJ Weisberg
2011-02-24  5:38                     ` Todd Wylie
2011-02-25  2:48                       ` PJ Weisberg
2011-02-25 18:43                 ` Jim Janney
2011-02-26  6:05                   ` Cthun
2011-02-26  7:21                     ` PJ Weisberg
2011-02-26 20:13                     ` Stefan Monnier
2011-02-27  6:21                       ` Cthun
2011-02-27  8:08                         ` David Kastrup
2011-02-27 15:28                           ` Cthun
2011-02-27 15:46                             ` David Kastrup
2011-02-27 15:51                               ` Cthun
2011-02-27 17:28                                 ` Julian Bradfield
2011-02-27 19:52                                   ` Cthun
2011-02-27 20:41                                     ` Alan Mackenzie
2011-02-27 21:02                                       ` Cthun
2011-02-27 20:59                                     ` Robert D. Crawford
2011-02-27 20:58                                   ` Tim Bradshaw
2011-02-27 21:02                                     ` Cthun
2011-02-27 21:12                                       ` David Kastrup
2011-02-27 22:02                                         ` Cthun
2011-02-28  3:51                                           ` Stefan Monnier
2011-02-28  9:53                                             ` David Kastrup
2011-02-28 18:04                                               ` Cthun
2011-02-28 19:03                                                 ` Eric Abrahamsen
     [not found]                                                 ` <mailman.2.1298919859.18999.help-gnu-emacs@gnu.org>
2011-02-28 19:41                                                   ` Ted Zlatanov
2011-02-28 20:04                                                 ` David Kastrup
2011-03-01  0:06                                                   ` Cthun
2011-03-01  0:14                                                     ` TheFlyingDutchman
2011-03-01  0:16                                                       ` Cthun
2011-03-01  0:28                                                         ` TheFlyingDutchman
2011-03-01  1:49                                                           ` Sean Sieger
2011-03-01  9:27                                                     ` David Kastrup
2011-03-01 13:52                                                       ` Cthun
2011-03-01 22:51                                                         ` TheFlyingDutchman
2011-03-01 23:43                                                           ` Cthun
2011-03-02  8:22                                                             ` David Kastrup
2011-03-02 14:33                                                               ` Cthun
2011-03-02 21:51                                                                 ` Cthun-bot discussion TheFlyingDutchman
2011-03-02 22:20                                                                   ` Cthun
2011-03-02 23:54                                                                     ` TheFlyingDutchman
2011-03-03  0:05                                                                       ` What's your favourite *under_publicized* editing feature ofEmacs? Cthun
2011-03-03  0:06                                                                         ` Jason Earl
2011-03-03  0:12                                                                           ` Cthun
2011-03-03 10:04                                                                           ` Marco Antoniotti
2011-03-03 10:21                                                                             ` David Kastrup
2011-03-03 13:43                                                                               ` Cthun
2011-03-03 13:42                                                                             ` Cthun
2011-03-02  8:39                                                             ` Cthun-bot discussion TheFlyingDutchman
2011-03-02 14:35                                                               ` What's your favourite *under_publicized* editing feature ofEmacs? Cthun
2011-03-01 12:57                                                     ` Antony
2011-02-28 18:02                                             ` Cthun
2011-02-27 16:05                             ` Perry Smith
2011-02-27 17:22                               ` Eric Abrahamsen
2011-02-27 18:16                                 ` Joe Riel
2011-02-27 23:17                               ` PJ Weisberg
     [not found]                               ` <mailman.8.1298827366.31652.help-gnu-emacs@gnu.org>
2011-02-28  3:58                                 ` Stefan Monnier
2011-02-28  4:37                                   ` rusi
2011-02-28 23:31                                     ` Stefan Monnier
2011-03-01  2:43                                       ` rusi
2011-02-28 19:41                                   ` Uday Reddy
     [not found]                             ` <mailman.3.1298822767.31652.help-gnu-emacs@gnu.org>
2011-02-27 17:11                               ` rusi
2011-02-27 20:52                         ` Tim Bradshaw
2011-02-27 20:59                           ` Cthun
2011-02-27  0:08                     ` Tim Bradshaw
2011-02-27  6:21                       ` Cthun
2011-02-28 11:38                     ` Jim Janney
2011-02-28 12:45                       ` Petter Gustad
2011-02-28 18:11                       ` Cthun
2011-03-01  4:32                         ` Jim Janney
2011-03-01  6:18                           ` rusi
2011-03-01 14:09                             ` Cthun
2011-03-01 14:05                           ` Cthun
2011-03-01 14:21                             ` Mario Lassnig
2011-03-01 15:02                               ` Cthun
2011-03-01 15:06                                 ` rusi
2011-03-01 15:07                                   ` Cthun
2011-03-01 15:26                                     ` David Kastrup
2011-03-01 16:43                                       ` Ted Zlatanov
2011-03-01 21:20                                       ` Cthun
2011-03-01 21:24                                         ` TheFlyingDutchman
2011-03-01 21:33                                           ` Cthun
2011-03-01 22:17                                             ` TheFlyingDutchman
2011-03-01 23:25                                       ` Thien-Thi Nguyen
2011-03-01 15:12                                 ` Mario Lassnig
2011-03-01 21:21                                   ` Cthun
2011-03-01 21:23                                     ` TheFlyingDutchman
2011-03-02  8:11                                     ` Mario Lassnig
2011-03-02 15:05                                       ` Cthun
2011-03-10 22:56                                     ` Susan Calvin
2011-03-11  0:07                                       ` Cthun
2011-03-01 14:31                             ` David Kastrup
2011-03-01 15:06                               ` Cthun
2011-03-01 17:39                             ` Jim Janney
2011-03-01 21:30                               ` Cthun
2011-03-01 22:19                                 ` TheFlyingDutchman
2011-03-01 22:37                                   ` Cthun
2011-03-01 22:47                                     ` TheFlyingDutchman
2011-03-01 23:46                                       ` Cthun
2011-03-02  0:02                                         ` Cthun-bot discussion TheFlyingDutchman
2011-03-02  1:17                                           ` PJ Weisberg
2011-03-02 15:08                                           ` What's your favourite *under_publicized* editing feature ofEmacs? Cthun
2011-03-02  5:52                                         ` Bot Tester
2011-03-02  8:42                                         ` Cthun-bot discussion TheFlyingDutchman
2011-03-02 15:10                                           ` What's your favourite *under_publicized* editing feature ofEmacs? Cthun
2011-03-02 15:54                                             ` Bastien
2011-03-04  0:52                                           ` Cthun-bot discussion Peter Keller
2011-03-04  2:43                                             ` Cthun
2011-03-04  5:55                                             ` TheFlyingDutchman
2011-03-04 18:00                                               ` What's your favourite *under_publicized* editing feature ofEmacs? Cthun
2011-03-04 21:31                                                 ` Cthun-bot discussion TheFlyingDutchman
2011-03-05  8:39                                                   ` David Kastrup
2011-03-02  0:36                                 ` What's your favourite *under_publicized* editing feature ofEmacs? Jim Janney
2011-03-02 15:06                                   ` Cthun
2011-03-02 19:52                                     ` Jim Janney
2011-03-02 20:01                                       ` Cthun
2011-03-02  1:00                                 ` What's your favourite *under_publicized* editing feature of Emacs? Steve
2011-03-02  5:34                                   ` PJ Weisberg
2011-02-23  7:01               ` What's your favourite *under_publicized* editing feature ofEmacs? Alan Mackenzie
2011-02-28 12:42           ` Sean Sieger
     [not found]           ` <mailman.6.1298896994.11648.help-gnu-emacs@gnu.org>
2011-02-28 14:16             ` David Kastrup
2011-02-28 14:47               ` Sean Sieger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o7utih6.fsf@notengoamigos.org \
    --to=jearl@notengoamigos.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).