GNU bug report logs - #16557
24.3; foreground-color-at-point does not define a color produced by facemenu-set-foreground

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Alex Kost <alezost@HIDDEN>; dated Sun, 26 Jan 2014 19:12:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Jan 2014 19:11:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 14:11:34 2014
Received: from localhost ([127.0.0.1]:36873 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1W7V7F-00084h-ML
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2014 14:11:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44242)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <alezost@HIDDEN>) id 1W7V7D-00084Z-FY
 for submit <at> debbugs.gnu.org; Sun, 26 Jan 2014 14:11:32 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <alezost@HIDDEN>) id 1W7V77-00051v-Bc
 for submit <at> debbugs.gnu.org; Sun, 26 Jan 2014 14:11:31 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33513)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <alezost@HIDDEN>) id 1W7V77-00051p-7n
 for submit <at> debbugs.gnu.org; Sun, 26 Jan 2014 14:11:25 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45957)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <alezost@HIDDEN>) id 1W7V71-0005P9-9C
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jan 2014 14:11:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <alezost@HIDDEN>) id 1W7V6v-00050e-BI
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jan 2014 14:11:19 -0500
Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:59700)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <alezost@HIDDEN>) id 1W7V6v-00050T-2r
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jan 2014 14:11:13 -0500
Received: by mail-la0-f54.google.com with SMTP id y1so3948998lam.13
 for <bug-gnu-emacs@HIDDEN>; Sun, 26 Jan 2014 11:11:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:user-agent:mime-version
 :content-type; bh=YoEWvAcVAc58Okz1se7ekf9oWzF66P7g4TbMJOyLMaA=;
 b=KTHtbDovnZXHfV9qqx4uAZcpH0Qb0/piMQOmteh1Dq0bZQl6RhtS+lZYtjfj+Dwk0U
 FCMwbrvn0h+V0ze5YaF3Nd8OniopLynziurBcPL7VuAFZ6C4Nm0F+n9fX2aEbfYSE+Zm
 rkFTThFplC6zug28FYtIrBdS6ZSKwH56u5khp7FYkYfoIX/jvxOAyal8BSK5ne6TzpoU
 ym1zUC+be83qUmrpoba8y+Yu913pSFf3lfM8t0zd4bhyeYEegpRZxSUkXy1tCZCDqzbO
 iZjFbWxje44gaw3ETseI7rGhTI0kB4qpEsfVw9/pypRv7jdA/1Nm/W5FEWvflNhsblyp
 FL5A==
X-Received: by 10.112.26.74 with SMTP id j10mr8931955lbg.10.1390763472051;
 Sun, 26 Jan 2014 11:11:12 -0800 (PST)
Received: from leviafan (128-70-204-126.broadband.corbina.ru. [128.70.204.126])
 by mx.google.com with ESMTPSA id dm8sm1919319lad.7.2014.01.26.11.11.11
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 26 Jan 2014 11:11:11 -0800 (PST)
From: Alex Kost <alezost@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3; foreground-color-at-point does not define a color produced by
 facemenu-set-foreground
Date: Sun, 26 Jan 2014 23:11:09 +0400
Message-ID: <878uu24kz6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Recipe:
- emacs -Q
- Create new buffer (lisp-interaction-mode is not suitable):
  C-x b new RET
- Write some text and select it
- M-x facemenu-set-foreground RET green RET
- The text becomes green, but "M-: (foreground-color-at-point)"
  returns nil 

I see problems both in `foreground-color-at-point' / `background-color-at-point'
and `facemenu-add-face' (the root function for facemenu functions like
`facemenu-set-foreground' or `facemenu-set-background').

1. `foreground-color-at-point' / `background-color-at-point'

According to (info "(elisp) Special Properties") a `face' property can
be a face name, a property list or a list of faces, i.e. a list of face
names or a list of property lists.  But `foreground-color-at-point' and
`background-color-at-point' do not support the latter form.

If you update a face property of some text
like this (create a new buffer and write something there):

  M-: (put-text-property (point-min) (point-max) 'face '(:foreground "green"))

then (foreground-color-at-point) gives the right answer - "green".  But
if you make a *list* of property lists:

  M-: (put-text-property (point-min) (point-max) 'face '((:foreground "green")))

then (foreground-color-at-point) returns nil.

2. `facemenu-add-face'

This function produces even a more nested form.  After "M-x
facemenu-set-foreground RET green RET" on some selected text, move the
point to any green character and "M-: (get-text-property (point) 'face)"
will return (((:foreground "green"))).


In GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.10.6)
 of 2014-01-18 on mnt-storage-buildroots-staging-i686-eric
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
Configured using:
 `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft'
 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe -fstack-protector
 --param=ssp-buffer-size=4'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''




Acknowledgement sent to Alex Kost <alezost@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#16557; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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