unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
To: Glenn Morris <rgm@gnu.org>
Cc: Uday S Reddy <U.S.Reddy@cs.bham.ac.uk>, 8376@debbugs.gnu.org
Subject: bug#8376: 23.3; font-lock-face doesn't get yanked
Date: Tue, 29 Mar 2011 21:24:07 +0100	[thread overview]
Message-ID: <19858.16359.847000.710144@gargle.gargle.HOWL> (raw)
In-Reply-To: <oe62r1oic3.fsf@fencepost.gnu.org>

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






  reply	other threads:[~2011-03-29 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 17:27 bug#8376: 23.3; font-lock-face doesn't get yanked Uday S Reddy
2011-03-29 19:08 ` Glenn Morris
2011-03-29 20:24   ` Uday S Reddy [this message]
2012-08-18  5:36     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19858.16359.847000.710144@gargle.gargle.HOWL \
    --to=u.s.reddy@cs.bham.ac.uk \
    --cc=8376@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).