{"action":"created","issue":{"url":"https://api.github.com/repos/melpa/melpa/issues/4326","repository_url":"https://api.github.com/repos/melpa/melpa","labels_url":"https://api.github.com/repos/melpa/melpa/issues/4326/labels{/name}","comments_url":"https://api.github.com/repos/melpa/melpa/issues/4326/comments","events_url":"https://api.github.com/repos/melpa/melpa/issues/4326/events","html_url":"https://github.com/melpa/melpa/pull/4326","id":183296926,"number":4326,"title":"Create pygen","user":{"login":"JackCrawley","id":8057822,"avatar_url":"https://avatars.githubusercontent.com/u/8057822?v=3","gravatar_id":"","url":"https://api.github.com/users/JackCrawley","html_url":"https://github.com/JackCrawley","followers_url":"https://api.github.com/users/JackCrawley/followers","following_url":"https://api.github.com/users/JackCrawley/following{/other_user}","gists_url":"https://api.github.com/users/JackCrawley/gists{/gist_id}","starred_url":"https://api.github.com/users/JackCrawley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackCrawley/subscriptions","organizations_url":"https://api.github.com/users/JackCrawley/orgs","repos_url":"https://api.github.com/users/JackCrawley/repos","events_url":"https://api.github.com/users/JackCrawley/events{/privacy}","received_events_url":"https://api.github.com/users/JackCrawley/received_events","type":"User","site_admin":false},"labels":[{"id":84709622,"url":"https://api.github.com/repos/melpa/melpa/labels/recipes","name":"recipes","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-16T22:40:54Z","updated_at":"2016-11-12T22:45:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/melpa/melpa/pulls/4326","html_url":"https://github.com/melpa/melpa/pull/4326","diff_url":"https://github.com/melpa/melpa/pull/4326.diff","patch_url":"https://github.com/melpa/melpa/pull/4326.patch"},"body":"### Brief summary of what the package does\n\nPython code generation with Elpy and Python-Mode.\n\nIt includes a number of commands to automatically generate and manipulate python code.\n### Direct link to the package repository\n\nhttps://github.com/JackCrawley/pygen\n### Your association with the package\n\nAuthor & maintainer\n### Relevant communications with the upstream package maintainer\n\n**None needed**\n### Checklist\n- [x] I've read [CONTRIBUTING.md](https://github.com/melpa/melpa/blob/master/CONTRIBUTING.md)\n- [x] I've built and installed the package using the instructions in the [README](https://github.com/melpa/melpa/blob/master/README.md)\n"},"comment":{"url":"https://api.github.com/repos/melpa/melpa/issues/comments/260153674","html_url":"https://github.com/melpa/melpa/pull/4326#issuecomment-260153674","issue_url":"https://api.github.com/repos/melpa/melpa/issues/4326","id":260153674,"user":{"login":"alphapapa","id":601365,"avatar_url":"https://avatars.githubusercontent.com/u/601365?v=3","gravatar_id":"","url":"https://api.github.com/users/alphapapa","html_url":"https://github.com/alphapapa","followers_url":"https://api.github.com/users/alphapapa/followers","following_url":"https://api.github.com/users/alphapapa/following{/other_user}","gists_url":"https://api.github.com/users/alphapapa/gists{/gist_id}","starred_url":"https://api.github.com/users/alphapapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphapapa/subscriptions","organizations_url":"https://api.github.com/users/alphapapa/orgs","repos_url":"https://api.github.com/users/alphapapa/repos","events_url":"https://api.github.com/users/alphapapa/events{/privacy}","received_events_url":"https://api.github.com/users/alphapapa/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T22:45:48Z","updated_at":"2016-11-12T22:45:48Z","body":"Well it's up to you, of course, but here's an example you might want to consider:\r\n\r\nReplace this:\r\n\r\n```el\r\n(while (re-search-forward \"[^ \\n\\t\\\\\\\\].*,\" nil t)\r\n              (let (current-argument)\r\n                (setq current-argument (buffer-substring-no-properties previous-position (1- (point))))\r\n                (setq current-argument (pygen-parse-single-argument current-argument))\r\n                (when current-argument\r\n                  (push current-argument arguments)\r\n                  (setq previous-position (point)))))\r\n```\r\nwith this:\r\n```el\r\n;; Outside the defun\r\n(defconst comma-separated-args-re (rx (not (any space \"\\\\\"))\r\n                                  (group (minimal-match (1+ anything)))\r\n                                  \",\"))\r\n...\r\n;; Inside the defun\r\n  (while (re-search-forward comma-separated-args-re nil t)\r\n    (-when-let (arg (pygen-parse-single-argument (match-string-no-properties 1)))\r\n      (push arg arguments)))\r\n\r\n```"}}
{"actor":{"display_login":"alphapapa"}}