unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tony Zorman <soliditsallgood@mailbox.org>
Cc: philipk@posteo.net, felician.nemeth@gmail.com,
	60418@debbugs.gnu.org, stefankangas@gmail.com
Subject: bug#60418: [PATCH] Add :vc keyword to use-package
Date: Sun, 16 Apr 2023 19:10:16 +0300	[thread overview]
Message-ID: <835y9vbyfr.fsf@gnu.org> (raw)
In-Reply-To: <87wn2bzvcp.fsf@hyperspace> (bug-gnu-emacs@gnu.org)

> Cc: 60418@debbugs.gnu.org, Felician Nemeth <felician.nemeth@gmail.com>,
>  stefankangas@gmail.com
> Date: Sun, 16 Apr 2023 17:43:02 +0200
> From:  Tony Zorman via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Alright, attached are patches that contain the requested change: we now
> default to :last-release.

Thanks, please see below a few minor comments.

> +(defun use-package-vc-install (arg &optional local-path)
> +  "ARG is a list of the form (NAME OPTIONS REVISION).

This should tell what the function does, not just what the arguments
look like.

> +The optional LOCAL-PATH boolean decides whether
> +`package-vc-install-from-checkout' or `package-vc-install' will
> +end up being called."

This should tell explicitly which of the two is called when
LOCAL-PATH is nil and when it's non-nil.

> +(defun use-package-handler/:vc (name _keyword arg rest state)
> +  "Generate code for the :vc keyword."

I don't think this is an accurate description of what the function
does.  Also, we try very hard to mention at least the mandatory
arguments in the first line of the doc strings.

> @@ -1666,7 +1744,8 @@ use-package
>                   (compare with `custom-set-variables').
>  :custom-face     Call `custom-set-faces' with each face definition.
>  :ensure          Loads the package using package.el if necessary.
> -:pin             Pin the package to an archive."
> +:pin             Pin the package to an archive.
> +:vc              Integration with `package-vc.el'."

The description of other keywords say what is the effect of each one;
the description of :vc doesn't.  "Integration with package.el" is not
a useful description, it says nothing about what this keyword does.

> +@findex :vc
> +The @code{:vc} keyword can be used to control how packages are fetched.

Without saying more regarding what "fetched" is about, this
description is not as useful as it could have been.  You should give
some context which would explain how "fetching" is related to
use-package.

My suggestion, btw, is to use a more descriptive "downloading", not
"fetching".

> +It accepts the same arguments as @code{package-vc-selected-packages},

There should be a cross-reference here to the Emacs manual where it
describes package-vc-selected-packages.

> +except that a name need not explicitly given: it is inferred from the
                              ^
"be" is missing there.

> +declaration.  Further, the accepted property list is augmented by a
> +@code{:rev} keyword, which has the same shape as the @code{REV} argument
> +to @code{package-vc-install}.  Notably—even when not specified—@code{:rev}
                                         ^
Please don't use non-ASCII characters in Texinfo sources, that is
usually unnecessary.  In this case, to produce an em-dash, use two
dashes in a row -- they will be converted to em-dash on output.

> +would try—by invoking @code{package-vc-install}—to install the latest

Same here.

> +The above dispatches to @code{package-vc-install-from-checkout}.

A cross-reference here would be beneficial, again.

> +** use-package
> +
> +*** New ':vc' keyword

Heading lines in NEWS should end in a period.

Also, this entry should be marked with "+++", as the necessary changes
in the manuals are included.

> +This keyword enables the user to control how packages are fetched by
> +utilising 'package-vc.el'.  By default, it relays its arguments to
> +'package-vc-install', but—when combined with the ':load-path'
> +keyword—it can also call upon 'package-vc-install-from-checkout'
> +instead.

Please also avoid non-ASCII characters in NEWS.

>           Further, if no revision is given via the ':rev' argument, we
> +fall back to the last release (via 'package-vc-install's
> +':last-release' argument).  To check out the last commit, use ':rev

You seem to like to say "Further," at the beginning of sentences, but
please be aware that this word usually adds no useful information, so
you can easily drop it in most cases.  For example, in the text above:
the sentence will be as informative without "Further" as with it.

Also, "we fall back" is not our style in documentation (who is "we"?).
We say "use-package will fall back" instead.

Thanks for working on this.





  reply	other threads:[~2023-04-16 16:10 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29 18:43 bug#60418: [PATCH] Add :vc keyword to use-package Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found] ` <handler.60418.B.167238381823776.ack@debbugs.gnu.org>
2023-01-14 12:48   ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-31 14:13     ` Felician Nemeth
2023-03-31 15:38       ` Philip Kaludercic
2023-04-07 14:11         ` Philip Kaludercic
2023-04-08  8:48           ` Felician Nemeth
2023-04-08  9:06             ` Philip Kaludercic
2023-04-08  9:25               ` Felician Nemeth
2023-04-08 10:41                 ` Philip Kaludercic
2023-04-11 14:10                   ` Felician Nemeth
2023-04-12  7:12                 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-12  7:34                   ` Philip Kaludercic
2023-04-12  9:00                     ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-16 15:43                       ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-16 16:10                         ` Eli Zaretskii [this message]
2023-04-17 19:39                           ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-18 12:13                             ` Eli Zaretskii
2023-04-19 17:38                               ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-22  9:26                                 ` Eli Zaretskii
2023-04-22 11:34                                   ` Philip Kaludercic
2023-04-23  5:51                                     ` John Wiegley
2023-04-22 11:32                                 ` Philip Kaludercic
2023-04-23  6:07                                   ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-23 12:35                                     ` Philip Kaludercic
2023-04-24 12:36                                       ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-01 19:43                                         ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-01 20:01                                           ` Philip Kaludercic
2023-05-02 13:18                                             ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-02 13:59                                               ` Robert Pluim
2023-05-02 15:09                                               ` Eli Zaretskii
2023-05-02 14:36                                             ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-02 12:40                                           ` Eli Zaretskii
2023-05-02 14:22                                             ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-02 15:16                                               ` Eli Zaretskii
2023-05-04  8:13                                                 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-04 10:39                                                   ` Eli Zaretskii
2023-05-05  5:04                                                   ` Philip Kaludercic
2023-05-05  5:36                                                     ` Eli Zaretskii
2023-05-05  5:49                                                       ` Philip Kaludercic
2023-05-05  6:53                                                         ` Eli Zaretskii
2023-05-05 17:15                                                           ` Philip Kaludercic
2023-05-05 18:45                                                             ` Eli Zaretskii
2023-05-06 18:50                                                               ` Philip Kaludercic
2023-05-06 19:13                                                                 ` Eli Zaretskii
2023-05-07  7:34                                                                   ` Philip Kaludercic
2023-05-06 19:39                                                                 ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-07  8:52                                                                   ` Philip Kaludercic
2023-05-16 19:30                                                                     ` Philip Kaludercic
2023-05-17  5:42                                                                       ` Tony Zorman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-16 16:18                         ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=835y9vbyfr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60418@debbugs.gnu.org \
    --cc=felician.nemeth@gmail.com \
    --cc=philipk@posteo.net \
    --cc=soliditsallgood@mailbox.org \
    --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).