From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.devel Subject: Re: Native line numbers, final testing Date: Fri, 30 Jun 2017 15:15:00 -0600 Message-ID: <87mv8pyy7f.fsf@lylat> References: <83y3s9pm2a.fsf@gnu.org> <87vandz7lw.fsf@lylat> <83wp7tpcav.fsf@gnu.org> <87r2y1z45o.fsf@lylat> <83vandp7wz.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1498857369 13316 195.159.176.226 (30 Jun 2017 21:16:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Jun 2017 21:16:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 30 23:16:03 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dR3Gk-00035R-LF for ged-emacs-devel@m.gmane.org; Fri, 30 Jun 2017 23:16:02 +0200 Original-Received: from localhost ([::1]:45973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dR3Go-0003nL-BH for ged-emacs-devel@m.gmane.org; Fri, 30 Jun 2017 17:16:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dR3Ft-0003jJ-AI for emacs-devel@gnu.org; Fri, 30 Jun 2017 17:15:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dR3Fp-0006ei-9F for emacs-devel@gnu.org; Fri, 30 Jun 2017 17:15:09 -0400 Original-Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]:37977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dR3Fp-0006eF-4b; Fri, 30 Jun 2017 17:15:05 -0400 Original-Received: by mail-it0-x22b.google.com with SMTP id k192so31170720ith.1; Fri, 30 Jun 2017 14:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=bBRmn2SJ2JRgrOfe+XSWhS2CvnOvM94JJoRyj/N78Bs=; b=aQAkPtpZUteyrT0fZDEweFU3e9xhERltNc2qjQK0dOiVKVmxQ/ETTt5VFZ3IAZ19Lv sbiwrao0wQfUpnERrUHe2UEeF6XHsZX9jZDXwMPdnGfEGSxAwH9wjyjQNlOpt0WotVoc L3Iu6x7+qtKZ6P/YSEH1XMVM87IX1ZqYQIiNT9n24EnO0xBiaCdzmN4P3Paej5cg/LPM TS/qPg30v36jfQmCGlt5uoEOuMuOa3l7yfJIJuhxOrGMCNUJgSAc7TB5bYws/1sZo6fn qhGHTxPfDWf94SmCD1coZ0Yvq2G7uVRHdm4wxrJL1HV0CBfBSLa3WXFqw0HadiEAjZFm sBLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=bBRmn2SJ2JRgrOfe+XSWhS2CvnOvM94JJoRyj/N78Bs=; b=WuaU2JQptxFXf98eDtZf+gkxHqrg7ezEXBoqKH4iGFYaUiksRc2l03Ww0x/Y28l+mX dXOkK6kjch4qQ2OGn5WwA4TQJNre54cUr6wATRPWz+MgSOld6A8gF6uVptUDeSoP0fXN m4tJD7ilt6NpnmRTy7DOUuyAMQ6LsKnXMV3kf88g6zFGqTrwXoWMVBehlrPdW2XKdhMo acaco2egkbeoIDZ6aWDZeqnrFEDeYOHtsNk6/EsZfy7JvBIsr6LuPhYaPY3qa3IT0zUX kTk5GUx3bKcmw8lHexpWqpJ/FDaoTaDYDOglcoGvqTxMYz1lBPydkXmRqrq81QfmJYem UMaw== X-Gm-Message-State: AKS2vOzpguHERylqQz6qSMCYtUCq9/jCtiPN5H16YQE2MKxE7d6CMUFD XZYPTLLh7fIRicSn X-Received: by 10.36.204.215 with SMTP id x206mr9678915itf.81.1498857303384; Fri, 30 Jun 2017 14:15:03 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id 66sm2559890itj.1.2017.06.30.14.15.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Jun 2017 14:15:02 -0700 (PDT) In-Reply-To: <83vandp7wz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Jun 2017 22:55:24 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216064 Archived-At: Eli Zaretskii writes: >> From: Alex >> Cc: emacs-devel@gnu.org >> Date: Fri, 30 Jun 2017 13:06:27 -0600 >> >> I forgot that just before testing relative line numbers, I set >> `display-line-number-width' to a non-nil value. For immediate results, >> try setting it to 0 and hit C-n/C-p a few times. > > Ah, okay. Thanks, should be fixed now. Thanks, it appears to be fixed. I noticed another bug. With `display-line-numbers' set to t or 'relative in xdisp.c: M-g c 2970 RET C-n Notice that C-n moved back one column. This does not happen with 'visual, nor does it happen when the window is sufficiently small. This is in emacs -Q, and only happens with non-nil line-move-visual. >> P.S. I noticed that with display-line-numbers set to 'visual, goto-line >> is much slower compared to 'relative. Is this expected? > > Yes. The initial na=C3=AFve implementation was unbearably slow, but I was > lucky to find a shortcut. It is still sometimes slow, and a few > redisplay optimizations are disabled with this mode, because moving > point vertically needs to redisplay the entire window, since the line > numbers change. If someone has ideas for speeding it up, I'm all > ears. I'm not planning to use 'visual, and I of course don't claim to know anything about this, but I'm curious as to why it works like this. goto-line in either style always goes to the same absolute line number, right? Does the line number display calculation occur after the point is already moved to this line? If so, then doesn't the display engine just need to calculate the visual line numbers around this point? If so, then why does a large jump like M-g g 25000 take so much longer comparatively than M-g g 1000? If these assumptions are wrong (they likely are), why are they wrong?