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#12867: 24.3.50; easy-to-repro crash involving mode line Date: Mon, 12 Nov 2012 20:35:00 +0200 Message-ID: <83625awtyj.fsf@gnu.org> References: <77CAAFE4D0CE4DD98476C996E3158648@us.oracle.com> <83obj2x218.fsf@gnu.org> <83ehjywvx9.fsf@gnu.org> <42FD6C9E3CE4497C860CC8BA17FB1DE5@us.oracle.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1352745345 14444 80.91.229.3 (12 Nov 2012 18:35:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2012 18:35:45 +0000 (UTC) Cc: 12867@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 12 19:35:55 2012 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 1TXyrS-0005EK-7s for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Nov 2012 19:35:54 +0100 Original-Received: from localhost ([::1]:48216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXyrI-0008Jz-8w for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Nov 2012 13:35:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXyrD-0008Iv-Tq for bug-gnu-emacs@gnu.org; Mon, 12 Nov 2012 13:35:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXyrA-0005JR-RE for bug-gnu-emacs@gnu.org; Mon, 12 Nov 2012 13:35:39 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXyrA-0005JN-Nl for bug-gnu-emacs@gnu.org; Mon, 12 Nov 2012 13:35:36 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TXyrZ-0008K2-Qi for bug-gnu-emacs@gnu.org; Mon, 12 Nov 2012 13:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Nov 2012 18:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12867 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12867-submit@debbugs.gnu.org id=B12867.135274531631939 (code B ref 12867); Mon, 12 Nov 2012 18:36:01 +0000 Original-Received: (at 12867) by debbugs.gnu.org; 12 Nov 2012 18:35:16 +0000 Original-Received: from localhost ([127.0.0.1]:35939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXyqq-0008J6-CN for submit@debbugs.gnu.org; Mon, 12 Nov 2012 13:35:16 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:38857) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXyqn-0008Iw-BV for 12867@debbugs.gnu.org; Mon, 12 Nov 2012 13:35:14 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MDE00I000UM9L00@a-mtaout21.012.net.il> for 12867@debbugs.gnu.org; Mon, 12 Nov 2012 20:34:45 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MDE00ISQ0XX4H50@a-mtaout21.012.net.il>; Mon, 12 Nov 2012 20:34:45 +0200 (IST) In-reply-to: <42FD6C9E3CE4497C860CC8BA17FB1DE5@us.oracle.com> X-012-Sender: halo1@inter.net.il X-Spam-Score: 1.5 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-Spam-Score: 1.5 (+) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:66813 Archived-At: > From: "Drew Adams" > Cc: <12867@debbugs.gnu.org> > Date: Mon, 12 Nov 2012 10:16:55 -0800 > > > Yes, post-command-hook is ugly and expensive. But you should know > > that %l is not ideal either: e.g., if display of the line numbers is > > disabled because the file is too large or the lines are too long, and > > Emacs displays "???" instead of the number, I think mode line is not > > redisplayed when the current line changes. Again, because Emacs tries > > very hard to avoid this costly redisplay. > > I see - good to know. I don't expect it will be a problem here, but I'll keep > an eye out. Any idea what size buffers lead to such behavior? Buffers that have more lines than line-number-display-limit or lines wider than line-number-display-limit-width. > > > I will be glad to find a way to simplify the code and > > > remove this ugly little hack. Suggestions welcome. > > > > A user option sounds like the right approach. > > Do you mean at the level of my code, or are you thinking about an enhancement > for Emacs? The rest of your text leads me to think the latter. If not, I'm not > sure what kind of option you have in mind here. I mean a new option, an enhancement. > > But we should first formulate the conditions under which this > > redisplay will be performed. > > If we're talking about my use case then it is each time the current line > changes. Would it be good enough to redisplay whenever point moves, and let your code you run from :eval decide whether the text on the mode line needs to be changed? I think this will be a more general solution. > > Anyway, it looks like this discussion should continue in another bug > > report, as the crash is solved. > > OK. Do you want to formulate the bug subject? Done: bug #12872. Let's continue there.