[emacs-berlin] A doubt about use-package
jman
emacs-berlin at storiepvtride.it
Sat Jan 23 14:38:16 UTC 2021
Hallo Narendra, followup on this issue: I think I've solved the issue!
Your snippet here to watch a variable was pivotal to let me understand the
issue.
>> --8<---------------cut here---------------start------------->8---
>> (add-variable-watcher 'the-var-to-be-watched
>> (lambda (sym new-value operation where)
>> (message "Value for %s getting modified to %s with
>> %s in buffer %s"
>> sym new-value operation where)))
>>
>> --8<---------------cut here---------------end--------------->8---
So, what was the issue?
In my `init.el` I had something like this:
(load "~/.config/emacs/mu4e-config.el")
(require 'org-mu4e)
`mu4e-config.el` is a huge block such as this:
(use-package mu4e
:load-path "~/.local/share/emacs/site-lisp/mu4e/"
:commands mu4e
:init
...
:config
...
:custom
...)
Apparently the `(require 'org-mu4e)` immediately after would reset to nil the
variable I was watching, here's a log snippet:
...
Loading ~/.config/emacs/mu4e-config.el (source)...done
>>> Value for mu4e-update-interval getting modified to 5 with set in buffer nil
Loading ~/.config/emacs/custom.el (source)...
Loading whitespace...done
Loading paren...done
>>> Value for mu4e-update-interval getting modified to nil with set in buffer
>>> nil
Loading ~/.config/emacs/custom.el (source)...done
Turning on magit-auto-revert-mode...done
...
I'm not sure why, I guess it has to do with org-mode now being enabled
by default in mu4e (since 1.4) and there's no need anymore to import
`org-mu4e`. Reimporting a deprecated package would probably reset
everything (I don't know, just my blind guess).
Anyway, I think I can now move forward from here.
Thank you again for giving ne the tools to debug the issue :-)
More information about the emacs-berlin
mailing list