[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: so-long and special major modes

From: Phil Sainty
Subject: Re: so-long and special major modes
Date: Wed, 9 Dec 2020 23:46:38 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 9/12/20 7:48 pm, Richard Stallman wrote:
>   > In general I felt it was necessary to white-list the
>   > modes for which it is acceptable for so-long to take
>   > action, because I don't think it's possible to
>   > automatically detect every mode in which it might be
>   > problematic.
> How about if you try activating for all except special
> modes?  It MIGHT turn out to be exactly right.  And if
> not, you can override as needed.

I don't have the broad knowledge of major modes necessary to say
whether your idea would be right in all cases.  I think that it
would increase the number of major modes being considered by a
significant margin, though, so to me it sounds risky, but I'd
welcome additional input from anyone who feels confident on the

It's certainly broadening the scope of the library, which was
originally written to mitigate issues with files of 'minified'
programming code and data formats (being a somewhat common
situation in which implicit assumptions made by modes about a
buffer's contents could end up being badly incorrect).

If the rule isn't correct in all cases, then I'm firmly against
the notion of maintaining a manual list of exceptions.  If we
don't have a reliable rule, I would greatly prefer that we err on
the side of caution, and only trigger so-long in situations where
we are confident that we will not be causing worse problems than
the one we're trying to solve.

If anyone would like to experiment with the idea, though, you
can do that by setting `so-long-target-modes' to `t', and then
writing a custom `so-long-predicate' function.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]