GNU bug report logs - #65891
29.0.91; Could the error msg be better for this?

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 12 Sep 2023 15:27:01 UTC

Severity: minor

Found in version 29.0.91

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Andreas Schwab <schwab <at> suse.de>
Cc: "65891 <at> debbugs.gnu.org" <65891 <at> debbugs.gnu.org>
Subject: bug#65891: 29.0.91; Could the error msg be better for this?
Date: Tue, 12 Sep 2023 17:11:58 +0000
> > I'm guessing that it's flagged as a "file mode specification" error
> > because it's from a mode hook?
> 
> It comes from processing auto-mode-alist, see normal-mode:
> 
>     (with-demoted-errors "File mode specification error: %s"
>       (set-auto-mode))
> 
> > But major modes are not necessarily about file buffers.
> 
> auto-mode-alist is only about matching file names to modes, so the error
> message looks fitting.

Fair enough, I guess.  But I still have the question
of whether we can do better here.

Also, I think `C-x b foo' followed by `M-x org-mode'
behaves the same, though no file buffer is involved.

A mode hook doesn't have any necessary relation to any
file or to `auto-mode-alist'.  It may be that Emacs
has chosen to relate the two in this way, as a kind of
shortcut, but there's no necessary connection, right?




This bug report was last modified 1 year and 276 days ago.

Previous Next


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