unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Payas Relekar <relekarpayas@gmail.com>,
	 Stefan Monnier <monnier@iro.umontreal.ca>,
	 emacs-devel <emacs-devel@gnu.org>
Subject: Re: Adding use-package to core
Date: Sat, 12 Nov 2022 07:25:01 +0000	[thread overview]
Message-ID: <87iljk1voy.fsf@posteo.net> (raw)
In-Reply-To: <CADwFkmkzf_D5t1y4WRRw5kEo=B8+H6Eio-9UzCTZJbbrKxJ5mw@mail.gmail.com> (Stefan Kangas's message of "Fri, 11 Nov 2022 21:42:26 -0800")

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

Stefan Kangas <stefankangas@gmail.com> writes:

> Payas Relekar <relekarpayas@gmail.com> writes:
>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>>>>> 1. Get use-package in ELPA
>>>>> 2. Complete all documentation
>>>>> 3. Prepare documentation in texinfo
>>>>>    Will cross that bridge when 2 is done.
>>>
>>> While we are at it, is there a rationale for this order?  I mean, there
>>> is no hurry, right? My misunderstanding was that the order was 2 -> 3 ->
>>> 1.  Or are you planning to have use-package ready for Emacs 29?
>>
>> If you mean merging use-package into emacs.git, that will definitely not
>> be happening (at least if I'm the only one working on it).
> [...]
>> From my understanding, ELPA has less stringent requirements for
>> documentation and testing compared to core. Since I cannot commit enough
>> time to complete all the tasks before expected 29 branch-off, ELPA is a
>> good compromise IMO.
>
> OK, I'll bite.  I have time to dedicate to this task; perhaps we can
> move quickly enough for Emacs 29.  Ultimately, the decision will be with
> the maintainers, but it seems to me that use-package.el itself is in
> shape for inclusion.

That would certainly be great1

> Could you write up a summary of what needs doing before we can add
> use-package to emacs.git?  Is it just a matter of writing up some more
> documentation, or is there more that needs doing?

Payas and I can up with the following list

  1. Get use-package in ELPA
  2. Complete all documentation
  3. Prepare documentation in texinfo
     Will cross that bridge when 2 is done.
  4. Add all relevant files to emacs.git
     TBD when 3 is done.
  5. Ensure everything loads properly

The first point has been done, but hasn't been finalised.  The most
tricky part IMO right now is to complete the .texi documentation.  Take
a look at

https://raw.githubusercontent.com/jwiegley/use-package/master/use-package.texi

I have previously commented on what has do be done here
(<87o7v37sqh.fsf@posteo.net>, <871qqhby2k.fsf@posteo.net>):

    Take a look at use-package.texi in the use-package repository.  There
    are currently two TODO that ought to be addressed.  And as the file is
    generated, the texinfo markup is probably not as idiomatic as it ought
    to be.  There are at least a few instances where @code is used instead
    of @kbd, @key or @var.  @ref where @xref/@pxref might be better.  Content-wise
    a few sections such as how to install the package will be outdated, and
    I'd rephrase the sections that mention MELPA to use ELPA examples.  I
    also notice that the spacing is inconsistent, and one should try to keep
    ensure that each full stop is followed by two spaces.

My worry here are the TODO sections -- they either have to be removed or
expanded:

--8<---------------cut here---------------start------------->8---
@node Getting Started
@chapter Getting Started

TODO@. For now, see @code{README.md}.
--8<---------------cut here---------------end--------------->8---

If the manual is pointing to the README, we might just have to convert
the Markdown document to Texi and clean it up.  My hunch is that the
README isn't written like a good manual, so it won't be that easy.

... On the other hand, if this TODO really just wants the "Getting
Started" section from the README, this should be trivial.  All one would
need is to clean up the following that I quickly converted using Pandoc:


[-- Attachment #2: Type: text/plain, Size: 1918 bytes --]

Here is the simplest @code{use-package} declaration:

@verbatim
;; This is only needed once, near the top of the file
(eval-when-compile
  ;; Following line is not needed if use-package.el is in ~/.emacs.d
  (add-to-list 'load-path "<path where use-package is installed>")
  (require 'use-package))

(use-package foo)
@end verbatim

This loads in the package @code{foo}, but only if @code{foo} is
available on your system. If not, a warning is logged to the
@code{*Messages*} buffer.

Use the @code{:init} keyword to execute code before a package is loaded.
It accepts one or more forms, up to the next keyword:

@verbatim
(use-package foo
  :init
  (setq foo-variable t))
@end verbatim

Similarly, @code{:config} can be used to execute code after a package is
loaded. In cases where loading is done lazily (see more about
autoloading below), this execution is deferred until after the autoload
occurs:

@verbatim
(use-package foo
  :init
  (setq foo-variable t)
  :config
  (foo-mode 1))
@end verbatim

As you might expect, you can use @code{:init} and @code{:config}
together:

@verbatim
(use-package color-moccur
  :commands (isearch-moccur isearch-all)
  :bind (("M-s O" . moccur)
         :map isearch-mode-map
         ("M-o" . isearch-moccur)
         ("M-O" . isearch-moccur-all))
  :init
  (setq isearch-lazy-highlight t)
  :config
  (use-package moccur-edit))
@end verbatim

In this case, I want to autoload the commands @code{isearch-moccur} and
@code{isearch-all} from @code{color-moccur.el}, and bind keys both at
the global level and within the @code{isearch-mode-map} (see next
section). When the package is actually loaded (by using one of these
commands), @code{moccur-edit} is also loaded, to allow editing of the
@code{moccur} buffer.

If you autoload no-interactive function, please use @code{:autoload}.

@verbatim
(use-package org-crypt
  :autoload org-crypt-use-before-save-magic)
@end verbatim

[-- Attachment #3: Type: text/plain, Size: 663 bytes --]


--8<---------------cut here---------------start------------->8---
@node Debugging Tools
@chapter Debugging Tools

TODO
--8<---------------cut here---------------end--------------->8---

This is a more technical topic that probably has to be written by
someone who is knowledgeable with the internals and implementation
details of use-package.  Either we find someone like that -- who has
time -- or the chapter is removed for now.

>> As for the order rationale, getting use-package to ELPA means less
>> friction and more users can try it out, more feedback, more eyeballs,
>> basically.
>
> If we get it into core, we can make it into a :core package.

Right.

  reply	other threads:[~2022-11-12  7:25 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 12:06 [ELPA] New package: use-package Payas Relekar
2022-10-25 14:14 ` Philip Kaludercic
2022-10-25 14:34   ` Payas Relekar
2022-10-25 16:09     ` Philip Kaludercic
2022-10-26 19:57     ` John Wiegley
2022-10-27  3:46       ` Payas Relekar
2022-10-27  5:25         ` Payas Relekar
     [not found]         ` <jwv35b92ohk.fsf-monnier+emacs@gnu.org>
     [not found]           ` <87v8o52mkn.fsf@gmail.com>
     [not found]             ` <87v8o5w2c1.fsf@posteo.net>
     [not found]               ` <jwvfsf9qbe4.fsf-monnier+emacs@gnu.org>
     [not found]                 ` <877d0kbkfm.fsf@gmail.com>
     [not found]                   ` <jwv8rl0nmb1.fsf-monnier+emacs@gnu.org>
     [not found]                     ` <875yg4144y.fsf@gmail.com>
     [not found]                       ` <jwvczablieq.fsf-monnier+emacs@gnu.org>
     [not found]                         ` <87o7tv16xc.fsf@posteo.net>
     [not found]                           ` <jwvmt9eitgd.fsf-monnier+emacs@gnu.org>
     [not found]                             ` <87wn8i36v6.fsf@gmail.com>
     [not found]                               ` <jwva65eef2q.fsf-monnier+emacs@gnu.org>
     [not found]                                 ` <871qqqpabk.fsf@posteo.net>
2022-10-30  4:13                                   ` Payas Relekar
     [not found]                         ` <87h6zmj451.fsf@gmail.com>
     [not found]                           ` <5EE58F68-8B9E-4DE6-BA20-3A88FFDA6528@posteo.net>
     [not found]                             ` <jwvh6zmit8b.fsf-monnier+emacs@gnu.org>
     [not found]                               ` <87sfj636pd.fsf@gmail.com>
     [not found]                                 ` <jwv4jvmeewq.fsf-monnier+emacs@gnu.org>
2022-10-29 17:23                                   ` Payas Relekar
2022-10-29 17:35                                     ` Stefan Monnier
     [not found]                               ` <871qqkjwjj.fsf@gmail.com>
2022-11-03  8:06                                 ` Payas Relekar
     [not found]                                 ` <jwvr0ykw2ac.fsf-monnier+emacs@gnu.org>
2022-11-03 16:42                                   ` Payas Relekar
2022-11-03 16:57                                     ` Philip Kaludercic
2022-11-03 16:59                                       ` Payas Relekar
2022-11-03 17:15                                         ` Philip Kaludercic
2022-11-04 18:24                                           ` John Wiegley
2022-11-04 22:03                                             ` Philip Kaludercic
2022-11-05  8:06                                               ` Payas Relekar
2022-11-05  8:33                                                 ` Philip Kaludercic
2022-11-05  8:45                                                   ` Payas Relekar
2022-11-05  9:37                                                     ` Philip Kaludercic
2022-11-05 10:13                                                       ` Payas Relekar
2022-11-05 10:36                                                         ` Philip Kaludercic
2022-11-05 11:29                                                           ` Payas Relekar
2022-11-05 11:36                                                             ` Philip Kaludercic
2022-11-12  5:42                                                         ` Adding use-package to core Stefan Kangas
2022-11-12  7:25                                                           ` Philip Kaludercic [this message]
2022-11-12 10:17                                                             ` Stefan Kangas
2022-11-12 14:04                                                               ` Philip Kaludercic
2022-11-12 15:38                                                                 ` Stefan Kangas
2022-11-12 15:46                                                                   ` Philip Kaludercic
2022-11-12 15:53                                                                     ` Payas Relekar
2022-11-12 16:33                                                                       ` Philip Kaludercic
2022-11-13  4:43                                                                       ` John Wiegley
2022-11-13  5:25                                                                         ` Stefan Kangas
2022-11-13  7:07                                                                           ` Philip Kaludercic
2022-11-13  7:31                                                                             ` Eli Zaretskii
2022-11-13 14:09                                                                             ` Stefan Kangas
2022-11-13 15:22                                                                               ` Philip Kaludercic
2022-11-13 15:42                                                                                 ` Stefan Kangas
2022-11-15 17:25                                                                             ` Philip Kaludercic
2022-11-16  4:17                                                                               ` Stefan Kangas
2022-11-16  7:59                                                                                 ` Philip Kaludercic
2022-11-03 17:22                                     ` [ELPA] New package: use-package Stefan Monnier
2022-10-25 15:37 ` Stefan Monnier
2022-10-25 15:45   ` Payas Relekar
2022-10-25 16:50     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2022-11-13  7:14 Adding use-package to core Payas Relekar
2022-11-13 11:55 Payas Relekar
2022-11-13 17:31 ` xenodasein--- via Emacs development discussions.
2022-11-13 17:40   ` Philip Kaludercic
2022-11-13 18:05   ` Stefan Kangas
2022-11-13 18:42     ` xenodasein--- via Emacs development discussions.
2022-11-13 18:24 ` John Wiegley
2022-11-13 16:11 xenodasein--- via Emacs development discussions.
2022-11-13 16:48 ` Eli Zaretskii
2022-11-13 17:53   ` John Wiegley
2022-11-13 18:13     ` Eli Zaretskii
2022-11-13 18:45       ` John Wiegley
2022-11-13 18:05 ` Stefan Kangas
     [not found] ` <838rkels13.fsf@gnu.org-NGltIw7----9>
2022-11-13 18:12   ` xenodasein--- via Emacs development discussions.
2022-11-13 18:22     ` Stefan Kangas
2022-11-13 18:31     ` Eli Zaretskii
2022-11-13 19:19       ` xenodasein--- via Emacs development discussions.
2022-11-13 20:08         ` Eli Zaretskii
2022-11-13 18:46     ` John Wiegley
2022-11-13 19:02       ` xenodasein--- via Emacs development discussions.
2022-11-13 19:48         ` John Wiegley
2022-11-13 20:04         ` Eli Zaretskii
2022-11-14 10:32           ` xenodasein--- via Emacs development discussions.
2022-11-14 13:30             ` Eli Zaretskii
2022-11-14  0:27 ` Po Lu
2022-11-14 10:12   ` xenodasein--- via Emacs development discussions.
2022-11-14 10:47     ` Po Lu
2022-11-14 11:52       ` xenodasein--- via Emacs development discussions.
2022-11-14 12:19         ` Po Lu
2022-11-15 15:39           ` Michael Albinus
2022-11-14 13:54         ` Eli Zaretskii
2022-11-14 14:47           ` xenodasein--- via Emacs development discussions.
2022-11-14 17:39             ` Eli Zaretskii
2022-11-15 15:38               ` xenodasein--- via Emacs development discussions.
2022-11-15 19:22                 ` Eli Zaretskii
2022-11-18 19:29   ` Sean Whitton
2022-11-18 19:33     ` Philip Kaludercic
2022-11-18 19:42     ` Eli Zaretskii
2022-11-18 20:43       ` Philip Kaludercic
2022-11-19  7:12         ` Eli Zaretskii
2022-11-19  7:33           ` Philip Kaludercic
2022-11-19  8:04             ` Eli Zaretskii
2022-11-19 10:09               ` Philip Kaludercic
2022-11-19 10:31                 ` Eli Zaretskii
2022-11-19 11:02                   ` Philip Kaludercic
2022-11-19 11:15                     ` Stefan Kangas
2022-11-19 11:58                     ` Eli Zaretskii
2022-11-19 12:15                       ` Philip Kaludercic
2022-11-19 15:28               ` Stefan Monnier
2022-11-19 15:36                 ` Philip Kaludercic
2022-11-19 15:46                 ` Eli Zaretskii
2022-11-19 15:26           ` Stefan Monnier
2022-11-16  8:28 Payas Relekar
2022-11-16  9:30 ` Stefan Kangas
2022-11-16 13:35 ` Eli Zaretskii
2022-11-16 14:18 Payas Relekar
2022-11-16 14:52 ` Eli Zaretskii
2022-11-16 19:35 ` John Wiegley
2022-11-16 15:29 Payas Relekar
2022-11-16 16:04 ` Philip Kaludercic
2022-11-16 16:51 ` Eli Zaretskii
2022-11-16 17:01   ` Philip Kaludercic
2022-11-16 19:29     ` Eli Zaretskii
2022-11-17  0:33       ` Stefan Kangas
2022-11-17  6:40         ` Eli Zaretskii
2022-11-17  7:17           ` Stefan Kangas
2022-11-17  7:24             ` Payas Relekar
2022-11-17 16:18               ` John Wiegley
2022-11-17  7:33             ` Eli Zaretskii
2022-11-17  7:58               ` Stefan Kangas
2022-11-18  0:32 Payas Relekar

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=87iljk1voy.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=relekarpayas@gmail.com \
    --cc=stefankangas@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).