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 display of line numbers, improved Date: Mon, 26 Jun 2017 13:41:19 -0600 Message-ID: <87wp7y4jvk.fsf@lylat> References: <83tw35thxw.fsf@gnu.org> <87efu7lsj0.fsf@lylat> <83r2y7sc9q.fsf@gnu.org> <87a84vl8gm.fsf@lylat> <8760fjl85k.fsf@lylat> <83o9tassmh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498506100 12271 195.159.176.226 (26 Jun 2017 19:41:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Jun 2017 19:41:40 +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 Mon Jun 26 21:41:35 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 1dPZt5-0002oY-Uy for ged-emacs-devel@m.gmane.org; Mon, 26 Jun 2017 21:41:32 +0200 Original-Received: from localhost ([::1]:48241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPZtA-0000xe-Sp for ged-emacs-devel@m.gmane.org; Mon, 26 Jun 2017 15:41:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPZt4-0000xK-BS for emacs-devel@gnu.org; Mon, 26 Jun 2017 15:41:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPZt1-0000TG-6B for emacs-devel@gnu.org; Mon, 26 Jun 2017 15:41:30 -0400 Original-Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]:35417) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPZt1-0000T4-1I; Mon, 26 Jun 2017 15:41:27 -0400 Original-Received: by mail-io0-x230.google.com with SMTP id h134so6638768iof.2; Mon, 26 Jun 2017 12:41:26 -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; bh=jSHG8Df1zBxfosJDvzlZEnl2kGd/l/9Ya08Q5o1Z2DA=; b=psgpTM5Lut1aS65XieLBeFvl0FsOydLgh/OAG91vbBQijbDLq+Orht7ZTttQAiwW5I x8qCMbFrvkBd0LJilY9XogObncMs0r0tK0NwOUxj9qm/tqCoT35PzS8PRFdl2KVgkYJJ aX4w/m8oORMUqJTArZ7AKeQ0pmpmGUKGmRCw5lx8hLdlFiX/UksPbnXizth0nVwM2iE+ wjTE7qP0FqHsmWi8TW2FdexMG9ALxp6EOIrivk3c3txKDJWqSB9paLlgFWZOby77FkkE WbzBEQO1Cznv43nvelqaG5Bnn4k1aYpKHxzcGfBpdV03/tISzay/Vfq8ZSurXLj2ylIc 07yg== 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; bh=jSHG8Df1zBxfosJDvzlZEnl2kGd/l/9Ya08Q5o1Z2DA=; b=djkOzuA44SVWtc01/Mq7RPphZ4JhuN+2vdrSiCe+ySxyourHJ2Pcuu4waGEX9pkAJI j0DhIh4Uy+2nUWT0KtCYCmvk3Ptre7T1Ns3YGyUpf6VR7NGoDacDF6oLpEJO2RfWwJ3Z KE4j/aWqEYmfEI5TieaRxefz91KcVXrBhp9fmhwqRhQzDGKKkPZS/1lH0YQYZl+PzxUV ooXpUIIzSz7Wrk6Thpt6EbsNMITqVOJWKMi3iyv59MyCoJOQzc6kaYbf7xjRMhnxU7uf 9M8im8yoINHdwB0bus7wUuJ83OEkuXPKhpUaknrhMH5VrCM5an3puclFIfKhhwfAshst e0Ag== X-Gm-Message-State: AKS2vOxoWzkZsrGnBnrKHjuTg3grdEyadNcKvZFvN1kXxZ06wsH4NfcV JDalvZZhP5muJOdr X-Received: by 10.107.16.9 with SMTP id y9mr2779661ioi.134.1498506085946; Mon, 26 Jun 2017 12:41:25 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id h187sm289046itb.13.2017.06.26.12.41.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jun 2017 12:41:23 -0700 (PDT) In-Reply-To: <83o9tassmh.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Jun 2017 17:58:30 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::230 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:216011 Archived-At: Eli Zaretskii writes: >> From: Alex >> Cc: emacs-devel@gnu.org >> Date: Sun, 25 Jun 2017 21:50:15 -0600 >> >> Err, sorry again. I meant to write "the number of digits needed to >> represent the last line in the buffer's line number". > > Right. That would be something like > > (truncate (1+ (log (max 1 (count-lines (point-min) (point-max))) 10))) Thanks. I was just thinking that the display engine could somehow do it noticeably faster, but evaluating that in a large file (xdisp.c) is only a few milliseconds on my machine, so that's probably fast enough. Is there going to be a minor mode in the merged version? It would be nice to have a display-line-numbers-mode-hook to attach the above to.