unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>, 45652@debbugs.gnu.org
Subject: bug#45652: so-long mode not triggered despite big file with very long lines
Date: Tue, 12 Jan 2021 00:28:24 +1300	[thread overview]
Message-ID: <a45b8bba-91ac-cc79-337f-ea95c46f7f8f@orcon.net.nz> (raw)
In-Reply-To: <877dosudon.5.fsf@jidanni.org>

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





  parent reply	other threads:[~2021-01-11 11:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 11:47 bug#45652: so-long mode not triggered despite big file with very long lines 積丹尼 Dan Jacobson
2021-01-10 14:53 ` Lars Ingebrigtsen
2021-01-11 11:21   ` 積丹尼 Dan Jacobson
2021-01-11 11:28 ` Phil Sainty [this message]
2021-01-11 12:55   ` 積丹尼 Dan Jacobson
2021-01-11 19:10     ` Phil Sainty
2021-01-11 23:04       ` 積丹尼 Dan Jacobson
2021-01-12  2:30         ` Phil Sainty
2021-01-12  5:53           ` 積丹尼 Dan Jacobson
2021-01-11 18:39   ` Lars Ingebrigtsen
2021-01-11 19:18     ` Phil Sainty
2021-01-11 19:30       ` Lars Ingebrigtsen
2021-01-11 21:07         ` Lars Ingebrigtsen
2021-01-12  2:42           ` Phil Sainty
2021-01-12 12:41             ` Lars Ingebrigtsen
2021-01-12 15:28               ` Eli Zaretskii
2021-01-12 15:37                 ` Lars Ingebrigtsen
2021-01-12 15:50                   ` Eli Zaretskii
2021-01-12 17:44                     ` Lars Ingebrigtsen
2021-01-12 19:22             ` Lars Ingebrigtsen
2021-01-12 23:49               ` Phil Sainty
2021-07-30  5:30                 ` Phil Sainty
2021-08-03 11:47                   ` Phil Sainty
2021-01-12  3:25           ` Eli Zaretskii
2021-01-12 12:40             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a45b8bba-91ac-cc79-337f-ea95c46f7f8f@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=45652@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).