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



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to