From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: relative line numbers and folding: how to make they play along? Date: Fri, 15 Jul 2016 10:07:52 +0300 Message-ID: <83mvlj7513.fsf@gnu.org> References: <8360sbcvbz.fsf@gnu.org> <83lh158eza.fsf@gnu.org> <83bn208djh.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468566529 30375 80.91.229.3 (15 Jul 2016 07:08:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2016 07:08:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 15 09:08:49 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNxEj-0000Wf-DO for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jul 2016 09:08:37 +0200 Original-Received: from localhost ([::1]:58828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNxEf-0003rg-7g for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jul 2016 03:08:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNxEG-0003pA-Gl for help-gnu-emacs@gnu.org; Fri, 15 Jul 2016 03:08:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNxEC-0007aJ-50 for help-gnu-emacs@gnu.org; Fri, 15 Jul 2016 03:08:07 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNxEC-0007a9-1j for help-gnu-emacs@gnu.org; Fri, 15 Jul 2016 03:08:04 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2761 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bNxEA-0004f4-Av for help-gnu-emacs@gnu.org; Fri, 15 Jul 2016 03:08:02 -0400 In-reply-to: (message from Stefan Monnier on Thu, 14 Jul 2016 17:03:07 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110860 Archived-At: > From: Stefan Monnier > Date: Thu, 14 Jul 2016 17:03:07 -0400 > > >> Actually, I don't think there needs to be flickering if the first step > >> ("perform redisplay of window") just computes the new matrices without > >> performing any drawing. > > Since the display engine computes the number of each screen line as it > > lays them out, I don't understand why would 2 phases be needed. I'm > > probably missing something. > > If we bake it into the redisplay code, we can indeed do it "on the fly", > but if we want this feature to be implemented in Elisp it seems a lot > more tricky to avoid the 2 passes. But this sub-thread started with you talking about baking it into redisplay: > I think to implement relative-visual-linum-mode efficiently, we'd need > help from the display engine. E.g.: > - First perform redisplay of the window. > - then, go through the window, visual-line by visual-line > and add something in the margin. > - then update the margin part of the matrices. These two passes are described in terms of what redisplay does, they are not visible to Lisp: we don't return to the command loop after each window's redisplay, and the glyph matrices are not exposed to Lisp, either. So now I'm confused about what you are suggesting.