unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 12867@debbugs.gnu.org
Subject: bug#12867: 24.3.50; easy-to-repro crash involving mode line
Date: Mon, 12 Nov 2012 20:35:00 +0200	[thread overview]
Message-ID: <83625awtyj.fsf@gnu.org> (raw)
In-Reply-To: <42FD6C9E3CE4497C860CC8BA17FB1DE5@us.oracle.com>

> From: "Drew Adams" <drew.adams@oracle.com>
> 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.





  reply	other threads:[~2012-11-12 18:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12  3:52 bug#12867: 24.3.50; easy-to-repro crash involving mode line Drew Adams
2012-11-12 15:40 ` Eli Zaretskii
2012-11-12 17:09   ` Drew Adams
2012-11-12 17:52     ` Eli Zaretskii
2012-11-12 18:16       ` Drew Adams
2012-11-12 18:35         ` Eli Zaretskii [this message]
2012-11-12 19:07           ` bug#12872: " Drew Adams
2012-11-12 17:31   ` martin rudalics
2012-11-12 18:19     ` Eli Zaretskii
2012-11-12 20:55       ` Stefan Monnier
2012-11-13  8:22         ` martin rudalics
2012-11-13 12:52           ` Eli Zaretskii
2012-11-13 13:50             ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83625awtyj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=12867@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).