syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.63k stars 4.89k forks source link

Custom dumps `custom-set-variables` within `dotspacemacs/user-init`, borking `.spacemacs` #16071

Open bryce-carson opened 1 year ago

bryce-carson commented 1 year ago

I have observed Custom dumping its variables into the wrong spot multiple times today.

As far as I can tell, the steps to reproduce the issue are:

  1. Have some stuff inside your dotspacemacs/user-init
  2. Open your dotspacemacs for editing, and make some changes
  3. Open the Customize interface, and make some changes and APPLY AND SAVE THEM FOR FUTURE SESSIONS
  4. Quit Emacs, with or without saving .spacemacs
  5. Reopen Emacs and your .spacemacs should be borked, with the following paragraph describing where custom-set-variables was dumped improperly.

It seems that custom-set-variables is inserted into dotspacemacs/user-init just before the first trailing s character in a variable value of the setq form.

Previously, I had witnessed this occurring multiple times with rmail-movemail-variant-in-use 'mailutil*s, where * indicates where custom-set-variables was inserted. This happened multiple times, remember.

I have added a new variable, which happens to have a trailing s character in it's value: rmail-movemail-flags (list "--tl*s"), with * again indicating where custom-set-variables is inserted.

I already updated my packages and pulled the latest changes in an attempt to see if that would resolve it, with no such luck.

What a strange bug.

The portion the Custom inserts is the form beginning with (custom-set-variables [...] and ending with the final parenthesis in the file.

smile13241324 commented 1 year ago

Strange 🤔, can you post your system details i.e. emacs version for further analysis?

bryce-carson commented 1 year ago

What other information may be helpful?

System Info :computer:


- System configuration features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB
github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!