From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#7587: 23.2; `format-mode-line' makes Emacs crash Date: Mon, 20 Dec 2010 23:29:48 +0800 Message-ID: <87y67k1mz7.fsf@stupidchicken.com> References: <87d3pd5mca.fsf@web.de> <83k4jh1ur6.fsf@gnu.org> <83fwu51cc1.fsf@gnu.org> <87ei9icvg0.fsf@stupidchicken.com> <83r5dffoi5.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1292860419 6136 80.91.229.12 (20 Dec 2010 15:53:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Dec 2010 15:53:39 +0000 (UTC) Cc: michael_heerdegen@web.de, 7587@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 20 16:53:34 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PUi3I-0005ok-0t for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Dec 2010 16:53:32 +0100 Original-Received: from localhost ([127.0.0.1]:51470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUi3H-0007nW-0C for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Dec 2010 10:53:31 -0500 Original-Received: from [140.186.70.92] (port=59591 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUi2o-0007YF-GB for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 10:53:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUi2l-0006l4-R4 for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 10:53:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUi2l-0006ky-Mt for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2010 10:52:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PUhak-0000WQ-Df; Mon, 20 Dec 2010 10:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Dec 2010 15:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7587-submit@debbugs.gnu.org id=B7587.12928586041962 (code B ref 7587); Mon, 20 Dec 2010 15:24:02 +0000 Original-Received: (at 7587) by debbugs.gnu.org; 20 Dec 2010 15:23:24 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PUha7-0000Vb-Os for submit@debbugs.gnu.org; Mon, 20 Dec 2010 10:23:23 -0500 Original-Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PUha6-0000VP-6R for 7587@debbugs.gnu.org; Mon, 20 Dec 2010 10:23:22 -0500 Original-Received: from furball (bb116-14-228-227.singnet.com.sg [116.14.228.227]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id oBKFTldq022795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 20 Dec 2010 10:29:50 -0500 Original-Received: by furball (Postfix, from userid 1000) id 865DC161E17; Mon, 20 Dec 2010 23:29:48 +0800 (SGT) In-Reply-To: <83r5dffoi5.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Dec 2010 10:56:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 20 Dec 2010 10:24:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42669 Archived-At: Eli Zaretskii writes: >> + : EQ (face, Qmode_line_inactive) ? MODE_LINE_FACE_ID > > I fixed these now. Thanks. > > I'm not even sure what the FACE argument to format-mode-line is > > useful for > > The doc string and the ELisp manual clearly answer that question: > format-mode-line can be used to compute the formatted string without > displaying it. When you use this API that way, you can specify a face > for the parts of mode line that don't have their faces specified in > the mode-line format. IOW, it sounds like a deliberate feature, given > the description in the ELisp manual. > > > it doesn't seem to be used anywhere in the sources. > > ?? init_iterator uses it (well, its index in the face cache) to > initialize the appropriate member of the iterator object. I mean, format-mode-line with a non-nil FACE argument doesn't seem to be used anywhere. > Given some history of discussions here, and the fact that no one seems > to be sure how this code should really work and why, I wonder why you > went ahead with the change without discussing it first. I'm afraid > that this change breaks backward compatibility for no good reason. Given that the backward compatible behavior is to segfault, this breakage might be acceptable. Less flippantly, the FACE argument, if non-nil, is still applied as a text property to the returned string. So I don't think there's going to be any noticeable difference (again, we don't have any concrete use cases, so it's difficult to say). The docstring change might not even be necessary.