From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: tabulated-list: extend truncation into next align-right col Date: Wed, 02 Nov 2016 08:27:54 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1478089868 24962 195.159.176.226 (2 Nov 2016 12:31:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 2 Nov 2016 12:31:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 02 13:31:04 2016 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 1c1uh0-0005Cn-4Z for ged-emacs-devel@m.gmane.org; Wed, 02 Nov 2016 13:30:58 +0100 Original-Received: from localhost ([::1]:55049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1uh2-0008VA-N2 for ged-emacs-devel@m.gmane.org; Wed, 02 Nov 2016 08:31:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1ugQ-0008Uz-Cy for emacs-devel@gnu.org; Wed, 02 Nov 2016 08:30:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1ugM-0005YJ-NW for emacs-devel@gnu.org; Wed, 02 Nov 2016 08:30:22 -0400 Original-Received: from [195.159.176.226] (port=42935 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1ugM-0005Y9-HU for emacs-devel@gnu.org; Wed, 02 Nov 2016 08:30:18 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1c1ug8-0007b4-DP for emacs-devel@gnu.org; Wed, 02 Nov 2016 13:30:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 12 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:Y43iy2qDh9xFqZi7SkKi1xKIKrA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:209108 Archived-At: > + (min next-col-width > + (tabulated-list--near-cols-max-widths > + (1- (line-number-at-pos)) Hmm... this (line-number-at-pos) and the inverse `nth` inside tabulated-list--near-cols-max-widths are both O(N), and since we go through this loop N times, this gives us an O(N^2) complexity. Can't we just get "the next row" and "the previous row" more directly? Stefan