unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Package naming
@ 2020-05-30 22:31 Daniele Nicolodi
  2020-05-30 22:42 ` Stefan Monnier
  2020-06-06 21:56 ` Daniele Nicolodi
  0 siblings, 2 replies; 6+ messages in thread
From: Daniele Nicolodi @ 2020-05-30 22:31 UTC (permalink / raw)
  To: emacs-devel

Hello,

what is the established convention for naming packages that mainly
provide a major mode? If I have a package that mainly provides
`foo-mode`, in the sense that all the "user facing" functionality is
enabled activating a major mode, should the package be named "foo" or
"foo-mode"?

I see examples of both. Notable examples are "org-mode" and "bibtex".

Thank you.

Cheers,
Dan



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

* Re: Package naming
  2020-05-30 22:31 Package naming Daniele Nicolodi
@ 2020-05-30 22:42 ` Stefan Monnier
  2020-05-30 22:58   ` Daniele Nicolodi
  2020-06-06 21:56 ` Daniele Nicolodi
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2020-05-30 22:42 UTC (permalink / raw)
  To: Daniele Nicolodi; +Cc: emacs-devel

> what is the established convention for naming packages that mainly
> provide a major mode? If I have a package that mainly provides
> `foo-mode`, in the sense that all the "user facing" functionality is
> enabled activating a major mode, should the package be named "foo" or
> "foo-mode"?

The convention is to obey the return value of

    M-: (if (zerop (mod (random) 2)) 'foo 'foo-mode) RET

Not sure if we should try and fix those packages which don't follow the
convention, tho.


        Stefan




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

* Re: Package naming
  2020-05-30 22:42 ` Stefan Monnier
@ 2020-05-30 22:58   ` Daniele Nicolodi
  0 siblings, 0 replies; 6+ messages in thread
From: Daniele Nicolodi @ 2020-05-30 22:58 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 30-05-2020 16:42, Stefan Monnier wrote:
>> what is the established convention for naming packages that mainly
>> provide a major mode? If I have a package that mainly provides
>> `foo-mode`, in the sense that all the "user facing" functionality is
>> enabled activating a major mode, should the package be named "foo" or
>> "foo-mode"?
> 
> The convention is to obey the return value of
> 
>     M-: (if (zerop (mod (random) 2)) 'foo 'foo-mode) RET
> 
> Not sure if we should try and fix those packages which don't follow the
> convention, tho.

I agree, it may be a never ending job.

Cheers,
Dan




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

* Re: Package naming
  2020-05-30 22:31 Package naming Daniele Nicolodi
  2020-05-30 22:42 ` Stefan Monnier
@ 2020-06-06 21:56 ` Daniele Nicolodi
  2020-06-06 22:20   ` Dmitry Gutov
  2020-06-06 23:11   ` Drew Adams
  1 sibling, 2 replies; 6+ messages in thread
From: Daniele Nicolodi @ 2020-06-06 21:56 UTC (permalink / raw)
  To: emacs-devel

On 30/05/2020 16:31, Daniele Nicolodi wrote:
> Hello,
> 
> what is the established convention for naming packages that mainly
> provide a major mode? If I have a package that mainly provides
> `foo-mode`, in the sense that all the "user facing" functionality is
> enabled activating a major mode, should the package be named "foo" or
> "foo-mode"?
> 
> I see examples of both. Notable examples are "org-mode" and "bibtex".

Hello,

beside the matter-of-fact reply of Stefan, I haven't seen anyone else
express opinion on this matter. I believe that with easy code
distribution via ELPA (and MELPA) it would be best to have some
consistency in package naming, thus an (unofficial, not strictly
enforced) naming convention would be a good thing.

Does anyone else feel like commenting on this?

Thank you.

Cheers,
Dan



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

* Re: Package naming
  2020-06-06 21:56 ` Daniele Nicolodi
@ 2020-06-06 22:20   ` Dmitry Gutov
  2020-06-06 23:11   ` Drew Adams
  1 sibling, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2020-06-06 22:20 UTC (permalink / raw)
  To: Daniele Nicolodi, emacs-devel

On 07.06.2020 00:56, Daniele Nicolodi wrote:
> beside the matter-of-fact reply of Stefan, I haven't seen anyone else
> express opinion on this matter. I believe that with easy code
> distribution via ELPA (and MELPA) it would be best to have some
> consistency in package naming, thus an (unofficial, not strictly
> enforced) naming convention would be a good thing.
> 
> Does anyone else feel like commenting on this?

I generally lean toward naming the packages 'foo', not 'foo-mode'. But 
there are exceptions.

E.g. if the mode is called <language>-mode, looks like almost everybody 
in MELPA up to now has chosen to name the package the same, apparently 
in order not to confuse the name of the package with the language? There 
are plenty of exceptions for this in core Emacs, though (python.el, 
pascal.el, prolog.el, etc). So you really can go either way.

All packages with minor modes, on the other hand, can safely go with the 
<foo> name, because it's probably sufficiently unique.

I'd call the org-mode package 'org', by the way.



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

* RE: Package naming
  2020-06-06 21:56 ` Daniele Nicolodi
  2020-06-06 22:20   ` Dmitry Gutov
@ 2020-06-06 23:11   ` Drew Adams
  1 sibling, 0 replies; 6+ messages in thread
From: Drew Adams @ 2020-06-06 23:11 UTC (permalink / raw)
  To: Daniele Nicolodi, emacs-devel

> Does anyone else feel like commenting on this?

Good idea to raise the question.

I don't think we should have any naming style/convention,
other than the file-name length or package-name length
(if the latter exists).

I do, however, think we should have an apropos command
that helps you find packages.  The "keywords" or other
relevant info describing a package are the best way to
find it.  We shouldn't expect the package or file names
to do that job.

IOW, Emacs has better ways to find things that depend
on a file name to convey much, if anything.  Package
developers name their things whatever they want, for
whatever reasons they want.  If they think the package
name is good for discovery or advertising (whether or
not it describes the package), that's fine too.

We have a command `apropos-library', but it doesn't
really seem to act like an apropos command.  It seems
to match only library (file) names, and return info
that's within the chosen library, as opposed to matching
keywords etc. relevant to the library.

I don't see any `apropos-package' command, but it might
be good to have one - preferably a powerful one that
really helps discovery etc.



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

end of thread, other threads:[~2020-06-06 23:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 22:31 Package naming Daniele Nicolodi
2020-05-30 22:42 ` Stefan Monnier
2020-05-30 22:58   ` Daniele Nicolodi
2020-06-06 21:56 ` Daniele Nicolodi
2020-06-06 22:20   ` Dmitry Gutov
2020-06-06 23:11   ` Drew Adams

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