Gnus development mailing list
 help / color / mirror / Atom feed
* Yanking text without properties?
@ 2004-07-12 16:22 Jonas Steverud
  2004-07-12 18:24 ` Steve Youngs
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jonas Steverud @ 2004-07-12 16:22 UTC (permalink / raw)



This is more of a Emacs question then a Gnus but since I usually
encounter it while using Gnus I still consider it to be on topic. :-)

When I copy or kill some text in one buffer and that text contains
some properties - in 99.999% of the cases it is the face of the text -
and then yanks it in some other buffer (usually a message buffer) the
text in the buffer keeps its properties (the face). Usually this is a
good thing, but personally I hate it - suddenly my buffer might look
like a Christmas tree with dozen of colours.

My question is; is there a yank-without-face, yank-without-properties
or similar piece of code? I have not been able to found any.

TIA, it's really annoying!

-- 
(        http://hem.bredband.net/steverud/        !     Wei Wu Wei     )
(        Meaning of U2 Lyrics, Roleplaying        !  To Do Without Do  )




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

* Re: Yanking text without properties?
  2004-07-12 16:22 Yanking text without properties? Jonas Steverud
@ 2004-07-12 18:24 ` Steve Youngs
  2004-07-12 22:37   ` Jonas Steverud
  2004-07-12 22:29 ` Katsumi Yamaoka
  2004-07-16 16:41 ` Ted Zlatanov
  2 siblings, 1 reply; 5+ messages in thread
From: Steve Youngs @ 2004-07-12 18:24 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

* Jonas Steverud <tvrud@bredband.net> writes:

  > This is more of a Emacs question then a Gnus but since I usually
  > encounter it while using Gnus I still consider it to be on topic. :-)

  > My question is; is there a yank-without-face, yank-without-properties
  > or similar piece of code? I have not been able to found any.

There's bound to be a better way than this, but you could yank from
the "original" article buffer (`C-u g' in the summary buffer).

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|              Ashes to ashes, dust to dust.               |
|      The proof of the pudding, is under the crust.       |
|----------------------------------<steve@youngs.au.com>---|

[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]

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

* Re: Yanking text without properties?
  2004-07-12 16:22 Yanking text without properties? Jonas Steverud
  2004-07-12 18:24 ` Steve Youngs
@ 2004-07-12 22:29 ` Katsumi Yamaoka
  2004-07-16 16:41 ` Ted Zlatanov
  2 siblings, 0 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2004-07-12 22:29 UTC (permalink / raw)


>>>>> In <m2oemljius.fsf@c-b75372d5.036-4-67626721.cust.bredbandsbolaget.se>
>>>>>	Jonas Steverud <tvrud@bredband.net> wrote:

> My question is; is there a yank-without-face, yank-without-properties
> or similar piece of code? I have not been able to found any.

This is another approach, stripping properties when copying or
killing instead of yanking.  You only have to type `C-x C-e'
after the closing parenthesis.

(defadvice kill-new (before strip-text-props activate)
  "Strip text properties from a killed string."
  (set-text-properties 0 (length (ad-get-arg 0)) nil (ad-get-arg 0)))
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



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

* Re: Yanking text without properties?
  2004-07-12 18:24 ` Steve Youngs
@ 2004-07-12 22:37   ` Jonas Steverud
  0 siblings, 0 replies; 5+ messages in thread
From: Jonas Steverud @ 2004-07-12 22:37 UTC (permalink / raw)


Steve Youngs <steve@youngs.au.com> writes:

> * Jonas Steverud <tvrud@bredband.net> writes:
[...]
>   > My question is; is there a yank-without-face, yank-without-properties
>   > or similar piece of code? I have not been able to found any.
>
> There's bound to be a better way than this, but you could yank from
> the "original" article buffer (`C-u g' in the summary buffer).

Well, that's one way of doing it. But it doesn't help very much when
I copy text from a info file, e.g. the heading, like I did when I
responded to the question about mail alias in BBDB. :-(

I probably have to write my own yank, but I then need pointers to the
correct functions to test the text (the region is probably better then
the kill-ring) and remove any faces.

-- 
(        http://hem.bredband.net/steverud/        !     Wei Wu Wei     )
(        Meaning of U2 Lyrics, Roleplaying        !  To Do Without Do  )




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

* Re: Yanking text without properties?
  2004-07-12 16:22 Yanking text without properties? Jonas Steverud
  2004-07-12 18:24 ` Steve Youngs
  2004-07-12 22:29 ` Katsumi Yamaoka
@ 2004-07-16 16:41 ` Ted Zlatanov
  2 siblings, 0 replies; 5+ messages in thread
From: Ted Zlatanov @ 2004-07-16 16:41 UTC (permalink / raw)


On Mon, 12 Jul 2004, tvrud@bredband.net wrote:

> My question is; is there a yank-without-face, yank-without-properties
> or similar piece of code? I have not been able to found any.

Maybe buffer-substring-no-properties will work for you?

Ted



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

end of thread, other threads:[~2004-07-16 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12 16:22 Yanking text without properties? Jonas Steverud
2004-07-12 18:24 ` Steve Youngs
2004-07-12 22:37   ` Jonas Steverud
2004-07-12 22:29 ` Katsumi Yamaoka
2004-07-16 16:41 ` Ted Zlatanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).