unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* development practices for ELPA packages
@ 2020-11-18 21:47 Yoni Rabkin
  2020-11-18 22:10 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yoni Rabkin @ 2020-11-18 21:47 UTC (permalink / raw)
  To: emacs-devel


Hello,

I currently have Emms and rt-liberation in ELPA. Users of those packages
are happy with this. However, as a developer I'm less happy. I would
like to ask for help in learning how people with packages in ELPA
develop them.

Right now I'm working on the next release of rt-liberation. I would like
to tell Emacs: "load all of the ELPA packages normally, but when you get
to rt-liberation please load my local, non-packaged, version from
/devel/rt-liberation"

I know I can give the package manager a list of packages to load, but
that doesn't help me. I want to tell the package manage which package
_not_ to load, and what to load instead.

How do people who work on ELPA packages manage this?

Thank you in advance.

-- 
   "Cut your own wood and it will warm you twice"



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

* Re: development practices for ELPA packages
  2020-11-18 21:47 development practices for ELPA packages Yoni Rabkin
@ 2020-11-18 22:10 ` Stefan Monnier
  2020-11-18 23:36 ` Stephen Leake
  2020-11-19  7:40 ` Michael Albinus
  2 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2020-11-18 22:10 UTC (permalink / raw)
  To: Yoni Rabkin; +Cc: emacs-devel

> I currently have Emms and rt-liberation in ELPA. Users of those packages
> are happy with this. However, as a developer I'm less happy. I would
> like to ask for help in learning how people with packages in ELPA
> develop them.
>
> Right now I'm working on the next release of rt-liberation. I would like
> to tell Emacs: "load all of the ELPA packages normally, but when you get
> to rt-liberation please load my local, non-packaged, version from
> /devel/rt-liberation"

> I know I can give the package manager a list of packages to load, but
> that doesn't help me. I want to tell the package manage which package
> _not_ to load, and what to load instead.
>
> How do people who work on ELPA packages manage this?

Personally, I arrange to have `/devel/` (or equivalent) in my
`package-directory-list` so I don't install `rt-liberation` into
`~/.emacs.d/elpa` at all, instead package.el uses `/devel/rt-liberation`
as the place where `rt-liberation` was installed.


        Stefan




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

* Re: development practices for ELPA packages
  2020-11-18 21:47 development practices for ELPA packages Yoni Rabkin
  2020-11-18 22:10 ` Stefan Monnier
@ 2020-11-18 23:36 ` Stephen Leake
  2020-11-20 15:04   ` Yoni Rabkin
  2020-11-20 15:22   ` Stefan Monnier
  2020-11-19  7:40 ` Michael Albinus
  2 siblings, 2 replies; 6+ messages in thread
From: Stephen Leake @ 2020-11-18 23:36 UTC (permalink / raw)
  To: Yoni Rabkin; +Cc: emacs-devel

Yoni Rabkin <yoni@rabkins.net> writes:

> Right now I'm working on the next release of rt-liberation. I would like
> to tell Emacs: "load all of the ELPA packages normally, but when you get
> to rt-liberation please load my local, non-packaged, version from
> /devel/rt-liberation"

Stefan's suggestion works if your devel directory looks like an
installed package. ada-mode doesn't; I put the devel version in
load-path, before the installed package directory.

-- 
-- Stephe

Written from unceded ancestral homelands of the Huichiun, an Ohlone
people,for which I pay Shuumi Land Tax.



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

* Re: development practices for ELPA packages
  2020-11-18 21:47 development practices for ELPA packages Yoni Rabkin
  2020-11-18 22:10 ` Stefan Monnier
  2020-11-18 23:36 ` Stephen Leake
@ 2020-11-19  7:40 ` Michael Albinus
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2020-11-19  7:40 UTC (permalink / raw)
  To: Yoni Rabkin; +Cc: emacs-devel

Yoni Rabkin <yoni@rabkins.net> writes:

> Hello,

Hi,

> I currently have Emms and rt-liberation in ELPA. Users of those packages
> are happy with this. However, as a developer I'm less happy. I would
> like to ask for help in learning how people with packages in ELPA
> develop them.
>
> Right now I'm working on the next release of rt-liberation. I would like
> to tell Emacs: "load all of the ELPA packages normally, but when you get
> to rt-liberation please load my local, non-packaged, version from
> /devel/rt-liberation"
>
> I know I can give the package manager a list of packages to load, but
> that doesn't help me. I want to tell the package manage which package
> _not_ to load, and what to load instead.
>
> How do people who work on ELPA packages manage this?

I would call "make archive" on the top level of the ELPA directory. And
then I would declare a local ELPA archive with higher priority, like

(add-to-list 'package-archives
             '("local" . "/home/albinus/src/elpa/archive/packages/"))

(add-to-list 'package-archive-priorities
	     '("local" . 3))
(add-to-list 'package-archive-priorities
	     '("gnu" . 2))
(add-to-list 'package-archive-priorities
	     '("melpa" . 1))

> Thank you in advance.

Best regards, Michael.



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

* Re: development practices for ELPA packages
  2020-11-18 23:36 ` Stephen Leake
@ 2020-11-20 15:04   ` Yoni Rabkin
  2020-11-20 15:22   ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Yoni Rabkin @ 2020-11-20 15:04 UTC (permalink / raw)
  To: emacs-devel

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> Yoni Rabkin <yoni@rabkins.net> writes:
>
>> Right now I'm working on the next release of rt-liberation. I would like
>> to tell Emacs: "load all of the ELPA packages normally, but when you get
>> to rt-liberation please load my local, non-packaged, version from
>> /devel/rt-liberation"
>
> Stefan's suggestion works if your devel directory looks like an
> installed package. ada-mode doesn't; I put the devel version in
> load-path, before the installed package directory.

That works for me. I'll use this technique to make the "devel" version
override the package I'm working on.

Thank you, and thank you to Stefan and Michael as well for providing
input.

-- 
   "Cut your own wood and it will warm you twice"



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

* Re: development practices for ELPA packages
  2020-11-18 23:36 ` Stephen Leake
  2020-11-20 15:04   ` Yoni Rabkin
@ 2020-11-20 15:22   ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2020-11-20 15:22 UTC (permalink / raw)
  To: Stephen Leake; +Cc: Yoni Rabkin, emacs-devel

>> Right now I'm working on the next release of rt-liberation. I would like
>> to tell Emacs: "load all of the ELPA packages normally, but when you get
>> to rt-liberation please load my local, non-packaged, version from
>> /devel/rt-liberation"
> Stefan's suggestion works if your devel directory looks like an
> installed package. ada-mode doesn't;

Making it look like an installed package is easy: it just requires
a <PKG>-pkg.el and <PKG>-autoloads.el file.

elpa.git has code to create&refresh those files.  It's not currently
very convenient to use that code in a specific directory, but that would
be easy to fix.

The creation of <PKG>-autoloads.el is done by the following rule in the
GNUmakefile:

    %-autoloads.el:
        @#echo 'Generating autoloads for $@'
        @cd $(dir $@) &&                                                   \
          $(EMACS) -l $(CURDIR)/admin/archive-contents.el                  \
              --eval "(require 'package)"                                  \
              --eval "(load (expand-file-name \"../names/names-autoloads.el\") t t)" \
              --eval "(package-generate-autoloads \"$$(basename $$(pwd))\" \
                                                  \"$$(pwd)\")"

and the rule for <PKG>-pkg.el is:

    %-pkg.el: %.el
        @echo 'Generating description file $@'
        @$(EMACS) \
            --eval '(require (quote package))' \
            --eval '(setq b (find-file-noselect "$<"))' \
            --eval '(setq d (with-current-buffer b (package-buffer-info)))' \
            --eval '(package-generate-description-file d "$@")'


-- Stefan




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

end of thread, other threads:[~2020-11-20 15:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 21:47 development practices for ELPA packages Yoni Rabkin
2020-11-18 22:10 ` Stefan Monnier
2020-11-18 23:36 ` Stephen Leake
2020-11-20 15:04   ` Yoni Rabkin
2020-11-20 15:22   ` Stefan Monnier
2020-11-19  7:40 ` Michael Albinus

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