unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: Integrating package.el
Date: Mon, 08 Mar 2010 11:53:34 -0600	[thread overview]
Message-ID: <87wrxmg0o1.fsf@lifelogs.com> (raw)
In-Reply-To: jwviq96vjzm.fsf-monnier+emacs@gnu.org

On Mon, 08 Mar 2010 12:01:52 -0500 Stefan Monnier <monnier@IRO.UMontreal.CA> wrote: 

Tom> I think the default should be to activate the most recent package, and
Tom> to activate a package at install time.  So, if the user picks a specific
Tom> older version to activate (or equivalently deactivates the most recent
Tom> version), record that, and take it into account during activation.

>> So it's a version override alist, where a missing entry implies the user
>> wants the latest?  Do you mean something like this:

>> ((package1 (repository1 path-to-specific-version1)) 
>> (package2 (repository2 path-to-specific-version2)))

>> or am I misunderstanding something?

SM> Don't know about you, but I seem to be missing something: why is the
SM> word "repository" used here?  AFAIK the "repository" for package.el are
SM> (typically remote) locations from where to download packages, and they
SM> should have no interaction whatsoever with the part that worries about
SM> installation and activation of packages (just like Debian's dpkg has no
SM> idea about repositories).

I thought it made sense to remember the repository that a particular
version came from, so selection (for activation) and warning messages
are more helpful.  But this can be guessed based on the path prefix so
it's not strictly necessary, and you seem to be looking for package
management that's less tied to repositories anyhow.  So forget the above
and see if the following makes sense.

SM> BTW, my take on package activation and selection of versions (which IIRC
SM> I already discussed with Tom a while back and we agreed to disagree) is
SM> that activation of a package is controlled by lines in .emacs that take
SM> a form similar to:

SM>    (load "/some/where/package/init/file.el" 'package)

SM> so there is no search or selection of package version at startup-time.

SM> This means that when a new version of a package is installed, Emacs has
SM> various ways to react to it:
SM> - don't do anything, and at the next startup warn the user that the
SM>   package he requested doesn't exist any more because it was replaced by
SM>   a new version.

This warning is always necessary because packages can get removed by
external agents as well (so the user doesn't know the load path is
incorrect).  So there could be no new version at all.

SM> - update the "load" line right when the package gets upgraded (tho only
SM>   for the .emacs of the user that performs the upgrade).

Too many potential problems here, I'd stay away from this.

SM> - use symlinks like "/some/where/elisp/sml-mode" pointing to
SM>   "sml-mode-4.1" and use (load "/some/where/elisp/sml-mode/startup.el")
SM>   so the symlink can be adjusted during the upgrade.

I did this for 7 years in a lab I was managing and it's not fun.  You
can automate some of the tedium but inevitably it becomes unwieldy.
If the user or admin wants to do it this way, let them manage it
externally, there are decent tools to automate it or they can write
ELisp wrappers to fit their environment.

Also symlinks don't work reliably in some environments.

SM> - use a different load, like

SM>    (package-activate-latest "/some/where/elisp/sml-mode")

SM>   which will look for the latest sml-mode package installed in
SM>   /some/where/elisp/, or

SM>    (package-activate-latest "sml-mode")

SM>   which will look for the latest sml-mode package installed in
SM>   any of the installation targets.

For the sake of backward compatibility this seems like the best option.
(load) and (require) can keep working normally.  Users can then
transition to the package.el management gradually.  Emacs can start
using these options gradually too.

Version overrides can be then specified as

(package-activate-specific "sml-mode" "specific-version")
(package-activate-specific "/path/to/sml-mode" "specific-version")

Together with the startup warnings (which can be issued by
package-activate-{specific,latest}) I think this approach makes sense.

Ted





  reply	other threads:[~2010-03-08 17:53 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-26  2:55 Autoload from a web page? Lennart Borgman
2009-12-27  3:13 ` Richard Stallman
2009-12-27  3:24   ` Lennart Borgman
2009-12-28 18:48     ` Richard Stallman
2009-12-28 18:55       ` Lennart Borgman
2009-12-29  1:32         ` Stephen J. Turnbull
2009-12-29  1:39           ` Lennart Borgman
2009-12-29  2:45         ` joakim
2009-12-29  2:54           ` Lennart Borgman
2009-12-29  4:52             ` Tom Tromey
2009-12-29 22:25               ` Lennart Borgman
2009-12-30  6:13                 ` Richard Stallman
2009-12-30 18:06                 ` Jonas Bernoulli
2009-12-30 18:30                   ` Stefan Monnier
2009-12-30 19:10                     ` Jonas Bernoulli
2010-01-01  0:40                     ` Phil Hagelberg
2010-01-01 19:27                     ` Tom Tromey
2010-01-01 19:26                   ` Tom Tromey
2010-01-04 18:12                   ` Ted Zlatanov
2009-12-29 15:11           ` Ted Zlatanov
2009-12-29 18:46             ` Richard Stallman
2009-12-29 21:14               ` unsupported packages area in the Emacs repo (was: Autoload from a web page?) Ted Zlatanov
2009-12-29 21:21                 ` Deniz Dogan
2009-12-29 21:38                   ` unsupported packages area in the Emacs repo Ted Zlatanov
2009-12-29 21:36                 ` Tom Tromey
2009-12-30 16:15                   ` Ted Zlatanov
2009-12-31  5:32                     ` Phil Hagelberg
2010-01-01 19:18                     ` Tom Tromey
2010-01-03  5:38                       ` Integrating package.el (was Re: unsupported packages area in the Emacs repo) Phil Hagelberg
2010-01-04 17:55                         ` Integrating package.el Ted Zlatanov
2010-01-04 19:51                           ` Tom Tromey
2010-01-05  5:02                             ` Phil Hagelberg
2010-01-05  5:37                               ` Lennart Borgman
2010-01-05 15:06                                 ` Stefan Monnier
2010-01-05 16:03                                   ` Ted Zlatanov
2010-01-05 16:47                                     ` Stefan Monnier
2010-01-05 20:18                                       ` Ted Zlatanov
2010-01-05 23:50                                         ` Jonas Bernoulli
2010-01-06 20:45                                           ` Richard Stallman
2010-01-06 21:49                                             ` Ted Zlatanov
2010-01-09  5:40                                       ` Phil Hagelberg
2010-01-09 14:32                                         ` Richard Stallman
2010-01-09 17:47                                           ` Phil Hagelberg
2010-01-10 10:41                                             ` Richard Stallman
2010-01-10 11:33                                               ` Stephen J. Turnbull
2010-01-10 14:04                                                 ` Chong Yidong
2010-01-10 16:00                                                   ` joakim
2010-01-10 20:43                                                     ` Phil Hagelberg
2010-01-10 20:07                                                   ` Phil Hagelberg
2010-01-10 21:24                                                     ` Stefan Monnier
2010-01-10 23:02                                                       ` Phil Hagelberg
2010-01-11  3:28                                                         ` Stefan Monnier
2010-01-14  3:12                                                           ` Phil Hagelberg
2010-01-19 11:40                                                         ` Phil Hagelberg
2010-01-19 17:17                                                           ` Dan Nicolaescu
2010-02-22 19:22                                                           ` Ted Zlatanov
2010-02-22 20:36                                                             ` joakim
2010-02-23 22:25                                                             ` Stefan Monnier
2010-02-24 21:20                                                               ` Ted Zlatanov
2010-02-25 20:05                                                                 ` Stefan Monnier
2010-03-01 14:59                                                                   ` Ted Zlatanov
2010-03-01 16:32                                                                     ` Jonas Bernoulli
2010-03-01 17:14                                                                       ` Ted Zlatanov
2010-03-01 20:59                                                                         ` Jonas Bernoulli
2010-03-02 17:39                                                                         ` Richard Stallman
2010-03-02 18:46                                                                           ` Ted Zlatanov
2010-03-01 21:19                                                                     ` Stefan Monnier
2010-03-02 13:34                                                                       ` Ted Zlatanov
2010-03-01 21:37                                                                     ` Jonas Bernoulli
2010-03-01 22:18                                                                       ` Štěpán Němec
2010-03-01 22:30                                                                         ` Štěpán Němec
2010-03-01 23:00                                                                         ` Jonas Bernoulli
2010-03-02 13:38                                                                       ` Ted Zlatanov
2010-03-03 20:13                                                                         ` Tom Tromey
2010-03-04  5:42                                                                           ` Phil Hagelberg
2010-03-02 19:03                                                                       ` Davis Herring
2010-02-25 22:56                                                               ` David De La Harpe Golden
2010-03-04  5:39                                                             ` Phil Hagelberg
2010-03-04  7:29                                                               ` Stephen J. Turnbull
2010-03-04 18:27                                                                 ` Stefan Monnier
2010-03-05  4:41                                                                   ` Stephen J. Turnbull
2010-03-04 13:54                                                               ` Ted Zlatanov
2010-03-04 18:29                                                               ` Stefan Monnier
2010-03-04 18:33                                                                 ` Tom Tromey
2010-03-07 22:58                                                                   ` Phil Hagelberg
2010-03-04 20:39                                                                 ` Ted Zlatanov
2010-03-07 23:16                                                                 ` Phil Hagelberg
2010-03-08  3:17                                                                   ` Tom Tromey
2010-03-08 14:55                                                                     ` Ted Zlatanov
2010-03-08 17:01                                                                       ` Stefan Monnier
2010-03-08 17:53                                                                         ` Ted Zlatanov [this message]
2010-03-04 18:30                                                               ` Tom Tromey
2010-03-05  0:22                                                                 ` Stefan Monnier
2010-03-01 14:43                                                           ` Ted Zlatanov
2010-03-01 16:26                                                             ` Jonas Bernoulli
2010-03-01 17:28                                                               ` Ted Zlatanov
2010-03-01 18:06                                                                 ` Tom Tromey
2010-03-01 21:22                                                                   ` Jonas Bernoulli
2010-03-03 20:15                                                                     ` Tom Tromey
2010-03-03 20:22                                                                       ` Ted Zlatanov
2010-03-03 22:21                                                                         ` Tom Tromey
2010-03-02 13:31                                                                   ` Ted Zlatanov
2010-03-01 21:09                                                                 ` Jonas Bernoulli
2010-01-11  3:09                                                   ` Stephen J. Turnbull
2010-01-12 20:06                                         ` Ted Zlatanov
2010-01-12 21:37                                           ` Phil Hagelberg
2010-01-05 15:50                             ` Ted Zlatanov
2010-01-05 16:42                               ` Stefan Monnier
2010-01-05 17:51                                 ` Installation, activation and setup of packages (e.g. Gnus) (was: Integrating package.el) Ted Zlatanov
2010-01-05 19:43                                   ` Installation, activation and setup of packages (e.g. Gnus) Stefan Monnier
2010-01-05 22:28                                     ` Gnus encouragement of GMail (was: Installation, activation and setup of packages (e.g. Gnus)) Ted Zlatanov
2010-01-05 17:27                               ` Installation, activation and setup of packages (e.g. Gnus) (was: Integrating package.el) Reiner Steib
2010-01-05 18:03                               ` Integrating package.el Phil Hagelberg
2010-01-05 18:40                                 ` Ted Zlatanov
2010-01-05 19:14                               ` Tom Tromey
2010-01-05 20:04                                 ` Ted Zlatanov
2010-01-05 23:19                                   ` Tom Tromey
2010-01-06 15:42                                     ` Ted Zlatanov
2009-12-30 17:16                   ` unsupported packages area in the Emacs repo Jonas Bernoulli
2010-01-01 19:21                     ` Tom Tromey
2009-12-29  5:22         ` Autoload from a web page? Richard Stallman
2009-12-29  5:29           ` Lennart Borgman
2010-01-02 15:45             ` Richard Stallman
2010-01-04  2:26               ` Lennart Borgman
2010-01-04 16:23                 ` Richard Stallman
2009-12-29 17:05 ` Stefan Monnier
2009-12-30 16:30   ` Ted Zlatanov
2009-12-30 16:58     ` Stefan Monnier
2009-12-30 17:08       ` Lennart Borgman
  -- strict thread matches above, loose matches on Subject: below --
2010-01-10 22:06 Integrating package.el MON KEY

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=87wrxmg0o1.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@gnu.org \
    /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).