bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63988: 30.0.50; Recent header line format changes cause spin/seg fau


From: Eli Zaretskii
Subject: bug#63988: 30.0.50; Recent header line format changes cause spin/seg fault with format-mode-line
Date: Sat, 10 Jun 2023 14:22:58 +0300

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Sat, 10 Jun 2023 07:08:20 -0400
> Cc: 63988@debbugs.gnu.org
> 
> > But what is the purpose of such a strange (to use a civilized word)
> > setting of header-line-format?  Why do you need :eval at all in this
> > case?
> >
> > IOW, why not say "don't do that" and be done?
> 
> It's a minimal repro for an issue I encountered with a package that does this:
> 
> https://github.com/rougier/nano-modeline/blob/master/nano-modeline.el#L532
> 
> It's how this modeline/header line adds line number/cursor position to
> a more complicated line. As I understand it, it has to format it first
> in order to use its width to properly right align it:
> 
> https://github.com/rougier/nano-modeline/blob/master/nano-modeline.el#L278
> 
> Is there a better way to do this?

Use just 'format'?  I still don't understand why they use
format-mode-line there.

> > So maybe we should declare this feature a failed experiment and remove
> > it?
> 
> I'll admit I don't really understand the change. Is it actually
> evaluating the cdr of the eval form up to two additional times to in
> order to determine whether or not to display the headerline at all?

Only two?

> Wouldn't this have performance implications?

Probably, although I wouldn't expect the performance to suffer too
much.  Header-line is rarely used.

But yes, that's one more implication to consider when introducing such
minor convenience features.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]