From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20872: 24.5; add-face-text-property doesn't work for :height Date: Mon, 22 Jun 2015 18:10:06 +0300 Message-ID: <831th3ixtd.fsf@gnu.org> References: <87zj3s0zvu.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1434985893 30372 80.91.229.3 (22 Jun 2015 15:11:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2015 15:11:33 +0000 (UTC) Cc: 20872@debbugs.gnu.org To: Oleh Krehel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 22 17:11:22 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z73NW-00079P-Mk for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2015 17:11:18 +0200 Original-Received: from localhost ([::1]:40558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z73NV-0000Cb-RO for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2015 11:11:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z73NN-00008k-L6 for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 11:11:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z73NH-0006if-Hm for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 11:11:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z73NH-0006iZ-7Z for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 11:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z73NG-0003bb-Lr for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 11:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jun 2015 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20872 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20872-submit@debbugs.gnu.org id=B20872.143498583213819 (code B ref 20872); Mon, 22 Jun 2015 15:11:02 +0000 Original-Received: (at 20872) by debbugs.gnu.org; 22 Jun 2015 15:10:32 +0000 Original-Received: from localhost ([127.0.0.1]:54611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z73Ml-0003ao-Rn for submit@debbugs.gnu.org; Mon, 22 Jun 2015 11:10:32 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:50083) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z73Mi-0003aU-6Y for 20872@debbugs.gnu.org; Mon, 22 Jun 2015 11:10:29 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NQC00400PNZFX00@mtaout25.012.net.il> for 20872@debbugs.gnu.org; Mon, 22 Jun 2015 18:06:02 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQC0057BPY1JP00@mtaout25.012.net.il>; Mon, 22 Jun 2015 18:06:02 +0300 (IDT) In-reply-to: <87zj3s0zvu.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104222 Archived-At: > From: Oleh Krehel > Date: Mon, 22 Jun 2015 13:02:45 +0200 > > (defface test-face > '((t (:height 1.2 :foreground "green"))) > "doc.") > (setq asdf (propertize "asdf" 'face 'test-face)) > (add-face-text-property 0 (length asdf) '(:foreground "red") nil asdf) > > `asdf' will still have the height 1.2 through `test-face' while gaining > a red foreground, instead of green. > > But this doesn't work: > > (add-face-text-property 0 (length asdf) '(:height 1.0) nil asdf) > > While the text properties will change, when inserting `asdf' into a > `fundamental-mode' buffer, it will still have the height 1.2. How can I > set the height to 1.0, while preserving the face? Untested: copy the face using copy-face, then change ':height' attribute of the copied face using set-face-attribute, and finally apply the modified face to the string.