[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: |
David Engster |
Subject: |
Re: delete-region - is their a way to get the deleted text? |
Date: |
Thu, 13 Jun 2013 18:16:38 +0200 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) |
Thorsten Jolitz writes:
> I found a function that would be useful for me as is - if only I would
> have access to the region deleted with 'delete-region' inside that
> function.
>
> ,------------------------------------------------------------------
> | (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?
Well, there's always the super-hacky way:
(require 'cl)
(defadvice your-function-of-interest
(around replace-delete-with-kill activate)
"Replace `delete-region' with `kill-region'."
(flet ((delete-region (x y)
(kill-region x y)))
ad-do-it))
And then just yank...
-David
- Re: delete-region - is their a way to get the deleted text?, (continued)
- Re: delete-region - is their a way to get the deleted text?, Thorsten Jolitz, 2013/06/13
- Re: delete-region - is their a way to get the deleted text?, Eric Abrahamsen, 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
- 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 <=
Re: delete-region - is their a way to get the deleted text?, Stefan Monnier, 2013/06/13