unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
@ 2020-06-20 19:53 Friedrich Beckmann
  2020-06-30 13:07 ` Vasilij Schneidermann
  0 siblings, 1 reply; 13+ messages in thread
From: Friedrich Beckmann @ 2020-06-20 19:53 UTC (permalink / raw)
  To: emacs-devel; +Cc: PSPP Development Mailing List

Hi,

I contribute to the GNU PSPP software and maintain the pspp debian
package. The package contains a pspp-mode.el file which provides
the pspp-mode for syntax highlighting spss syntax files. Currently
the file is installed via dh-elpa in the debian package but I think
it should be in the normal gnu elpa distribution.

The file is available here:

http://git.savannah.gnu.org/cgit/pspp.git/tree/pspp-mode.el

Can you integrate that in gnu elpa?

Regards

Friedrich



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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-06-20 19:53 [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting Friedrich Beckmann
@ 2020-06-30 13:07 ` Vasilij Schneidermann
  0 siblings, 0 replies; 13+ messages in thread
From: Vasilij Schneidermann @ 2020-06-30 13:07 UTC (permalink / raw)
  To: Friedrich Beckmann; +Cc: PSPP Development Mailing List, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]

Hello Friedrich,

> The file is available here:
> 
> http://git.savannah.gnu.org/cgit/pspp.git/tree/pspp-mode.el
> 
> Can you integrate that in gnu elpa?

The GNU ELPA Readme [1] explains the necessary steps for this.  One
prerequisite is following the coding style, there's a number of things sticking
out in your code:

- Inconsistent paragraph spacing (sometimes the expected newline is missing,
  sometimes there's two or three of them, with no clear reason why).
- Lone opening/closing parentheses are something to be avoided, please keep
  these together.
- Indentation of comments is inconsistent and doesn't line up with code.
- The major mode definition should use `define-derived-mode`, that way you no
  longer need to manipulate major mode name/hooks/local variables/syntax
  tables/key maps.

All but the last point are elaborated in further detail in Riastradh's Lisp
Style Rules [2].

Vasilij

[1]: http://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/README
[2]: https://mumble.net/~campbell/scheme/style.txt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-04 15:15     ` John Darrington
@ 2020-07-05  9:44       ` Friedrich Beckmann
  2020-07-05 11:18         ` John Darrington
  2020-07-05 16:51         ` Sean Whitton
  0 siblings, 2 replies; 13+ messages in thread
From: Friedrich Beckmann @ 2020-07-05  9:44 UTC (permalink / raw)
  To: John Darrington
  Cc: PSPP Development Mailing List, mail, Stefan Monnier, emacs-devel

Hi,

i think the benefit of having the pspp-mode in GNU ELPA is that I can load it in emacs via the standard elpa way, i.e. M-x package-list—packages and then select pspp-mode - which is working right now because Stefan included pspp-mode.el in the GNU
ELPA repository.

Until now I included the pspp-mode.el in the pspp debian package where it is then installed as an „external“ elpa package. The benefit is that once I install pspp, then the pspp-mode is autoloaded in emacs right away, i.e. when I open a .sps file, then the mode is immediately working. I think it is nice that I do not even need to know ELPA and the mode works in emacs right away when I install the debian pspp package. So maybe that is a reason to keep pspp-mode.el in the distribution. An alternative way would be  to find a way that installing the pspp package will „activate“ the pspp-mode.el from GNU ELPA.

Friedrich

> Am 04.07.2020 um 17:15 schrieb John Darrington <john@darrington.wattle.id.au>:
> 
> On Sat, Jul 04, 2020 at 09:12:33AM -0400, Stefan Monnier wrote:
>> thanks for your response regarding PSPP mode for emacs in GNU ELPA.
>> I think we can simply copy pspp-mode.el to elpa.git and do the necessary
>> modifications there.
> 
>     Having the development/maintenance of `pspp-mode.el` take place in
>     `elpa.git` is indeed the better option from where I stand, but
>     would `pspp-mode.el` then be removed from the PSPP Git repository (to
>     avoid a risk of the two versions going out of sync)?
> 
> 
> Probably it would be - but I don't think a decision has been made yet.
> 




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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-05  9:44       ` Friedrich Beckmann
@ 2020-07-05 11:18         ` John Darrington
  2020-07-05 16:51         ` Sean Whitton
  1 sibling, 0 replies; 13+ messages in thread
From: John Darrington @ 2020-07-05 11:18 UTC (permalink / raw)
  To: Friedrich Beckmann
  Cc: PSPP Development Mailing List, emacs-devel, John Darrington, mail,
	Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 964 bytes --]

I have removed pspp-mode.el from the PSPP repository.

If debian or other packagers want to have pspp-mode automatically
installed, then I guess it would be as simple as putting

(package-install 'pspp-mode nil) 

in the site-emacs file.

J'

On Sun, Jul 05, 2020 at 11:44:23AM +0200, Friedrich Beckmann wrote:
     
     Until now I included the pspp-mode.el in the pspp debian package where it is then installed as an ???external??? elpa package. The benefit is that once I install pspp, then the pspp-mode is autoloaded in emacs right away, i.e. when I open a .sps file, then the mode is immediately working. I think it is nice that I do not even need to know ELPA and the mode works in emacs right away when I install the debian pspp package. So maybe that is a reason to keep pspp-mode.el in the distribution. An alternative way would be  to find a way that installing the pspp package will ???activate??? the pspp-mode.el from GNU ELPA.
     

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-05  9:44       ` Friedrich Beckmann
  2020-07-05 11:18         ` John Darrington
@ 2020-07-05 16:51         ` Sean Whitton
  2020-07-05 17:14           ` Friedrich Beckmann
  2020-07-05 18:35           ` John Darrington
  1 sibling, 2 replies; 13+ messages in thread
From: Sean Whitton @ 2020-07-05 16:51 UTC (permalink / raw)
  To: Friedrich Beckmann, John Darrington
  Cc: PSPP Development Mailing List, emacs-devel, Stefan Monnier, mail

Hello,

On Sun 05 Jul 2020 at 11:44AM +02, Friedrich Beckmann wrote:

> i think the benefit of having the pspp-mode in GNU ELPA is that I can load it in emacs via the standard elpa way, i.e. M-x package-list—packages and then select pspp-mode - which is working right now because Stefan included pspp-mode.el in the GNU
> ELPA repository.
>
> Until now I included the pspp-mode.el in the pspp debian package where it is then installed as an „external“ elpa package. The benefit is that once I install pspp, then the pspp-mode is autoloaded in emacs right away, i.e. when I open a .sps file, then the mode is immediately working. I think it is nice that I do not even need to know ELPA and the mode works in emacs right away when I install the debian pspp package. So maybe that is a reason to keep pspp-mode.el in the distribution. An alternative way would be  to find a way that installing the pspp package will „activate“ the pspp-mode.el from GNU ELPA.

There could easily be a separate package in Debian containing just
pspp-mode.el and tracking GNU ELPA as upstream.

Docs are here:
https://manpages.debian.org/buster/dh-make-elpa/dh-make-elpa.1.en.html

-- 
Sean Whitton



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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-05 16:51         ` Sean Whitton
@ 2020-07-05 17:14           ` Friedrich Beckmann
  2020-07-05 18:35           ` John Darrington
  1 sibling, 0 replies; 13+ messages in thread
From: Friedrich Beckmann @ 2020-07-05 17:14 UTC (permalink / raw)
  To: Sean Whitton
  Cc: PSPP Development Mailing List, emacs-devel, John Darrington,
	Stefan Monnier, mail

Hi Sean,

thanks for your idea with the separate debian package for the pspp-mode. Do you think there is also a way to do this:

>>  An alternative way would be  to find a way that installing the pspp package will „activate“ the pspp-mode.el from GNU ELPA.

i.e. no upstream code tracking, no additional debian package - just a trigger that will activate this mode via GNU ELPA when I install the pspp application.

Regards

Friedrich

> Am 05.07.2020 um 18:51 schrieb Sean Whitton <spwhitton@spwhitton.name>:
> 
> There could easily be a separate package in Debian containing just
> pspp-mode.el and tracking GNU ELPA as upstream.
> 




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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-05 16:51         ` Sean Whitton
  2020-07-05 17:14           ` Friedrich Beckmann
@ 2020-07-05 18:35           ` John Darrington
  2020-07-05 18:50             ` tomas
  2020-07-05 20:20             ` Sean Whitton
  1 sibling, 2 replies; 13+ messages in thread
From: John Darrington @ 2020-07-05 18:35 UTC (permalink / raw)
  To: Sean Whitton
  Cc: Friedrich Beckmann, John Darrington, emacs-devel, Stefan Monnier,
	PSPP Development Mailing List, mail

On Sun, Jul 05, 2020 at 09:51:12AM -0700, Sean Whitton wrote:
     Hello,
     
     There could easily be a separate package in Debian containing just
     pspp-mode.el and tracking GNU ELPA as upstream.
     
     Docs are here:
     https://manpages.debian.org/buster/dh-make-elpa/dh-make-elpa.1.en.html
     
Sure.  But from a user's perspective I don't see the advantage in that.
I mean what is the difference between typing "apt-get install pspp-mode"
and "M-x package-install 'pspp-mode" ?

J'



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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-05 18:35           ` John Darrington
@ 2020-07-05 18:50             ` tomas
  2020-07-05 20:20             ` Sean Whitton
  1 sibling, 0 replies; 13+ messages in thread
From: tomas @ 2020-07-05 18:50 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

On Sun, Jul 05, 2020 at 08:35:02PM +0200, John Darrington wrote:
> On Sun, Jul 05, 2020 at 09:51:12AM -0700, Sean Whitton wrote:
>      Hello,
>      
>      There could easily be a separate package in Debian containing just
>      pspp-mode.el and tracking GNU ELPA as upstream.
>      
>      Docs are here:
>      https://manpages.debian.org/buster/dh-make-elpa/dh-make-elpa.1.en.html
>      
> Sure.  But from a user's perspective I don't see the advantage in that.
> I mean what is the difference between typing "apt-get install pspp-mode"
> and "M-x package-install 'pspp-mode" ?

If your system has more than one user (EEEK!), then there /is/ at
least one difference ;-)

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-05 18:35           ` John Darrington
  2020-07-05 18:50             ` tomas
@ 2020-07-05 20:20             ` Sean Whitton
  2020-07-06  5:53               ` Dmitry Alexandrov
  1 sibling, 1 reply; 13+ messages in thread
From: Sean Whitton @ 2020-07-05 20:20 UTC (permalink / raw)
  To: John Darrington
  Cc: Friedrich Beckmann, John Darrington, emacs-devel, Stefan Monnier,
	PSPP Development Mailing List, mail

Hello John,

On Sun 05 Jul 2020 at 08:35PM +02, John Darrington wrote:

> Sure.  But from a user's perspective I don't see the advantage in that.
> I mean what is the difference between typing "apt-get install pspp-mode"
> and "M-x package-install 'pspp-mode" ?

From the perspective of those of us working on packaging Emacs addons in
Debian, significant advantages are

1) the way addons work doesn't change within a Debian stable release,
   just like Emacs itself doesn't change within a Debian stable release

2) addons get installed using Debian's mechanisms for a secure software
   supply chain, rather than relying on https alone.

-- 
Sean Whitton



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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-05 20:20             ` Sean Whitton
@ 2020-07-06  5:53               ` Dmitry Alexandrov
  2020-07-06  6:01                 ` Sean Whitton
  0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Alexandrov @ 2020-07-06  5:53 UTC (permalink / raw)
  To: Sean Whitton
  Cc: Friedrich Beckmann, John Darrington, emacs-devel, Stefan Monnier,
	PSPP Development Mailing List, mail

[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]

Sean Whitton <spwhitton@spwhitton.name> wrote:
> On Sun 05 Jul 2020 at 08:35PM +02, John Darrington wrote:
>> Sure.  But from a user's perspective I don't see the advantage in that.  I mean what is the difference between typing "apt-get install pspp-mode" and "M-x package-install 'pspp-mode" ?
>
> From the perspective of those of us working on packaging Emacs addons in Debian, significant advantages are
>
> 1) the way addons work doesn't change within a Debian stable release,
>    just like Emacs itself doesn't change within a Debian stable release
>
> 2) addons get installed using Debian's mechanisms for a secure software
>    supply chain, rather than relying on https alone.

3) they are automatically available to  #!/usr/bin/emacs --script  scripts; and pollute stderr at every run:

	$ ./hello.el
	Loading /etc/emacs/site-start.d/00debian.el (source)...
	Loading /etc/emacs/site-start.d/50autoconf.el (source)...
	Loading /etc/emacs/site-start.d/50cmake-data.el (source)...
	Loading /etc/emacs/site-start.d/50dictem.el (source)...
	Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
	Loading debian-ispell...
	Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
	Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
	Loading /etc/emacs/site-start.d/50global.el (source)...
	Loading /etc/emacs/site-start.d/50mu4e.el (source)...
	Hello, Debian!

stimulating a user to learn nice tricks that allow to pass more than single argument to interpreter in order to get rid of them:

	#!/bin/sh
	":"; exec emacs --no-site-file --no-site-lisp --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*-

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-06  5:53               ` Dmitry Alexandrov
@ 2020-07-06  6:01                 ` Sean Whitton
  2020-07-06  6:38                   ` Dmitry Alexandrov
  0 siblings, 1 reply; 13+ messages in thread
From: Sean Whitton @ 2020-07-06  6:01 UTC (permalink / raw)
  To: Dmitry Alexandrov
  Cc: Friedrich Beckmann, John Darrington, emacs-devel, Stefan Monnier,
	PSPP Development Mailing List, mail

Hello Dmitry,

On Mon 06 Jul 2020 at 08:53AM +03, Dmitry Alexandrov wrote:

> Sean Whitton <spwhitton@spwhitton.name> wrote:
>> On Sun 05 Jul 2020 at 08:35PM +02, John Darrington wrote:
>>> Sure.  But from a user's perspective I don't see the advantage in that.  I mean what is the difference between typing "apt-get install pspp-mode" and "M-x package-install 'pspp-mode" ?
>>
>> From the perspective of those of us working on packaging Emacs addons in Debian, significant advantages are
>>
>> 1) the way addons work doesn't change within a Debian stable release,
>>    just like Emacs itself doesn't change within a Debian stable release
>>
>> 2) addons get installed using Debian's mechanisms for a secure software
>>    supply chain, rather than relying on https alone.
>
> 3) they are automatically available to  #!/usr/bin/emacs --script  scripts; and pollute stderr at every run:
>
> 	$ ./hello.el
> 	Loading /etc/emacs/site-start.d/00debian.el (source)...
> 	Loading /etc/emacs/site-start.d/50autoconf.el (source)...
> 	Loading /etc/emacs/site-start.d/50cmake-data.el (source)...
> 	Loading /etc/emacs/site-start.d/50dictem.el (source)...
> 	Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
> 	Loading debian-ispell...
> 	Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
> 	Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
> 	Loading /etc/emacs/site-start.d/50global.el (source)...
> 	Loading /etc/emacs/site-start.d/50mu4e.el (source)...
> 	Hello, Debian!

This only happens with old style addons.  Once we have finished
migrating all addons in the archive to our newer tooling you won't see
this.

-- 
Sean Whitton



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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-06  6:01                 ` Sean Whitton
@ 2020-07-06  6:38                   ` Dmitry Alexandrov
  2020-07-07  4:51                     ` Sean Whitton
  0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Alexandrov @ 2020-07-06  6:38 UTC (permalink / raw)
  To: Sean Whitton
  Cc: Friedrich Beckmann, John Darrington, emacs-devel, Stefan Monnier,
	PSPP Development Mailing List, mail

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

Sean Whitton <spwhitton@spwhitton.name> wrote:
> On Mon 06 Jul 2020 at 08:53AM +03, Dmitry Alexandrov wrote:
>> Sean Whitton <spwhitton@spwhitton.name> wrote:
>>> On Sun 05 Jul 2020 at 08:35PM +02, John Darrington wrote:
>>>> Sure.  But from a user's perspective I don't see the advantage in that.  I mean what is the difference between typing "apt-get install pspp-mode" and "M-x package-install 'pspp-mode" ?
>>>
>>> From the perspective of those of us working on packaging Emacs addons in Debian, significant advantages are
>>>
>>> 1) the way addons work doesn't change within a Debian stable release, just like Emacs itself doesn't change within a Debian stable release
>>>
>>> 2) addons get installed using Debian's mechanisms for a secure software supply chain, rather than relying on https alone.
>>
>> 3) they are automatically available to  #!/usr/bin/emacs --script  scripts; and pollute stderr at every run:

> This only happens with old style addons.  Once we have finished migrating all addons in the archive to our newer tooling you won't see this.

The first part of the advantage will be still valid, though, right?  That is, they are prepended to ‘load-path’ even with -q / --batch / --script, while package.el-managed packages do not.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* Re: [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting
  2020-07-06  6:38                   ` Dmitry Alexandrov
@ 2020-07-07  4:51                     ` Sean Whitton
  0 siblings, 0 replies; 13+ messages in thread
From: Sean Whitton @ 2020-07-07  4:51 UTC (permalink / raw)
  To: Dmitry Alexandrov
  Cc: Friedrich Beckmann, John Darrington, emacs-devel, Stefan Monnier,
	PSPP Development Mailing List, mail

Hello,

On Mon 06 Jul 2020 at 09:38AM +03, Dmitry Alexandrov wrote:

> Sean Whitton <spwhitton@spwhitton.name> wrote:
>> On Mon 06 Jul 2020 at 08:53AM +03, Dmitry Alexandrov wrote:
>>> Sean Whitton <spwhitton@spwhitton.name> wrote:
>>>> On Sun 05 Jul 2020 at 08:35PM +02, John Darrington wrote:
>>>>> Sure.  But from a user's perspective I don't see the advantage in that.  I mean what is the difference between typing "apt-get install pspp-mode" and "M-x package-install 'pspp-mode" ?
>>>>
>>>> From the perspective of those of us working on packaging Emacs addons in Debian, significant advantages are
>>>>
>>>> 1) the way addons work doesn't change within a Debian stable release, just like Emacs itself doesn't change within a Debian stable release
>>>>
>>>> 2) addons get installed using Debian's mechanisms for a secure software supply chain, rather than relying on https alone.
>>>
>>> 3) they are automatically available to  #!/usr/bin/emacs --script  scripts; and pollute stderr at every run:
>
>> This only happens with old style addons.  Once we have finished migrating all addons in the archive to our newer tooling you won't see this.
>
> The first part of the advantage will be still valid, though, right?  That is, they are prepended to ‘load-path’ even with -q / --batch / --script, while package.el-managed packages do not.

Actually, they are added to package-directory-alist and then
package-initialize adds them to the load-path.

-- 
Sean Whitton



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

end of thread, other threads:[~2020-07-07  4:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 19:53 [ELPA] New package: pspp-mode.el for PSPP/SPSS syntax highlighting Friedrich Beckmann
2020-06-30 13:07 ` Vasilij Schneidermann
     [not found] <jwvr1twzlte.fsf-monnier+emacs@gnu.org>
2020-06-30 21:55 ` Fwd: " Friedrich Beckmann
2020-07-04 13:12   ` Stefan Monnier
2020-07-04 15:15     ` John Darrington
2020-07-05  9:44       ` Friedrich Beckmann
2020-07-05 11:18         ` John Darrington
2020-07-05 16:51         ` Sean Whitton
2020-07-05 17:14           ` Friedrich Beckmann
2020-07-05 18:35           ` John Darrington
2020-07-05 18:50             ` tomas
2020-07-05 20:20             ` Sean Whitton
2020-07-06  5:53               ` Dmitry Alexandrov
2020-07-06  6:01                 ` Sean Whitton
2020-07-06  6:38                   ` Dmitry Alexandrov
2020-07-07  4:51                     ` Sean Whitton

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