{"action":"created","comment":{"url":"https://api.github.com/repos/flycheck/flycheck/pulls/comments/81768369","pull_request_review_id":2723512,"id":81768369,"diff_hunk":"@@ -137,9 +137,8 @@\n       (it \"has the error ID in the 4th cell\"\n         (expect (aref cells 3) :to-equal\n                 (list \"W1\"\n-                      'type 'flycheck-error-list\n-                      'face 'flycheck-error-list-id\n-                      'help-echo \"W1\")))","path":"test/specs/test-error-list.el","position":6,"original_position":6,"commit_id":"e9527ff7a48c47890392eeda89b848ad6cd84050","original_commit_id":"1dd61de4bb8bcf08396aad2615acfe05ea130aad","user":{"login":"lunaryorn","id":224922,"avatar_url":"https://avatars.githubusercontent.com/u/224922?v=3","gravatar_id":"","url":"https://api.github.com/users/lunaryorn","html_url":"https://github.com/lunaryorn","followers_url":"https://api.github.com/users/lunaryorn/followers","following_url":"https://api.github.com/users/lunaryorn/following{/other_user}","gists_url":"https://api.github.com/users/lunaryorn/gists{/gist_id}","starred_url":"https://api.github.com/users/lunaryorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunaryorn/subscriptions","organizations_url":"https://api.github.com/users/lunaryorn/orgs","repos_url":"https://api.github.com/users/lunaryorn/repos","events_url":"https://api.github.com/users/lunaryorn/events{/privacy}","received_events_url":"https://api.github.com/users/lunaryorn/received_events","type":"User","site_admin":false},"body":"@fmdkdd Please restore the former help echo which showed the whole error ID.  I did serve a not so unimportant purpose on the error ID column; we must not remove that.","created_at":"2016-10-04T14:25:36Z","updated_at":"2016-10-04T14:25:37Z","html_url":"https://github.com/flycheck/flycheck/pull/1122#discussion_r81768369","pull_request_url":"https://api.github.com/repos/flycheck/flycheck/pulls/1122","_links":{"self":{"href":"https://api.github.com/repos/flycheck/flycheck/pulls/comments/81768369"},"html":{"href":"https://github.com/flycheck/flycheck/pull/1122#discussion_r81768369"},"pull_request":{"href":"https://api.github.com/repos/flycheck/flycheck/pulls/1122"}}},"pull_request":{"url":"https://api.github.com/repos/flycheck/flycheck/pulls/1122","id":87361045,"html_url":"https://github.com/flycheck/flycheck/pull/1122","diff_url":"https://github.com/flycheck/flycheck/pull/1122.diff","patch_url":"https://github.com/flycheck/flycheck/pull/1122.patch","issue_url":"https://api.github.com/repos/flycheck/flycheck/issues/1122","number":1122,"state":"open","locked":false,"title":"Add the ability to explain error at point","user":{"login":"fmdkdd","id":340129,"avatar_url":"https://avatars.githubusercontent.com/u/340129?v=3","gravatar_id":"","url":"https://api.github.com/users/fmdkdd","html_url":"https://github.com/fmdkdd","followers_url":"https://api.github.com/users/fmdkdd/followers","following_url":"https://api.github.com/users/fmdkdd/following{/other_user}","gists_url":"https://api.github.com/users/fmdkdd/gists{/gist_id}","starred_url":"https://api.github.com/users/fmdkdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmdkdd/subscriptions","organizations_url":"https://api.github.com/users/fmdkdd/orgs","repos_url":"https://api.github.com/users/fmdkdd/repos","events_url":"https://api.github.com/users/fmdkdd/events{/privacy}","received_events_url":"https://api.github.com/users/fmdkdd/received_events","type":"User","site_admin":false},"body":"Following the discussion in flycheck/flycheck-rust#35, @lunaryorn was open to add an \"explain error at point\" functionality to flycheck.  This pull request is a sketch implementation for that feature.\r\n\r\n### Background\r\nIn rust-lang, the compiler can produce clear (and lengthy!) explanations for error messages.  For instance:\r\n\r\n>This error occurs when an attempt is made to use a variable after its contents\r\nhave been moved elsewhere. For example:\r\n```\r\nstruct MyStruct { s: u32 }\r\n\r\n>fn main() {\r\n    let mut x = MyStruct{ s: 5u32 };\r\n    let y = x;\r\n    x.s = 6;\r\n    println!(\"{}\", x.s);\r\n}\r\n```\r\nSince `MyStruct` is a type that is not marked `Copy`, the data gets moved out\r\nof `x` when we set `y`. This is fundamental to Rust's ownership system: outside\r\nof workarounds like `Rc`, a value cannot be owned by more than one variable.\r\n[...]\r\n\r\nThese explanations are quite useful, especially for beginners, and we should encourage users to look them up.  By default, the rust compiler will emit the following message when there are errors with explanations:\r\n\r\n```\r\nrun `rustc --explain E0499` to see a detailed explanation\r\n```\r\n\r\nWe used to have this message as well in the echo area and the error list, but not since we switched to the new JSON parser in #1036, since this specific line is not part of the JSON output.\r\n\r\nTo remedy that, I added a function to display the explanation for the error under point in an help buffer, in flycheck/flycheck-rust#30.  But I don't think many rust users noticed, unless they looked at the source or keep in touch with our pull requests.\r\n\r\nIn flycheck/flycheck-rust#35 I proposed to add a default keybinding to make this function more discoverable, and @lunaryorn suggested to make the functionality generic, hence this PR.\r\n\r\n### Sketch implementation\r\nThis commit adds a new optional checker property, `error-explainer`, which should be a function that returns the explanation (as a string) for a given error (a `flycheck-error` object).\r\n\r\nIt also adds an interactive function `flycheck-explain-error-at-point` (bound to `C-c ! r` by default), which gets the error under point, calls the error-explainer (if any) to get an explanation string, then calls a new function `flycheck-display-error-explanation` to open an help buffer containing the explanation string.\r\n\r\n### Discussion points\r\nI open the PR now so that we can discuss the merits of the feature, as well as the implementation strategy.  It already works for Rust as is, but please overlook the specifics of the code yet, as much of the design isn't settled yet.\r\n\r\nHere are some points I would like some feedback on:\r\n\r\n1. Are there any other checkers that could use this functionality?  If not, then maybe staying with the `explain-error` function in flycheck-rust is best to avoid technical debt.\r\n\r\n2. At the moment, the code will only try to explain the *first* error under point.  There could of course be multiple errors under point, so how do we choose which error to explain?  As a first step, we could try to call the explainer on all the errors under point, and return the first explanation that comes.  I don't have an example in rust where *different* explanations appear under point, but with multiple checkers enabled and multiple explainer functions, this could be an usability issue.\r\n\r\n3. Should this functionality also be present in the error list?  It seems to me it should, and there wouldn't be any of the above ambiguity in the list.","created_at":"2016-09-29T17:49:57Z","updated_at":"2016-10-04T14:25:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7cfc81fc76361eb0d62b2a2dbb7feb8ba0c4514b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/flycheck/flycheck/pulls/1122/commits","review_comments_url":"https://api.github.com/repos/flycheck/flycheck/pulls/1122/comments","review_comment_url":"https://api.github.com/repos/flycheck/flycheck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flycheck/flycheck/issues/1122/comments","statuses_url":"https://api.github.com/repos/flycheck/flycheck/statuses/e9527ff7a48c47890392eeda89b848ad6cd84050","head":{"label":"flycheck:add-checker-explainer","ref":"add-checker-explainer","sha":"e9527ff7a48c47890392eeda89b848ad6cd84050","user":{"login":"flycheck","id":5254142,"avatar_url":"https://avatars.githubusercontent.com/u/5254142?v=3","gravatar_id":"","url":"https://api.github.com/users/flycheck","html_url":"https://github.com/flycheck","followers_url":"https://api.github.com/users/flycheck/followers","following_url":"https://api.github.com/users/flycheck/following{/other_user}","gists_url":"https://api.github.com/users/flycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/flycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flycheck/subscriptions","organizations_url":"https://api.github.com/users/flycheck/orgs","repos_url":"https://api.github.com/users/flycheck/repos","events_url":"https://api.github.com/users/flycheck/events{/privacy}","received_events_url":"https://api.github.com/users/flycheck/received_events","type":"Organization","site_admin":false},"repo":{"id":6158882,"name":"flycheck","full_name":"flycheck/flycheck","owner":{"login":"flycheck","id":5254142,"avatar_url":"https://avatars.githubusercontent.com/u/5254142?v=3","gravatar_id":"","url":"https://api.github.com/users/flycheck","html_url":"https://github.com/flycheck","followers_url":"https://api.github.com/users/flycheck/followers","following_url":"https://api.github.com/users/flycheck/following{/other_user}","gists_url":"https://api.github.com/users/flycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/flycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flycheck/subscriptions","organizations_url":"https://api.github.com/users/flycheck/orgs","repos_url":"https://api.github.com/users/flycheck/repos","events_url":"https://api.github.com/users/flycheck/events{/privacy}","received_events_url":"https://api.github.com/users/flycheck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flycheck/flycheck","description":"On the fly syntax checking for GNU Emacs","fork":false,"url":"https://api.github.com/repos/flycheck/flycheck","forks_url":"https://api.github.com/repos/flycheck/flycheck/forks","keys_url":"https://api.github.com/repos/flycheck/flycheck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flycheck/flycheck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flycheck/flycheck/teams","hooks_url":"https://api.github.com/repos/flycheck/flycheck/hooks","issue_events_url":"https://api.github.com/repos/flycheck/flycheck/issues/events{/number}","events_url":"https://api.github.com/repos/flycheck/flycheck/events","assignees_url":"https://api.github.com/repos/flycheck/flycheck/assignees{/user}","branches_url":"https://api.github.com/repos/flycheck/flycheck/branches{/branch}","tags_url":"https://api.github.com/repos/flycheck/flycheck/tags","blobs_url":"https://api.github.com/repos/flycheck/flycheck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flycheck/flycheck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flycheck/flycheck/git/refs{/sha}","trees_url":"https://api.github.com/repos/flycheck/flycheck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flycheck/flycheck/statuses/{sha}","languages_url":"https://api.github.com/repos/flycheck/flycheck/languages","stargazers_url":"https://api.github.com/repos/flycheck/flycheck/stargazers","contributors_url":"https://api.github.com/repos/flycheck/flycheck/contributors","subscribers_url":"https://api.github.com/repos/flycheck/flycheck/subscribers","subscription_url":"https://api.github.com/repos/flycheck/flycheck/subscription","commits_url":"https://api.github.com/repos/flycheck/flycheck/commits{/sha}","git_commits_url":"https://api.github.com/repos/flycheck/flycheck/git/commits{/sha}","comments_url":"https://api.github.com/repos/flycheck/flycheck/comments{/number}","issue_comment_url":"https://api.github.com/repos/flycheck/flycheck/issues/comments{/number}","contents_url":"https://api.github.com/repos/flycheck/flycheck/contents/{+path}","compare_url":"https://api.github.com/repos/flycheck/flycheck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flycheck/flycheck/merges","archive_url":"https://api.github.com/repos/flycheck/flycheck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flycheck/flycheck/downloads","issues_url":"https://api.github.com/repos/flycheck/flycheck/issues{/number}","pulls_url":"https://api.github.com/repos/flycheck/flycheck/pulls{/number}","milestones_url":"https://api.github.com/repos/flycheck/flycheck/milestones{/number}","notifications_url":"https://api.github.com/repos/flycheck/flycheck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flycheck/flycheck/labels{/name}","releases_url":"https://api.github.com/repos/flycheck/flycheck/releases{/id}","deployments_url":"https://api.github.com/repos/flycheck/flycheck/deployments","created_at":"2012-10-10T14:45:13Z","updated_at":"2016-10-04T02:57:17Z","pushed_at":"2016-10-04T13:51:51Z","git_url":"git://github.com/flycheck/flycheck.git","ssh_url":"git@github.com:flycheck/flycheck.git","clone_url":"https://github.com/flycheck/flycheck.git","svn_url":"https://github.com/flycheck/flycheck","homepage":"http://www.flycheck.org","size":18905,"stargazers_count":1139,"watchers_count":1139,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":224,"mirror_url":null,"open_issues_count":62,"forks":224,"open_issues":62,"watchers":1139,"default_branch":"master"}},"base":{"label":"flycheck:master","ref":"master","sha":"c6fc7237f55cc61cced7a400f331491333b1f2a9","user":{"login":"flycheck","id":5254142,"avatar_url":"https://avatars.githubusercontent.com/u/5254142?v=3","gravatar_id":"","url":"https://api.github.com/users/flycheck","html_url":"https://github.com/flycheck","followers_url":"https://api.github.com/users/flycheck/followers","following_url":"https://api.github.com/users/flycheck/following{/other_user}","gists_url":"https://api.github.com/users/flycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/flycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flycheck/subscriptions","organizations_url":"https://api.github.com/users/flycheck/orgs","repos_url":"https://api.github.com/users/flycheck/repos","events_url":"https://api.github.com/users/flycheck/events{/privacy}","received_events_url":"https://api.github.com/users/flycheck/received_events","type":"Organization","site_admin":false},"repo":{"id":6158882,"name":"flycheck","full_name":"flycheck/flycheck","owner":{"login":"flycheck","id":5254142,"avatar_url":"https://avatars.githubusercontent.com/u/5254142?v=3","gravatar_id":"","url":"https://api.github.com/users/flycheck","html_url":"https://github.com/flycheck","followers_url":"https://api.github.com/users/flycheck/followers","following_url":"https://api.github.com/users/flycheck/following{/other_user}","gists_url":"https://api.github.com/users/flycheck/gists{/gist_id}","starred_url":"https://api.github.com/users/flycheck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flycheck/subscriptions","organizations_url":"https://api.github.com/users/flycheck/orgs","repos_url":"https://api.github.com/users/flycheck/repos","events_url":"https://api.github.com/users/flycheck/events{/privacy}","received_events_url":"https://api.github.com/users/flycheck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flycheck/flycheck","description":"On the fly syntax checking for GNU Emacs","fork":false,"url":"https://api.github.com/repos/flycheck/flycheck","forks_url":"https://api.github.com/repos/flycheck/flycheck/forks","keys_url":"https://api.github.com/repos/flycheck/flycheck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flycheck/flycheck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flycheck/flycheck/teams","hooks_url":"https://api.github.com/repos/flycheck/flycheck/hooks","issue_events_url":"https://api.github.com/repos/flycheck/flycheck/issues/events{/number}","events_url":"https://api.github.com/repos/flycheck/flycheck/events","assignees_url":"https://api.github.com/repos/flycheck/flycheck/assignees{/user}","branches_url":"https://api.github.com/repos/flycheck/flycheck/branches{/branch}","tags_url":"https://api.github.com/repos/flycheck/flycheck/tags","blobs_url":"https://api.github.com/repos/flycheck/flycheck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flycheck/flycheck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flycheck/flycheck/git/refs{/sha}","trees_url":"https://api.github.com/repos/flycheck/flycheck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flycheck/flycheck/statuses/{sha}","languages_url":"https://api.github.com/repos/flycheck/flycheck/languages","stargazers_url":"https://api.github.com/repos/flycheck/flycheck/stargazers","contributors_url":"https://api.github.com/repos/flycheck/flycheck/contributors","subscribers_url":"https://api.github.com/repos/flycheck/flycheck/subscribers","subscription_url":"https://api.github.com/repos/flycheck/flycheck/subscription","commits_url":"https://api.github.com/repos/flycheck/flycheck/commits{/sha}","git_commits_url":"https://api.github.com/repos/flycheck/flycheck/git/commits{/sha}","comments_url":"https://api.github.com/repos/flycheck/flycheck/comments{/number}","issue_comment_url":"https://api.github.com/repos/flycheck/flycheck/issues/comments{/number}","contents_url":"https://api.github.com/repos/flycheck/flycheck/contents/{+path}","compare_url":"https://api.github.com/repos/flycheck/flycheck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flycheck/flycheck/merges","archive_url":"https://api.github.com/repos/flycheck/flycheck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flycheck/flycheck/downloads","issues_url":"https://api.github.com/repos/flycheck/flycheck/issues{/number}","pulls_url":"https://api.github.com/repos/flycheck/flycheck/pulls{/number}","milestones_url":"https://api.github.com/repos/flycheck/flycheck/milestones{/number}","notifications_url":"https://api.github.com/repos/flycheck/flycheck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flycheck/flycheck/labels{/name}","releases_url":"https://api.github.com/repos/flycheck/flycheck/releases{/id}","deployments_url":"https://api.github.com/repos/flycheck/flycheck/deployments","created_at":"2012-10-10T14:45:13Z","updated_at":"2016-10-04T02:57:17Z","pushed_at":"2016-10-04T13:51:51Z","git_url":"git://github.com/flycheck/flycheck.git","ssh_url":"git@github.com:flycheck/flycheck.git","clone_url":"https://github.com/flycheck/flycheck.git","svn_url":"https://github.com/flycheck/flycheck","homepage":"http://www.flycheck.org","size":18905,"stargazers_count":1139,"watchers_count":1139,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":224,"mirror_url":null,"open_issues_count":62,"forks":224,"open_issues":62,"watchers":1139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flycheck/flycheck/pulls/1122"},"html":{"href":"https://github.com/flycheck/flycheck/pull/1122"},"issue":{"href":"https://api.github.com/repos/flycheck/flycheck/issues/1122"},"comments":{"href":"https://api.github.com/repos/flycheck/flycheck/issues/1122/comments"},"review_comments":{"href":"https://api.github.com/repos/flycheck/flycheck/pulls/1122/comments"},"review_comment":{"href":"https://api.github.com/repos/flycheck/flycheck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flycheck/flycheck/pulls/1122/commits"},"statuses":{"href":"https://api.github.com/repos/flycheck/flycheck/statuses/e9527ff7a48c47890392eeda89b848ad6cd84050"}}}}
{"actor":{"display_login":"lunaryorn"}}