GNU bug report logs - #10650
view-mode inconsistencies wrt special mode-class

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Mon, 30 Jan 2012 09:06:01 UTC

Severity: minor

Found in version 24.0.93

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #6 received at 10650 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 10650 <at> debbugs.gnu.org
Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class
Date: Mon, 30 Jan 2012 15:10:01 -0500
I've changed my mind. I wanted to document _why_ view-file checks for a
special mode-class, but I could find no logical explanation.
This check was added here:

2003-07-09  Richard M. Stallman  <rms at gnu.org>

    * view.el (view-file): If existing buffer's major mode is
    special, don't go into view mode.

Unfortunately this just tells us _what_ was done, not why.
Emacs 22's NEWS file says:

  *** M-x view-file and commands that use it now avoid interfering
  with special modes such as Tar mode.

The only relevant thing I could find from the Emacs mailing lists around
this time was:

http://lists.gnu.org/archive/html/bug-gnu-emacs/2003-07/msg00031.html

  Problem: in dired the user hits v instead of RET on some file.zip.
  This causes lots of Zip-Archive mode keys to be overridden by view
  mode keys.

This isn't compelling to me. I agree with the only posted response:

   No, you should use RET if you want to run dired-find-file, and v if
   you want to run dired-view-file.


Anyway, it doesn't make much sense to me to steal the special mode-class
that tar-mode happens to have and start using it for view-file as well
(and it has never been documented anywhere AFAICS).

This came up before in some long thread:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4896#153

  I think the right solution should be to let the major mode say
  explicitly that it is mutually-exclusive with view-mode.


It would seem better to have some new explicit property for this, rather
than stealing special mode-class.




This bug report was last modified 13 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.