[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete-region - is their a way to get the deleted text?
From: |
Stefan Monnier |
Subject: |
Re: delete-region - is their a way to get the deleted text? |
Date: |
Thu, 13 Jun 2013 11:11:06 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> ,------------------------------------------------------------------
> | (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?
By and large it's gone and lost. What you can do:
- copy the text before calling the function (then try and figure out
which part of the text was deleted).
- 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).
- temporarily advise delete-region so it stashes its result in
some variable.
- even nastier hacks can be imagined, of course.
Stefan
- Re: delete-region - is their a way to get the deleted text?, (continued)
- Message not available
- Re: delete-region - is their a way to get the deleted text?, Barry Margolin, 2013/06/13
- Re: delete-region - is their a way to get the deleted text?, Peter Dyballa, 2013/06/13
- Message not available
- Re: delete-region - is their a way to get the deleted text?, Barry Margolin, 2013/06/13
- Re: delete-region - is their a way to get the deleted text?, Peter Dyballa, 2013/06/13
- Message not available
- Re: delete-region - is their a way to get the deleted text?, Barry Margolin, 2013/06/13
- Re: delete-region - is their a way to get the deleted text?, Peter Dyballa, 2013/06/13
- Re: delete-region - is their a way to get the deleted text?, Thorsten Jolitz, 2013/06/14
- Re: delete-region - is their a way to get the deleted text?, Peter Dyballa, 2013/06/14
Re: delete-region - is their a way to get the deleted text?, David Engster, 2013/06/13
Re: delete-region - is their a way to get the deleted text?,
Stefan Monnier <=