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#45085: Have so-long mode fire-sprinkler system always ready for M-x compile, M-x shell Date: Thu, 10 Dec 2020 00:02:22 +1300 Message-ID: <76bfb5aa-3bbf-3e0f-ccbc-08cbeff4668f@orcon.net.nz> References: <87im9fuli6.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="1287"; 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 , 45085@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 09 12:03:12 2020 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 1kmxFX-0000FQ-WA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Dec 2020 12:03:11 +0100 Original-Received: from localhost ([::1]:43658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmxFW-0000GB-U4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Dec 2020 06:03:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmxFN-0000Eu-Tc for bug-gnu-emacs@gnu.org; Wed, 09 Dec 2020 06:03:01 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmxFN-0007jI-Mb for bug-gnu-emacs@gnu.org; Wed, 09 Dec 2020 06:03:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmxFN-0005Ot-IS for bug-gnu-emacs@gnu.org; Wed, 09 Dec 2020 06:03: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: Wed, 09 Dec 2020 11:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45085 X-GNU-PR-Package: emacs Original-Received: via spool by 45085-submit@debbugs.gnu.org id=B45085.160751174920712 (code B ref 45085); Wed, 09 Dec 2020 11:03:01 +0000 Original-Received: (at 45085) by debbugs.gnu.org; 9 Dec 2020 11:02:29 +0000 Original-Received: from localhost ([127.0.0.1]:32887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmxEq-0005O0-Rj for submit@debbugs.gnu.org; Wed, 09 Dec 2020 06:02:29 -0500 Original-Received: from smtp-4.orcon.net.nz ([60.234.4.59]:41529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmxEn-0005Nq-L3 for 45085@debbugs.gnu.org; Wed, 09 Dec 2020 06:02:27 -0500 Original-Received: from [101.53.216.160] (port=44125 helo=[192.168.20.103]) by smtp-4.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1kmxEk-0002j4-Qk; Thu, 10 Dec 2020 00:02:23 +1300 In-Reply-To: <87im9fuli6.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:195482 Archived-At: On 7/12/20 2:12 am, 積丹尼 Dan Jacobson wrote: > so-long mode is great, when opening files. > But what about the case > (compile "perl -wle 'print 8 x 888888888;'")? > That's going to produce a buffer with a really long line. > So so-long mode should jump in to the rescue. > > And what about M-x shell? > If we do > $ perl -wle 'print 8 x 888888888;' One immediate issue with the scenario you're considering is that buffers handling process output are commonly auto-scrolling to the end of the output, which means that after running a command which produces a massive line, you're liable to be left with the *end* of the giant line visible in the window (which is the worst-case situation); so Emacs might struggle with that even if so-long was active. I do think it would be interesting to experiment with using `after-change-functions' to detect the insertion of extremely long lines into a buffer, but I also think it might bring significant complications, so I don't have any current plans to extend the library in these directions. We can be relatively confident about the suitability of calling `so-long' in a buffer which is visiting a file of programming code; but it's harder to have such confidence when considering buffers *generally* -- Emacs buffers can be used for almost anything, and it may be wildly inappropriate for `so-long' to get involved in many of those cases. Especially when considering buffers dealing with external processes, when the buffer's mode might be fairly generic, yet with a wide variety of different output possibilities. Explicit/white-listed uses of `so-long-minor-mode' can be useful, however. For example, I recall an Emacs 26 user reporting excellent performance improvements (albeit at the cost to the readability) from using `so-long-minor-mode' in debugger backtrace buffers when giant lists of text properties were involved; so there's certainly scope to use so-long outside of file-visiting buffers in particular scenarios; but my gut feeling is that such uses ought to be targeted individually. -Phil