{"action":"created","issue":{"url":"https://api.github.com/repos/mrkkrp/vimish-fold/issues/25","labels_url":"https://api.github.com/repos/mrkkrp/vimish-fold/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/mrkkrp/vimish-fold/issues/25/comments","events_url":"https://api.github.com/repos/mrkkrp/vimish-fold/issues/25/events","html_url":"https://github.com/mrkkrp/vimish-fold/issues/25","id":109640862,"number":25,"title":"Folds not reloading","user":{"login":"tbekolay","id":203709,"avatar_url":"https://avatars.githubusercontent.com/u/203709?v=3","gravatar_id":"","url":"https://api.github.com/users/tbekolay","html_url":"https://github.com/tbekolay","followers_url":"https://api.github.com/users/tbekolay/followers","following_url":"https://api.github.com/users/tbekolay/following{/other_user}","gists_url":"https://api.github.com/users/tbekolay/gists{/gist_id}","starred_url":"https://api.github.com/users/tbekolay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbekolay/subscriptions","organizations_url":"https://api.github.com/users/tbekolay/orgs","repos_url":"https://api.github.com/users/tbekolay/repos","events_url":"https://api.github.com/users/tbekolay/events{/privacy}","received_events_url":"https://api.github.com/users/tbekolay/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-03T19:29:48Z","updated_at":"2015-10-04T10:25:29Z","closed_at":"2015-10-04T10:25:29Z","body":"First, thanks a lot for this package, the functionality is exactly what I've been looking for!\r\n\r\nI'm trying to figure out why my folds aren't reloading when I restart Emacs. I visited a file and made some folds, then closed Emacs. I verified that I have a folder inside my `.emacs.d` called `vimish-fold`, and it contains a file that seems like it has my folds saved in it, and the filename makes sense for the file I originally visited. However, when I reopen Emacs and visit that file, the folds do not reappear. Nothing of interest shows up in `*Messages*`.\r\n\r\nIs there something I need to add to my configuration to enable folds to be reloaded? I've already enabled `vimish-fold-global-mode` and have assigned a few keyboard mappings."},"comment":{"url":"https://api.github.com/repos/mrkkrp/vimish-fold/issues/comments/145334100","html_url":"https://github.com/mrkkrp/vimish-fold/issues/25#issuecomment-145334100","issue_url":"https://api.github.com/repos/mrkkrp/vimish-fold/issues/25","id":145334100,"user":{"login":"tbekolay","id":203709,"avatar_url":"https://avatars.githubusercontent.com/u/203709?v=3","gravatar_id":"","url":"https://api.github.com/users/tbekolay","html_url":"https://github.com/tbekolay","followers_url":"https://api.github.com/users/tbekolay/followers","following_url":"https://api.github.com/users/tbekolay/following{/other_user}","gists_url":"https://api.github.com/users/tbekolay/gists{/gist_id}","starred_url":"https://api.github.com/users/tbekolay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbekolay/subscriptions","organizations_url":"https://api.github.com/users/tbekolay/orgs","repos_url":"https://api.github.com/users/tbekolay/repos","events_url":"https://api.github.com/users/tbekolay/events{/privacy}","received_events_url":"https://api.github.com/users/tbekolay/received_events","type":"User","site_admin":false},"created_at":"2015-10-04T10:25:29Z","updated_at":"2015-10-04T10:25:29Z","body":"Thanks, trying that command helped me track down the issue :)\r\n\r\nSo, the root cause is that I am using [jwiegley's `use-package`](https://github.com/jwiegley/use-package) macro to keep my .emacs tidy and fast. Using `use-package` automatically `autoload`s packages, rather than doing `require`. When trying to eval `vimish-fold--folds-in`, I noticed that it wasn't defined; instead, only the \"public\" functions (e.g., `vimish-fold-delete`, but nothing starting with `vimish-fold--`) were defined.\r\n\r\nI removed the use of `use-package`, and just did `(require 'vimish-fold)`, and folding loaded up properly. Functions starting with `vimish-fold--` were also now available. I then tried to do `autoload` manually, and that worked as well.\r\n\r\nMy conclusion is that `use-package` is doing something strange with the autoloading that I don't understand. Perhaps it can be made to work, but for the time being, I just turned off autoloading by passing in the `:demand` flag. Folding now loads properly when I visit the file again.\r\n\r\nFor reference, here's what is currently in my .emacs for anyone that uses `use-package`:\r\n\r\n```elisp\r\n(use-package vimish-fold\r\n    :demand\r\n    :config (vimish-fold-global-mode 1)\r\n    :bind ((\"C-<tab>\" . vimish-fold)\r\n           (\"C-s-<tab>\" . vimish-fold-delete)\r\n           (\"M-n\" . vimish-fold-next-fold)\r\n           (\"M-p\" . vimish-fold-previous-fold)))\r\n```"}}