From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#39658: 26.3; can't edit file with terminal escape sequences Date: Sun, 23 Feb 2020 17:42:32 +1300 Message-ID: References: <20200218165850.GC1035@localhost> <838skylb9d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="12743"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 39658@debbugs.gnu.org, frederik@ofb.net To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 23 05:43:11 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 1j5j6k-0003EM-Vr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 23 Feb 2020 05:43:10 +0100 Original-Received: from localhost ([::1]:49482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5j6j-0004s8-Mv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Feb 2020 23:43:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58122) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5j6d-0004rx-DZ for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 23:43:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5j6c-0000fa-BM for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 23:43:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5j6c-0000f0-7Y for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 23:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j5j6c-0008GV-4s for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2020 23:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Feb 2020 04:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39658 X-GNU-PR-Package: emacs Original-Received: via spool by 39658-submit@debbugs.gnu.org id=B39658.158243296031737 (code B ref 39658); Sun, 23 Feb 2020 04:43:02 +0000 Original-Received: (at 39658) by debbugs.gnu.org; 23 Feb 2020 04:42:40 +0000 Original-Received: from localhost ([127.0.0.1]:50312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5j6F-0008Fp-Kh for submit@debbugs.gnu.org; Sat, 22 Feb 2020 23:42:39 -0500 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:37427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5j6E-0008Fg-6R for 39658@debbugs.gnu.org; Sat, 22 Feb 2020 23:42:38 -0500 Original-Received: from [101.53.216.254] (port=44518 helo=[192.168.20.103]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1j5j68-0005Sn-RV; Sun, 23 Feb 2020 17:42:33 +1300 In-Reply-To: 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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:176415 Archived-At: On 19/02/20 2:58 am, Robert Pluim wrote: > The problem is more likely to be the extremely long lines in the > file. If you have emacs-27 or emacs-master, you can try 'M-x > global-so-long-mode' before visiting the file, which attempts to > improve Emacs' behaviour in such cases. On 21/02/20 3:26 am, Robert Pluim wrote: > 19 feb. 2020 kl. 18.47 skrev Eli Zaretskii: > > Ah, yes.  Set bidi-inhibit-bpa non-nil, and Bob's your uncle. > > Doesn't so-long-mode turn off bpa? Yes it does and so that does provide a solution -- provided that the original major mode used for the file is one that so-long is interested in. The example file here had no file name extension, nor any magic-mode-alist content, and consequently the default list of so-long-target-modes was never going to match this. Perhaps fundamental-mode should be in so-long-target-modes? Experimentally, that does do the trick in this example; and would surely cover other similar cases as well. The big question is whether that might cause more problems than it solves. Offhand I think it's probably ok: as far as the major mode aspects are concerned, so-long-mode is little more than fundamental-mode, so any file which opened in fundamental-mode ought to be fine in so-long-mode as well. I suspect we would also want that large increase to the default value of so-long-threshold which has previously been discussed, just on account of the number of different kinds of file which might now be subject to this, as the heuristic of "programming code lines are expected to be pretty short" would no longer be adequate. I was intending to go ahead with that change in any case, and IIRC a value of 10,000 seemed to be quite reasonable in my initial tests. I was going to do more testing, and still haven't gotten around to it. -Phil