{"action":"closed","issue":{"url":"https://api.github.com/repos/polymode/polymode/issues/49","repository_url":"https://api.github.com/repos/polymode/polymode","labels_url":"https://api.github.com/repos/polymode/polymode/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/polymode/polymode/issues/49/comments","events_url":"https://api.github.com/repos/polymode/polymode/issues/49/events","html_url":"https://github.com/polymode/polymode/issues/49","id":51007033,"node_id":"MDU6SXNzdWU1MTAwNzAzMw==","number":49,"title":"implementation of polymode-mark-or-extend-chunk","user":{"login":"r2evans","id":5815808,"node_id":"MDQ6VXNlcjU4MTU4MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/5815808?v=4","gravatar_id":"","url":"https://api.github.com/users/r2evans","html_url":"https://github.com/r2evans","followers_url":"https://api.github.com/users/r2evans/followers","following_url":"https://api.github.com/users/r2evans/following{/other_user}","gists_url":"https://api.github.com/users/r2evans/gists{/gist_id}","starred_url":"https://api.github.com/users/r2evans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r2evans/subscriptions","organizations_url":"https://api.github.com/users/r2evans/orgs","repos_url":"https://api.github.com/users/r2evans/repos","events_url":"https://api.github.com/users/r2evans/events{/privacy}","received_events_url":"https://api.github.com/users/r2evans/received_events","type":"User","site_admin":false},"labels":[{"id":1014497082,"node_id":"MDU6TGFiZWwxMDE0NDk3MDgy","url":"https://api.github.com/repos/polymode/polymode/labels/UI","name":"UI","color":"3d7be5","default":false},{"id":31307461,"node_id":"MDU6TGFiZWwzMTMwNzQ2MQ==","url":"https://api.github.com/repos/polymode/polymode/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2014-12-04T17:59:27Z","updated_at":"2018-09-09T13:37:31Z","closed_at":"2018-09-09T13:37:31Z","author_association":"NONE","body":"I apologize for not submitting this as a PR, it's so miniscule ...\n\nThis is a simple implementation of what I believe `polymode-mark-or-extend-chunk` is intended to do (or at least `polymode-mark-chunk`). It works with Rmd, and I think it will work with Rnw, though since I don't use it I have not tested it extensively.\n\nThe regexps are decent but it is certainly possible to improve them. For instance, if the user is currently not in a code chunk, this doesn't behave as one would expect, so it might be better instead to check to make sure that there isn't a chunk-end in between the point and chunk-begin (and vice versa).\n\n``````\n--- polymode.el.orig    2014-12-04 09:34:43.564938900 -0800\n+++ polymode.el 2014-12-04 09:34:46.890744900 -0800\n@@ -235,8 +235,13 @@\n       (_ (pm/narrow-to-span)))))\n\n (defun polymode-mark-or-extend-chunk ()\n+  \"Put point at the beginning of this chunk (assuming we are in a chunk), mark at the end. The chunk marked is the one that contains the point.\"\n   (interactive)\n-  (error \"Not implemented yet\"))\n+  (re-search-forward \"^\\\\(```\\\\|@\\\\)\\\\s-*$\")\n+  (move-beginning-of-line nil)\n+  (push-mark nil t t)\n+  (re-search-backward \"^\\\\(```\\\\|<<\\\\)\")\n+  (move-beginning-of-line 2))\n\n (defun polymode-insert-new-chunk ()\n   (interactive)\n``````\n"}}
{"actor":{"display_login":"vspinu"}}