Subject: bug#45084: so-long mode vs. dired-view-file

From: Phil Sainty <[email-masked]>
Date: Mon, 07 Dec 2020 17:24:12 +1300

On 2020-12-07 01:22, 積丹尼 Dan Jacobson wrote:
> That's right. We stumbled into a file that triggers so-long mode.
> 
> Our whole rhythm is busted. And we have to go through hoops to finally
> do what just a "q" did.
> 
> So so-long mode and whatever dired-view-file calls should somehow make
> a deal not to mess up "q".

It's true that, by default, so-long changing the major mode is going
to cause key bindings for the original mode to not be available.  This
is one of the trade-offs we make -- we have the benefit that Emacs
isn't going to freeze up, with the cost that the file is being treated
differently.

I don't think it would be very practical to try to account for all of
the special cases that might arise in people's workflows, and try to
implement workarounds.  Adding `view-mode' support wouldn't be hard,
but I do worry about the slippery slope factor.

You can alternatively use:

  (setq so-long-action 'so-long-minor-mode)

And then the buffers would remain in view-mode, and "q" will work as
normal.

-Phil