{"action":"created","issue":{"url":"https://api.github.com/repos/phildawes/racer/issues/203","labels_url":"https://api.github.com/repos/phildawes/racer/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/phildawes/racer/issues/203/comments","events_url":"https://api.github.com/repos/phildawes/racer/issues/203/events","html_url":"https://github.com/phildawes/racer/issues/203","id":69299033,"number":203,"title":"Emacs: annotations don't appear on the first completion","user":{"login":"ane","id":174208,"avatar_url":"https://avatars.githubusercontent.com/u/174208?v=3","gravatar_id":"","url":"https://api.github.com/users/ane","html_url":"https://github.com/ane","followers_url":"https://api.github.com/users/ane/followers","following_url":"https://api.github.com/users/ane/following{/other_user}","gists_url":"https://api.github.com/users/ane/gists{/gist_id}","starred_url":"https://api.github.com/users/ane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ane/subscriptions","organizations_url":"https://api.github.com/users/ane/orgs","repos_url":"https://api.github.com/users/ane/repos","events_url":"https://api.github.com/users/ane/events{/privacy}","received_events_url":"https://api.github.com/users/ane/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-18T11:14:31Z","updated_at":"2015-04-18T11:33:06Z","closed_at":null,"body":"When completing, the annotations don't appear initially, you have to browse through the candidates to get them to appear. Specifically:\r\n\r\n1. Type `std::io::` and then <kbd>TAB</kbd>\r\n2. No annotations appear\r\n3. Press <kbd>M-n</kbd> to select next\r\n4. Annotations appear\r\n\r\nI fiddled with the completion function in racer.el and I found out that if you remove the `(when (looking-back \"[a-zA-Z <..>\")` bit around the cl-case in the completion command, the annotations appear immediately. \r\n\r\nI don't understand what causes that behaviour: does it get called with an empty completion buffer, so on the first try `looking-back` returns false? Removing it altogether seemed to fix the issue. Unless this is desired behaviour!\r\n\r\nPossible fix:\r\n\r\n1. Remove surrounding `when` expression in `race-company-complete`\r\n2. Re-evaluate with <kbd>C-M-x</kbd>\r\n3. Go complete something\r\n4. Annotations appear immediately."},"comment":{"url":"https://api.github.com/repos/phildawes/racer/issues/comments/94157995","html_url":"https://github.com/phildawes/racer/issues/203#issuecomment-94157995","issue_url":"https://api.github.com/repos/phildawes/racer/issues/203","id":94157995,"user":{"login":"ane","id":174208,"avatar_url":"https://avatars.githubusercontent.com/u/174208?v=3","gravatar_id":"","url":"https://api.github.com/users/ane","html_url":"https://github.com/ane","followers_url":"https://api.github.com/users/ane/followers","following_url":"https://api.github.com/users/ane/following{/other_user}","gists_url":"https://api.github.com/users/ane/gists{/gist_id}","starred_url":"https://api.github.com/users/ane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ane/subscriptions","organizations_url":"https://api.github.com/users/ane/orgs","repos_url":"https://api.github.com/users/ane/repos","events_url":"https://api.github.com/users/ane/events{/privacy}","received_events_url":"https://api.github.com/users/ane/received_events","type":"User","site_admin":false},"created_at":"2015-04-18T11:33:06Z","updated_at":"2015-04-18T11:33:06Z","body":"There seems to be an alternative way to implement the prefix position lookup: https://github.com/company-mode/company-mode/wiki/Writing-backends#advanced-example but I don't know exactly how that differns from `racer--prefix`."}}