GNU bug report logs -
#22727
Managing packages writes the user init file
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22727 in the body.
You can then email your comments to 22727 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22727
; Package
emacs
.
(Thu, 18 Feb 2016 00:51:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Angelo Graziosi <angelo.graziosi <at> alice.it>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 18 Feb 2016 00:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have noticed that just using
Options - Manage Emacs Packages
writes my init file. For example I find these additions in my case:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages (quote (tabbar-ruler sr-speedbar))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
I discovered this only casually..
I think this is not the right thing to do. Why an application should
write a file which belongs to the user?
Maybe there is a better way saving those additions in another file which
the use could customize, more or less as we do with the desktop file or
lock file. For example in my init.el file I have
;; Instead to save in ~/.projects.ede
(setq ede-project-placeholder-cache-file "~/.emacs.d/projects.ede")
;; Instead to save in ~/.emacs.desktop
(setq desktop-base-file-name "~/.emacs.d/desktop")
;; Instead to save in ~/.emacs.desktop.lock
(setq desktop-base-lock-name "~/.emacs.d/desktop.lock")
We could have something like this
;; Instead to save in ~/.emacs.packages_installed
(setq desktop-base-lock-name "~/.emacs.d/packages_installed")
This would be very useful.. :)
TIA,
Angelo.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22727
; Package
emacs
.
(Thu, 18 Feb 2016 16:49:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 22727 <at> debbugs.gnu.org (full text, mbox):
> From: Angelo Graziosi <angelo.graziosi <at> alice.it>
> Date: Thu, 18 Feb 2016 01:49:36 +0100
>
> I have noticed that just using
>
> Options - Manage Emacs Packages
>
> writes my init file. For example I find these additions in my case:
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> '(package-selected-packages (quote (tabbar-ruler sr-speedbar))))
> (custom-set-faces
> ;; custom-set-faces was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> )
>
> I discovered this only casually..
>
> I think this is not the right thing to do. Why an application should write a file which belongs to the user?
This is how Custom behaves since ages ago: when you save
customizations, it writes such forms into your ~/.emacs. The use case
with package managing is therefore not special in any way; rather, you
are proposing to divert the customizations made by Custom to a
separate file. We already have an option to do that, named
'custom-file'; see the node "Saving Customizations" in the Emacs User
Manual. Is that option sufficient to solve your problem in this bug
report? If not, can you tell why not?
It is possible that your objection is somehow limited to what
package.el does, but, as written, it describes a much more broad class
of functionalities, and is not specific to package.el.
For the record, the reason why customizations are by default saved in
~/.emacs is that originally the idea was to teach users how to use
Lisp for customizing Emacs, so that users could progressively migrate
from using Custom to writing their own Lisp, as they gain proficiency.
I don't think we've abandoned this idea, even though I'm not sure it
is working as planned.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22727
; Package
emacs
.
(Thu, 18 Feb 2016 18:50:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 22727 <at> debbugs.gnu.org (full text, mbox):
I opened this bug report because John asked me:
http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00989.html
The problem here is NOT that when one customizes something this is saved
in the init file but that also when one does not customize anything, the
init file is changed, more or less silently. For example clicking
Options -Manage Emacs packages.
Emacs did not exhibit this behavior some time ago (an year? two?)
Maybe you have to reread the full thread starting here:
http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00958.html
If you think is right that an application changes the user init file,
more or less silently, you can close this bug.
Angelo
Il 18/02/2016 17:48, Eli Zaretskii ha scritto:
>> From: Angelo Graziosi <angelo.graziosi <at> alice.it>
>> Date: Thu, 18 Feb 2016 01:49:36 +0100
>>
>> I have noticed that just using
>>
>> Options - Manage Emacs Packages
>>
>> writes my init file. For example I find these additions in my case:
>>
>> (custom-set-variables
>> ;; custom-set-variables was added by Custom.
>> ;; If you edit it by hand, you could mess it up, so be careful.
>> ;; Your init file should contain only one such instance.
>> ;; If there is more than one, they won't work right.
>> '(package-selected-packages (quote (tabbar-ruler sr-speedbar))))
>> (custom-set-faces
>> ;; custom-set-faces was added by Custom.
>> ;; If you edit it by hand, you could mess it up, so be careful.
>> ;; Your init file should contain only one such instance.
>> ;; If there is more than one, they won't work right.
>> )
>>
>> I discovered this only casually..
>>
>> I think this is not the right thing to do. Why an application should write a file which belongs to the user?
>
> This is how Custom behaves since ages ago: when you save
> customizations, it writes such forms into your ~/.emacs. The use case
> with package managing is therefore not special in any way; rather, you
> are proposing to divert the customizations made by Custom to a
> separate file. We already have an option to do that, named
> 'custom-file'; see the node "Saving Customizations" in the Emacs User
> Manual. Is that option sufficient to solve your problem in this bug
> report? If not, can you tell why not?
>
> It is possible that your objection is somehow limited to what
> package.el does, but, as written, it describes a much more broad class
> of functionalities, and is not specific to package.el.
>
> For the record, the reason why customizations are by default saved in
> ~/.emacs is that originally the idea was to teach users how to use
> Lisp for customizing Emacs, so that users could progressively migrate
> from using Custom to writing their own Lisp, as they gain proficiency.
> I don't think we've abandoned this idea, even though I'm not sure it
> is working as planned.
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22727
; Package
emacs
.
(Thu, 18 Feb 2016 20:30:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 22727 <at> debbugs.gnu.org (full text, mbox):
> Cc: 22727 <at> debbugs.gnu.org, johnw <at> gnu.org
> From: Angelo Graziosi <angelo.graziosi <at> alice.it>
> Date: Thu, 18 Feb 2016 19:49:15 +0100
>
> The problem here is NOT that when one customizes something this is saved
> in the init file but that also when one does not customize anything, the
> init file is changed, more or less silently. For example clicking
> Options -Manage Emacs packages.
If we solve this part, i.e. avoid modifying .emacs until the user
actually selects some packages to install, would that address your
concerns that triggered this bug report?
As for silent modifications: if the user accepts some options that
should remain in effect for future sessions, that's a reason good
enough to save these settings. This is what Custom does when you save
the customizations for future sessions.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22727
; Package
emacs
.
(Thu, 18 Feb 2016 22:05:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 22727 <at> debbugs.gnu.org (full text, mbox):
Il 18/02/2016 21:29, Eli Zaretskii ha scritto:
>> Cc: 22727 <at> debbugs.gnu.org, johnw <at> gnu.org
>> From: Angelo Graziosi <angelo.graziosi <at> alice.it>
>> Date: Thu, 18 Feb 2016 19:49:15 +0100
>>
>> The problem here is NOT that when one customizes something this is saved
>> in the init file but that also when one does not customize anything, the
>> init file is changed, more or less silently. For example clicking
>> Options -Manage Emacs packages.
>
> If we solve this part, i.e. avoid modifying .emacs until the user
> actually selects some packages to install, would that address your
> concerns that triggered this bug report?
No.
1.
As I tried to explain, I haven't opened this report to see fixed an
issue for me. Please read:
http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00989.html
On emacs-devel there is a discussion in which others think Emacs should
not change the init file when one manages Emacs packages.
2.
Since I discovered this behavior, each time I need to manege packages (I
have some packages installed from MELPA), I save my init file and
restore it after the managing. So I never used those additions and Emacs
seems to work the same. Indeed I don't understand why installing
packages should change MY init file..
3.
Anyway, I am not an Emacs developer so it could be the case that for
some obscure (to me) reason, Emacs needs those additions/informations.
If this is true, why not use another packages configuration files? On
emacs-devel it seems that other users/developers would prefer that..
Given the nature of the addictions,
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages (quote (bla bla bla))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
why not to use a separate file also for Options - Customize Emacs? If I
understand the discussion on emacs-devel someone proposes to use
something like "customize-emacs" both for managing packages and
"Customize Emacs". This seems reasonable. Se also
http://lists.gnu.org/archive/html/bug-gnu-emacs/2016-02/msg01034.html,
where I reported a raw example how things could be from the end user POV.
In any case, I can live with current status.
4.
This thread seems to have all the prerequisites to become another of
those endless thread, so please close this bug report (who is interested
could always reopen another) or remove me from the discussion.
Thanks,
Angelo.
>
> As for silent modifications: if the user accepts some options that
> should remain in effect for future sessions, that's a reason good
> enough to save these settings. This is what Custom does when you save
> the customizations for future sessions.
>
> Thanks.
>
Reply sent
to
Nicolas Richard <youngfrog <at> members.fsf.org>
:
You have taken responsibility.
(Fri, 19 Feb 2016 06:37:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Angelo Graziosi <angelo.graziosi <at> alice.it>
:
bug acknowledged by developer.
(Fri, 19 Feb 2016 06:37:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 22727-done <at> debbugs.gnu.org (full text, mbox):
Angelo Graziosi <angelo.graziosi <at> alice.it> writes:
> please close this bug report (who is
> interested could always reopen another)
done.
Note that you can do that yourself by appending -done to the bug number
in the bug address (I did just that).
Nicolas.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22727
; Package
emacs
.
(Fri, 19 Feb 2016 09:41:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 22727 <at> debbugs.gnu.org (full text, mbox):
> Cc: 22727 <at> debbugs.gnu.org, johnw <at> gnu.org
> From: Angelo Graziosi <angelo.graziosi <at> alice.it>
> Date: Thu, 18 Feb 2016 23:04:09 +0100
>
> > If we solve this part, i.e. avoid modifying .emacs until the user
> > actually selects some packages to install, would that address your
> > concerns that triggered this bug report?
>
> No.
>
> 1.
>
> As I tried to explain, I haven't opened this report to see fixed an
> issue for me. Please read:
> http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00989.html
Thanks, I've read that thread before writing the above.
> On emacs-devel there is a discussion in which others think Emacs should
> not change the init file when one manages Emacs packages.
I thought this bug report was supposed to be the place where the issue
is discussed. It sounds strange to me to file a bug, and then discuss
it elsewhere.
> 2.
>
> Since I discovered this behavior, each time I need to manege packages (I
> have some packages installed from MELPA), I save my init file and
> restore it after the managing. So I never used those additions and Emacs
> seems to work the same.
If the stuff written by package.el is not needed, then it should not
write it, I agree.
> Indeed I don't understand why installing packages should change MY
> init file..
Presumably because Emacs needs to know what is installed the next time
you invoke package.el.
> 3.
>
> Anyway, I am not an Emacs developer so it could be the case that for
> some obscure (to me) reason, Emacs needs those additions/informations.
> If this is true, why not use another packages configuration files? On
> emacs-devel it seems that other users/developers would prefer that..
> Given the nature of the addictions,
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> '(package-selected-packages (quote (bla bla bla))))
> (custom-set-faces
> ;; custom-set-faces was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> )
>
> why not to use a separate file also for Options - Customize Emacs?
As mentioned elsewhere, you can customize the variable custom-file to
have that.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Mar 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 91 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.