help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crash-proof emacs use


From: Stefan Monnier
Subject: Re: crash-proof emacs use
Date: Sun, 11 Sep 2022 23:26:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> this is open-ended, but would mean something like, you kill some text
> with a "about to move" command so that killing is not conflated with
> moving, and it gets marked as "move operation started".  then you go
> to the location to yank to, and you [if your stm is operating ok] yank
> in the new place with a message that this is supposed to be
> crash-proof.  as part of that yanking, the old text gets deleted.
> this is just a silly example.

It probably depends on lots of things, but AFAIK the normal way Emacs
solves this is by treating everything between two `C-x C-s` as a kind of
transaction, so until you `C-x C-s` all the changes in your buffer
are transient.

Of course, it doesn't help you in cases such as:

- kill, with the intent to yank elsewhere
- forget all about it
- save

If you're worried about that, then most likely you're also worried
about:

- kill, with the intent to replace it with something else
- forget all about it
- save

tho admittedly, in such a case you can easily workaround the problem by
first typing in the replacement, then killing the old version (so that,
if you forget all about it in the middle, you just get both versions
and no info is lost).

FWIW, I fairly often do that kind of "insert first" (or copy first) and
only delete the original code later on.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]