unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: Robert Pluim <rpluim@gmail.com>
Cc: "Mattias Engdegård" <mattiase@acm.org>,
	39658@debbugs.gnu.org, frederik@ofb.net
Subject: bug#39658: 26.3; can't edit file with terminal escape sequences
Date: Sun, 23 Feb 2020 17:42:32 +1300	[thread overview]
Message-ID: <d3624d84-3bb0-186c-536e-9960f98c20fe@orcon.net.nz> (raw)
In-Reply-To: <CAMTcmTdsSezNpsjyv6XNd8rGQy=LE8VrHGKoRCB1j=deAk3W0w@mail.gmail.com>

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





  reply	other threads:[~2020-02-23  4:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 13:48 bug#39658: 26.3; can't edit file with terminal escape sequences frederik
2020-02-18 13:58 ` Robert Pluim
2020-02-18 14:15   ` frederik
2020-02-18 16:05     ` Eli Zaretskii
2020-02-18 16:02 ` Mattias Engdegård
2020-02-18 16:58   ` frederik
2020-02-18 22:09     ` Mattias Engdegård
2020-02-19 17:47       ` Eli Zaretskii
2020-02-20 13:36         ` Mattias Engdegård
2020-02-20 14:26           ` Robert Pluim
2020-02-23  4:42             ` Phil Sainty [this message]
2020-02-20 14:46           ` Eli Zaretskii
2020-02-18 16:08 ` Eli Zaretskii

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=d3624d84-3bb0-186c-536e-9960f98c20fe@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=39658@debbugs.gnu.org \
    --cc=frederik@ofb.net \
    --cc=mattiase@acm.org \
    --cc=rpluim@gmail.com \
    /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).