From: Drew Adams <drew.adams@oracle.com>
To: Andreas Schwab <schwab@suse.de>
Cc: "65891@debbugs.gnu.org" <65891@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 [thread overview]
Message-ID: <SJ0PR10MB5488F74B66ACAD2C0F5F8B18F3F1A@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <mvm4jjzz92m.fsf@suse.de>
> > 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?
prev parent reply other threads:[~2023-09-12 17:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 15:26 bug#65891: 29.0.91; Could the error msg be better for this? Drew Adams
2023-09-12 15:48 ` Andreas Schwab
2023-09-12 17:11 ` Drew Adams [this message]
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=SJ0PR10MB5488F74B66ACAD2C0F5F8B18F3F1A@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=65891@debbugs.gnu.org \
--cc=schwab@suse.de \
/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).