include in package.el repositories (Marmelade, ELPA, ...) #217

Closed
jrhorn424 opened this Issue Feb 25, 2012 · 13 comments

Comments

Projects
None yet
4 participants
@jrhorn424

Possibly related to #185

yasnippet-bundle doesn't play well with nXhtml. This is an old issue that isn't a problem in trunk. The issue is that the emacs-starter-kit relies heavily on ELPA. I don't much care for it myself, but the org-mode team keeps a dev snapshot updated/uploaded by cron.

There is some reluctance to pull yasnippet-bundle out of the starter-kit.

@joaotavora

This comment has been minimized.

Show comment Hide comment
@joaotavora

joaotavora Feb 25, 2012

Owner

I see, I haven't given yasnippet much attention lately, but I have to take care of this. I have to see if ELPA supports packages with that also bundle some kind of data directory or support directory, since I am thinking of pulling support for the all-in-one approach of yasnippet-bundle.el

Owner

joaotavora commented Feb 25, 2012

I see, I haven't given yasnippet much attention lately, but I have to take care of this. I have to see if ELPA supports packages with that also bundle some kind of data directory or support directory, since I am thinking of pulling support for the all-in-one approach of yasnippet-bundle.el

@jrhorn424

This comment has been minimized.

Show comment Hide comment
@jrhorn424

jrhorn424 Feb 25, 2012

I would agree with pulling support for the bundle. At least for me, adding manually my customized snippets directories is best, since yasnippet pulls in default snippets nicely. Beyond zero-configuration, yasnippet-bundle didn't add a whole lot that was visible to me.

I would agree with pulling support for the bundle. At least for me, adding manually my customized snippets directories is best, since yasnippet pulls in default snippets nicely. Beyond zero-configuration, yasnippet-bundle didn't add a whole lot that was visible to me.

@jrhorn424

This comment has been minimized.

Show comment Hide comment
@jrhorn424

jrhorn424 Feb 25, 2012

I've tried uploading a version to marmalade, but ran into some issues. The instructions were pretty straight-forward, but the only caveat I have to add is that I don't have a dev server to pull, package, and upload on a regular basis (who knows where my laptop is at any given time, or whether it's turned on). If development of yasnippet hasn't been regular lately, this isn't a huge hurdle.

If updating the package in the ELPA archive is OK, that's probably the best course anyway, since that archive is enabled by default by the starter kit packages (maybe even emacs24 itself). Changing the name from yasnippet-bundle to yasnippet might cause confusion when yasnippet-bundle is expected.

I've tried uploading a version to marmalade, but ran into some issues. The instructions were pretty straight-forward, but the only caveat I have to add is that I don't have a dev server to pull, package, and upload on a regular basis (who knows where my laptop is at any given time, or whether it's turned on). If development of yasnippet hasn't been regular lately, this isn't a huge hurdle.

If updating the package in the ELPA archive is OK, that's probably the best course anyway, since that archive is enabled by default by the starter kit packages (maybe even emacs24 itself). Changing the name from yasnippet-bundle to yasnippet might cause confusion when yasnippet-bundle is expected.

@bbatsov

This comment has been minimized.

Show comment Hide comment
@bbatsov

bbatsov Feb 27, 2012

Marmalade is not enabled on Emacs 24 by default and it's unlikely it will ever be. I don't like very much the idea of promoting dev builds via package.el. I'd much rather see yasnippet starting to tag some "stable" releases on a more regular basis. I've just became the maintainer of yasnippet in marmalade and I'd like to do something about the package there soon.

bbatsov commented Feb 27, 2012

Marmalade is not enabled on Emacs 24 by default and it's unlikely it will ever be. I don't like very much the idea of promoting dev builds via package.el. I'd much rather see yasnippet starting to tag some "stable" releases on a more regular basis. I've just became the maintainer of yasnippet in marmalade and I'd like to do something about the package there soon.

@jrhorn424

This comment has been minimized.

Show comment Hide comment
@jrhorn424

jrhorn424 Feb 27, 2012

I thought you could have dev releases in ELPA, but maybe/maybe not on http://tromey.com/elpa/. The problem I would guess is the centralized nature of that repo, as user's can't upload their own packages. I suppose Eric would be less opposed to adding an new repo by default, so marmalade is ok for my issue, but probably not in the case @bbatsov mentioned.

I thought you could have dev releases in ELPA, but maybe/maybe not on http://tromey.com/elpa/. The problem I would guess is the centralized nature of that repo, as user's can't upload their own packages. I suppose Eric would be less opposed to adding an new repo by default, so marmalade is ok for my issue, but probably not in the case @bbatsov mentioned.

@bbatsov

This comment has been minimized.

Show comment Hide comment
@bbatsov

bbatsov Feb 27, 2012

The original ELPA is dead (no longer maintained/updated). Since package.el was move into Emacs core for Emacs 24 there is now a new default repo - http://elpa.gnu.org/ Submitting packages there is pretty hard though. Btw, there are other "starter kits" that make heavy use of package.el like https://github.com/bbatsov/emacs-prelude That aside - updating packages is a bit problematic currently and dev builds have a tendency to be a bit buggy from time to time.

bbatsov commented Feb 27, 2012

The original ELPA is dead (no longer maintained/updated). Since package.el was move into Emacs core for Emacs 24 there is now a new default repo - http://elpa.gnu.org/ Submitting packages there is pretty hard though. Btw, there are other "starter kits" that make heavy use of package.el like https://github.com/bbatsov/emacs-prelude That aside - updating packages is a bit problematic currently and dev builds have a tendency to be a bit buggy from time to time.

@joaotavora

This comment has been minimized.

Show comment Hide comment
@joaotavora

joaotavora Feb 27, 2012

Owner

@bbatsov you're right about dev builds and I'll try to tag release 0.7 soon, I develop yasnippet intermitently when I find the time...

Still, how does package.el handle packages that need some kind of data-directory? I've just gotten rid of yasnippet-bundle.el: the advantages it used to provide were zero-configuration and much faster loading of snippets.

The latter can now be achieved with the new yas/compile-snippets and the former I plan to let package.el or other package manager handle. We would need a place to store a default snippet collection and have yas/snippet-dirs point to that.

Also, it would be nice if the yasnippet engine and snippet collections could be separated into different packages, collections depending on the core yasnippet package. Do you think that's possible?

Owner

joaotavora commented Feb 27, 2012

@bbatsov you're right about dev builds and I'll try to tag release 0.7 soon, I develop yasnippet intermitently when I find the time...

Still, how does package.el handle packages that need some kind of data-directory? I've just gotten rid of yasnippet-bundle.el: the advantages it used to provide were zero-configuration and much faster loading of snippets.

The latter can now be achieved with the new yas/compile-snippets and the former I plan to let package.el or other package manager handle. We would need a place to store a default snippet collection and have yas/snippet-dirs point to that.

Also, it would be nice if the yasnippet engine and snippet collections could be separated into different packages, collections depending on the core yasnippet package. Do you think that's possible?

@joaotavora

This comment has been minimized.

Show comment Hide comment
@joaotavora

joaotavora Feb 27, 2012

Owner

Renamed this issue to reflect what we're discussing

Owner

joaotavora commented Feb 27, 2012

Renamed this issue to reflect what we're discussing

@bbatsov

This comment has been minimized.

Show comment Hide comment
@bbatsov

bbatsov Feb 27, 2012

Well, a package like yasnippet is packaged as tarball and when installed by package.el it will be in a folder that has everything from that tarball. We can use the load file name of the yasnippet.el to determine the relative folder of its default snippet collection. Snippets distributed as separate packages should simply register their installtion folder in yas/snipper-dirs like this:

;;;###autoload
(when load-file-name
  (add-to-list 'yas/snippet-dirs
               (file-name-as-directory (file-name-directory load-file-name))))

Similar code should be used for the default snippet collection.

We'd also need a yasnippet-pkg.el file with the following contents added to the project:

(define-package
  "yasnippet"
  "0.7.0"
  "yasnippet is template system for Emacs.")

bbatsov commented Feb 27, 2012

Well, a package like yasnippet is packaged as tarball and when installed by package.el it will be in a folder that has everything from that tarball. We can use the load file name of the yasnippet.el to determine the relative folder of its default snippet collection. Snippets distributed as separate packages should simply register their installtion folder in yas/snipper-dirs like this:

;;;###autoload
(when load-file-name
  (add-to-list 'yas/snippet-dirs
               (file-name-as-directory (file-name-directory load-file-name))))

Similar code should be used for the default snippet collection.

We'd also need a yasnippet-pkg.el file with the following contents added to the project:

(define-package
  "yasnippet"
  "0.7.0"
  "yasnippet is template system for Emacs.")
@joaotavora

This comment has been minimized.

Show comment Hide comment
@joaotavora

joaotavora Feb 27, 2012

Owner

@bbatsov, I'm afraid I'm not very familiar with package.el (and even autoloads make my brain hurt a bit :-) ), so just to get this straight...

  • For the default snippet collection bundled with yasnippet use the load-file-name technique. That's OK, it's what yasnippet.el already uses to initialise yas/snippet-dirs in the (defcustom yas/snippet-dirs ... call. Is that enough or do I need/should provide that autoload somewhere else?
  • For other snippet collections, the load-file-name technique should be used as well, but it would need some my-collection.el file that would basically have only that statement, right? It would also need some code to specify it depends on the yasnippet package...
Owner

joaotavora commented Feb 27, 2012

@bbatsov, I'm afraid I'm not very familiar with package.el (and even autoloads make my brain hurt a bit :-) ), so just to get this straight...

  • For the default snippet collection bundled with yasnippet use the load-file-name technique. That's OK, it's what yasnippet.el already uses to initialise yas/snippet-dirs in the (defcustom yas/snippet-dirs ... call. Is that enough or do I need/should provide that autoload somewhere else?
  • For other snippet collections, the load-file-name technique should be used as well, but it would need some my-collection.el file that would basically have only that statement, right? It would also need some code to specify it depends on the yasnippet package...
@bbatsov

This comment has been minimized.

Show comment Hide comment
@bbatsov

bbatsov Feb 27, 2012

Yep, that the gist of it. For the first point - you're probably already covered, but I'll have to take a look at the actual code to be certain. package.el automatically extracts all autoloads from a package and loads them on package/initialize. The code you have to put in my-collection.el to make it depend on yasnippet is actually a special comment. The structure of the my-collection.el should be something like:

;;; yasnippet-ruby.el --- ruby snippets

;; Copyright xxx

;; Author: xxx
;; URL: xxx
;; Version: 0.7.0
;; Package-Requires: ((yasnippet "0.7.0"))

;; Code goes here

;;; yasnippet-ruby.el ends here

bbatsov commented Feb 27, 2012

Yep, that the gist of it. For the first point - you're probably already covered, but I'll have to take a look at the actual code to be certain. package.el automatically extracts all autoloads from a package and loads them on package/initialize. The code you have to put in my-collection.el to make it depend on yasnippet is actually a special comment. The structure of the my-collection.el should be something like:

;;; yasnippet-ruby.el --- ruby snippets

;; Copyright xxx

;; Author: xxx
;; URL: xxx
;; Version: 0.7.0
;; Package-Requires: ((yasnippet "0.7.0"))

;; Code goes here

;;; yasnippet-ruby.el ends here
@rubikitch

This comment has been minimized.

Show comment Hide comment
@rubikitch

rubikitch Jul 19, 2012

Contributor

yasnippet in Marmalade is old (0.6.1) now.
I think some users get confused.

Contributor

rubikitch commented Jul 19, 2012

yasnippet in Marmalade is old (0.6.1) now.
I think some users get confused.

@joaotavora

This comment has been minimized.

Show comment Hide comment
@joaotavora

joaotavora Jul 22, 2012

Owner

I tried to upload yasnippet to Marmelade once, it didn't work. I contacted the author and got no response. Also forgot to post here, so sorry. I recommend:

  • Melpa http://melpa.milkbox.net
  • El-get (ensure you have the latest recipe)
  • Wait for YASnippet's inclusion in the official elpa.gnu.org repositories, which I hope will be soon, (YASnippet now belongs to the FSF)

Giving up on Marmelade, see http://batsov.com/articles/2012/02/19/package-management-in-emacs-the-good-the-bad-and-the-ugly/ for a rationale that I imported :-)

Owner

joaotavora commented Jul 22, 2012

I tried to upload yasnippet to Marmelade once, it didn't work. I contacted the author and got no response. Also forgot to post here, so sorry. I recommend:

  • Melpa http://melpa.milkbox.net
  • El-get (ensure you have the latest recipe)
  • Wait for YASnippet's inclusion in the official elpa.gnu.org repositories, which I hope will be soon, (YASnippet now belongs to the FSF)

Giving up on Marmelade, see http://batsov.com/articles/2012/02/19/package-management-in-emacs-the-good-the-bad-and-the-ugly/ for a rationale that I imported :-)

@joaotavora joaotavora closed this Jul 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment