{"action":"created","issue":{"url":"https://api.github.com/repos/jwiegley/use-package/issues/734","repository_url":"https://api.github.com/repos/jwiegley/use-package","labels_url":"https://api.github.com/repos/jwiegley/use-package/issues/734/labels{/name}","comments_url":"https://api.github.com/repos/jwiegley/use-package/issues/734/comments","events_url":"https://api.github.com/repos/jwiegley/use-package/issues/734/events","html_url":"https://github.com/jwiegley/use-package/issues/734","id":380333311,"node_id":"MDU6SXNzdWUzODAzMzMzMTE=","number":734,"title":"add-hook leads to errors with company-mode","user":{"login":"titaniumbones","id":364340,"node_id":"MDQ6VXNlcjM2NDM0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/364340?v=4","gravatar_id":"","url":"https://api.github.com/users/titaniumbones","html_url":"https://github.com/titaniumbones","followers_url":"https://api.github.com/users/titaniumbones/followers","following_url":"https://api.github.com/users/titaniumbones/following{/other_user}","gists_url":"https://api.github.com/users/titaniumbones/gists{/gist_id}","starred_url":"https://api.github.com/users/titaniumbones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/titaniumbones/subscriptions","organizations_url":"https://api.github.com/users/titaniumbones/orgs","repos_url":"https://api.github.com/users/titaniumbones/repos","events_url":"https://api.github.com/users/titaniumbones/events{/privacy}","received_events_url":"https://api.github.com/users/titaniumbones/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-13T17:14:49Z","updated_at":"2018-12-04T23:58:06Z","closed_at":null,"author_association":"NONE","body":"Copying over from my erroneous report in company-mode/company-mode#842.  I'm getting an error on startup that I'm having trouble tracking down, and am wondering if you can help me figure out where it comes from.  \r\n\r\nI initialize company with use-package: \r\n\r\n```\r\n(use-package company\r\n      :ensure t\r\n      :hook\r\n      (after-init . 'global-company-mode) )\r\n```\r\nI would expect that the value of `after-init-hook` would now include `global-company-mode` , but instead it looks like this:\r\n\r\n(#[0 \"\\303\\211\b\\235\\203\u0010\\0\\304\u0001\b\\\"\u0010\\301\\305!\\210\\210\t\\205\u001B\\0\\306 \\210\\307\\211\u0012\\207\" [command-line-args desktop-save-mode inhibit-startup-screen \"--no-desktop\" delete 0 desktop-read t] 4] global-emojify-mode company global-flycheck-mode x-wm-set-size-hint tramp-register-archive-file-name-handler table--make-cell-map)\r\n```\r\nSeveral of these are mysterious to me but the only one that errors out is `company` which gives the following (called manually here):\r\n\r\n```\r\nDebugger entered--Lisp error: (error \"Autoloading file /home/matt/.emacs.d/elpa/company-20181012.2220/company.elc failed to define function company\")\r\n  (company)\r\n  eval((company) nil)\r\n  eval-expression((company) nil nil 127)\r\n  funcall-interactively(eval-expression (company) nil nil 127)\r\n  call-interactively(eval-expression nil nil)\r\n  command-execute(eval-expression)\r\n```\r\n\r\n`pp-macroexpand-last-sexp` gives\r\n\r\n```\r\n(progn\r\n  (use-package-ensure-elpa 'company\r\n                           '(t)\r\n                           'nil)\r\n  (defvar use-package--warning115\r\n    #'(lambda\r\n        (keyword err)\r\n        (let\r\n            ((msg\r\n              (format \"%s/%s: %s\" 'company keyword\r\n                      (error-message-string err))))\r\n          (display-warning 'use-package msg :error))))\r\n  (condition-case-unless-debug err\r\n      (progn\r\n        (unless\r\n            (fboundp 'company)\r\n          (autoload #'company \"company\" nil t))\r\n        (add-hook 'after-init-hook #'company)\r\n        (add-hook 'quote-hook #'company)\r\n        (add-hook 'global-company-mode-hook #'company))\r\n    (error\r\n     (funcall use-package--warning115 :catch err))))\r\n```\r\n\r\nAny idea what might be causing this? looks like it might be similar to #731. Thanks!\r\n\r\nMatt"},"comment":{"url":"https://api.github.com/repos/jwiegley/use-package/issues/comments/444305592","html_url":"https://github.com/jwiegley/use-package/issues/734#issuecomment-444305592","issue_url":"https://api.github.com/repos/jwiegley/use-package/issues/734","id":444305592,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDMwNTU5Mg==","user":{"login":"jpkotta","id":198850,"node_id":"MDQ6VXNlcjE5ODg1MA==","avatar_url":"https://avatars3.githubusercontent.com/u/198850?v=4","gravatar_id":"","url":"https://api.github.com/users/jpkotta","html_url":"https://github.com/jpkotta","followers_url":"https://api.github.com/users/jpkotta/followers","following_url":"https://api.github.com/users/jpkotta/following{/other_user}","gists_url":"https://api.github.com/users/jpkotta/gists{/gist_id}","starred_url":"https://api.github.com/users/jpkotta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpkotta/subscriptions","organizations_url":"https://api.github.com/users/jpkotta/orgs","repos_url":"https://api.github.com/users/jpkotta/repos","events_url":"https://api.github.com/users/jpkotta/events{/privacy}","received_events_url":"https://api.github.com/users/jpkotta/received_events","type":"User","site_admin":false},"created_at":"2018-12-04T23:58:06Z","updated_at":"2018-12-04T23:58:06Z","author_association":"NONE","body":"You probably just need to remove the quote on the function: `(after-init . global-company-mode)`.  The examples don't have quotes, and no quotes is consistent with the `:bind` syntax."}}
{"actor":{"display_login":"jpkotta"}}