From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45652: so-long mode not triggered despite big file with very long lines Date: Mon, 11 Jan 2021 19:39:18 +0100 Message-ID: <87wnwjco89.fsf@gnus.org> References: <877dosudon.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18186"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45652@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 11 19:40:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kz26x-0004Wt-27 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 19:40:15 +0100 Original-Received: from localhost ([::1]:37878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kz26v-0008TM-KE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 13:40:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kz26k-0008Sd-Fj for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 13:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kz26k-0003Tj-8c for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 13:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kz26k-0001ua-4T for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 13:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45652 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45652-submit@debbugs.gnu.org id=B45652.16103903737303 (code B ref 45652); Mon, 11 Jan 2021 18:40:02 +0000 Original-Received: (at 45652) by debbugs.gnu.org; 11 Jan 2021 18:39:33 +0000 Original-Received: from localhost ([127.0.0.1]:58235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz26H-0001ti-Er for submit@debbugs.gnu.org; Mon, 11 Jan 2021 13:39:33 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:56100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kz26F-0001tW-SP for 45652@debbugs.gnu.org; Mon, 11 Jan 2021 13:39:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=u4geXH2fZS8yw0B5ZiAf6pYxUer0tqDrgfCxxT7x/CA=; b=abQXyvoAXulEB4BPDSbAec09Yj 4OYjvmr1MzRVshkb41b3yhrU7k5AfRb7KQRDtZy1EqjNEYfBHXyd/ky+fEounhb0lKK2Drmq70Rw/ bEjdl8JqcIdrIdJ04bpcMeVkAbvEEsyoPE7tmNYkE7OJpaLgLdT/2vmtSzKBRVEMF+ys=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kz263-0001bU-SO; Mon, 11 Jan 2021 19:39:24 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEUrJSYkHh5NOkOQ T0b///+qhH9IAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UBCxIkMd+oGKIAAAHCSURBVDjLXVSLscQg CERtAHMNKDYQof/e3oLm97iLM2FxQRZDRIxfWCJO9TJ3MMU71cdSjWiRlkkaUR3TY/iwFECT1rID 2c4gZesXf1gdpitbpo9l8x0cdXz8Q0fr/0I1w48acvINmymLDPG1XZ5iQlGt24czgCw3kmXXYPYC nAo1ZbENyGMRFn75At4Zd2ujLyCmj/8NoCWmK9cnuVjLcvvfW+Bq7448wMd9k42oPvpfaeux/Usn iJjeZGhQ6OSaX5osLjtx9jUMvKjaat9Qantw0ktxpsOcfpXHq/C2Bm2oJG5xGkyhB/TFfOjojAoA eZKa8F+LmQO2hEGROIEfwlLZQOTUkRV+jM7oGE1u5plwHCsJwUWtjMnDAQmAix3qVPoDEFXJLt6W bLBJluoaJI7kbp49JSS/Os8qp/Xxg7/X5M++UMep45z2Q/pODngb2TurOrCjIBHuF9iocnSdJ+g7 iI4pwmjjtYMnKp0AsiqAfUf9cmpRPVFTswmAq1NtVUJmLEdn5YSqoPTnrmWBVIjxK/e+cckBxEOh VtI1R1up0xd06+S3G8EzdBRZyV9AaJxpDVatzzfn39fnftn7HP4DLF1Z0zFFb68AAAAldEVYdGRh dGU6Y3JlYXRlADIwMjEtMDEtMTFUMTg6MzY6NDgrMDA6MDABzbx4AAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIxLTAxLTExVDE4OjM2OjQ4KzAwOjAwcJAExAAAAABJRU5ErkJggg== X-Now-Playing: Keith Seatman's _Scarred For Life 2_: "One Lost Weekend" In-Reply-To: (Phil Sainty's message of "Tue, 12 Jan 2021 00:28:24 +1300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197732 Archived-At: Phil Sainty writes: > In particular, so-long doesn't (by default) look at the whole file, > and the above file is apparently 45,982 lines long. For context > I am currently looking at increasing the maximum number of lines > checked by so-long (by default) to 500 -- approximately the first > 1% of your file. Have you considered adding a C-level primitive that just looks at the entire buffer? It should be reasonably simple and very fast -- just count areas between "\n"s, skipping the buffer gap. We don't have to care about characters as such, I think, so this should be massively faster than counting line lengths in Lisp. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no