GNU bug report logs - #8376
23.3; font-lock-face doesn't get yanked

Previous Next

Package: emacs;

Reported by: Uday S Reddy <U.S.Reddy <at> cs.bham.ac.uk>

Date: Tue, 29 Mar 2011 17:28:01 UTC

Severity: minor

Found in version 23.3

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Uday S Reddy <u.s.reddy <at> cs.bham.ac.uk>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Uday S Reddy <U.S.Reddy <at> cs.bham.ac.uk>, 8376 <at> debbugs.gnu.org
Subject: bug#8376: 23.3; font-lock-face doesn't get yanked
Date: Tue, 29 Mar 2011 21:24:07 +0100
Glenn Morris writes:

> Well yes, people used to complain that copying text would copy unwanted
> font-locking along with it. Eg
> 
> http://lists.gnu.org/archive/html/emacs-devel/2006-09/msg00981.html
> 
> Why do you think it should be preserved?

My context was in writing email messages in mail-mode/message-mode,
both of which use font-lock to fontify the headers and the cited text.

VM has functions that put "attachment buttons" into the mail-mode
buffers, which are have data stored in text properties.  I wanted to
put a face on them to make them look like "buttons".  It works fine
normally but it is not preserved under killing and yanking.

I find the above thread a bit confused, or perhaps I am hopelessly
confused.  It appears that the 'font-lock-face property has been
installed so that font-lock-mode doesn't mess with it.  I don't see
any "unwanted font-locking" in the 'font-lock-face property.  So, why
should it be erased by yanking?  It should work the same way as the
'face property works in a non-font-lock-mode buffer.

Certainly, when you want to move text around within a single buffer,
you don't want to lose faces by killing and yanking.  If it gives
undesirable results when people want to move text from one buffer to
another, then they might need to use a separate function to erase the
fontification or they might use the yank-excluded-properties variable
to exclude font-lock-face.

Perhaps, I should reopen the discussion in the emacs-dev list?

Cheers,
Uday





This bug report was last modified 12 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.