From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: delete-region - is their a way to get the deleted text?
Date: Fri, 14 Jun 2013 10:18:44 +0200 [thread overview]
Message-ID: <87d2rpw1ej.fsf@gmail.com> (raw)
In-Reply-To: jwvli6edp9r.fsf-monnier+gnu.emacs.help@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> ,------------------------------------------------------------------
>> | (delete-region START END)
>> | Delete the text between START and END.
>> | This command deletes buffer text without modifying the kill ring.
>> `------------------------------------------------------------------
>> If its not in the kill ring - is there any other way to get the text
>> that deleted, or is it simply gone and lost?
> - make sure the function is called with undo enabled, then look for the
> deleted string in the undo log (that's how delete-and-extract-region
> was originally coded, back when I wrote it in Elisp).
that sounds reasonably simple
> - temporarily advise delete-region so it stashes its result in
> some variable.
another option I like
> - even nastier hacks can be imagined, of course.
thanks for the tips!
--
cheers,
Thorsten
next prev parent reply other threads:[~2013-06-14 8:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1524.1371113397.22516.help-gnu-emacs@gnu.org>
2013-06-13 15:11 ` delete-region - is their a way to get the deleted text? Stefan Monnier
2013-06-14 8:18 ` Thorsten Jolitz [this message]
2013-06-13 8:49 Thorsten Jolitz
2013-06-13 8:56 ` Peter Dyballa
2013-06-13 9:25 ` Eric Abrahamsen
2013-06-13 10:00 ` Peter Dyballa
2013-06-13 10:20 ` Thorsten Jolitz
2013-06-13 10:23 ` Eric Abrahamsen
[not found] ` <mailman.1532.1371117614.22516.help-gnu-emacs@gnu.org>
2013-06-13 13:33 ` Barry Margolin
2013-06-13 18:31 ` Peter Dyballa
[not found] ` <mailman.1597.1371148312.22516.help-gnu-emacs@gnu.org>
2013-06-13 18:51 ` Barry Margolin
2013-06-13 19:41 ` Peter Dyballa
[not found] ` <mailman.1599.1371152513.22516.help-gnu-emacs@gnu.org>
2013-06-13 21:08 ` Barry Margolin
2013-06-13 23:00 ` Peter Dyballa
2013-06-14 8:15 ` Thorsten Jolitz
2013-06-14 8:37 ` Peter Dyballa
2013-06-13 16:16 ` David Engster
2013-06-14 8:20 ` Thorsten Jolitz
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2rpw1ej.fsf@gmail.com \
--to=tjolitz@gmail.com \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.