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.64k stars 4.89k forks source link

Org layer overrides user configuration set in org-customize #5170

Closed opie4624 closed 7 years ago

opie4624 commented 8 years ago

Fixed in #5168

opie4624 commented 8 years ago

This actually happens in other layers besides Org, it just hasn't affected me. This is why the fix proposed in #5168 includes a portion of code in core-spacemacs.el and a portion in layers/org/packages.el.

syl20bnr commented 8 years ago

Can you provide repro steps ?

Also can you try to put your customized settings inside a with-eval-after-load or a use-package post config hook ?

opie4624 commented 8 years ago

Sorry for the super late response. :neutral_face:

Reproducing the issue:

  1. M-x customize-variable org-default-notes-file
  2. Set any file you like; mine is set to Inbox.org.
  3. Restart Emacs
  4. M-m a o c (Org Capture) file's task into notes.org

Emacs moves customize'd settings to a known place in the .emacs file each time, so moving it doesn't seem to help.

opie4624 commented 8 years ago

@syl20bnr My primary concern over blindly stepping on customized variables is that it effectively breaks documentation for the packages themselves. For example, the chapter on using and setting up Org Capture mode starts out encouraging users to use M-x customize-variable to configure the variables that Capture uses. Many of these are also set using setq in the layer files which execute after customize variables are setup.

Should this be a broader issue to establish a variable setting method used in layers other than setq that would respect any existing customized variables where appropriate?

ruibinx commented 8 years ago

Moving auto-generated custom variables into dotspacemacs/user-config fixes this problem.

opie4624 commented 8 years ago

Correct. This fixes the problem, but breaks any usage of customize.

On Tue, May 24, 2016 at 12:09 PM Xing Robin notifications@github.com wrote:

Moving auto-generated custom variables into dotspacemacs/user-config fixes this problem.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/syl20bnr/spacemacs/issues/5170#issuecomment-221368969

syl20bnr commented 7 years ago

Should be fixed in develop with commit https://github.com/syl20bnr/spacemacs/commit/e699f18

ksjogo commented 7 years ago

This change broke some '--batch' '--eval' Emacs calls relying on customized values (e.g. 'paradox-github-token' for emacs upgrades via the command line). Is the function not called when in script mode?

Also the application of unsafe dir locals and their writing seems to cause issue, but I need to further pin that down.

ksjogo commented 7 years ago

Any customization I try with the gui at the moment will result in a "selected deleted buffer".

et2010 commented 7 years ago

This change broke some '--batch' '--eval' Emacs calls relying on customized values (e.g. 'paradox-github-token' for emacs upgrades via the command line).

Any customization I try with the gui at the moment will result in a "selected deleted buffer".

I think I got the same issue: #7963