GNU bug report logs -
#57469
Missing information about all the modes that fall under prog-mode.
Previous Next
Reported by: uzibalqa <uzibalqa <at> proton.me>
Date: Mon, 29 Aug 2022 04:14:03 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57469 in the body.
You can then email your comments to 57469 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 04:14:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
uzibalqa <uzibalqa <at> proton.me>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 29 Aug 2022 04:14:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I am using prog-mode-hook but cannot find anywhere in the manual stating all the modes that fall under prog-mode.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 05:50:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 57469 <at> debbugs.gnu.org (full text, mbox):
>
> I am using prog-mode-hook but cannot find anywhere in the manual stating
> all the modes that fall under prog-mode.
>
All modes do not fall under prog-mode. There are four "root" modes in the
hierarchy (see the info manual of Elisp, section 24.2.5: Basic Major
Modes): text-mode and prog-mode, which are the two modes from which most
modes inherit, special-mode which is the mode from which for example
*Help* buffers inherit, and fundamental-mode which is the mode from which
modes that do not fall in one of the three previous categories inherit.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 06:06:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 57469 <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Monday, August 29th, 2022 at 5:49 AM, Gregory Heytings <gregory <at> heytings.org> wrote:
> > I am using prog-mode-hook but cannot find anywhere in the manual stating
> > all the modes that fall under prog-mode.
>
>
> All modes do not fall under prog-mode. There are four "root" modes in the
> hierarchy (see the info manual of Elisp, section 24.2.5: Basic Major
> Modes): text-mode and prog-mode, which are the two modes from which most
> modes inherit, special-mode which is the mode from which for example
> Help buffers inherit, and fundamental-mode which is the mode from which
> modes that do not fall in one of the three previous categories inherit.
Your elaboration does not bring to light anything valuable to users.
When one uses prog-mode-hook , which major modes are affected? The manuals
do not say.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 08:39:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 57469 <at> debbugs.gnu.org (full text, mbox):
>
> Your elaboration does not bring to light anything valuable to users.
>
I misunderstood your question, that's all.
>
> When one uses prog-mode-hook , which major modes are affected? The
> manuals do not say.
>
All major modes that derive from prog-mode, that is, all major modes with
which program sources are edited. For example, c-mode, sh-mode,
fortran-mode and perl-mode.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 08:52:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 57469 <at> debbugs.gnu.org (full text, mbox):
> Sent: Monday, August 29, 2022 at 8:38 PM
> From: "Gregory Heytings" <gregory <at> heytings.org>
> To: "uzibalqa" <uzibalqa <at> proton.me>
> Cc: 57469 <at> debbugs.gnu.org
> Subject: bug#57469: Missing information about all the modes that fall under prog-mode.
>
>
> >
> > Your elaboration does not bring to light anything valuable to users.
> >
>
> I misunderstood your question, that's all.
>
> >
> > When one uses prog-mode-hook , which major modes are affected? The
> > manuals do not say.
> >
>
> All major modes that derive from prog-mode, that is, all major modes with
> which program sources are edited. For example, c-mode, sh-mode,
> fortran-mode and perl-mode.
Question suggests that users want to know exactly the built-in language modes that are
affected by changes to a prog-mode hook. OP does not want examples, but the actual list
of language major-modes. And have the information included in the manuals.
Kristoff
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 09:14:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 57469 <at> debbugs.gnu.org (full text, mbox):
>
> OP does not want examples, but the actual list of language major-modes.
>
antlr-mode asm-mode autoconf-mode awk-mode bat-mode cfengine2-mode
cfengine3-mode c++-mode c-mode cperl-mode css-mode dcl-mode dsssl-mode
edebug-eval-mode elisp-byte-code-mode emacs-lisp-mode erts-mode f90-mode
fortran-mode gdb-script-mode gnus-edit-form-mode gnus-kill-file-mode
gnus-score-mode help-fns--edit-value-mode icon-mode idl-mode idlwave-mode
java-mode js-json-mode js-jsx-mode js-mode ld-script-mode less-css-mode
lisp-data-mode lisp-interaction-mode lisp-mode m2-mode m4-mode
makefile-automake-mode makefile-bsdmake-mode makefile-gmake-mode
makefile-imake-mode makefile-makepp-mode makefile-mode mercury-mode
meta-common-mode metafont-mode metapost-mode mixal-mode objc-mode
octave-mode opascal-mode pascal-mode perl-mode pike-mode plstore-mode
prolog-mode ps-mode python-mode ruby-mode scheme-mode scss-mode sh-mode
sieve-mode simula-mode sql-mode tcl-mode vera-mode verilog-mode vhdl-mode
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 10:30:03 GMT)
Full text and
rfc822 format available.
Message #23 received at 57469 <at> debbugs.gnu.org (full text, mbox):
> Sent: Monday, August 29, 2022 at 9:13 PM
> From: "Gregory Heytings" <gregory <at> heytings.org>
> To: "Christopher Dimech" <dimech <at> gmx.com>
> Cc: 57469 <at> debbugs.gnu.org, "uzibalqa" <uzibalqa <at> proton.me>
> Subject: Re: bug#57469: Missing information about all the modes that fall under prog-mode.
>
>
> >
> > OP does not want examples, but the actual list of language major-modes.
> >
Quite a list. If it is problematic to include in the manual, a built-in lisp function
could be introduced that returns this list. Would be useful.
> antlr-mode asm-mode autoconf-mode awk-mode bat-mode cfengine2-mode
> cfengine3-mode c++-mode c-mode cperl-mode css-mode dcl-mode dsssl-mode
> edebug-eval-mode elisp-byte-code-mode emacs-lisp-mode erts-mode f90-mode
> fortran-mode gdb-script-mode gnus-edit-form-mode gnus-kill-file-mode
> gnus-score-mode help-fns--edit-value-mode icon-mode idl-mode idlwave-mode
> java-mode js-json-mode js-jsx-mode js-mode ld-script-mode less-css-mode
> lisp-data-mode lisp-interaction-mode lisp-mode m2-mode m4-mode
> makefile-automake-mode makefile-bsdmake-mode makefile-gmake-mode
> makefile-imake-mode makefile-makepp-mode makefile-mode mercury-mode
> meta-common-mode metafont-mode metapost-mode mixal-mode objc-mode
> octave-mode opascal-mode pascal-mode perl-mode pike-mode plstore-mode
> prolog-mode ps-mode python-mode ruby-mode scheme-mode scss-mode sh-mode
> sieve-mode simula-mode sql-mode tcl-mode vera-mode verilog-mode vhdl-mode
>
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Mon, 29 Aug 2022 11:37:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
uzibalqa <uzibalqa <at> proton.me>
:
bug acknowledged by developer.
(Mon, 29 Aug 2022 11:37:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 57469-done <at> debbugs.gnu.org (full text, mbox):
> Cc: 57469 <at> debbugs.gnu.org, uzibalqa <uzibalqa <at> proton.me>
> From: Christopher Dimech <dimech <at> gmx.com>
> Date: Mon, 29 Aug 2022 12:29:28 +0200
>
> > > OP does not want examples, but the actual list of language major-modes.
> > >
>
> Quite a list. If it is problematic to include in the manual, a built-in lisp function
> could be introduced that returns this list. Would be useful.
Not only is it problematic to include this in the manual, it will also
be inaccurate in every Emacs session out there, because the above list
cannot possibly include all the modes in 3rd-party packages out there.
Users who set such settings in the likes of prog-mode should
understand what they are doing. If they are unsure which modes this
will affect, they should do this in mode hooks of specific modes, noit
in prog-mode.
I'm closing this bug because there's no bug here.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 11:55:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 57469-done <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Monday, August 29th, 2022 at 11:36 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Cc: 57469 <at> debbugs.gnu.org, uzibalqa uzibalqa <at> proton.me
> > From: Christopher Dimech dimech <at> gmx.com
> > Date: Mon, 29 Aug 2022 12:29:28 +0200
> >
> > > > OP does not want examples, but the actual list of language major-modes.
> >
> > Quite a list. If it is problematic to include in the manual, a built-in lisp function
> > could be introduced that returns this list. Would be useful.
>
>
> Not only is it problematic to include this in the manual, it will also
> be inaccurate in every Emacs session out there, because the above list
> cannot possibly include all the modes in 3rd-party packages out there.
>
> Users who set such settings in the likes of prog-mode should
> understand what they are doing. If they are unsure which modes this
> will affect, they should do this in mode hooks of specific modes, noit
> in prog-mode.
>
> I'm closing this bug because there's no bug here.
>
It was a request for improvements. I am using the hook but did not know which
modes might not be affected by it, whilst I am debugging a part of my elisp code.
I like the idea of calling a function. At least get information only about built-in
language major modes. Would still be much better than current situation.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 13:12:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 57469-done <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 29 Aug 2022 11:53:40 +0000
> From: uzibalqa <uzibalqa <at> proton.me>
> Cc: Christopher Dimech <dimech <at> gmx.com>, 57469-done <at> debbugs.gnu.org, gregory <at> heytings.org
>
> I like the idea of calling a function. At least get information only about built-in
> language major modes. Would still be much better than current situation.
The language modes that come with Emacs change frequently, so keeping
that list up to date would be a significant maintenance burden. No,
thanks.
You should just keep in mind that every mode for something that looks
like a programming language inherits from prog-mode.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 16:34:03 GMT)
Full text and
rfc822 format available.
Message #37 received at 57469-done <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Monday, August 29th, 2022 at 1:12 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Date: Mon, 29 Aug 2022 11:53:40 +0000
> > From: uzibalqa uzibalqa <at> proton.me
> > Cc: Christopher Dimech dimech <at> gmx.com, 57469-done <at> debbugs.gnu.org, gregory <at> heytings.org
> >
> > I like the idea of calling a function. At least get information only about built-in
> > language major modes. Would still be much better than current situation.
>
>
> The language modes that come with Emacs change frequently, so keeping
> that list up to date would be a significant maintenance burden. No,
> thanks.
>
> You should just keep in mind that every mode for something that looks
> like a programming language inherits from prog-mode.
Gregory manages to compile a list. How was that done?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Mon, 29 Aug 2022 21:25:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 57469-done <at> debbugs.gnu.org (full text, mbox):
On 2022-08-30 04:33, uzibalqa wrote:
> Gregory manages to compile a list. How was that done?
If you want to see LOADED modes derived from prog-mode you can do
this sort of thing:
(cl-loop for sym being the symbols
if (provided-mode-derived-p sym 'prog-mode)
collect sym)
I imagine Gregory grepped the codebase for define-derived-mode
definitions deriving from prog-mode, though, rather than loading
all of the things.
-Phil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Tue, 30 Aug 2022 02:17:01 GMT)
Full text and
rfc822 format available.
Message #43 received at 57469-done <at> debbugs.gnu.org (full text, mbox):
Following up my own comment, grepping the codebase for
define-derived-mode definitions would require multiple
passes (in order to establish chains of derivatives leading
back to prog-mode), so "loading all the things" and testing
in elisp seems simpler after all.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#57469
; Package
emacs
.
(Tue, 30 Aug 2022 04:06:02 GMT)
Full text and
rfc822 format available.
Message #46 received at 57469-done <at> debbugs.gnu.org (full text, mbox):
------- Original Message -------
On Tuesday, August 30th, 2022 at 2:16 AM, Phil Sainty <psainty <at> orcon.net.nz> wrote:
> Following up my own comment, grepping the codebase for
> define-derived-mode definitions would require multiple
> passes (in order to establish chains of derivatives leading
> back to prog-mode), so "loading all the things" and testing
> in elisp seems simpler after all.
It is.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 27 Sep 2022 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 209 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.