unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [NonGNU ELPA] New package proposal: git-modes
@ 2021-10-18 18:08 Jonas Bernoulli
  2021-10-18 19:18 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Jonas Bernoulli @ 2021-10-18 18:08 UTC (permalink / raw)
  To: emacs-devel

Hello,

I would like to propose the addition of "git-modes" to NonGNU Elpa.  It
provides three simple major-modes gitattributes-mode, gitconfig-mode and
gitignore-mode.

These modes/libraries used to be (and still are) distributes as three
separate packages on Melpa but I think it would be best to distribute
them as a single package.  I've asked Steve Purcell (Melpa maintainer)
about it and he agrees.  The three existing packages will be replaced
with the "git-modes" packages on Melpa.

A "git-modes.el" library that merely loads the other libraries existed
for a long time already.  Users don't actually have to load that, or
the individual libraries for that matter, because autoloading adds the
appropriate entries to auto-mode-alist.

Adding to GNU ELPA is not an option because one of the main authors
is against assigning copyright to the FSF as a matter of principle.

"git-modes" can be found at https://github.com/magit/git-modes.  You
can git-clone from that URL to avoid non-free javascript.  Note that
I am preparing for the addition to NonGNU ELPA on the "next" branch.

     Cheers,
     Jonas



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-18 18:08 [NonGNU ELPA] New package proposal: git-modes Jonas Bernoulli
@ 2021-10-18 19:18 ` Stefan Monnier
  2021-10-18 19:50 ` Philip Kaludercic
  2021-10-20  6:46 ` Richard Stallman
  2 siblings, 0 replies; 15+ messages in thread
From: Stefan Monnier @ 2021-10-18 19:18 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: emacs-devel

> I would like to propose the addition of "git-modes" to NonGNU Elpa.  It
> provides three simple major-modes gitattributes-mode, gitconfig-mode and
> gitignore-mode.

Sounds good to me.  Let me know if you need help adding it.


        Stefan




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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-18 18:08 [NonGNU ELPA] New package proposal: git-modes Jonas Bernoulli
  2021-10-18 19:18 ` Stefan Monnier
@ 2021-10-18 19:50 ` Philip Kaludercic
  2021-10-18 22:13   ` Jonas Bernoulli
  2021-10-20  6:46 ` Richard Stallman
  2 siblings, 1 reply; 15+ messages in thread
From: Philip Kaludercic @ 2021-10-18 19:50 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: emacs-devel

Jonas Bernoulli <jonas@bernoul.li> writes:

> Hello,

Hi!

> "git-modes" can be found at https://github.com/magit/git-modes.  You
> can git-clone from that URL to avoid non-free javascript.  Note that
> I am preparing for the addition to NonGNU ELPA on the "next" branch.

I seem to see no "next" branch in the repository at the moment (neither
on GitHub nor in my local checkout).

        $ git branch -al
        * master
          remotes/origin/HEAD -> origin/master
          remotes/origin/master

Also, do you plan to continue the development on the next branch (so
that the MELPA and the NonGNU ELPA version are maintained in parallel),
or will you merge the NonGNU ELPA version back into the master branch
later on?

-- 
	Philip Kaludercic



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-18 19:50 ` Philip Kaludercic
@ 2021-10-18 22:13   ` Jonas Bernoulli
  0 siblings, 0 replies; 15+ messages in thread
From: Jonas Bernoulli @ 2021-10-18 22:13 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

> I seem to see no "next" branch in the repository at the moment (neither
> on GitHub nor in my local checkout).

I forgot to push.

> Also, do you plan to continue the development on the next branch

No, there is only one long lived branch "master", at least that's the
plan right now.  I probably shouldn't have named the temporary branch
"next" as that indeed is usually used for long-lived branches.



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-18 18:08 [NonGNU ELPA] New package proposal: git-modes Jonas Bernoulli
  2021-10-18 19:18 ` Stefan Monnier
  2021-10-18 19:50 ` Philip Kaludercic
@ 2021-10-20  6:46 ` Richard Stallman
  2021-10-20 13:02   ` Stefan Kangas
  2021-10-20 18:52   ` [NonGNU ELPA] New package proposal: git-modes Philip Kaludercic
  2 siblings, 2 replies; 15+ messages in thread
From: Richard Stallman @ 2021-10-20  6:46 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: emacs-devel

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

  > I would like to propose the addition of "git-modes" to NonGNU Elpa.  It
  > provides three simple major-modes gitattributes-mode, gitconfig-mode and
  > gitignore-mode.

Assuming these are worth distributing (I have no opinion on that),
should these be part of Emacs?  Can we get papers for them?

-- 
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] 15+ messages in thread

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-20  6:46 ` Richard Stallman
@ 2021-10-20 13:02   ` Stefan Kangas
  2021-10-22 23:44     ` git-modes Richard Stallman
  2021-10-20 18:52   ` [NonGNU ELPA] New package proposal: git-modes Philip Kaludercic
  1 sibling, 1 reply; 15+ messages in thread
From: Stefan Kangas @ 2021-10-20 13:02 UTC (permalink / raw)
  To: rms, Jonas Bernoulli; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Assuming these are worth distributing (I have no opinion on that),
> should these be part of Emacs?  Can we get papers for them?

IMO, it's a no-brainer that we would want them as part of Emacs.

Git is the most commonly used VCS in free software there these days, so
we need excellent support for it.  This includes merely "nice" things
such as syntax highlighting for its configuration files.



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-20  6:46 ` Richard Stallman
  2021-10-20 13:02   ` Stefan Kangas
@ 2021-10-20 18:52   ` Philip Kaludercic
  2021-10-21 22:42     ` Richard Stallman
  1 sibling, 1 reply; 15+ messages in thread
From: Philip Kaludercic @ 2021-10-20 18:52 UTC (permalink / raw)
  To: Richard Stallman; +Cc: Jonas Bernoulli, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> [[[ 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. ]]]
>
>   > I would like to propose the addition of "git-modes" to NonGNU Elpa.  It
>   > provides three simple major-modes gitattributes-mode, gitconfig-mode and
>   > gitignore-mode.
>
> Assuming these are worth distributing (I have no opinion on that),
> should these be part of Emacs?  Can we get papers for them?

Seems like it sadly isn't possible, as Jonas says:

> Adding to GNU ELPA is not an option because one of the main authors is
> against assigning copyright to the FSF as a matter of principle.

-- 
	Philip Kaludercic



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-20 18:52   ` [NonGNU ELPA] New package proposal: git-modes Philip Kaludercic
@ 2021-10-21 22:42     ` Richard Stallman
  2021-10-22  0:08       ` Jonas Bernoulli
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Stallman @ 2021-10-21 22:42 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: jonas, emacs-devel

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

  > Seems like it sadly isn't possible, as Jonas says:

  > > Adding to GNU ELPA is not an option because one of the main authors is
  > > against assigning copyright to the FSF as a matter of principle.

That's a shame.  But how big is per code?
Would it be feasible to write new code to replace that code?
-- 
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] 15+ messages in thread

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-21 22:42     ` Richard Stallman
@ 2021-10-22  0:08       ` Jonas Bernoulli
  2021-10-22  2:13         ` Stefan Kangas
  0 siblings, 1 reply; 15+ messages in thread
From: Jonas Bernoulli @ 2021-10-22  0:08 UTC (permalink / raw)
  To: rms, Philip Kaludercic; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>   > Seems like it sadly isn't possible, as Jonas says:
>
>   > > Adding to GNU ELPA is not an option because one of the main authors is
>   > > against assigning copyright to the FSF as a matter of principle.
>
> That's a shame.  But how big is per code?
> Would it be feasible to write new code to replace that code?

It's not a of code: gitconfig-mode: 137, gitignore-mode: 61,
gitattributes-mode 232 lines, all including headers.  IMO it
would make sense to re-implement them.

gitignore-mode is completely trivial, basically just font-lock keywords.
gitconfig-mode has more font-lock keywords plus some indentation code,
  which I personally find more annoying than helpful.
gitattributes-mode is more complex, also including support for eldoc and
  some navigation commands.  The good news is that in this case we might
  actually be able to get all the required copyright assignments.



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-22  0:08       ` Jonas Bernoulli
@ 2021-10-22  2:13         ` Stefan Kangas
  2021-10-22  6:50           ` Juri Linkov
  2021-10-22 18:05           ` Jonas Bernoulli
  0 siblings, 2 replies; 15+ messages in thread
From: Stefan Kangas @ 2021-10-22  2:13 UTC (permalink / raw)
  To: Jonas Bernoulli, rms, Philip Kaludercic; +Cc: emacs-devel

Jonas Bernoulli <jonas@bernoul.li> writes:

>> That's a shame.  But how big is per code?
>> Would it be feasible to write new code to replace that code?
>
> It's not a of code: gitconfig-mode: 137, gitignore-mode: 61,
> gitattributes-mode 232 lines, all including headers.  IMO it
> would make sense to re-implement them.
>
> gitignore-mode is completely trivial, basically just font-lock keywords.

Couldn't .gitignore-mode basically just be replaced with
`conf-unix-mode'?  I have gitignore-mode running locally, but I'm not
sure the syntax highlighting it does have is very helpful.  Why
highlight "/" in "foo/bar", for example?

This would be a trivial addition to auto-mode-alist in emacs-28, if
that's something we want to do.

> gitconfig-mode has more font-lock keywords plus some indentation code,
>   which I personally find more annoying than helpful.

By default, we use `conf-mode' for these files, which already looks
pretty good to my eyes.  Is gitconfig-mode much better?

> gitattributes-mode is more complex, also including support for eldoc and
>   some navigation commands.  The good news is that in this case we might
>   actually be able to get all the required copyright assignments.

That's good news, indeed.



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-22  2:13         ` Stefan Kangas
@ 2021-10-22  6:50           ` Juri Linkov
  2021-10-22  7:57             ` Stefan Kangas
  2021-10-22 18:05           ` Jonas Bernoulli
  1 sibling, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2021-10-22  6:50 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Philip Kaludercic, Jonas Bernoulli, rms, emacs-devel

>> gitignore-mode is completely trivial, basically just font-lock keywords.
>
> Couldn't .gitignore-mode basically just be replaced with
> `conf-unix-mode'?  I have gitignore-mode running locally, but I'm not
> sure the syntax highlighting it does have is very helpful.  Why
> highlight "/" in "foo/bar", for example?

.gitignore is already font-locked after (require 'generic-x),
but specific gitignore-mode is still needed to fontify at least
important syntax of the negation character "!".
But why not add this to generic-x.el?



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-22  6:50           ` Juri Linkov
@ 2021-10-22  7:57             ` Stefan Kangas
  2021-10-23 18:14               ` Juri Linkov
  0 siblings, 1 reply; 15+ messages in thread
From: Stefan Kangas @ 2021-10-22  7:57 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Philip Kaludercic, Jonas Bernoulli, rms, emacs-devel

Juri Linkov <juri@linkov.net> writes:

> .gitignore is already font-locked after (require 'generic-x),
> but specific gitignore-mode is still needed to fontify at least
> important syntax of the negation character "!".
> But why not add this to generic-x.el?

Could we autoload it if we add it there?



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

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-22  2:13         ` Stefan Kangas
  2021-10-22  6:50           ` Juri Linkov
@ 2021-10-22 18:05           ` Jonas Bernoulli
  1 sibling, 0 replies; 15+ messages in thread
From: Jonas Bernoulli @ 2021-10-22 18:05 UTC (permalink / raw)
  To: Stefan Kangas, rms, Philip Kaludercic; +Cc: emacs-devel


> I have gitignore-mode running locally, but I'm not sure the syntax
> highlighting it does have is very helpful.

I don't really have an opinion on the matter.  I am not the original
author and for the most part just fixed bugs.  Some of the additional
font-lock sugar seems unnecessary to me too.

(If I remember correctly the only reason I agreed to become the
maintainer of these modes is that it was part of the deal that allowed
me to integrate various git-commit.el implementations into the one in
magit.  And that in turn I only wanted to do because the most popular
implementation injected bugs into magit via monkey patches and while its
author refused to stop doing that he offered to completely handover the
package (plus git{config,ignore}.el) to me.)



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

* Re: git-modes
  2021-10-20 13:02   ` Stefan Kangas
@ 2021-10-22 23:44     ` Richard Stallman
  0 siblings, 0 replies; 15+ messages in thread
From: Richard Stallman @ 2021-10-22 23:44 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: jonas, emacs-devel

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

It sounds like these would not be a lot of work to write from scratch.
We can write a program like git-modes on our own from scratch.
Let's do that, and eliminate the obstacle.

-- 
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] 15+ messages in thread

* Re: [NonGNU ELPA] New package proposal: git-modes
  2021-10-22  7:57             ` Stefan Kangas
@ 2021-10-23 18:14               ` Juri Linkov
  0 siblings, 0 replies; 15+ messages in thread
From: Juri Linkov @ 2021-10-23 18:14 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Philip Kaludercic, Jonas Bernoulli, rms, emacs-devel

>> .gitignore is already font-locked after (require 'generic-x),
>> but specific gitignore-mode is still needed to fontify at least
>> important syntax of the negation character "!".
>> But why not add this to generic-x.el?
>
> Could we autoload it if we add it there?

gitignore-mode will autoload the whole generic-x.el with all other modes.
I don't know how to autoload only one mode selectively on demand,
without customizing generic-extras-enable-list.



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

end of thread, other threads:[~2021-10-23 18:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18 18:08 [NonGNU ELPA] New package proposal: git-modes Jonas Bernoulli
2021-10-18 19:18 ` Stefan Monnier
2021-10-18 19:50 ` Philip Kaludercic
2021-10-18 22:13   ` Jonas Bernoulli
2021-10-20  6:46 ` Richard Stallman
2021-10-20 13:02   ` Stefan Kangas
2021-10-22 23:44     ` git-modes Richard Stallman
2021-10-20 18:52   ` [NonGNU ELPA] New package proposal: git-modes Philip Kaludercic
2021-10-21 22:42     ` Richard Stallman
2021-10-22  0:08       ` Jonas Bernoulli
2021-10-22  2:13         ` Stefan Kangas
2021-10-22  6:50           ` Juri Linkov
2021-10-22  7:57             ` Stefan Kangas
2021-10-23 18:14               ` Juri Linkov
2021-10-22 18:05           ` Jonas Bernoulli

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