GNU bug report logs -
#79601
[PATCH] Indent startup.el and provider startup feature
Previous Next
To reply to this bug, email your comments to 79601 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Wed, 08 Oct 2025 14:18:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Yauhen Artsiukhou <jsirex <at> gmail.com>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Wed, 08 Oct 2025 14:18:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
First patch does only indent of startup.el:
https://github.com/jsirex/emacs/commit/6e8bccc0816e3751d128161143debd6933335166.patch
Second patch provides 'startup feature, I believe it is missing:
https://github.com/jsirex/emacs/commit/dcb0aa1b74698bc60a21b60ce94bd642898f5c38.patch
PS. This is my first contribution
PPS. Attached as links because first patch is too big
--
Yauhen
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Wed, 08 Oct 2025 14:31:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 79601 <at> debbugs.gnu.org (full text, mbox):
> From: Yauhen Artsiukhou <jsirex <at> gmail.com>
> Date: Wed, 8 Oct 2025 14:39:02 +0200
>
> First patch does only indent of startup.el:
> https://github.com/jsirex/emacs/commit/6e8bccc0816e3751d128161143debd6933335166.patch
Thanks. We don't like to make whitespace-only changes. Instead, we
fix the whitespace around the places where we make real changes.
> Second patch provides 'startup feature, I believe it is missing:
> https://github.com/jsirex/emacs/commit/dcb0aa1b74698bc60a21b60ce94bd642898f5c38.patch
startup.el is preloaded, so such a provide doesn't really help
anything. Why did you think we need it?
Andrea and Stefan, do we have any policy to have 'provide' in all the
preloaded packages?
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Wed, 08 Oct 2025 14:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 79601 <at> debbugs.gnu.org (full text, mbox):
> Andrea and Stefan, do we have any policy to have 'provide' in all the
> preloaded packages?
AFAIK, we don't. We don't have a policy against them either, so
I wouldn't reject a patch just because it adds such a unnecessary
`provide`, but the patch should do something else that's useful.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Wed, 08 Oct 2025 15:15:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 79601 <at> debbugs.gnu.org (full text, mbox):
I thought that having whitespace-only changes separately makes the
process easier.
But ok, next time I will not provide such patches.
Regarding `provide`, as an emacs user, I did my best to write
`init.el` and sort things out. And I want to follow some structure.
I see many files have their own `defcustom`s and I decided to follow
each package with `use-package` to group settings.
So I did:
(use-package startup :ensure nil
:init
(setopt inhibit-startup-screen t))
But if demand is true or defer is false it tries to require package
and fails with:
Debugger entered--Lisp error: (error "Loading file
/usr/local/share/emacs/31.0.50/lisp/startup.elc failed to provide
feature ‘startup’")
Try `(require 'startup)`.
As a new user who tries to understand "how to write emacs" such
inconsistency is really confusing. When should I use `provide` and
when I should not.
Feel free to accept or reject any patch. At least I figured out how to
contribute :)
ср, 8 окт. 2025 г. в 16:53, Stefan Monnier <monnier <at> iro.umontreal.ca>:
>
> > Andrea and Stefan, do we have any policy to have 'provide' in all the
> > preloaded packages?
>
> AFAIK, we don't. We don't have a policy against them either, so
> I wouldn't reject a patch just because it adds such a unnecessary
> `provide`, but the patch should do something else that's useful.
>
>
> Stefan
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Wed, 08 Oct 2025 19:12:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 79601 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> Andrea and Stefan, do we have any policy to have 'provide' in all the
>> preloaded packages?
>
> AFAIK, we don't. We don't have a policy against them either, so
> I wouldn't reject a patch just because it adds such a unnecessary
> `provide`, but the patch should do something else that's useful.
+1
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Thu, 09 Oct 2025 08:50:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 79601 <at> debbugs.gnu.org (full text, mbox):
Yauhen Artsiukhou <jsirex <at> gmail.com> writes:
> Regarding `provide`, as an emacs user, I did my best to write
> `init.el` and sort things out. And I want to follow some structure.
> I see many files have their own `defcustom`s and I decided to follow
> each package with `use-package` to group settings.
> So I did:
> (use-package startup :ensure nil
> :init
> (setopt inhibit-startup-screen t))
Does the following form help?
(use-package emacs
:custom
(inhibit-startup-screen t))
Best, Arash
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Thu, 09 Oct 2025 10:33:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 79601 <at> debbugs.gnu.org (full text, mbox):
Arash, yes I know about this.
Crucial difference here is (featurep 'emacs) is t.
So basically (require 'emacs) works as expected, but (require 'startup) fails.
inhibit-startup-screen is defined in startup.el.
So, if we abstract away a little bit, I see the following common pattern:
1. emacs has "something" implemented in lisp/foo/something.el.
2. I want to use it and perform standard routine: (progn (require
'something) (setopt something-enabled t))
Same with use-package: (use-package something :ensure nil :init
(setopt this 0) :config (setopt that 1))
And it is a bit confusing that most files (provide 'feature-x) but
some of them don't. For example, (require 'indent) fails exactly the
same.
чт, 9 окт. 2025 г. в 10:48, Arash Esbati <arash <at> gnu.org>:
>
> Yauhen Artsiukhou <jsirex <at> gmail.com> writes:
>
> > Regarding `provide`, as an emacs user, I did my best to write
> > `init.el` and sort things out. And I want to follow some structure.
> > I see many files have their own `defcustom`s and I decided to follow
> > each package with `use-package` to group settings.
> > So I did:
> > (use-package startup :ensure nil
> > :init
> > (setopt inhibit-startup-screen t))
>
> Does the following form help?
>
> (use-package emacs
> :custom
> (inhibit-startup-screen t))
>
> Best, Arash
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility.
(Sat, 25 Oct 2025 10:18:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Yauhen Artsiukhou <jsirex <at> gmail.com>:
bug acknowledged by developer.
(Sat, 25 Oct 2025 10:18:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 79601-done <at> debbugs.gnu.org (full text, mbox):
> From: Yauhen Artsiukhou <jsirex <at> gmail.com>
> Date: Thu, 9 Oct 2025 12:31:48 +0200
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Zaretskii <eliz <at> gnu.org>,
> Andrea Corallo <acorallo <at> gnu.org>, 79601 <at> debbugs.gnu.org
>
> Arash, yes I know about this.
>
> Crucial difference here is (featurep 'emacs) is t.
>
> So basically (require 'emacs) works as expected, but (require 'startup) fails.
> inhibit-startup-screen is defined in startup.el.
>
> So, if we abstract away a little bit, I see the following common pattern:
> 1. emacs has "something" implemented in lisp/foo/something.el.
> 2. I want to use it and perform standard routine: (progn (require
> 'something) (setopt something-enabled t))
> Same with use-package: (use-package something :ensure nil :init
> (setopt this 0) :config (setopt that 1))
>
> And it is a bit confusing that most files (provide 'feature-x) but
> some of them don't. For example, (require 'indent) fails exactly the
> same.
No further comments, so I'm now closing this bug.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#79601; Package
emacs.
(Mon, 27 Oct 2025 00:34:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 79601 <at> debbugs.gnu.org (full text, mbox):
> So, if we abstract away a little bit, I see the following common pattern:
> 1. emacs has "something" implemented in lisp/foo/something.el.
> 2. I want to use it and perform standard routine: (progn (require
> 'something) (setopt something-enabled t))
> Same with use-package: (use-package something :ensure nil :init
> (setopt this 0) :config (setopt that 1))
>
> And it is a bit confusing that most files (provide 'feature-x) but
> some of them don't. For example, (require 'indent) fails exactly the
> same.
Indeed the `provide` thingies are still fundamentally designed for
(require <FEATURE>), i.e. for use by other packages, and not for
(use-package <FEATURE> ...) which is for init.el customization.
I consider any `require` in an init file to be a sign of a bug somewhere
(usually either a bug in the init file or in the required file), so I'm
very skeptical of this part of the `use-package` functionality.
But admittedly, `use-package` also uses <FEATURE> for
`with-eval-after-load` which is definitely legitimate in an init file.
The use of (use-package <FEATURE> ...) that you propose has a few other
problems for the preloaded files: we, Emacs maintainers, have not been
super careful about what to put where, and furthermore, we sometimes
move some definitions around, notably for reasons of ordering in
`loadup.el` and related bootstrap issues.
I tend to think it would be good to be more careful about what we put
where and treat those files more like actual packages (which just happen
to be preloaded), including obeying the usual "namespace prefix"
convention, but I don't think there's a general agreement about it, nor
much desire to implement such a change, or even much evidence that it
would bring much concrete benefit.
All in all, I think similar things tend to happen within multi-file
packages, so it makes sense to treat preloaded files as all members of
the `emacs` multi-file package.
Stefan
This bug report was last modified 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.