From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#45652: so-long mode not triggered despite big file with very long lines Date: Tue, 12 Jan 2021 00:28:24 +1300 Message-ID: References: <877dosudon.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5705"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson , 45652@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 11 12:29:15 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 1kyvNq-0001Kf-SC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 12:29:14 +0100 Original-Received: from localhost ([::1]:38664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyvNp-0008At-T2 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Jan 2021 06:29:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyvNe-0008Am-FZ for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 06:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyvNe-0005N2-0D for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 06:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyvNd-0000HU-Nh for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2021 06:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2021 11:29:01 +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.16103645091042 (code B ref 45652); Mon, 11 Jan 2021 11:29:01 +0000 Original-Received: (at 45652) by debbugs.gnu.org; 11 Jan 2021 11:28:29 +0000 Original-Received: from localhost ([127.0.0.1]:55893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyvN7-0000Gk-IP for submit@debbugs.gnu.org; Mon, 11 Jan 2021 06:28:29 -0500 Original-Received: from smtp-3.orcon.net.nz ([60.234.4.44]:35255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyvN5-0000Gb-G5 for 45652@debbugs.gnu.org; Mon, 11 Jan 2021 06:28:28 -0500 Original-Received: from [101.53.216.160] (port=29856 helo=[192.168.20.103]) by smtp-3.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1kyvN3-00079J-0t; Tue, 12 Jan 2021 00:28:25 +1300 In-Reply-To: <877dosudon.5.fsf@jidanni.org> Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- 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:197687 Archived-At: Hi Dan, On 5/01/21 12:47 am, 積丹尼 Dan Jacobson wrote: > Alas, even in my https://www.jidanni.org/comp/configuration/.emacs with > (global-so-long-mode 1) > (setq so-long-action 'so-long-minor-mode) > this certain file does not trigger so-long mode. I see that Emacs uses js-mode for .har files, so it *is* a targeted major mode for so-long, which means that it's probably just not meeting the configured criteria for a file with long lines. See the docstring for `so-long-detected-long-line-p' for details. I'm also in the process of making changes to some of the relevant default values, so you could test the current WIP version from here: https://git.savannah.nongnu.org/cgit/so-long.git/plain/so-long.el?h=wip > Where to get such a file to test? > Real simple. In Chrome Developer Tools network tab, visit > https://www.youtube.com/c/jidanni2/playlists?view=1 and right click > "Save all as HAR with content." I don't have Chrome installed, sorry; but if it's not a config issue then I'll be happy to take a look at an example file, if you provide one (compressed, please). > Here we see the file(1) command knows a file has very long lines. > $ file www.youtube.com.har > www.youtube.com.har: UTF-8 Unicode text, with very long lines > $ wc www.youtube.com.har > 45982 330703 14075335 www.youtube.com.har Those programs have no bearing on so-long's criteria, of course. 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. Even if we go with a larger number, I think it's likely to *be* a fixed maximum number in the default config, which means there will always be scope for a file to have its first gigantic line on the (max+1)th line, and not be detected by so-long. Hopefully the new default config will be more reliable than before, though. -Phil