From: Philip Kaludercic <philipk@posteo.net>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Uwe Brauer <oub@mat.ucm.es>, Andrea Corallo <acorallo@gnu.org>,
emacs-devel@gnu.org
Subject: Re: having emacs-matlab in ELPA, finally. FSF paper signed
Date: Sun, 24 Nov 2024 19:59:30 +0000 [thread overview]
Message-ID: <87mshotnbx.fsf@posteo.net> (raw)
In-Reply-To: <CADwFkmmVNYrZGfMq95VS0M60E9u+_sdJjEPFpLpqKrsxrVGn=Q@mail.gmail.com> (Stefan Kangas's message of "Sat, 23 Nov 2024 14:13:51 -0500")
Stefan Kangas <stefankangas@gmail.com> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>
>>>>> "SK" == Stefan Kangas <stefankangas@gmail.com> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>> +(defconst matlab-mode-version (package-get-version)
>>>> + "Current version of MATLAB(R) mode.")
>>
>>> We have tried to discourage the addition of such variables and commands,
>>> given that one can always find that information by other means,
>>> e.g. interactively with `describe-package` or from Lisp:
>>
>>> (package-desc-version (cadr (assq 'foo package-alist)))
>>
>> So you want me use just that string
>> well (package-desc-version (cadr (assq 'matlab-mode package-alist)))
>> I presume
>>
>> in matlab.el (and matlab-mode.el)?
>
> That's what I would do, indeed. Well, I'd use this if you need the
> string form:
>
> (package-version-join
> (package-desc-version (cadr (assq 'matlab-mode package-alist))))
We should keep in mind that this will break if the package is not
installed using package.el, as then
(cadr (assq 'matlab-mode package-alist)) ;=> nil
and thus
(package-desc-version nil) ;!> (wrong-type-argument package-desc nil)
> Yeah, it's a bit of a mouthful. Most packages don't bother, and just
> rely on `describe-package`, I think.
>
> That said, there's nothing wrong with keeping it around; it just seems
> redundant now that you have a "Version" header. I mostly mentioned it
> for the record, and in case you wanted to get rid of some possible
> redundancy.
>
> (Personally, I'm not sure if the `matlab-show-version` command is needed
> either given that we have `describe-package`. In emacs.git, we tend to
> make such `foo-package-version` commands obsolete.)
1+ to this. The custom commands for version numbers are an anti-pattern IMO.
>
>> What's about our current setting
>>
>> (defconst matlab-mode-version "6.2"
>> "Current version of MATLAB(R) mode.")
>>
>> Which we need for MELPA?
>
> Hmm, are you sure that you need it for MELPA even with the addition of
> the "Version" header?
>
> In any case, this is an extremely minor nit either way.
Uwe Brauer via Matlab-emacs-discuss
<matlab-emacs-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
writes:
>> Uwe Brauer <oub-YB6e1s5WF/He5aOfsHch1g@public.gmane.org> writes:
>
>> You don't have to do anything*, I just have to add a package
>> specification (similar to the "recipe file" for MELPA) to elpa.git.
>
>> * As soon as it works. The main issues right now, are as you noticed
>> that ELPA doesn't release a new tarball for every commit, but just
>> when a new version is released. We track this by checking for commits
>> that bump the "Version" header in the main file (in your case
>> matlab.el). You currently don't have any version number, so the build
>> fails. I would suggest applying a change like this, if it doesn't
>> break any assumptions you have regarding the minimal Emacs version:
>
>> diff --git a/matlab.el b/matlab.el
>> index 8ca0ee24a2..b82229a672 100644
>> --- a/matlab.el
>> +++ b/matlab.el
>> @@ -5,11 +5,7 @@
>> ;; Maintainer: Eric M. Ludlam <eludlam-I5WecO5yM8GakBO8gow8eQ@public.gmane.org>
>> ;; Created: 04 Jan 91
>> ;; Keywords: MATLAB(R)
>> -;; Version:
>> -
>> -(defconst matlab-mode-version "5.0"
>> - "Current version of MATLAB(R) mode.")
>> -
>> +;; Version: 5.0
>> ;;
>> ;; Copyright (C) 1997-2022 Eric M. Ludlam
>> ;; Copyright (C) 1991-1997 Matthew R. Wette
>> @@ -50,6 +46,10 @@
>
>> ;;; Code:
>
>> +(defconst matlab-mode-version (package-get-version)
>> + "Current version of MATLAB(R) mode.")
>> +
>> +
>> (require 'matlab-compat)
>> (require 'matlab-syntax)
>> (require 'matlab-scan)
>
> A couple of remarks,
>
> 1. this diff seems against an older matlab-mode version (may the one
> in sourceforge), the latest github version is 6.2
> https://github.com/mathworks/Emacs-MATLAB-Mode.git
That might very well be, I used a local checkout that ELPA made when
experimenting with the package, and it appears that was not the newest
version.
> 2. Jonas Bernoulli one of the MELPA maintainers, recommended (but
> did not demand) to add file called matlab-mode.el which is
> basically a dummy file but also contains the current version
What is the name of the MELPA package? If it is called "matlab", then
by default ELPA will consult the "matlab.el" file for version
information. Otherwise it will consult "matlab-mode.el". We can adjust
this though if need be in the package specification.
>> The other issue is that ELPA checks the copyright string and wants to
>> see that all packages in GNU ELPA have their copyright assigned to the
>> FSF.
>
> There is an automated process for checking this. If I had known, it
> would have saved my quite a bit of time and work. I eyeballed the logs
> and if there was an unknown author I checked the diff, and if necessary
> contacted him.
It doesn't go through the logs, it just searches for a copyright string
somewhere in the header.
>> If you can fix these two things, then everything should go through.
>> You can then decide to filter out files out of the final tarball by
>> adding an .elpaignore file that lists what files to exclude.
>
>
> 1. I will add an elpaignore file, which is urgent,
>
> 2. And concerning the version number, what shall I do, your proposal
> or Stefan's?
>
> For the moment being I would like to keep the MELPA version as well till
> I know ELPA works
Inherently there is no reason against having both, especially if people
have already installed the package via MELPA.
> Uwe
Uwe Brauer <oub@mat.ucm.es> writes:
>> Uwe Brauer <oub@mat.ucm.es> writes:
>
>
>> +(defconst matlab-mode-version (package-get-version)
>> + "Current version of MATLAB(R) mode.")
>> +
>> +
>> (require 'matlab-compat)
>> (require 'matlab-syntax)
>> (require 'matlab-scan)
>
>
>> The other issue is that ELPA checks the copyright string and wants to
>> see that all packages in GNU ELPA have their copyright assigned to the
>> FSF.
>
>> If you can fix these two things, then everything should go through.
>> You can then decide to filter out files out of the final tarball by
>> adding an .elpaignore file that lists what files to exclude.
>
> I added .elpaignore,
> and pushed the commit to the github repository.
1+
> Concerning the version header, I got two different recommendation so I
> prefer to wait till this is settled, and also what to do with the
> original string that is needed for MELPA
>
>
>> We have tried to discourage the addition of such variables and commands,
>> given that one can always find that information by other means,
>> e.g. interactively with `describe-package` or from Lisp:
>
>> (package-desc-version (cadr (assq 'foo package-alist)))
next prev parent reply other threads:[~2024-11-24 19:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 12:45 having emacs-matlab in ELPA, finally. FSF paper signed Uwe Brauer
2024-08-06 21:55 ` Andrea Corallo
2024-08-07 17:03 ` Uwe Brauer
2024-08-07 17:54 ` Andrea Corallo
2024-08-12 11:20 ` Philip Kaludercic
2024-08-12 11:33 ` Andreas Schwab
2024-08-12 11:38 ` Philip Kaludercic
2024-08-12 12:16 ` Uwe Brauer
2024-08-12 12:29 ` Philip Kaludercic
2024-08-12 14:58 ` Uwe Brauer
2024-08-12 15:06 ` Philip Kaludercic
2024-08-12 15:17 ` Uwe Brauer
2024-08-12 16:11 ` Philip Kaludercic
2024-11-22 16:12 ` Uwe Brauer
2024-11-23 10:30 ` Philip Kaludercic
2024-11-23 12:07 ` Stefan Kangas
2024-11-23 13:22 ` Uwe Brauer
2024-11-23 19:13 ` Stefan Kangas
2024-11-24 8:16 ` Uwe Brauer
2024-11-24 11:12 ` Stefan Kangas
2024-11-24 14:07 ` Uwe Brauer
2024-11-24 19:59 ` Philip Kaludercic [this message]
2024-11-24 20:37 ` Uwe Brauer
2024-11-24 21:34 ` Philip Kaludercic
2024-11-25 7:37 ` Uwe Brauer via Emacs development discussions.
2024-11-25 7:45 ` Uwe Brauer via Emacs development discussions.
2024-11-23 13:19 ` Uwe Brauer via Matlab-emacs-discuss
2024-11-23 13:30 ` having emacs-matlab in ELPA, finally. FSF paper signed, " Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mshotnbx.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=acorallo@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=oub@mat.ucm.es \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).