all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to paste (yank) "raw text"
@ 2005-05-21 20:48 Moritz Kerbel
  2005-05-22  3:19 ` Eli Zaretskii
  2005-05-23 17:07 ` Kevin Rodgers
  0 siblings, 2 replies; 3+ messages in thread
From: Moritz Kerbel @ 2005-05-21 20:48 UTC (permalink / raw)


Hello!

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


	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to paste (yank) "raw text"
  2005-05-21 20:48 How to paste (yank) "raw text" Moritz Kerbel
@ 2005-05-22  3:19 ` Eli Zaretskii
  2005-05-23 17:07 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2005-05-22  3:19 UTC (permalink / raw)


> Date: Sat, 21 May 2005 22:48:42 +0200 (CEST)
> From: Moritz Kerbel <moritz_kerbel@yahoo.de>
> 
>    Does there exist a raw yank version that only
> pastes the raw text (or maybe a raw copy version).

What version of Emacs is that?  The CVS code has the
yank-excluded-properties variable which you could use to tell Emacs
what text properties to strip from the yanked text.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to paste (yank) "raw text"
  2005-05-21 20:48 How to paste (yank) "raw text" Moritz Kerbel
  2005-05-22  3:19 ` Eli Zaretskii
@ 2005-05-23 17:07 ` Kevin Rodgers
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2005-05-23 17:07 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-23 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-21 20:48 How to paste (yank) "raw text" Moritz Kerbel
2005-05-22  3:19 ` Eli Zaretskii
2005-05-23 17:07 ` Kevin Rodgers

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.