[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to paste (yank) "raw text"
From: |
Kevin Rodgers |
Subject: |
Re: How to paste (yank) "raw text" |
Date: |
Mon, 23 May 2005 11:07:46 -0600 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
Moritz Kerbel wrote:
> My problem: If I cut and paste for example an info heading into an
> other buffer the layout information (font size, font weight etc.) plus
> invisible text (if you cut it from the beginning to the very end) is
> pasted into the buffer if you type C-y;
>
> Does there exist a raw yank version that only pastes the raw text
> (or maybe a raw copy version). Mabe an "intelligent" yank would be
> great: If you yank into a buffer with the same (major) mode as the
> original buffer yank the text, if you yank into a buffer with another
> mode only yank the raw text (string) ... on the other hand there are
> situations where a major mode is only valid for a region of a buffer
> (multiple major modes) ... just pondering the possiblities. Thanks
> for you help Moritz
How about something like:
(defadvice yank (after remove-text-properties activate)
"Remove all text properties from the inserted text."
(set-text-properties (region-beginning) (region-end) '()))
--
Kevin Rodgers