* bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" [not found] <m1pmswzsda.fsf.ref@yahoo.es> @ 2021-09-25 13:39 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors 2021-09-25 17:46 ` Stefan Kangas 0 siblings, 1 reply; 7+ messages in thread From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-25 13:39 UTC (permalink / raw) To: 50801 I'm reviewing the manuals for the upcoming Emacs 28 and I have a couple of minor suggestions for node "49.2.4.1 Specifying File Variables": The node doesn't explictly mention the crucial information that in 'mode: MODENAME' 'MODENAME' must not end in "-mode". It's true that there's an example down there that says "mode: Lisp", so users may infer that you don't need to spell the major mode with "-mode", but I thought it may be better to be explicit about in the manual. Another suggestion I have is that the manual doesn't mention that something like "-*- C++ -*-" (that is, omitting the "mode" keyword) is also supported. Many free software projects have traditionally been using "-* C++ -*" in their C++ header files to make Emacs distinguish them from plain C files. See also src/epaths.in in the Emacs repository, among others. I see this used by Jim Blandy since 1992 at least, but I don't really know if a) it's really a stable way to declare a file-local mode, and we may lack the historical info to answer that, and b) it's worth mentioning it in the manual. Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" 2021-09-25 13:39 ` bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-25 17:46 ` Stefan Kangas 2021-09-25 18:22 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Stefan Kangas @ 2021-09-25 17:46 UTC (permalink / raw) To: Daniel Martín; +Cc: 50801 Daniel Martín <mardani29@yahoo.es> writes: > I'm reviewing the manuals for the upcoming Emacs 28 and I have a couple > of minor suggestions for node "49.2.4.1 Specifying File Variables": That is extremely useful, thank you very much for working on this. (BTW, you can press `w' in info to get a reference like "(emacs) Specifying File Variables". This is not super important, but a handy feature to know about, as you can then `M-: (info "...")' and get to that section quickly.) > The node doesn't explictly mention the crucial information that in > 'mode: MODENAME' 'MODENAME' must not end in "-mode". It's true that > there's an example down there that says "mode: Lisp", so users may infer > that you don't need to spell the major mode with "-mode", but I thought > it may be better to be explicit about in the manual. Fully agreed. Perhaps something like this? diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index d12033f841..d5f18fff35 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1084,8 +1084,9 @@ Specifying File Variables @noindent You can specify any number of variable/value pairs in this way, each pair with a colon and semicolon. The special variable/value pair -@code{mode: @var{modename};}, if present, specifies a major mode. The -@var{value}s are used literally, and not evaluated. +@code{mode: @var{modename};}, if present, specifies a major mode +(excluding the ``-mode'' part). The @var{value}s are used literally, +and not evaluated. @findex add-file-local-variable-prop-line @findex delete-file-local-variable-prop-line > Another suggestion I have is that the manual doesn't mention that > something like "-*- C++ -*-" (that is, omitting the "mode" keyword) is > also supported. Many free software projects have traditionally been > using "-* C++ -*" in their C++ header files to make Emacs distinguish > them from plain C files. See also src/epaths.in in the Emacs > repository, among others. I see this used by Jim Blandy since 1992 at > least, but I don't really know if a) it's really a stable way to declare > a file-local mode, and we may lack the historical info to answer that, > and b) it's worth mentioning it in the manual. I can't remember the details, but I believe that this form is considered obsolete and/or problematic. So I think it's fine to not document it. ^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" 2021-09-25 17:46 ` Stefan Kangas @ 2021-09-25 18:22 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors 2021-09-26 6:59 ` Lars Ingebrigtsen 2021-09-26 7:09 ` Andreas Schwab 2 siblings, 0 replies; 7+ messages in thread From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-25 18:22 UTC (permalink / raw) To: Stefan Kangas; +Cc: 50801 Stefan Kangas <stefan@marxist.se> writes: > >> I'm reviewing the manuals for the upcoming Emacs 28 and I have a couple >> of minor suggestions for node "49.2.4.1 Specifying File Variables": > > That is extremely useful, thank you very much for working on this. > > (BTW, you can press `w' in info to get a reference like "(emacs) > Specifying File Variables". This is not super important, but a handy > feature to know about, as you can then `M-: (info "...")' and get to > that section quickly.) Yep, I forgot to add a direct link to the Info node, sorry. BTW you can 'C-u w' to get the link inside a function call to `info` directly. > >> The node doesn't explictly mention the crucial information that in >> 'mode: MODENAME' 'MODENAME' must not end in "-mode". It's true that >> there's an example down there that says "mode: Lisp", so users may infer >> that you don't need to spell the major mode with "-mode", but I thought >> it may be better to be explicit about in the manual. > > Fully agreed. Perhaps something like this? > > diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi > index d12033f841..d5f18fff35 100644 > --- a/doc/emacs/custom.texi > +++ b/doc/emacs/custom.texi > @@ -1084,8 +1084,9 @@ Specifying File Variables > @noindent > You can specify any number of variable/value pairs in this way, each > pair with a colon and semicolon. The special variable/value pair > -@code{mode: @var{modename};}, if present, specifies a major mode. The > -@var{value}s are used literally, and not evaluated. > +@code{mode: @var{modename};}, if present, specifies a major mode > +(excluding the ``-mode'' part). The @var{value}s are used literally, > +and not evaluated. I'm not a native speaker but it reads well to me, thank you. > > @findex add-file-local-variable-prop-line > @findex delete-file-local-variable-prop-line > >> Another suggestion I have is that the manual doesn't mention that >> something like "-*- C++ -*-" (that is, omitting the "mode" keyword) is >> also supported. Many free software projects have traditionally been >> using "-* C++ -*" in their C++ header files to make Emacs distinguish >> them from plain C files. See also src/epaths.in in the Emacs >> repository, among others. I see this used by Jim Blandy since 1992 at >> least, but I don't really know if a) it's really a stable way to declare >> a file-local mode, and we may lack the historical info to answer that, >> and b) it's worth mentioning it in the manual. > > I can't remember the details, but I believe that this form is considered > obsolete and/or problematic. So I think it's fine to not document it. Makes sense. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" 2021-09-25 17:46 ` Stefan Kangas 2021-09-25 18:22 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-26 6:59 ` Lars Ingebrigtsen 2021-09-26 10:05 ` Stefan Kangas 2021-09-26 7:09 ` Andreas Schwab 2 siblings, 1 reply; 7+ messages in thread From: Lars Ingebrigtsen @ 2021-09-26 6:59 UTC (permalink / raw) To: Stefan Kangas; +Cc: 50801, Daniel Martín Stefan Kangas <stefan@marxist.se> writes: > -@code{mode: @var{modename};}, if present, specifies a major mode. The > -@var{value}s are used literally, and not evaluated. > +@code{mode: @var{modename};}, if present, specifies a major mode > +(excluding the ``-mode'' part). The @var{value}s are used literally, > +and not evaluated. Makes sense to me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" 2021-09-26 6:59 ` Lars Ingebrigtsen @ 2021-09-26 10:05 ` Stefan Kangas 0 siblings, 0 replies; 7+ messages in thread From: Stefan Kangas @ 2021-09-26 10:05 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: 50801, Daniel Martín tags 50801 fixed close 50801 28.1 thanks Lars Ingebrigtsen <larsi@gnus.org> writes: > Stefan Kangas <stefan@marxist.se> writes: > >> -@code{mode: @var{modename};}, if present, specifies a major mode. The >> -@var{value}s are used literally, and not evaluated. >> +@code{mode: @var{modename};}, if present, specifies a major mode >> +(excluding the ``-mode'' part). The @var{value}s are used literally, >> +and not evaluated. > > Makes sense to me. Thanks, I have now made this change on master (commit 68994995db) with the improvement suggested by Andreas. I'm therefore closing this bug report. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" 2021-09-25 17:46 ` Stefan Kangas 2021-09-25 18:22 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors 2021-09-26 6:59 ` Lars Ingebrigtsen @ 2021-09-26 7:09 ` Andreas Schwab 2021-09-27 22:34 ` Richard Stallman 2 siblings, 1 reply; 7+ messages in thread From: Andreas Schwab @ 2021-09-26 7:09 UTC (permalink / raw) To: Stefan Kangas; +Cc: 50801, Daniel Martín On Sep 25 2021, Stefan Kangas wrote: > diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi > index d12033f841..d5f18fff35 100644 > --- a/doc/emacs/custom.texi > +++ b/doc/emacs/custom.texi > @@ -1084,8 +1084,9 @@ Specifying File Variables > @noindent > You can specify any number of variable/value pairs in this way, each > pair with a colon and semicolon. The special variable/value pair > -@code{mode: @var{modename};}, if present, specifies a major mode. The > -@var{value}s are used literally, and not evaluated. > +@code{mode: @var{modename};}, if present, specifies a major mode > +(excluding the ``-mode'' part). The @var{value}s are used literally, without the ``-mode'' suffix Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" 2021-09-26 7:09 ` Andreas Schwab @ 2021-09-27 22:34 ` Richard Stallman 0 siblings, 0 replies; 7+ messages in thread From: Richard Stallman @ 2021-09-27 22:34 UTC (permalink / raw) To: Andreas Schwab; +Cc: 50801, stefan, mardani29 [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > +@code{mode: @var{modename};}, if present, specifies a major mode > > +(excluding the ``-mode'' part). The @var{value}s are used literally, > without the ``-mode'' suffix Indeed. `-mode' is NOT part of the mode's name. The name of Mail mode, which I'm using now, is "Mail", not "Mail mode". -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-09-27 22:34 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <m1pmswzsda.fsf.ref@yahoo.es> 2021-09-25 13:39 ` bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors 2021-09-25 17:46 ` Stefan Kangas 2021-09-25 18:22 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors 2021-09-26 6:59 ` Lars Ingebrigtsen 2021-09-26 10:05 ` Stefan Kangas 2021-09-26 7:09 ` Andreas Schwab 2021-09-27 22:34 ` Richard Stallman
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.