unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Radon Rosborough <radon.neon@gmail.com>
Cc: emacs-devel@gnu.org
Subject: RE: Summary and next steps for (package-initialize)
Date: Sun, 20 Aug 2017 17:33:54 -0700 (PDT)	[thread overview]
Message-ID: <7bf7e0e4-1285-4df5-a21c-a279888891e0@default> (raw)
In-Reply-To: <CADB4rJGL5s6viPkM68nWe0Sd=tYOEbakQEPV6VmtDovx1YEBig@mail.gmail.com>

> Let me clarify. I see the following spectrum in this debate:
> 
>     People who want package.el to be enabled by default in spite of
>     the resulting UX problems (too much magic, automatic modification
>     of init-file).
> 
>     ^
>     | (a) Have Emacs write (package-initialize) into the existing
>     |     init-file at startup.
>     |
>     | (b) Have Emacs create a template init-file with
>     |     (package-initialize) at startup, if one doesn't exist
>     |     already.
>     |
>     | (c) Don't create (package-initialize) calls anywhere, but still
>     |     call package-initialize in startup.el.
>     |
>     | (d) Don't call (package-initialize) anywhere; the user must call
>     |     it manually in their init-file.
>     v
> 
>     People who want package.el to be disabled by default in spite of
>     the resulting UX problems (package management system doesn't work
>     out of the box).
> 
> You and I are both at point (d). However, this is a rather extreme
> position, so I am not arguing for point (d) or even point (c), but
> rather point (b), because I view point (b) as an improvement over
> point (a), which is the current situation.
> 
> Most people on this thread view any solution that doesn't involve
> package.el working out of the box as a non-starter. That is why I am
> not proposing such a solution. Instead, I am proposing a solution
> which has much less potential for annoyance, while still having
> package.el work out of the box.
> 
> Does this clear up the confusion?

I guess so, and I appreciate the time you spent spelling that out.

What I would actually prefer, IIUC, is both of these at the same time:

* package.el to be enabled  by default
* package.el to be disabled by default

;-)

Rather, as a user I don't want to have to prescribe whether
package.el should be enabled or disabled, by default or
otherwise.  I don't want to have to care about package.el.

I would like accessing packages to just happen, when/if I
ask to access them - e.g. if I do `M-x list-packages'.

And if I have updated whatever persistent info is needed for
it, I would like Emacs to automatically enable this or that
package when I start Emacs.  It should be easy for me to
tell Emacs that I prefer to automatically enable this or that
package on startup.

I would want something like what exists for bookmark.el.
If/when you try to access bookmarks then your bookmarks file
is loaded automatically.  It's on-demand, but your bookmarks
file is separate from your init file.

> > > I agree wholeheartedly with everything you have said. However, a
> > > significant number of people on this list disagree,
> >
> > Hm.  I haven't read this thread very carefully.  But I also
> > haven't gotten the impression that a significant number of
> > people here have argued for generating init files.
> 
> You're right. I meant that you're arguing that Emacs shouldn't
> go through contortions to make package.el work out of the box,

Not sure what you mean.  I don't care whether Emacs goes
through such contorsions.  I don't think users should go
through contorsions.

If by Emacs going through contortions you mean Emacs adding
stuff to user init files or creating new init files, then yes,
I don't think Emacs should do that.

If by Emacs going through contortions you mean that it does
some work under the covers then no, I don't care whether it
does that.

> and people disagree with that. Meanwhile I'm just trying
> to make the contortions less horrifying, as an immediate
> improvement to the current situation.
> 
> > So I can't say whether your proposal is better or is a
> > compromise of some sort.
> 
> The part of my proposal that is relevant to you is the part where
> Emacs doesn't try to write (package-initialize) into your init-file
> automatically. Do you consider that an improvement?

I've already said that I don't think Emacs should write to
init files.  (And I don't think it should have to do that.
Why is that considered a hard requirement?)

But I've also said that if the package system needs to
record some info persistently for a user then it should use
a different file from the init file.  That doesn't mean that
I disagree with Emacs writing such info locally.  It just
means hands-off init files, please.

> > I don't like the idea of Emacs generating an init file if there is
> > none OR of Emacs messing with an existing init file.
> 
> Same here. Unfortunately, the technical challenges in making
> package.el work out of the box pretty much guarantee we have
> to do one of these.

I don't see why.  But I don't pretend to be familiar with the
technical challenges.  If it can do what it needs to do by
writing to an init file then why can't it do what it needs to
do by using a separate file?

Is the problem the difficulty for a user to determine where
in the init file to load the separate file?  If so, then
Emacs can perhaps detect bad placement - not by examining
the init file but by the effects of this or that inappropriate
placement.  E.g., if it is loaded before XYZ has been defined
or initialized then tell the user to move it etc.

> Now, whether or not it's worth all this trouble to make
> package.el work out of the box is another debate, but that's a much
> harder debate than this one, which is why I'm not arguing it (at least
> for now).
> 
> > I don't see your proposal as a "middle way", for users.
> 
> It's a middle way because creating a default init-file is less
> intrusive than modifying an existing one, but still more intrusive
> than doing nothing at all.

Debatable whether it is less bothersome/intrusive for a user.
In any case, I don't argue that Emacs must do nothing at all.
I argue (admittedly naively) that Emacs should keep its hands
off init files; that's all.
 
> > Naively, I'd suggest that package.el should do what custom.el
> > and bookmark.el and lots of other libraries do: Use a separate
> > Lisp file for persisting info the library needs - a file whose
> > name/location the user can set using an option.
> >
> > If that would mean that a user might need to load that file
> > at an appropriate place in an init file, so be it.  The
> > package system might well require some understanding of it
> > before using it.
> 
> Again, agreed -- but emacs-devel does not want the user to have to
> have any understanding of the package system before using it, so I'm
       ^^^
> not making that argument.

I'll make the argument.  If Emacs cannot make it easy to use
packages without it writing to init files then it sounds like
a design flaw and time to get back to the drawing board.

> (By the way, you're spot on with the separate Lisp file idea -- in
> fact, package.el already does this, and the separate Lisp file
> [directory] is ~/.emacs.d/elpa. This debate is over how to force users
> to use package.el by activating it automatically. Again, while neither
> of us thinks such a thing should be done, I think it's more realistic
> to try to get it done in the least bad way possible, at least for
> now.)

I see.  Too bad.

> > FWIW, I am also not in favor of Customize writing to your
> > init file.
>
> Same.
> 
> > If it is difficult for users to find an appropriate place in
> > their init file to load whatever state/settings file package.el
> > might require, or to call `package-initialize' or whatever,
> > then perhaps the package system could be improved to help with
> > that somehow.
> 
> The solution here is improving the documentation of package.el,
> which I've already suggested.

Even without being familiar with that doc, I can pretty much
blindly guess "+1" to that suggestion.

But as someone will no doubt point out, lots of users
(especially nowadays) do not read doc.  Create a good video
presenting the same relevant information and that might be
all that's needed.

That plus making the package system perform some checks to
recognize problematic situations resulting from inappropriate
use - and then point to relevant videos/doc etc.

IOW, if this is about pilot error then (1) improve the pilot
doc and (2) add some indicator lights or announcements that
pop up telling a pilot about a mistake s?he made and how to
correct it.

> > I say "naively" because I know next to nothing about
> > package.el, and I'm not trying to design the package system.
> 
> As someone who has in fact already written an Emacs package manager
> from scratch (straight.el), I think all your points are spot on.
> Thanks for your comments.

Thank you for your explanations.



  reply	other threads:[~2017-08-21  0:33 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-20  2:38 Summary and next steps for (package-initialize) Radon Rosborough
2017-08-20  6:10 ` Drew Adams
2017-08-20 17:20   ` Radon Rosborough
2017-08-20 18:09     ` Drew Adams
2017-08-20 18:39       ` Radon Rosborough
2017-08-21  0:33         ` Drew Adams [this message]
2017-08-21  4:08           ` Radon Rosborough
2017-08-20  8:13 ` Stefan Monnier
2017-08-20 17:21   ` Radon Rosborough
2017-08-20  8:15 ` Clément Pit-Claudel
2017-08-20 17:21   ` Radon Rosborough
2017-08-20 14:20 ` Eli Zaretskii
2017-08-20 16:37   ` Alex
2017-08-20 16:44     ` Eli Zaretskii
2017-08-20 16:46     ` Yuri Khan
2017-08-20 16:54       ` Drew Adams
2017-08-20 17:18         ` Colin Baxter
2017-08-22 21:24       ` Alex
2017-08-20 17:22   ` Radon Rosborough
2017-08-20 17:36     ` Eli Zaretskii
2017-08-20 17:54       ` Radon Rosborough
2017-08-21 16:35         ` Eli Zaretskii
2017-08-21 16:43           ` Radon Rosborough
2017-08-21 17:40             ` Eli Zaretskii
2017-08-21 20:33               ` Radon Rosborough
2017-08-22  2:37                 ` Eli Zaretskii
2017-08-22  4:52                   ` Radon Rosborough
2017-08-22  8:41                     ` Clément Pit-Claudel
2017-08-22 16:02                       ` Radon Rosborough
2017-08-22 14:33                     ` Eli Zaretskii
2017-08-22 18:09                       ` Radon Rosborough
2017-08-22 21:01                         ` Clément Pit-Claudel
2017-08-21  9:04   ` Stefan Monnier
2017-08-21 14:31     ` Eli Zaretskii
2017-08-21 16:34       ` Radon Rosborough
2017-08-21 17:47         ` Clément Pit-Claudel
2017-08-22 11:37         ` Timur Aydin
2017-08-22 16:58           ` Radon Rosborough
2017-08-22 21:04             ` Clément Pit-Claudel
2017-08-23  5:17               ` Radon Rosborough
2017-08-23 11:33                 ` Angelo Graziosi
2017-08-23 17:16                   ` Radon Rosborough
2017-08-23 13:28                 ` Drew Adams
2017-08-23 17:31                   ` Radon Rosborough
2017-08-23 18:00                     ` Drew Adams
2017-08-23 18:32                       ` Radon Rosborough
2017-08-23 20:27                         ` Drew Adams
2017-08-23 20:59                           ` Clément Pit-Claudel
2017-08-23 21:21                             ` Drew Adams
2017-08-23 21:44                               ` Clément Pit-Claudel
2017-08-23 21:53                                 ` Drew Adams
2017-08-24  0:44                               ` Radon Rosborough
2017-08-24  6:39                                 ` Drew Adams
2017-08-25  1:03                                   ` Radon Rosborough
2017-08-24 17:14                           ` Eli Zaretskii
     [not found]                           ` <<83fucg99cj.fsf@gnu.org>
2017-08-24 17:44                             ` Drew Adams
2017-08-24 18:12                               ` Clément Pit-Claudel
2017-08-24 18:29                                 ` Drew Adams
2017-08-24 21:34                                   ` Clément Pit-Claudel
2017-08-24 21:40                                     ` Drew Adams
2017-08-25  1:04                                   ` Radon Rosborough
2017-08-24 18:14                               ` Eli Zaretskii
     [not found]                               ` <<83bmn496js.fsf@gnu.org>
2017-08-24 18:36                                 ` Drew Adams
2017-08-24 18:57                                   ` Eli Zaretskii
2017-08-25  1:04                                   ` Radon Rosborough
2017-08-25  1:04                               ` Radon Rosborough
2017-08-23  3:15       ` Stefan Monnier
2017-08-24 16:47         ` Eli Zaretskii
2017-08-24 17:48           ` Stefan Monnier
2017-08-24 18:26             ` Eli Zaretskii
2017-08-25  3:52               ` Stefan Monnier
2017-08-25  3:59                 ` Radon Rosborough
2017-08-25  4:39                   ` Stefan Monnier
2017-08-25  4:45                     ` Radon Rosborough
2017-08-25  4:48                       ` Stefan Monnier
2017-08-25  6:47                 ` Eli Zaretskii
2017-08-25 11:51                   ` Stefan Monnier
2017-08-25  1:04             ` Radon Rosborough
2017-08-25  4:14               ` Stefan Monnier
2017-08-25  4:28                 ` Radon Rosborough
2017-08-25  4:47                   ` Stefan Monnier
2017-08-25 21:07                 ` Stefan Monnier
2017-08-25 21:34                   ` Radon Rosborough
2017-08-26 22:29                     ` Stefan Monnier
2017-08-26 22:33                       ` Radon Rosborough
2017-08-21 16:18     ` Radon Rosborough
2017-08-20 19:09 ` Mark Oteiza
2017-08-23 15:57 ` Nikolay Kudryavtsev
2017-08-23 18:17   ` Radon Rosborough
2017-08-23 19:17     ` Nikolay Kudryavtsev
2017-08-23 19:38       ` Radon Rosborough
2017-08-23 20:09         ` Nikolay Kudryavtsev
2017-08-24  0:13           ` Radon Rosborough
2017-08-24 13:44             ` Nikolay Kudryavtsev
2017-08-25  1:04               ` Radon Rosborough
2017-08-24 17:12           ` Eli Zaretskii
2017-08-23 22:30   ` Nathan Moreau
2017-08-24  0:54     ` Radon Rosborough
2017-08-24 11:13       ` Nathan Moreau
2017-08-24 17:02   ` Eli Zaretskii
2017-08-24 17:52     ` Nikolay Kudryavtsev
2017-08-24 18:31       ` Eli Zaretskii
2017-08-25 13:48         ` Nikolay Kudryavtsev
  -- strict thread matches above, loose matches on Subject: below --
2017-08-21  8:24 angelo.g0
2017-08-21 16:22 ` Radon Rosborough
2017-08-21 19:35   ` Angelo Graziosi

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=7bf7e0e4-1285-4df5-a21c-a279888891e0@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=radon.neon@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).