• Re: unpleasant flickering in terminal emacs

    From Dmitrii Kuragin@dmitriy.kuragin@gmail.com to gnu.emacs.help on Wed Aug 24 15:12:10 2022
    From Newsgroup: gnu.emacs.help

    On Saturday, April 28, 2018 at 4:05:39 AM UTC-7, Emanuel Berg wrote:
    Eli Zaretskii wrote:

    People who discover something important
    frequently want that to be the first issue
    described in <THE DOCUMENT OF YOUR CHOICE>.
    Of course, there's only one such issue that
    can ever be the first one in any document...
    The first question should be "What is Emacs?"

    The first answer on debugging should be "-Q" in
    order to find out if the problem is with Emacs
    or in the user's setup.

    People who have problems with Emacs and come
    here and ask about it sometimes get a bit
    embarrassed when trying -Q to find out the
    problem is with them and not with Emacs.
    This Q&A in a FAQ could spare some of them this
    experience.

    But actually I don't think it is anything to be
    embarrassed about. Furthermore they might still
    need help with their situation. And really, if
    all such cases really were Emacs bugs, that'd
    be even more embarrassing :)
    --
    underground experts united
    http://user.it.uu.se/~embe8573

    Recently I experienced the same problem and it looks like, the root cause for me was:
    ```
    (add-hook 'after-init-hook #'global-display-fill-column-indicator-mode)
    ```

    Somehow when the column indicator is enabled together with relative numbers it causes flickering.

    Likely, it is caused by performance optimizations and probably the indicator is being recalculated on every line movement, since display line number mode might adjust the width and it require redrawing of the whole screen.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Dmitrii Kuragin@dmitriy.kuragin@gmail.com to gnu.emacs.help on Wed Aug 24 15:23:41 2022
    From Newsgroup: gnu.emacs.help

    On Wednesday, August 24, 2022 at 3:12:11 PM UTC-7, Dmitrii Kuragin wrote:
    On Saturday, April 28, 2018 at 4:05:39 AM UTC-7, Emanuel Berg wrote:
    Eli Zaretskii wrote:

    People who discover something important
    frequently want that to be the first issue
    described in <THE DOCUMENT OF YOUR CHOICE>.
    Of course, there's only one such issue that
    can ever be the first one in any document...
    The first question should be "What is Emacs?"

    The first answer on debugging should be "-Q" in
    order to find out if the problem is with Emacs
    or in the user's setup.

    People who have problems with Emacs and come
    here and ask about it sometimes get a bit
    embarrassed when trying -Q to find out the
    problem is with them and not with Emacs.
    This Q&A in a FAQ could spare some of them this
    experience.

    But actually I don't think it is anything to be
    embarrassed about. Furthermore they might still
    need help with their situation. And really, if
    all such cases really were Emacs bugs, that'd
    be even more embarrassing :)
    --
    underground experts united
    http://user.it.uu.se/~embe8573
    Recently I experienced the same problem and it looks like, the root cause for me was:
    ```
    (add-hook 'after-init-hook #'global-display-fill-column-indicator-mode)
    ```

    Somehow when the column indicator is enabled together with relative numbers it causes flickering.

    Likely, it is caused by performance optimizations and probably the indicator is being recalculated on every line movement, since display line number mode might adjust the width and it require redrawing of the whole screen.

    Basically, I have run -Q and executed:
    ```
    (setq-default
    display-line-numbers-width 3
    display-line-numbers-type 'visual)

    (display-fill-column-indicator-mode)
    (display-line-numbers-mode)
    ```

    The I have 2 vertical panes: left is large C++ file and the tight one with a scratch buffer.

    When I scroll in the large C++ file, emacs is flickering.
    --- Synchronet 3.21d-Linux NewsLink 1.2