{"action":"created","issue":{"url":"https://api.github.com/repos/srstevenson/vim-picker/issues/24","repository_url":"https://api.github.com/repos/srstevenson/vim-picker","labels_url":"https://api.github.com/repos/srstevenson/vim-picker/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/srstevenson/vim-picker/issues/24/comments","events_url":"https://api.github.com/repos/srstevenson/vim-picker/issues/24/events","html_url":"https://github.com/srstevenson/vim-picker/pull/24","id":294174446,"number":24,"title":"Add PickerQuickfix and PickerLocationList","user":{"login":"boxofrox","id":636691,"avatar_url":"https://avatars0.githubusercontent.com/u/636691?v=4","gravatar_id":"","url":"https://api.github.com/users/boxofrox","html_url":"https://github.com/boxofrox","followers_url":"https://api.github.com/users/boxofrox/followers","following_url":"https://api.github.com/users/boxofrox/following{/other_user}","gists_url":"https://api.github.com/users/boxofrox/gists{/gist_id}","starred_url":"https://api.github.com/users/boxofrox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxofrox/subscriptions","organizations_url":"https://api.github.com/users/boxofrox/orgs","repos_url":"https://api.github.com/users/boxofrox/repos","events_url":"https://api.github.com/users/boxofrox/events{/privacy}","received_events_url":"https://api.github.com/users/boxofrox/received_events","type":"User","site_admin":false},"labels":[{"id":413446543,"url":"https://api.github.com/repos/srstevenson/vim-picker/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"boxofrox","id":636691,"avatar_url":"https://avatars0.githubusercontent.com/u/636691?v=4","gravatar_id":"","url":"https://api.github.com/users/boxofrox","html_url":"https://github.com/boxofrox","followers_url":"https://api.github.com/users/boxofrox/followers","following_url":"https://api.github.com/users/boxofrox/following{/other_user}","gists_url":"https://api.github.com/users/boxofrox/gists{/gist_id}","starred_url":"https://api.github.com/users/boxofrox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxofrox/subscriptions","organizations_url":"https://api.github.com/users/boxofrox/orgs","repos_url":"https://api.github.com/users/boxofrox/repos","events_url":"https://api.github.com/users/boxofrox/events{/privacy}","received_events_url":"https://api.github.com/users/boxofrox/received_events","type":"User","site_admin":false},"assignees":[{"login":"boxofrox","id":636691,"avatar_url":"https://avatars0.githubusercontent.com/u/636691?v=4","gravatar_id":"","url":"https://api.github.com/users/boxofrox","html_url":"https://github.com/boxofrox","followers_url":"https://api.github.com/users/boxofrox/followers","following_url":"https://api.github.com/users/boxofrox/following{/other_user}","gists_url":"https://api.github.com/users/boxofrox/gists{/gist_id}","starred_url":"https://api.github.com/users/boxofrox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxofrox/subscriptions","organizations_url":"https://api.github.com/users/boxofrox/orgs","repos_url":"https://api.github.com/users/boxofrox/repos","events_url":"https://api.github.com/users/boxofrox/events{/privacy}","received_events_url":"https://api.github.com/users/boxofrox/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-02-04T06:29:17Z","updated_at":"2018-02-10T00:24:22Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/srstevenson/vim-picker/pulls/24","html_url":"https://github.com/srstevenson/vim-picker/pull/24","diff_url":"https://github.com/srstevenson/vim-picker/pull/24.diff","patch_url":"https://github.com/srstevenson/vim-picker/pull/24.patch"},"body":"Resolves #23.\r\n\r\nNames may be a bit wierd.  I decided to conform to Vim's terminology in its manual: `LocationList & Quickfix` instead of `Location & Quickfix` or `LocationList & QuickfixList`.\r\n\r\nSince `:cc` and `:ll` take number arguments, I prefixed each string with its one-based index and a colon separator.  The `PickStringWithId` uses a regex to extract the ID.  For example,\r\n\r\n```\r\n1: First location text\r\n2: Second location text\r\n3: Etc...\r\n```\r\n\r\nI didn't find an alternative in the *selecta* documentation for mapping a selection to another value (other than piping through other commands).  I rejected using a dictionary to map strings to location/quickfix numbers as this didn't seem much better than the regex solution, considering that a string in either list can be excessively long.  Also, I prefer the location/quickfix number in the string as it serves as an easy-to-recognize landmark when looking through the lists.\r\n\r\nAlso updated the readme to reflect the two new commands.\r\n\r\nIf anything is less than satisfactory, I'm happy to make corrections.\r\n\r\nCheers!\r\n\r\nOne more thing to note.  `getqflist` and `getloclist` return lists of dictionaries with:\r\n* `bufnr` : number of buffer that has the file name.\r\n* `lnum` : line number in the buffer (first line is 1)\r\n* `col` : column number (first column is 1)\r\n* `vcol` : TRUE if \"col\" is visual column, FALSE if \"col\" is byte index\r\n* `nr` : error number\r\n* `pattern` : search pattern used to locate the error\r\n* `text` : description of the error\r\n* `type` : type of the error, 'E', '1', etc.\r\n* `valid` : TRUE if recognized error message\r\n\r\nThis patch only uses `text`.  If more details are desired, let me know.\r\n\r\n`bufnr`, `lnum`, and `col` may be useful to include in the picker strings (e.g `1: (bufnr:lnum:col) text`).  `nr` can be all -1 or 0 depending on which vim command populated the list (e.g. `lgrep`).  `pattern`, `type`, and `valid` mean too little for me to include them."},"comment":{"url":"https://api.github.com/repos/srstevenson/vim-picker/issues/comments/364607185","html_url":"https://github.com/srstevenson/vim-picker/pull/24#issuecomment-364607185","issue_url":"https://api.github.com/repos/srstevenson/vim-picker/issues/24","id":364607185,"user":{"login":"boxofrox","id":636691,"avatar_url":"https://avatars0.githubusercontent.com/u/636691?v=4","gravatar_id":"","url":"https://api.github.com/users/boxofrox","html_url":"https://github.com/boxofrox","followers_url":"https://api.github.com/users/boxofrox/followers","following_url":"https://api.github.com/users/boxofrox/following{/other_user}","gists_url":"https://api.github.com/users/boxofrox/gists{/gist_id}","starred_url":"https://api.github.com/users/boxofrox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boxofrox/subscriptions","organizations_url":"https://api.github.com/users/boxofrox/orgs","repos_url":"https://api.github.com/users/boxofrox/repos","events_url":"https://api.github.com/users/boxofrox/events{/privacy}","received_events_url":"https://api.github.com/users/boxofrox/received_events","type":"User","site_admin":false},"created_at":"2018-02-10T00:24:22Z","updated_at":"2018-02-10T00:24:22Z","author_association":"CONTRIBUTOR","body":"Okay, scratch that idea.  Using stdin of the picker process won't work.  The stdin is actually stdin for the TTY, which means once the picker runs, all those strings dumped into `jobsend` or `systemlist` are consumed as keyboard input by the picker instead of as list input.\r\n\r\nLooks like this PR is our best option unless another epiphany smacks me upside the head. :smile:\r\n"}}
{"actor":{"display_login":"boxofrox"}}