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#15155: 24.3; wrap-prefix in adaptive-wrap-prefix-mode with variable-pitch has wrong face Date: Thu, 22 Aug 2013 17:54:23 +0300 Message-ID: <838uztkc80.fsf@gnu.org> References: <87ob8q4y67.fsf@mathematik.tu-chemnitz.de> <5215B7EC.10808@mathematik.tu-chemnitz.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1377183322 12438 80.91.229.3 (22 Aug 2013 14:55:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Aug 2013 14:55:22 +0000 (UTC) Cc: 15155@debbugs.gnu.org To: Frank Fischer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 22 16:55:23 2013 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 1VCWI7-00079S-Qi for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Aug 2013 16:55:15 +0200 Original-Received: from localhost ([::1]:60289 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCWI7-0003jn-Eq for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Aug 2013 10:55:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCWI0-0003i6-7H for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2013 10:55:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCWHv-0006zK-1k for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2013 10:55:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCWHu-0006z5-VX for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2013 10:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VCWHu-000121-DG for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2013 10:55: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: Thu, 22 Aug 2013 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15155 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15155-submit@debbugs.gnu.org id=B15155.13771832703925 (code B ref 15155); Thu, 22 Aug 2013 14:55:02 +0000 Original-Received: (at 15155) by debbugs.gnu.org; 22 Aug 2013 14:54:30 +0000 Original-Received: from localhost ([127.0.0.1]:47821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCWHN-00011E-2r for submit@debbugs.gnu.org; Thu, 22 Aug 2013 10:54:29 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:62874) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VCWHJ-000113-OG for 15155@debbugs.gnu.org; Thu, 22 Aug 2013 10:54:26 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MRX00700T6S6500@a-mtaout21.012.net.il> for 15155@debbugs.gnu.org; Thu, 22 Aug 2013 17:54:24 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRX00646TEKW0B0@a-mtaout21.012.net.il>; Thu, 22 Aug 2013 17:54:21 +0300 (IDT) In-reply-to: <5215B7EC.10808@mathematik.tu-chemnitz.de> 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:77607 Archived-At: > Date: Thu, 22 Aug 2013 09:04:12 +0200 > From: Frank Fischer > Cc: 15155@debbugs.gnu.org > > Taking your hint, I have tried the following `adaptive-fill-function` > > (setq adaptive-fill-function > (lambda () > (and adaptive-fill-prefix > (looking-at adaptive-fill-prefix) > (match-string 0)))) > > This is exactly what `fill-adaptive-match-prefix' does except the latter > uses `match-string-no-properties`. > > This seems to work fine for the color of the prefix but not for its font > (when using variable-pitch-mode). So a second try was > > > (setq adaptive-fill-function > (lambda () > (and adaptive-fill-prefix > (looking-at adaptive-fill-prefix) > (propertize (match-string-no-properties 0) 'face 'default)))) > > Now the wrap-prefix has the correct font but the wrong color (but this > variant seems to work reasonably well for LaTeX and variable-pitch). > > I think, the wrap-prefix should at least have the default face (which > may be modified by variable-pitch-mode) in any case. I'm not sure about > the other properties like color, but may adaptive-wrap-mode should > (optionally?) use something like the adaptive-fill-function above to > assign the wrap-prefix the same face as the original prefix (in contrast > to the one that happened to be active where the line got truncated). > > Though, I have no idea what to about the color vs. font problem (how to > get both?). How about using the face returned by face-at-point, instead of 'default'?