unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: 8384@debbugs.gnu.org
Subject: bug#8384: 24.0.50; Yanking and text properties
Date: Thu, 31 Mar 2011 00:26:14 +0200	[thread overview]
Message-ID: <8762r0utx5.fsf@escher.fritz.box> (raw)

1. emacs -Q
2. Enter text in a buffer and select it, e.g.: `C-x b a RET test C-SPC C-a' 
3. Put a face or display text property on the selected text, e.g.: `M-o b'
4. Put the propertized text on the kill ring: `C-SPC C-e M-w'.
5. Yank it in another buffer: `C-x b b RET C-y'
=> The yanked text in buffer b is propertized as in buffer a.

Now repeat steps 2 and 3, and instead of repeating step 4, double-click
on the text with mouse-1 to make it the primary selection, and instead
of repeating step 5, do `C-x b b RET <mouse-2>' to yank that selection.
=> The yanked text in buffer b is not propertized.

Is this difference between the two types of yanking a programming bug or
a feature (of the primary selection?) that is AFAICS undocumented and
hence a doc bug?  The comment by Glenn Morris in bug#8376
(http://permalink.gmane.org/gmane.emacs.bugs/45480) suggests the former,
namely, that yanking by C-y should also not preserve text properties.
Note, however, that mouse-yank-at-click behaves like C-y and not like
mouse-yank-primary.  (Or is it only font-locking, not face and display
properties, that aren't supposed to be preserved any more?  Note also
that if other text properties, e.g. invisible or intangible, are applied
in the first recipe, yanking with C-y does not preserve these.)

In GNU Emacs 24.0.50.1 (i686-suse-linux-gnu, GTK+ Version 2.20.1)
 of 2011-03-30 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10800000
configured using `configure  '--without-toolkit-scroll-bars' 'CFLAGS=-g -O2 -fno-optimize-sibling-calls''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t





             reply	other threads:[~2011-03-30 22:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30 22:26 Stephen Berman [this message]
2011-04-04 20:53 ` bug#8384: 24.0.50; Yanking and text properties David De La Harpe Golden
2011-04-05  5:16   ` Eli Zaretskii
2012-08-07  4:53     ` 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=8762r0utx5.fsf@escher.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=8384@debbugs.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).