{"action":"created","issue":{"url":"https://api.github.com/repos/kazu-yamamoto/ghc-mod/issues/492","labels_url":"https://api.github.com/repos/kazu-yamamoto/ghc-mod/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/kazu-yamamoto/ghc-mod/issues/492/comments","events_url":"https://api.github.com/repos/kazu-yamamoto/ghc-mod/issues/492/events","html_url":"https://github.com/kazu-yamamoto/ghc-mod/pull/492","id":85216416,"number":492,"title":"add elispPath command to bootstrap elisp code from ghc-mod installation","user":{"login":"etrepum","id":26596,"avatar_url":"https://avatars.githubusercontent.com/u/26596?v=3","gravatar_id":"","url":"https://api.github.com/users/etrepum","html_url":"https://github.com/etrepum","followers_url":"https://api.github.com/users/etrepum/followers","following_url":"https://api.github.com/users/etrepum/following{/other_user}","gists_url":"https://api.github.com/users/etrepum/gists{/gist_id}","starred_url":"https://api.github.com/users/etrepum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etrepum/subscriptions","organizations_url":"https://api.github.com/users/etrepum/orgs","repos_url":"https://api.github.com/users/etrepum/repos","events_url":"https://api.github.com/users/etrepum/events{/privacy}","received_events_url":"https://api.github.com/users/etrepum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-04T18:25:51Z","updated_at":"2015-06-04T18:34:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kazu-yamamoto/ghc-mod/pulls/492","html_url":"https://github.com/kazu-yamamoto/ghc-mod/pull/492","diff_url":"https://github.com/kazu-yamamoto/ghc-mod/pull/492.diff","patch_url":"https://github.com/kazu-yamamoto/ghc-mod/pull/492.patch"},"body":"Per #358 this adds an elispPath command which prints out the elisp directory in the ghc-mod installation. Adds a separate elisp-bootstrap directory with elisp code to call ghc-mod with elispPath and load the real code.\r\n\r\nI don't really know what I'm doing in elisp but this worked for me. Here's what is in my initialization for emacs:\r\n\r\n```elisp\r\n(add-to-list 'load-path \"~/src/ghc-mod/elisp-bootstrap\")\r\n(load \"ghc-mod\")\r\n(add-hook 'haskell-mode-hook (lambda () (ghc-bootstrap)))\r\n(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)\r\n```\r\n\r\nPresumably you'd be able to take the elisp-boostrap dir and upload it to MELPA which would work for all future versions of ghc-mod. Possible enhancements would include better error reporting, in particular if ghc-mod isn't found then it should tell the user to install ghc-mod and ensure that it's on the PATH."},"comment":{"url":"https://api.github.com/repos/kazu-yamamoto/ghc-mod/issues/comments/109001479","html_url":"https://github.com/kazu-yamamoto/ghc-mod/pull/492#issuecomment-109001479","issue_url":"https://api.github.com/repos/kazu-yamamoto/ghc-mod/issues/492","id":109001479,"user":{"login":"etrepum","id":26596,"avatar_url":"https://avatars.githubusercontent.com/u/26596?v=3","gravatar_id":"","url":"https://api.github.com/users/etrepum","html_url":"https://github.com/etrepum","followers_url":"https://api.github.com/users/etrepum/followers","following_url":"https://api.github.com/users/etrepum/following{/other_user}","gists_url":"https://api.github.com/users/etrepum/gists{/gist_id}","starred_url":"https://api.github.com/users/etrepum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etrepum/subscriptions","organizations_url":"https://api.github.com/users/etrepum/orgs","repos_url":"https://api.github.com/users/etrepum/repos","events_url":"https://api.github.com/users/etrepum/events{/privacy}","received_events_url":"https://api.github.com/users/etrepum/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T18:34:17Z","updated_at":"2015-06-04T18:34:17Z","body":"Perhaps then we would move the current elisp code out of elisp/ and move the bootstrap code into there."}}