* unpleasant flickering in terminal emacs @ 2018-04-27 11:58 Amos Bird 2018-04-27 12:04 ` Tim Visher 2018-04-27 12:50 ` Eli Zaretskii 0 siblings, 2 replies; 17+ messages in thread From: Amos Bird @ 2018-04-27 11:58 UTC (permalink / raw) To: help-gnu-emacs Hi, I'm using emacs master branch in terminal (alacritty). When moving cursor with relative line number enabled or scrolling up/down, I get unpleasant screen flickering. However, frame switch works fine, which I suppose uses full rendering updates. It seems partial rendering update doesn't work well. The author of alacritty mentioned one possible cause : "flickering is typically caused by a program not writing full updates to the pty. We drain all available bytes up to like 64k before yielding for a render. It may be that we should add some heuristic around time to prevent flickering from poorly behaved terminal applications." So my question is, can I enable full updates for every redisplay? Thanks! Here is a screencast of flickering. https://youtu.be/wv4QINKHDUY regards, -- Amos Bird amosbird@gmail.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 11:58 unpleasant flickering in terminal emacs Amos Bird @ 2018-04-27 12:04 ` Tim Visher 2018-04-27 12:23 ` Amos Bird 2018-04-27 12:50 ` Eli Zaretskii 1 sibling, 1 reply; 17+ messages in thread From: Tim Visher @ 2018-04-27 12:04 UTC (permalink / raw) To: Amos Bird; +Cc: help-gnu-emacs I don't have an informed idea about whether you're suffering from this (I never have) but your question tickled my memory. https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102/ On Fri, Apr 27, 2018 at 7:58 AM, Amos Bird <amosbird@gmail.com> wrote: > Hi, > > I'm using emacs master branch in terminal (alacritty). When moving > cursor with relative line number enabled or scrolling up/down, I get > unpleasant screen flickering. However, frame switch works fine, which > I suppose uses full rendering updates. It seems partial rendering > update doesn't work well. The author of alacritty mentioned one > possible cause : "flickering is typically caused by a program not > writing full updates to the pty. We drain all available bytes up to > like 64k before yielding for a render. It may be that we should add > some heuristic around time to prevent flickering from poorly behaved > terminal applications." So my question is, can I enable full updates > for every redisplay? Thanks! > > Here is a screencast of flickering. > > https://youtu.be/wv4QINKHDUY > > regards, > > -- > Amos Bird > amosbird@gmail.com > > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 12:04 ` Tim Visher @ 2018-04-27 12:23 ` Amos Bird 2018-04-27 12:51 ` Eli Zaretskii 0 siblings, 1 reply; 17+ messages in thread From: Amos Bird @ 2018-04-27 12:23 UTC (permalink / raw) To: Tim Visher; +Cc: help-gnu-emacs Thanks. But it's emacs in the terminal which flickers, not in the GUI. I'm not sure if the double buffering mechanism has anything to do with terminals. regards, Tim Visher <tim.visher@gmail.com> writes: > I don't have an informed idea about whether you're suffering > from this (I > never have) but your question tickled my memory. > > https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102/ > > On Fri, Apr 27, 2018 at 7:58 AM, Amos Bird <amosbird@gmail.com> > wrote: > >> Hi, >> >> I'm using emacs master branch in terminal (alacritty). When >> moving >> cursor with relative line number enabled or scrolling up/down, >> I get >> unpleasant screen flickering. However, frame switch works fine, >> which >> I suppose uses full rendering updates. It seems partial >> rendering >> update doesn't work well. The author of alacritty mentioned one >> possible cause : "flickering is typically caused by a program >> not >> writing full updates to the pty. We drain all available bytes >> up to >> like 64k before yielding for a render. It may be that we should >> add >> some heuristic around time to prevent flickering from poorly >> behaved >> terminal applications." So my question is, can I enable full >> updates >> for every redisplay? Thanks! >> >> Here is a screencast of flickering. >> >> https://youtu.be/wv4QINKHDUY >> >> regards, >> >> -- >> Amos Bird >> amosbird@gmail.com >> >> -- Amos Bird amosbird@gmail.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 12:23 ` Amos Bird @ 2018-04-27 12:51 ` Eli Zaretskii 0 siblings, 0 replies; 17+ messages in thread From: Eli Zaretskii @ 2018-04-27 12:51 UTC (permalink / raw) To: help-gnu-emacs > From: Amos Bird <amosbird@gmail.com> > Date: Fri, 27 Apr 2018 20:23:07 +0800 > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org> > > I'm not sure if the double buffering mechanism has anything to do > with terminals. Indeed, it doesn't. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 11:58 unpleasant flickering in terminal emacs Amos Bird 2018-04-27 12:04 ` Tim Visher @ 2018-04-27 12:50 ` Eli Zaretskii 2018-04-27 15:05 ` Amos Bird 1 sibling, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2018-04-27 12:50 UTC (permalink / raw) To: help-gnu-emacs > From: Amos Bird <amosbird@gmail.com> > Date: Fri, 27 Apr 2018 19:58:56 +0800 > > I'm using emacs master branch in terminal (alacritty). When moving > cursor with relative line number enabled or scrolling up/down, I > get unpleasant screen flickering. Relative line numbers require a full redraw of the window when you scroll, because every line's number changes. Emacs will actually redraw only the numbers themselves, and maybe also some general window decorations. Not sure why that happens to you during scrolling without line numbers, it doesn't seem to happen to me. Do you see that in "emacs -Q"? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 12:50 ` Eli Zaretskii @ 2018-04-27 15:05 ` Amos Bird 2018-04-27 15:51 ` Eli Zaretskii 0 siblings, 1 reply; 17+ messages in thread From: Amos Bird @ 2018-04-27 15:05 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs Hi Eli, "emacs -Q" works fine, same as my emacs's *scratch* buffer with 100K lines of code. However, after switching to Fundamental mode and turning of font-lock-mode, xdisp.c buffer still flickers while scrolling. All the minor modes are the same as the *scratch* buffer. I've also tried loading the same theme of "emacs -Q", it doesn't help either. Eli Zaretskii <eliz@gnu.org> writes: >> From: Amos Bird <amosbird@gmail.com> >> Date: Fri, 27 Apr 2018 19:58:56 +0800 >> >> I'm using emacs master branch in terminal (alacritty). When >> moving >> cursor with relative line number enabled or scrolling up/down, >> I >> get unpleasant screen flickering. > > Relative line numbers require a full redraw of the window when > you > scroll, because every line's number changes. Emacs will > actually > redraw only the numbers themselves, and maybe also some general > window > decorations. > > Not sure why that happens to you during scrolling without line > numbers, it doesn't seem to happen to me. Do you see that in > "emacs -Q"? -- Amos Bird amosbird@gmail.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 15:05 ` Amos Bird @ 2018-04-27 15:51 ` Eli Zaretskii 2018-04-27 16:45 ` Amos Bird 0 siblings, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2018-04-27 15:51 UTC (permalink / raw) To: help-gnu-emacs > From: Amos Bird <amosbird@gmail.com> > Cc: help-gnu-emacs@gnu.org > Date: Fri, 27 Apr 2018 23:05:06 +0800 > > Hi Eli, "emacs -Q" works fine, same as my emacs's *scratch* buffer > with 100K > lines of code. However, after switching to Fundamental mode and > turning of > font-lock-mode, xdisp.c buffer still flickers while scrolling. All > the minor > modes are the same as the *scratch* buffer. I've also tried > loading the same > theme of "emacs -Q", it doesn't help either. Sorry, I don't think I follow. If you start Emacs with "emacs -Q", then visit xdisp.c and scroll, does it still flicker? If not, are you saying that it starts flickering as soon as you load some theme? If so, what theme do you need to load? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 15:51 ` Eli Zaretskii @ 2018-04-27 16:45 ` Amos Bird 2018-04-27 18:27 ` Eli Zaretskii [not found] ` <mailman.13046.1524853658.27995.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 17+ messages in thread From: Amos Bird @ 2018-04-27 16:45 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs Sorry for being ambiguous. I referred "my emacs" as the emacs with my configuration instead of "emacs -Q". regards, Eli Zaretskii <eliz@gnu.org> writes: >> From: Amos Bird <amosbird@gmail.com> >> Cc: help-gnu-emacs@gnu.org >> Date: Fri, 27 Apr 2018 23:05:06 +0800 >> >> Hi Eli, "emacs -Q" works fine, same as my emacs's *scratch* >> buffer >> with 100K >> lines of code. However, after switching to Fundamental mode and >> turning of >> font-lock-mode, xdisp.c buffer still flickers while scrolling. >> All >> the minor >> modes are the same as the *scratch* buffer. I've also tried >> loading the same >> theme of "emacs -Q", it doesn't help either. > > Sorry, I don't think I follow. If you start Emacs with "emacs > -Q", > then visit xdisp.c and scroll, does it still flicker? If not, > are you > saying that it starts flickering as soon as you load some theme? > If > so, what theme do you need to load? -- Amos Bird amosbird@gmail.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 16:45 ` Amos Bird @ 2018-04-27 18:27 ` Eli Zaretskii 2018-04-28 3:36 ` Amos Bird [not found] ` <mailman.13046.1524853658.27995.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 17+ messages in thread From: Eli Zaretskii @ 2018-04-27 18:27 UTC (permalink / raw) To: help-gnu-emacs > From: Amos Bird <amosbird@gmail.com> > Cc: help-gnu-emacs@gnu.org > Date: Sat, 28 Apr 2018 00:45:18 +0800 > > > Sorry for being ambiguous. I referred "my emacs" as the emacs with > my > configuration instead of "emacs -Q". Then I take it as meaning that "emacs -Q" doesn't show the problem, even if you load the theme you are normally using? If so, I suggest to bisect your customizations to find out which one(s) cause this flickering, then come back here and tell what you found. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 18:27 ` Eli Zaretskii @ 2018-04-28 3:36 ` Amos Bird 2018-04-28 6:40 ` Eli Zaretskii 0 siblings, 1 reply; 17+ messages in thread From: Amos Bird @ 2018-04-28 3:36 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs It seems related to the true color terminfo I used. xterm-24bits|xterm with 24-bit direct color mode, use=xterm-256color, setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, using xterm-256color doesn't flicker at all. Eli Zaretskii <eliz@gnu.org> writes: >> From: Amos Bird <amosbird@gmail.com> >> Cc: help-gnu-emacs@gnu.org >> Date: Sat, 28 Apr 2018 00:45:18 +0800 >> >> >> Sorry for being ambiguous. I referred "my emacs" as the emacs >> with >> my >> configuration instead of "emacs -Q". > > Then I take it as meaning that "emacs -Q" doesn't show the > problem, > even if you load the theme you are normally using? If so, I > suggest > to bisect your customizations to find out which one(s) cause > this > flickering, then come back here and tell what you found. -- Amos Bird amosbird@gmail.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-28 3:36 ` Amos Bird @ 2018-04-28 6:40 ` Eli Zaretskii 0 siblings, 0 replies; 17+ messages in thread From: Eli Zaretskii @ 2018-04-28 6:40 UTC (permalink / raw) To: help-gnu-emacs > From: Amos Bird <amosbird@gmail.com> > Cc: help-gnu-emacs@gnu.org > Date: Sat, 28 Apr 2018 11:36:37 +0800 > > It seems related to the true color terminfo I used. > > xterm-24bits|xterm with 24-bit direct color mode, > use=xterm-256color, > setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, > setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm, > > using xterm-256color doesn't flicker at all. Thanks, please report this as a bug using "M-x report-emacs-bug RET". ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.13046.1524853658.27995.help-gnu-emacs@gnu.org>]
* Re: unpleasant flickering in terminal emacs [not found] ` <mailman.13046.1524853658.27995.help-gnu-emacs@gnu.org> @ 2018-04-27 20:38 ` Emanuel Berg 2018-04-28 6:27 ` Eli Zaretskii [not found] ` <mailman.13064.1524896893.27995.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 17+ messages in thread From: Emanuel Berg @ 2018-04-27 20:38 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii wrote: > Then I take it as meaning that "emacs -Q" > doesn't show the problem, even if you load > the theme you are normally using? If so, > I suggest to bisect your customizations to > find out which one(s) cause this flickering, > then come back here and tell what you found. Is there an Emacs FAQ? (Of course there is. Somewhere in Emacs!) The first question should be, Q: I have a problem when I [insert the rest of your question here] A: run Emacs like this $ emacs -Q does the problem remain? I guess this is an inherent problem with all software that is based on customization and extension, and where that happens in text files that contain code. (Now it sounds like I have tons of such software. And maybe I do...) In practice, I have not experienced this as a problem. I can find the bug in all my init files because they are loaded by theme. So to do binary search does not mean commenting out half the code in a single enormous file (that itself contains comments/"sections as comments"). But that's the mere technical side to searching of course. With time, one gets better at finding the problem by thinking at the same time as one does a brute-force attempt. That's why the fighters that can punch AND think are the best. Or carpenters for that matter! The only exception to the rule "isolating the problem isn't difficult" that I have encountered is with Gnus. Because leave out the configuration, and you can't get to your e-mail, or to any newsgroups, so you can't reproduce the error w/o the Gnus your init files! Perhaps one should do like the LaTeX people with their hangup on "minimal working examples", namely, write a "minimal Gnus init file" that does that and only that, namely connects to ONE mailbox, and a single NNTP newsgroup, and one Gmane/NNTP ditto, and why not the .test ones while at it? Then one could say, OK, so Gnus works. But not my Gnus! -- underground experts united http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 20:38 ` Emanuel Berg @ 2018-04-28 6:27 ` Eli Zaretskii [not found] ` <mailman.13064.1524896893.27995.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 17+ messages in thread From: Eli Zaretskii @ 2018-04-28 6:27 UTC (permalink / raw) To: help-gnu-emacs > From: Emanuel Berg <moasen@zoho.com> > Date: Fri, 27 Apr 2018 22:38:25 +0200 > > Is there an Emacs FAQ? (Of course there is. > Somewhere in Emacs!) The first question should > be, > > Q: I have a problem when I [insert the rest > of your question here] > > A: run Emacs like this > > $ emacs -Q > > does the problem remain? 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... Emacs does have a FAQ (two of them, actually), but our documentation principles are that such fundamental issues should be in the manual, not in the FAQ. The Emacs manual has a chapter on reporting bugs, which begins with explaining how to establish there's a bug and how to search the list of known problems. Then it describes how to report a bug, and as part of that tells about "emacs -Q". > The only exception to the rule "isolating the > problem isn't difficult" that I have > encountered is with Gnus. Because leave out the > configuration, and you can't get to your > e-mail, or to any newsgroups, so you can't > reproduce the error w/o the Gnus your > init files! The "start with 'emacs -Q'" rule doesn't mean you cannot load additional packages, set variables to non-default values, etc. The idea is to present a full recipe starting from 'emacs -Q', so that others could reproduce that without knowing anything about the Emacs setup on the OP's system. > Perhaps one should do like the LaTeX people > with their hangup on "minimal working > examples", namely, write a "minimal Gnus init > file" that does that and only that, namely > connects to ONE mailbox, and a single NNTP > newsgroup, and one Gmane/NNTP ditto, and why > not the .test ones while at it? Exactly. Except that if the problem doesn't need a Gnus init file at all, you don't even need such a minimal file as part of the recipe. You can just show which variables should be set to what values, manually. ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.13064.1524896893.27995.help-gnu-emacs@gnu.org>]
* Re: unpleasant flickering in terminal emacs [not found] ` <mailman.13064.1524896893.27995.help-gnu-emacs@gnu.org> @ 2018-04-28 11:05 ` Emanuel Berg 0 siblings, 0 replies; 17+ messages in thread From: Emanuel Berg @ 2018-04-28 11:05 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.13019.1524830349.27995.help-gnu-emacs@gnu.org>]
* Re: unpleasant flickering in terminal emacs [not found] <mailman.13019.1524830349.27995.help-gnu-emacs@gnu.org> @ 2018-04-27 15:14 ` Emanuel Berg 2018-04-27 16:47 ` Amos Bird [not found] ` <mailman.13042.1524847634.27995.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 17+ messages in thread From: Emanuel Berg @ 2018-04-27 15:14 UTC (permalink / raw) To: help-gnu-emacs Amos Bird wrote: > I'm using emacs master branch in terminal > (alacritty). I read about alacritty a while back but haven't used it and I don't remember what it said about it. It was in Linux Magazine, I think. Anyway I'm an Emacs terminal user as well, the Linux VTs, I have Emacs 24/7 in /dev/tty1, and I haven't experienced any flickering, so perhaps it is an alacritty, and not terminal, issue? What happens if you run Emacs from a Linux VT? If you're on Linux that is? -- underground experts united http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: unpleasant flickering in terminal emacs 2018-04-27 15:14 ` Emanuel Berg @ 2018-04-27 16:47 ` Amos Bird [not found] ` <mailman.13042.1524847634.27995.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 17+ messages in thread From: Amos Bird @ 2018-04-27 16:47 UTC (permalink / raw) To: Emanuel Berg; +Cc: help-gnu-emacs Hi, it also flickers in xterm, st, urxvt, termite ... Emanuel Berg <moasen@zoho.com> writes: > Amos Bird wrote: > >> I'm using emacs master branch in terminal >> (alacritty). > > I read about alacritty a while back but haven't > used it and I don't remember what it said about > it. It was in Linux Magazine, I think. > Anyway I'm an Emacs terminal user as well, the > Linux VTs, I have Emacs 24/7 in /dev/tty1, and > I haven't experienced any flickering, so > perhaps it is an alacritty, and not terminal, > issue? What happens if you run Emacs from > a Linux VT? If you're on Linux that is? -- Amos Bird amosbird@gmail.com ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.13042.1524847634.27995.help-gnu-emacs@gnu.org>]
* Re: unpleasant flickering in terminal emacs [not found] ` <mailman.13042.1524847634.27995.help-gnu-emacs@gnu.org> @ 2018-04-27 16:58 ` Emanuel Berg 0 siblings, 0 replies; 17+ messages in thread From: Emanuel Berg @ 2018-04-27 16:58 UTC (permalink / raw) To: help-gnu-emacs Amos Bird wrote: > it also flickers in xterm, st, urxvt, termite > ... OK, those are terminal emulators running in X. -- underground experts united http://user.it.uu.se/~embe8573 ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2018-04-28 11:05 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-04-27 11:58 unpleasant flickering in terminal emacs Amos Bird 2018-04-27 12:04 ` Tim Visher 2018-04-27 12:23 ` Amos Bird 2018-04-27 12:51 ` Eli Zaretskii 2018-04-27 12:50 ` Eli Zaretskii 2018-04-27 15:05 ` Amos Bird 2018-04-27 15:51 ` Eli Zaretskii 2018-04-27 16:45 ` Amos Bird 2018-04-27 18:27 ` Eli Zaretskii 2018-04-28 3:36 ` Amos Bird 2018-04-28 6:40 ` Eli Zaretskii [not found] ` <mailman.13046.1524853658.27995.help-gnu-emacs@gnu.org> 2018-04-27 20:38 ` Emanuel Berg 2018-04-28 6:27 ` Eli Zaretskii [not found] ` <mailman.13064.1524896893.27995.help-gnu-emacs@gnu.org> 2018-04-28 11:05 ` Emanuel Berg [not found] <mailman.13019.1524830349.27995.help-gnu-emacs@gnu.org> 2018-04-27 15:14 ` Emanuel Berg 2018-04-27 16:47 ` Amos Bird [not found] ` <mailman.13042.1524847634.27995.help-gnu-emacs@gnu.org> 2018-04-27 16:58 ` Emanuel Berg
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).