From: Ben Bacarisse <ben.usenet@bsb.me.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: Editing change groups
Date: Fri, 09 Nov 2018 11:41:29 +0000 [thread overview]
Message-ID: <874lcq5vh2.fsf@bsb.me.uk> (raw)
In-Reply-To: mailman.3697.1541749970.1284.help-gnu-emacs@gnu.org
Michael Heerdegen <michael_heerdegen@web.de> writes:
> I have the following requirement for a user interface: if the user hits
> a key, something in the buffer is replaced with something else. Doing
> this potentially involves several editing operations. If the user hits
> the same key again, the old contents are restored.
Would fiddling with the undo mechanism not be a better way to do this?
https://www.gnu.org/software/emacs/manual/html_node/elisp/Undo.html
I've never tried to do what you ask this way (so I'm, just speculating)
but it looks like one place to start.
--
Ben.
next parent reply other threads:[~2018-11-09 11:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3697.1541749970.1284.help-gnu-emacs@gnu.org>
2018-11-09 11:41 ` Ben Bacarisse [this message]
2018-11-09 12:10 ` Editing change groups Michael Heerdegen
[not found] ` <mailman.3721.1541765458.1284.help-gnu-emacs@gnu.org>
2018-11-09 13:36 ` Ben Bacarisse
2018-11-09 13:58 ` Michael Heerdegen
2018-11-09 7:52 Michael Heerdegen
2018-11-09 8:39 ` Joost Kremers
2018-11-09 11:58 ` Noam Postavsky
2018-11-09 12:39 ` Michael Heerdegen
2018-11-09 13:14 ` Eli Zaretskii
2018-11-09 13:12 ` Michael Heerdegen
2018-11-09 13:52 ` Stefan Monnier
2018-11-10 4:53 ` Michael Heerdegen
2018-11-10 13:15 ` Stefan Monnier
2018-11-10 16:23 ` Michael Heerdegen
2018-11-10 18:07 ` Stefan Monnier
2018-11-11 8:01 ` Michael Heerdegen
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=874lcq5vh2.fsf@bsb.me.uk \
--to=ben.usenet@bsb.me.uk \
--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).