all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#57469: Missing information about all the modes that fall under prog-mode.
@ 2022-08-29  4:12 uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-29  5:49 ` Gregory Heytings
  0 siblings, 1 reply; 14+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-29  4:12 UTC (permalink / raw)
  To: 57469



I am using prog-mode-hook but cannot find anywhere in the manual stating all the modes that fall under prog-mode.







^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29  4:12 bug#57469: Missing information about all the modes that fall under prog-mode uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-29  5:49 ` Gregory Heytings
  2022-08-29  6:05   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 14+ messages in thread
From: Gregory Heytings @ 2022-08-29  5:49 UTC (permalink / raw)
  To: uzibalqa; +Cc: 57469


>
> 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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29  5:49 ` Gregory Heytings
@ 2022-08-29  6:05   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-29  8:38     ` Gregory Heytings
  0 siblings, 1 reply; 14+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-29  6:05 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: 57469


------- Original Message -------
On Monday, August 29th, 2022 at 5:49 AM, Gregory Heytings <gregory@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.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29  6:05   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-29  8:38     ` Gregory Heytings
  2022-08-29  8:51       ` Christopher Dimech
  0 siblings, 1 reply; 14+ messages in thread
From: Gregory Heytings @ 2022-08-29  8:38 UTC (permalink / raw)
  To: uzibalqa; +Cc: 57469


>
> 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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29  8:38     ` Gregory Heytings
@ 2022-08-29  8:51       ` Christopher Dimech
  2022-08-29  9:13         ` Gregory Heytings
  0 siblings, 1 reply; 14+ messages in thread
From: Christopher Dimech @ 2022-08-29  8:51 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: 57469, uzibalqa


> Sent: Monday, August 29, 2022 at 8:38 PM
> From: "Gregory Heytings" <gregory@heytings.org>
> To: "uzibalqa" <uzibalqa@proton.me>
> Cc: 57469@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








^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29  8:51       ` Christopher Dimech
@ 2022-08-29  9:13         ` Gregory Heytings
  2022-08-29 10:29           ` Christopher Dimech
  0 siblings, 1 reply; 14+ messages in thread
From: Gregory Heytings @ 2022-08-29  9:13 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: 57469, uzibalqa


>
> 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





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29  9:13         ` Gregory Heytings
@ 2022-08-29 10:29           ` Christopher Dimech
  2022-08-29 11:36             ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Christopher Dimech @ 2022-08-29 10:29 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: 57469, uzibalqa



> Sent: Monday, August 29, 2022 at 9:13 PM
> From: "Gregory Heytings" <gregory@heytings.org>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: 57469@debbugs.gnu.org, "uzibalqa" <uzibalqa@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
>





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29 10:29           ` Christopher Dimech
@ 2022-08-29 11:36             ` Eli Zaretskii
  2022-08-29 11:53               ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2022-08-29 11:36 UTC (permalink / raw)
  To: Christopher Dimech; +Cc: 57469-done, gregory, uzibalqa

> Cc: 57469@debbugs.gnu.org, uzibalqa <uzibalqa@proton.me>
> From: Christopher Dimech <dimech@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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29 11:36             ` Eli Zaretskii
@ 2022-08-29 11:53               ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-29 13:12                 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-29 11:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57469-done, Christopher Dimech, gregory


------- Original Message -------
On Monday, August 29th, 2022 at 11:36 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Cc: 57469@debbugs.gnu.org, uzibalqa uzibalqa@proton.me
> > From: Christopher Dimech dimech@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.
 






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29 11:53               ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-29 13:12                 ` Eli Zaretskii
  2022-08-29 16:33                   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2022-08-29 13:12 UTC (permalink / raw)
  To: uzibalqa; +Cc: 57469-done, dimech, gregory

> Date: Mon, 29 Aug 2022 11:53:40 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: Christopher Dimech <dimech@gmx.com>, 57469-done@debbugs.gnu.org, gregory@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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29 13:12                 ` Eli Zaretskii
@ 2022-08-29 16:33                   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-29 21:24                     ` Phil Sainty
  0 siblings, 1 reply; 14+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-29 16:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 57469-done, dimech, gregory


------- Original Message -------
On Monday, August 29th, 2022 at 1:12 PM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Mon, 29 Aug 2022 11:53:40 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: Christopher Dimech dimech@gmx.com, 57469-done@debbugs.gnu.org, gregory@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?






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29 16:33                   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-29 21:24                     ` Phil Sainty
  2022-08-30  2:16                       ` Phil Sainty
  0 siblings, 1 reply; 14+ messages in thread
From: Phil Sainty @ 2022-08-29 21:24 UTC (permalink / raw)
  To: uzibalqa; +Cc: 57469-done, dimech, Eli Zaretskii, gregory

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






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-29 21:24                     ` Phil Sainty
@ 2022-08-30  2:16                       ` Phil Sainty
  2022-08-30  4:05                         ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 14+ messages in thread
From: Phil Sainty @ 2022-08-30  2:16 UTC (permalink / raw)
  To: uzibalqa; +Cc: 57469-done, dimech, Eli Zaretskii, gregory

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.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#57469: Missing information about all the modes that fall under prog-mode.
  2022-08-30  2:16                       ` Phil Sainty
@ 2022-08-30  4:05                         ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 14+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-30  4:05 UTC (permalink / raw)
  To: Phil Sainty; +Cc: 57469-done, dimech, Eli Zaretskii, gregory

------- Original Message -------
On Tuesday, August 30th, 2022 at 2:16 AM, Phil Sainty <psainty@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.





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-08-30  4:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-29  4:12 bug#57469: Missing information about all the modes that fall under prog-mode uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29  5:49 ` Gregory Heytings
2022-08-29  6:05   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29  8:38     ` Gregory Heytings
2022-08-29  8:51       ` Christopher Dimech
2022-08-29  9:13         ` Gregory Heytings
2022-08-29 10:29           ` Christopher Dimech
2022-08-29 11:36             ` Eli Zaretskii
2022-08-29 11:53               ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 13:12                 ` Eli Zaretskii
2022-08-29 16:33                   ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-29 21:24                     ` Phil Sainty
2022-08-30  2:16                       ` Phil Sainty
2022-08-30  4:05                         ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors

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.