all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Line number in mode-line with column-number-mode on in GNU Emacs 23.x
@ 2009-12-25 10:51 Peter Dyballa
  2009-12-25 14:46 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Dyballa @ 2009-12-25 10:51 UTC (permalink / raw)
  To: GNU Emacs List

Hello!

In compilation mode it happens that the line number is substituted to  
"??" although I've set line-number-display-limit to nil, i.e., GNU  
Emacs should not stop counting. I also set line-number-display-limit- 
width (first) to 625, although some lines can be as long as a few  
10,000 characters (later set to 62,500, but no change).

Is there a way to force display of the line number? Is it suppressed  
because of duration of high CPU load?

--
Greetings

   Pete

Be careful of reading health books, you might die of a misprint.
				– Mark Twain





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Line number in mode-line with column-number-mode on in GNU Emacs 23.x
  2009-12-25 10:51 Line number in mode-line with column-number-mode on in GNU Emacs 23.x Peter Dyballa
@ 2009-12-25 14:46 ` Eli Zaretskii
  2009-12-25 17:19   ` Peter Dyballa
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2009-12-25 14:46 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Peter Dyballa <Peter_Dyballa@Web.DE>
> Date: Fri, 25 Dec 2009 11:51:58 +0100
> 
> In compilation mode it happens that the line number is substituted to  
> "??" although I've set line-number-display-limit to nil, i.e., GNU  
> Emacs should not stop counting. I also set line-number-display-limit- 
> width (first) to 625, although some lines can be as long as a few  
> 10,000 characters (later set to 62,500, but no change).

The code seems to remember that a window had long lines, and once that
happens, this window will not have line numbers, until you switch to
another buffer.  Is that your case -- that you enlarged
line-number-display-limit-width only _after_ you saw "??" instead of a
line number?  If so, does it help to switch to a different buffer and
then switch back to the original one in the same window?

Failing that, I don't see any explanation for what you report.
Perhaps try stepping with a debugger through decode_mode_spec, or
submit a bug report with a clear recipe to reproduce this behavior.

> Is there a way to force display of the line number?

I don't see one, except enlarging line-number-display-limit-width to a
very large number (but not too large -- Emacs multiplies it by about
100 (depending on your window height), and if the result overflows,
you get the opposite of what you wanted.

Maybe we should allow nil as a value, meaning unlimited line width.

> Is it suppressed because of duration of high CPU load?

This code runs during redisplay, so it's not a good idea for it to be
too slow.  But I never profiled this, so I have no idea if it really
can be slow for long lines.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Line number in mode-line with column-number-mode on in GNU Emacs 23.x
  2009-12-25 14:46 ` Eli Zaretskii
@ 2009-12-25 17:19   ` Peter Dyballa
  2009-12-25 19:25     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Dyballa @ 2009-12-25 17:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: GNU Emacs List


Am 25.12.2009 um 15:46 schrieb Eli Zaretskii:

> The code seems to remember that a window had long lines, and once that
> happens, this window will not have line numbers, until you switch to
> another buffer.

Well, it's likely that I did this, changing into *shell* buffer and  
others...

> Is that your case -- that you enlarged
> line-number-display-limit-width only _after_ you saw "??" instead of a
> line number?

Yes, exactly.

> If so, does it help to switch to a different buffer and
> then switch back to the original one in the same window?

I have no proof that I did so, there is just some likelihood from time- 
stamps in tcsh's history...

>
> Failing that, I don't see any explanation for what you report.
> Perhaps try stepping with a debugger through decode_mode_spec, or
> submit a bug report with a clear recipe to reproduce this behavior.

Letting your computer on over night while GNU Emacs is compiling GCC  
4.2 (more than 10 h for me)...


With line-number-display-limit-width set to 62,500 it did not happen  
again to me, the longest compile job below 1 h, the longest line far  
below this value.

--
Greetings

   Pete

Life is the only flaw in an otherwise perfect nonexistence
				– Schopenhauer





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Line number in mode-line with column-number-mode on in GNU Emacs 23.x
  2009-12-25 17:19   ` Peter Dyballa
@ 2009-12-25 19:25     ` Eli Zaretskii
  2009-12-25 20:13       ` Peter Dyballa
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2009-12-25 19:25 UTC (permalink / raw)
  To: help-gnu-emacs

> Cc: GNU Emacs List <help-gnu-emacs@gnu.org>
> From: Peter Dyballa <Peter_Dyballa@Web.DE>
> Date: Fri, 25 Dec 2009 18:19:24 +0100
> 
> Letting your computer on over night while GNU Emacs is compiling GCC  
> 4.2 (more than 10 h for me)...

Perhaps the default limit of 200 is too small nowadays, certainly for
compiling GCC, but you said some lines are tens of thousands of
characters long, is that right?

Anyway, feel free to suggest on emacs-devel to enlarge the limit.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Line number in mode-line with column-number-mode on in GNU Emacs 23.x
  2009-12-25 19:25     ` Eli Zaretskii
@ 2009-12-25 20:13       ` Peter Dyballa
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2009-12-25 20:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


Am 25.12.2009 um 20:25 schrieb Eli Zaretskii:

> Perhaps the default limit of 200 is too small nowadays, certainly for
> compiling GCC, but you said some lines are tens of thousands of
> characters long, is that right?


Yes, I've seen such long lines, 'though not with GCC (it and QT4 take  
very long to compile, the latter having also very long lines) but with  
X11 related software, particularly such that uses GTK+2 – 20 and more  
shared libraries needed, built from 100 or more object files. Although  
in column-number-mode the line number is erased, the column counter  
still works – and GNU Emacs 23 has the preference to leave the text  
cursor at the lines' ends.

Luckily modern shells support command line lengths of 64 K (wide?)  
characters, maybe even more, so compiling such monster applications  
even works!


OK, I'll send that suggestion!

--
Greetings

   Pete

Hard Disk, n.:
	A device that allows users to delete vast quantities of data with  
simple mnemonic commands.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-25 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-25 10:51 Line number in mode-line with column-number-mode on in GNU Emacs 23.x Peter Dyballa
2009-12-25 14:46 ` Eli Zaretskii
2009-12-25 17:19   ` Peter Dyballa
2009-12-25 19:25     ` Eli Zaretskii
2009-12-25 20:13       ` Peter Dyballa

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.