From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: freezer@posteo.de, 23598@debbugs.gnu.org
Subject: bug#23598: 25.0.94; linum
Date: Tue, 11 Aug 2020 19:20:28 -0700 [thread overview]
Message-ID: <CADwFkmnJBCA--SaNvv4_kFJcZHU+MJT8-ywo9ZoxaXcAzz1xpg@mail.gmail.com> (raw)
In-Reply-To: <83a8ji6rvo.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 22 May 2016 18:20:59 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 22 May 2016 08:59:35 +0200
>> From: freezer@posteo.de
>>
>> 1. When I turn on line numbers (with linum-mode), scrolling a large org file is very slow. This only happens when the org sections are folded and not fully
>> expanded.
>
> linum-mode needs to count lines each time you scroll through the file,
> and it needs to update the display for all the lines visible in the
> window. When many lines are hidden, updating a window requires
> traversing a lot of lines in the buffer. For example, the sample file
> you sent shows almost 3000 lines in a single window, which is 100
> times more than an average window without hidden lines. So yes, this
> is slow.
>
> I suggest to switch to nlinum-mode from ELPA, which us much faster in
> these cases.
>
>> 2. With some themes, the line numbers are also truncated. Example (theme
>> monokai): http://i.imgur.com/gkY8FGn.png
>>
>> Example org file:
>> https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org
>
> The monokai theme seems to implicitly enlarge the face used for the
> line numbers and change its font (because Org headers use an enlarged
> variable-pitch font), but it doesn't update the 'linum' face with that
> information. By default, the face for the line numbers has its
> attributes merged with those of the face used to display the text
> line, and since the 'linum' face by default doesn't specify any size
> or font attributes, they are taken from the Org header face. So the
> calculation of character size linum-mode does is incorrect, because
> the 'linum' face's font is still defined to be the original size
> before it was enlarged. I think setting the 'linum' face's attributes
> to set specific font family and height attributes should fix this
> problem. It could be argued that the monokai theme should do that: it
> clearly caters to linum-mode, since it does set some attributes of the
> 'linum' face.
So the suggestion here is to use nlinum-mode instead for these cases,
and to potentially also make changes to an external theme.
So is there anything more to do here or should this be closed?
Best regards,
Stefan Kangas
next prev parent reply other threads:[~2020-08-12 2:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-22 6:59 bug#23598: 25.0.94; linum freezer
2016-05-22 15:20 ` Eli Zaretskii
2020-08-12 2:20 ` Stefan Kangas [this message]
2020-08-12 14:12 ` Eli Zaretskii
2020-08-12 14:18 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmnJBCA--SaNvv4_kFJcZHU+MJT8-ywo9ZoxaXcAzz1xpg@mail.gmail.com \
--to=stefan@marxist.se \
--cc=23598@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=freezer@posteo.de \
/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 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.