all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* What are the criteria for making a minor mode ?
@ 2024-08-26 15:54 Heime
  2024-08-26 16:59 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 6+ messages in thread
From: Heime @ 2024-08-26 15:54 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor


One can just add code to a file and require it.  Ar make a minor mode.
What are the criteria for making a minor mode justified ?






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

* Re: What are the criteria for making a minor mode ?
  2024-08-26 15:54 What are the criteria for making a minor mode ? Heime
@ 2024-08-26 16:59 ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-08-27 17:20   ` Heime
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-08-26 16:59 UTC (permalink / raw)
  To: help-gnu-emacs

> One can just add code to a file and require it.

Do remember that loading a file should not significantly change Emacs's
behavior (this is a convention on which Emacs relies occasionally to
"enthusiastically" load files without an explicit request to do so,
e.g. to try and generate a better docstring, or to try and find out what
functions that file defines).

> Ar make a minor mode.  What are the criteria for making a minor mode
> justified ?

You don't need any justification.  You can define as many minor modes as
makes you happy.  It's cheap, don't hold back.


        Stefan




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

* Re: What are the criteria for making a minor mode ?
  2024-08-26 16:59 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-08-27 17:20   ` Heime
  2024-08-27 21:08     ` Rudolf Adamkovič
  0 siblings, 1 reply; 6+ messages in thread
From: Heime @ 2024-08-27 17:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Tuesday, August 27th, 2024 at 4:59 AM, Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> > One can just add code to a file and require it.
> 
> 
> Do remember that loading a file should not significantly change Emacs's
> behavior (this is a convention on which Emacs relies occasionally to
> "enthusiastically" load files without an explicit request to do so,
> e.g. to try and generate a better docstring, or to try and find out what
> functions that file defines).
> 
> > Ar make a minor mode. What are the criteria for making a minor mode
> > justified ?
> 
> 
> You don't need any justification. You can define as many minor modes as
> makes you happy. It's cheap, don't hold back. - Stefan

Are there any other ways for making a new tool apart from making a minor
or major mode ?  And what would they be good for ? 





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

* Re: What are the criteria for making a minor mode ?
  2024-08-27 17:20   ` Heime
@ 2024-08-27 21:08     ` Rudolf Adamkovič
  2024-08-27 21:27       ` Heime
  0 siblings, 1 reply; 6+ messages in thread
From: Rudolf Adamkovič @ 2024-08-27 21:08 UTC (permalink / raw)
  To: Heime, Stefan Monnier; +Cc: help-gnu-emacs

Heime <heimeborgia@protonmail.com> writes:

> Are there any other ways for making a new tool apart from making a minor
> or major mode ?

Sure.  For example, you could make a group of related commands, with no
accompanying major or minor mode.  What you want to make?

Rudy
-- 
"'Obvious' is all too often a synonym for 'wrong'."
--- Jeff Erickson, Algorithms, 2019

Rudolf Adamkovič <rudolf@adamkovic.org> [he/him]
http://adamkovic.org



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

* Re: What are the criteria for making a minor mode ?
  2024-08-27 21:08     ` Rudolf Adamkovič
@ 2024-08-27 21:27       ` Heime
  2024-08-29 10:50         ` Rudolf Adamkovič
  0 siblings, 1 reply; 6+ messages in thread
From: Heime @ 2024-08-27 21:27 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: Stefan Monnier, help-gnu-emacs

On Wednesday, August 28th, 2024 at 9:08 AM, Rudolf Adamkovič <rudolf@adamkovic.org> wrote:

> Heime heimeborgia@protonmail.com writes:
> 
> > Are there any other ways for making a new tool apart from making a minor
> > or major mode ?
> 
> 
> Sure. For example, you could make a group of related commands, with no
> accompanying major or minor mode. What you want to make?

Stefan has pointed out to me that just loading a file should not be made 
to alter Emacs's behavior in any significant way.
 
> Rudy
> --
> "'Obvious' is all too often a synonym for 'wrong'."
> --- Jeff Erickson, Algorithms, 2019
> 
> Rudolf Adamkovič rudolf@adamkovic.org [he/him]
> 
> http://adamkovic.org



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

* Re: What are the criteria for making a minor mode ?
  2024-08-27 21:27       ` Heime
@ 2024-08-29 10:50         ` Rudolf Adamkovič
  0 siblings, 0 replies; 6+ messages in thread
From: Rudolf Adamkovič @ 2024-08-29 10:50 UTC (permalink / raw)
  To: Heime; +Cc: Stefan Monnier, help-gnu-emacs

Heime <heimeborgia@protonmail.com> writes:

> Stefan has pointed out to me that just loading a file should not be made 
> to alter Emacs's behavior in any significant way.

That is correct.  If you need to do more, such as create a window or
create a file, you should encapsulate that within a function.  That
function can also be a command that enables a mode, of course.

Rudy
-- 
"'Obvious' is all too often a synonym for 'wrong'."
--- Jeff Erickson, Algorithms, 2019

Rudolf Adamkovič <rudolf@adamkovic.org> [he/him]
http://adamkovic.org



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

end of thread, other threads:[~2024-08-29 10:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 15:54 What are the criteria for making a minor mode ? Heime
2024-08-26 16:59 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-08-27 17:20   ` Heime
2024-08-27 21:08     ` Rudolf Adamkovič
2024-08-27 21:27       ` Heime
2024-08-29 10:50         ` Rudolf Adamkovič

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.