wasamasa / eyebrowse

A simple-minded way of managing window configs in emacs
GNU General Public License v3.0
437 stars 24 forks source link

eyebrowse-mode-line-indicator void at start #99

Closed mrcnski closed 5 years ago

mrcnski commented 5 years ago

Hi...

When I start Emacs, before I have any eyebrowse workspaces open, eyebrowse-mode-line-indicator does not exist. This means I have to use the cumbersome (when (fboundp 'eyebrowse-mode-line-indicator) whenever I call eyebrose-mode-line-indicator (e.g. in the mode-line).

After creating a workspace, the function exists. If I delete the workspace (so the state of Emacs is the same as when I started), it continues to exist. So I think it should just exist from the get-go.

I thought that maybe adding :ensure t to my use-package declaration would help, but no cigar. Maybe you can assist me.

wasamasa commented 5 years ago

Sorry, but no. I don't use use-package and cannot reproduce what you're describing without it at all.

mrcnski commented 5 years ago

No problem. I read a bit about autoloading and proceeded to delve deep into the eyebrowse source code, discovering, that this particular function was not autoloaded. Using :demand t in my use-package declaration forced the whole package to be loaded, and I was able to remove the foundp (or whatever) call. 🎉

Bye bye to the following!

Error during redisplay: (eval (concat (mode-line-fill (+ 1 (length (substring-no-properties (eyebrowse-mode-line-indicator))))) (eyebrowse-mode-line-indicator))) signaled (void-function eyebrowse-mode-line-indicator) [347 times]

Glad we were able to set aside our differences long enough to correct this pernicious problem in my .init.el.