GNU bug report logs - #66350
30.0.50; Description for (use-package emacs ...)

Previous Next

Package: emacs;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Wed, 4 Oct 2023 21:32:02 UTC

Severity: wishlist

Found in version 30.0.50

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66350 in the body.
You can then email your comments to 66350 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Wed, 04 Oct 2023 21:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arash Esbati <arash <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Oct 2023 21:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Description for (use-package emacs ...)
Date: Wed, 04 Oct 2023 23:29:26 +0200
Hi all,

use-package.texi contains this example[1]:

  @lisp
  @group
  ;; Completely hide visual-line-mode and change auto-fill-mode to " AF".
  (use-package emacs
    :delight
    (auto-fill-function " AF")
    (visual-line-mode))
  @end group
  @end lisp

The usage of (use-package emacs ...) isn't described anywhere in the
file, though.  There was a discussion about it here[2], but I think it
should be documented in the manual somehow.  I'm not familiar enough
with use-package to make a suggestion, sorry.

Best, Arash

Footnotes:
[1]  https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/use-package.texi#n1539

[2]  https://www.reddit.com/r/emacs/comments/mk9ehd/curious_whats_the_use_of_usepackage_emacs/






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Thu, 05 Oct 2023 05:47:01 GMT) Full text and rfc822 format available.

Message #8 received at 66350 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>, John Wiegley <johnw <at> gnu.org>
Cc: 66350 <at> debbugs.gnu.org
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Thu, 05 Oct 2023 08:45:46 +0300
> From: Arash Esbati <arash <at> gnu.org>
> Date: Wed, 04 Oct 2023 23:29:26 +0200
> 
> Hi all,
> 
> use-package.texi contains this example[1]:
> 
>   @lisp
>   @group
>   ;; Completely hide visual-line-mode and change auto-fill-mode to " AF".
>   (use-package emacs
>     :delight
>     (auto-fill-function " AF")
>     (visual-line-mode))
>   @end group
>   @end lisp
> 
> The usage of (use-package emacs ...) isn't described anywhere in the
> file, though.  There was a discussion about it here[2], but I think it
> should be documented in the manual somehow.  I'm not familiar enough
> with use-package to make a suggestion, sorry.
> 
> Best, Arash
> 
> Footnotes:
> [1]  https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/use-package.texi#n1539
> 
> [2]  https://www.reddit.com/r/emacs/comments/mk9ehd/curious_whats_the_use_of_usepackage_emacs/

Adding John, in case he has any thoughts about this.




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 05 Oct 2023 21:54:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Fri, 06 Oct 2023 03:41:02 GMT) Full text and rfc822 format available.

Message #13 received at 66350 <at> debbugs.gnu.org (full text, mbox):

From: John Wiegley <johnw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Arash Esbati <arash <at> gnu.org>, 66350 <at> debbugs.gnu.org
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Thu, 05 Oct 2023 20:39:04 -0700
>>>>> Eli Zaretskii <eliz <at> gnu.org> writes:

>> (use-package emacs

> Adding John, in case he has any thoughts about this.

The ‘(use-package emacs …)‘ declaration has no special meaning. It just takes
advantage of the fact that ‘(featurep 'emacs)‘ is always true, so in a way
it’s just for consistency’s sake, and doesn’t actually do anything special.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Fri, 06 Oct 2023 17:21:02 GMT) Full text and rfc822 format available.

Message #16 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Fri, 06 Oct 2023 19:19:08 +0200
John Wiegley <johnw <at> gnu.org> writes:

> The ‘(use-package emacs …)‘ declaration has no special meaning. It just takes
> advantage of the fact that ‘(featurep 'emacs)‘ is always true, so in a way
> it’s just for consistency’s sake, and doesn’t actually do anything special.

Thanks for your response.  I wonder which use-package keywords don't
make sense in that form?  The way I see it things like :defer, :init et
al. are useless since we're talking about Emacs with all preloaded
libraries, right?

Best, Arash





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Tue, 23 Jul 2024 08:47:01 GMT) Full text and rfc822 format available.

Message #19 received at 66350 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: John Wiegley <johnw <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 66350 <at> debbugs.gnu.org
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Tue, 23 Jul 2024 10:44:07 +0200
John Wiegley <johnw <at> gnu.org> writes:

>>>>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> (use-package emacs
>
>> Adding John, in case he has any thoughts about this.
>
> The ‘(use-package emacs …)‘ declaration has no special meaning. It just takes
> advantage of the fact that ‘(featurep 'emacs)‘ is always true, so in a way
> it’s just for consistency’s sake, and doesn’t actually do anything special.

Thanks.  In order to close this report, I suggest to add the following
to the manual:

--8<---------------cut here---------------start------------->8---
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index c2b6404b68b..e0a156eb373 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -181,7 +181,7 @@ Getting Started
 immediately.  In most cases, this is not necessary or desirable, as
 that will slow down Emacs startup.  Instead, you should try to set
 things up so that packages are only loaded when they are actually
-needed (a.k.a. ``autoloading'').  If you have installed a package from
+needed (a.k.a.@: ``autoloading'').  If you have installed a package from
 @acronym{GNU} @acronym{ELPA} that provides it's own autoloads, it is often
 enough to say:

@@ -225,6 +225,21 @@ Getting Started
 that you can use.  Where possible, it is a good idea to copy them, and
 use that as a starting point.

+You can also configure variables defined in Emacs C sources or preloaded
+with Emacs with the no-op @samp{emacs} package:
+
+@lisp
+@group
+(use-package emacs
+  :init
+  (setq custom-file "~/.emacs.d/emacs-custom.el")
+  (load custom-file)
+  (setq frame-title-format "%b")
+  :custom
+  (use-short-answers t))
+@end group
+@end lisp
+
 That should be enough to get you started!

 @c ----------------------------------------------------------------------------
--8<---------------cut here---------------end--------------->8---

If the question is too trivial, we can close it as wontfix.

Best, Arash




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Tue, 23 Jul 2024 13:21:01 GMT) Full text and rfc822 format available.

Notification sent to Arash Esbati <arash <at> gnu.org>:
bug acknowledged by developer. (Tue, 23 Jul 2024 13:21:02 GMT) Full text and rfc822 format available.

Message #24 received at 66350-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>, John Wiegley <johnw <at> gnu.org>
Cc: 66350-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Tue, 23 Jul 2024 06:19:44 -0700
[Message part 1 (text/plain, inline)]
Version: 30.1

Arash Esbati <arash <at> gnu.org> writes:

> Thanks.  In order to close this report, I suggest to add the following
> to the manual:
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
> index c2b6404b68b..e0a156eb373 100644
> --- a/doc/misc/use-package.texi
> +++ b/doc/misc/use-package.texi
> @@ -181,7 +181,7 @@ Getting Started
>  immediately.  In most cases, this is not necessary or desirable, as
>  that will slow down Emacs startup.  Instead, you should try to set
>  things up so that packages are only loaded when they are actually
> -needed (a.k.a. ``autoloading'').  If you have installed a package from
> +needed (a.k.a.@: ``autoloading'').  If you have installed a package from
>  @acronym{GNU} @acronym{ELPA} that provides it's own autoloads, it is often
>  enough to say:
>
> @@ -225,6 +225,21 @@ Getting Started
>  that you can use.  Where possible, it is a good idea to copy them, and
>  use that as a starting point.
>
> +You can also configure variables defined in Emacs C sources or preloaded
> +with Emacs with the no-op @samp{emacs} package:
> +
> +@lisp
> +@group
> +(use-package emacs
> +  :init
> +  (setq custom-file "~/.emacs.d/emacs-custom.el")
> +  (load custom-file)
> +  (setq frame-title-format "%b")
> +  :custom
> +  (use-short-answers t))
> +@end group
> +@end lisp
> +
>  That should be enough to get you started!
>
>  @c ----------------------------------------------------------------------------
> --8<---------------cut here---------------end--------------->8---
>
> If the question is too trivial, we can close it as wontfix.

I've installed the attached patch on emacs-30 (commit c7609464f70),
adding a new node describing this all.  Thanks for proposing a text, it
was a useful starting point.

Please let me know if you spot any mistakes or anything that could be
improved in what I wrote.  Meanwhile, I'm closing this bug report.
[0001-Document-use-package-emacs-declarations.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Tue, 23 Jul 2024 17:38:02 GMT) Full text and rfc822 format available.

Message #27 received at 66350-done <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 66350-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 John Wiegley <johnw <at> gnu.org>
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Tue, 23 Jul 2024 19:37:09 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> I've installed the attached patch on emacs-30 (commit c7609464f70),
> adding a new node describing this all.  Thanks for proposing a text, it
> was a useful starting point.
>
> Please let me know if you spot any mistakes or anything that could be
> improved in what I wrote.  Meanwhile, I'm closing this bug report.

Many thanks for picking this up; your patch LGTM.  One other change in
my proposal was this around line 184:

-needed (a.k.a. ``autoloading'').  If you have installed a package from
+needed (a.k.a.@: ``autoloading'').  If you have installed a package from

We can also ignore this if use-package manual isn't distributed as .pdf,
I think.

Best, Arash




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Tue, 23 Jul 2024 17:54:01 GMT) Full text and rfc822 format available.

Message #30 received at 66350-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: 66350-done <at> debbugs.gnu.org, johnw <at> gnu.org, stefankangas <at> gmail.com
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Tue, 23 Jul 2024 20:53:06 +0300
> From: Arash Esbati <arash <at> gnu.org>
> Cc: John Wiegley <johnw <at> gnu.org>,  Eli Zaretskii <eliz <at> gnu.org>,
>   66350-done <at> debbugs.gnu.org
> Date: Tue, 23 Jul 2024 19:37:09 +0200
> 
> Stefan Kangas <stefankangas <at> gmail.com> writes:
> 
> > I've installed the attached patch on emacs-30 (commit c7609464f70),
> > adding a new node describing this all.  Thanks for proposing a text, it
> > was a useful starting point.
> >
> > Please let me know if you spot any mistakes or anything that could be
> > improved in what I wrote.  Meanwhile, I'm closing this bug report.
> 
> Many thanks for picking this up; your patch LGTM.  One other change in
> my proposal was this around line 184:
> 
> -needed (a.k.a. ``autoloading'').  If you have installed a package from
> +needed (a.k.a.@: ``autoloading'').  If you have installed a package from
> 
> We can also ignore this if use-package manual isn't distributed as .pdf,
> I think.

Users should be able to generate a good-looking PDF from every manual
we ship.  So I think that part of the change should also be installed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66350; Package emacs. (Tue, 23 Jul 2024 21:37:02 GMT) Full text and rfc822 format available.

Message #33 received at 66350 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Arash Esbati <arash <at> gnu.org>
Cc: johnw <at> gnu.org, 66350 <at> debbugs.gnu.org
Subject: Re: bug#66350: 30.0.50; Description for (use-package emacs ...)
Date: Tue, 23 Jul 2024 14:35:37 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

>> One other change in my proposal was this around line 184:
>>
>> -needed (a.k.a. ``autoloading'').  If you have installed a package from
>> +needed (a.k.a.@: ``autoloading'').  If you have installed a package from
>>
>> We can also ignore this if use-package manual isn't distributed as .pdf,
>> I think.
>
> Users should be able to generate a good-looking PDF from every manual
> we ship.  So I think that part of the change should also be installed.

Thanks, I removed the acronym as redundant on emacs-30.
See commit 05629d3af0a.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Aug 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.