Subject: Re: bug#22791: 25.0.91; Deleting dependency package and reinstalling overwrites custom file

From: Mauro Aranda <[email-masked]>
Date: Sat, 5 Sep 2020 09:38:34 -0300

Joost Kremers <[email-masked]> writes:

> - Given the following init file:
>
> ```
> (setq custom-file "~/.emacs.d/custom.el")
>
> (require 'package)
> ;; (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/
"))
> (setq package-enable-at-startup nil)
> (package-initialize)
>
> (load custom-file)
> ```
>
> - Customize some option (e.g., `fill-column') with `M-x
>   customize-option'. (This is not an essential step, it just serves to
>   illustrate the problem.)
>
> - Install a package that has some dependency, e.g., ace-window, which
>   has avy as a dependency.
>
>
>     M-x package-install RET ace-window RET
>
>
> - Close Emacs and do (from a shell):
>
>     $ rm -rf ~/.emacs.d/elpa/avy-*
>
> - Restart Emacs (this will give an error about not being able to load
>   ace-window, because its dependency avy is not met.)
>
> - Install avy:
>
>     M-x package-install RET avy RET
>
> At this point, the custom file ~/.emacs.d/custom.el is overwritten: the
> custom setting for `fill-column' is gone.
>
> The bug is dependent on `package-enable-at-startup' being set to nil and
> `custom-file' being set. If either of these conditions isn't met, the
> bug doesn't occur.
>

I can't try this recipe with Emacs 25, but with Emacs 26.3 and beyond
I'm unable to reproduce it.  The fill-column setting stays there after I
follow these steps.

Have you seen anything like this lately? Or is it possible that this was
fixed over the years?