{"action":"created","comment":{"url":"https://api.github.com/repos/clojure-emacs/cider/pulls/comments/155727277","pull_request_review_id":82094390,"id":155727277,"diff_hunk":"@@ -1211,10 +1320,13 @@ Print its value into the current buffer.\"\n                             (when (consp form) form)\n                             (cider--nrepl-pprint-request-plist (cider--pretty-print-width)))))\n \n-(defun cider-pprint-eval-last-sexp ()\n-  \"Evaluate the sexp preceding point and pprint its value in a popup buffer.\"\n-  (interactive)\n-  (cider--pprint-eval-form (cider-last-sexp 'bounds)))\n+(defun cider-pprint-eval-last-sexp (&optional output-to-current-buffer)\n+  \"Evaluate the sexp preceding point and pprint its value in a popup buffer.\n+If invoked with OUTPUT-TO-CURRENT-BUFFER, insert as comment in the current buffer.\"\n+  (interactive \"P\")\n+  (if output-to-current-buffer\n+      (cider-pprint-eval-last-sexp-to-comment nil)","path":"cider-interaction.el","position":204,"original_position":204,"commit_id":"635557242cb172ca9dd90770dfb82a0489694c8f","original_commit_id":"635557242cb172ca9dd90770dfb82a0489694c8f","user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars0.githubusercontent.com/u/103882?v=4","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"body":"You don't have to pass `nil` here - now it's optional, which means the param is going to be nil by default.","created_at":"2017-12-08T08:46:09Z","updated_at":"2017-12-08T08:46:09Z","html_url":"https://github.com/clojure-emacs/cider/pull/2111#discussion_r155727277","pull_request_url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/comments/155727277"},"html":{"href":"https://github.com/clojure-emacs/cider/pull/2111#discussion_r155727277"},"pull_request":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111"}}},"pull_request":{"url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111","id":152014945,"html_url":"https://github.com/clojure-emacs/cider/pull/2111","diff_url":"https://github.com/clojure-emacs/cider/pull/2111.diff","patch_url":"https://github.com/clojure-emacs/cider/pull/2111.patch","issue_url":"https://api.github.com/repos/clojure-emacs/cider/issues/2111","number":2111,"state":"open","locked":false,"title":"Implement cider-pprint-eval-last-sexp-to-comment","user":{"login":"gonewest818","id":2460918,"avatar_url":"https://avatars1.githubusercontent.com/u/2460918?v=4","gravatar_id":"","url":"https://api.github.com/users/gonewest818","html_url":"https://github.com/gonewest818","followers_url":"https://api.github.com/users/gonewest818/followers","following_url":"https://api.github.com/users/gonewest818/following{/other_user}","gists_url":"https://api.github.com/users/gonewest818/gists{/gist_id}","starred_url":"https://api.github.com/users/gonewest818/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonewest818/subscriptions","organizations_url":"https://api.github.com/users/gonewest818/orgs","repos_url":"https://api.github.com/users/gonewest818/repos","events_url":"https://api.github.com/users/gonewest818/events{/privacy}","received_events_url":"https://api.github.com/users/gonewest818/received_events","type":"User","site_admin":false},"body":"This function has similar functionality to the other pprint interactions;\r\nhowever this variant inserts the result of the evaluation directly in the\r\ncurrent buffer.\r\n\r\nThe comment prefix used in the output is user-configurable, and for consistency\r\nwe also use same prefix in cider-eval-defun-to-comment.\r\n\r\nBy default the output will be commented like so\r\n```\r\n(for [i (range 1 10)]\r\n  (range i))\r\n;; => ((0)\r\n;;     (0 1)\r\n;;     (0 1 2)\r\n;;     (0 1 2 3)\r\n;;     (0 1 2 3 4)\r\n;;     (0 1 2 3 4 5)\r\n;;     (0 1 2 3 4 5 6)\r\n;;     (0 1 2 3 4 5 6 7)\r\n;;     (0 1 2 3 4 5 6 7 8))\r\n```\r\nbut by customizing the `cider-pprint-comment-*` variables you can also get output like this\r\n\r\n```\r\n#_((0)\r\n   (0 1)\r\n   (0 1 2)\r\n   (0 1 2 3)\r\n   (0 1 2 3 4)\r\n   (0 1 2 3 4 5)\r\n   (0 1 2 3 4 5 6)\r\n   (0 1 2 3 4 5 6 7)\r\n   (0 1 2 3 4 5 6 7 8))\r\n```\r\n\r\nor even\r\n\r\n```\r\n(comment\r\n  ((0)\r\n   (0 1)\r\n   (0 1 2)\r\n   (0 1 2 3)\r\n   (0 1 2 3 4)\r\n   (0 1 2 3 4 5)\r\n   (0 1 2 3 4 5 6)\r\n   (0 1 2 3 4 5 6 7)\r\n   (0 1 2 3 4 5 6 7 8))\r\n)\r\n```\r\n-----------------\r\n\r\nBefore submitting the PR make sure the following things have been done (and denote this\r\nby checking the relevant checkboxes):\r\n\r\n- [x] The commits are consistent with our [contribution guidelines][1]\r\n- [ ] You've added tests (if possible) to cover your change(s)\r\n- [x] All tests are passing (`make test`)\r\n- [x] The new code is not generating bytecode or `M-x checkdoc` warnings\r\n- [x] You've updated the changelog (if adding/changing user-visible functionality)\r\n- [ ] You've updated the readme (if adding/changing user-visible functionality)\r\n- [ ] You've updated the refcard (if you made changes to the commands listed there)\r\n\r\nThanks!\r\n\r\n*If you're just starting out to hack on CIDER you might find this [section of its\r\nmanual][2] extremely useful.*\r\n\r\n[1]: https://github.com/clojure-emacs/cider/blob/master/.github/CONTRIBUTING.md\r\n[2]: https://cider.readthedocs.io/en/latest/hacking_on_cider/\r\n","created_at":"2017-11-10T22:19:53Z","updated_at":"2017-12-08T08:46:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fda8283dcc05b279febf6cd9a053be7380b603e8","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111/commits","review_comments_url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111/comments","review_comment_url":"https://api.github.com/repos/clojure-emacs/cider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clojure-emacs/cider/issues/2111/comments","statuses_url":"https://api.github.com/repos/clojure-emacs/cider/statuses/635557242cb172ca9dd90770dfb82a0489694c8f","head":{"label":"gonewest818:cider-pprint-eval-last-sexp-to-comment","ref":"cider-pprint-eval-last-sexp-to-comment","sha":"635557242cb172ca9dd90770dfb82a0489694c8f","user":{"login":"gonewest818","id":2460918,"avatar_url":"https://avatars1.githubusercontent.com/u/2460918?v=4","gravatar_id":"","url":"https://api.github.com/users/gonewest818","html_url":"https://github.com/gonewest818","followers_url":"https://api.github.com/users/gonewest818/followers","following_url":"https://api.github.com/users/gonewest818/following{/other_user}","gists_url":"https://api.github.com/users/gonewest818/gists{/gist_id}","starred_url":"https://api.github.com/users/gonewest818/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonewest818/subscriptions","organizations_url":"https://api.github.com/users/gonewest818/orgs","repos_url":"https://api.github.com/users/gonewest818/repos","events_url":"https://api.github.com/users/gonewest818/events{/privacy}","received_events_url":"https://api.github.com/users/gonewest818/received_events","type":"User","site_admin":false},"repo":{"id":110268252,"name":"cider","full_name":"gonewest818/cider","owner":{"login":"gonewest818","id":2460918,"avatar_url":"https://avatars1.githubusercontent.com/u/2460918?v=4","gravatar_id":"","url":"https://api.github.com/users/gonewest818","html_url":"https://github.com/gonewest818","followers_url":"https://api.github.com/users/gonewest818/followers","following_url":"https://api.github.com/users/gonewest818/following{/other_user}","gists_url":"https://api.github.com/users/gonewest818/gists{/gist_id}","starred_url":"https://api.github.com/users/gonewest818/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonewest818/subscriptions","organizations_url":"https://api.github.com/users/gonewest818/orgs","repos_url":"https://api.github.com/users/gonewest818/repos","events_url":"https://api.github.com/users/gonewest818/events{/privacy}","received_events_url":"https://api.github.com/users/gonewest818/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gonewest818/cider","description":"The Clojure Interactive Development Environment that Rocks for Emacs","fork":true,"url":"https://api.github.com/repos/gonewest818/cider","forks_url":"https://api.github.com/repos/gonewest818/cider/forks","keys_url":"https://api.github.com/repos/gonewest818/cider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonewest818/cider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonewest818/cider/teams","hooks_url":"https://api.github.com/repos/gonewest818/cider/hooks","issue_events_url":"https://api.github.com/repos/gonewest818/cider/issues/events{/number}","events_url":"https://api.github.com/repos/gonewest818/cider/events","assignees_url":"https://api.github.com/repos/gonewest818/cider/assignees{/user}","branches_url":"https://api.github.com/repos/gonewest818/cider/branches{/branch}","tags_url":"https://api.github.com/repos/gonewest818/cider/tags","blobs_url":"https://api.github.com/repos/gonewest818/cider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonewest818/cider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonewest818/cider/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonewest818/cider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonewest818/cider/statuses/{sha}","languages_url":"https://api.github.com/repos/gonewest818/cider/languages","stargazers_url":"https://api.github.com/repos/gonewest818/cider/stargazers","contributors_url":"https://api.github.com/repos/gonewest818/cider/contributors","subscribers_url":"https://api.github.com/repos/gonewest818/cider/subscribers","subscription_url":"https://api.github.com/repos/gonewest818/cider/subscription","commits_url":"https://api.github.com/repos/gonewest818/cider/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonewest818/cider/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonewest818/cider/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonewest818/cider/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonewest818/cider/contents/{+path}","compare_url":"https://api.github.com/repos/gonewest818/cider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonewest818/cider/merges","archive_url":"https://api.github.com/repos/gonewest818/cider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonewest818/cider/downloads","issues_url":"https://api.github.com/repos/gonewest818/cider/issues{/number}","pulls_url":"https://api.github.com/repos/gonewest818/cider/pulls{/number}","milestones_url":"https://api.github.com/repos/gonewest818/cider/milestones{/number}","notifications_url":"https://api.github.com/repos/gonewest818/cider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonewest818/cider/labels{/name}","releases_url":"https://api.github.com/repos/gonewest818/cider/releases{/id}","deployments_url":"https://api.github.com/repos/gonewest818/cider/deployments","created_at":"2017-11-10T16:28:22Z","updated_at":"2017-11-10T16:28:24Z","pushed_at":"2017-12-08T00:36:18Z","git_url":"git://github.com/gonewest818/cider.git","ssh_url":"git@github.com:gonewest818/cider.git","clone_url":"https://github.com/gonewest818/cider.git","svn_url":"https://github.com/gonewest818/cider","homepage":"https://cider.readthedocs.org","size":11032,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"clojure-emacs:master","ref":"master","sha":"2fe60860161a1541d74fc94138d3094b10a05e4b","user":{"login":"clojure-emacs","id":5080083,"avatar_url":"https://avatars0.githubusercontent.com/u/5080083?v=4","gravatar_id":"","url":"https://api.github.com/users/clojure-emacs","html_url":"https://github.com/clojure-emacs","followers_url":"https://api.github.com/users/clojure-emacs/followers","following_url":"https://api.github.com/users/clojure-emacs/following{/other_user}","gists_url":"https://api.github.com/users/clojure-emacs/gists{/gist_id}","starred_url":"https://api.github.com/users/clojure-emacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clojure-emacs/subscriptions","organizations_url":"https://api.github.com/users/clojure-emacs/orgs","repos_url":"https://api.github.com/users/clojure-emacs/repos","events_url":"https://api.github.com/users/clojure-emacs/events{/privacy}","received_events_url":"https://api.github.com/users/clojure-emacs/received_events","type":"Organization","site_admin":false},"repo":{"id":4118920,"name":"cider","full_name":"clojure-emacs/cider","owner":{"login":"clojure-emacs","id":5080083,"avatar_url":"https://avatars0.githubusercontent.com/u/5080083?v=4","gravatar_id":"","url":"https://api.github.com/users/clojure-emacs","html_url":"https://github.com/clojure-emacs","followers_url":"https://api.github.com/users/clojure-emacs/followers","following_url":"https://api.github.com/users/clojure-emacs/following{/other_user}","gists_url":"https://api.github.com/users/clojure-emacs/gists{/gist_id}","starred_url":"https://api.github.com/users/clojure-emacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clojure-emacs/subscriptions","organizations_url":"https://api.github.com/users/clojure-emacs/orgs","repos_url":"https://api.github.com/users/clojure-emacs/repos","events_url":"https://api.github.com/users/clojure-emacs/events{/privacy}","received_events_url":"https://api.github.com/users/clojure-emacs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clojure-emacs/cider","description":"The Clojure Interactive Development Environment that Rocks for Emacs","fork":false,"url":"https://api.github.com/repos/clojure-emacs/cider","forks_url":"https://api.github.com/repos/clojure-emacs/cider/forks","keys_url":"https://api.github.com/repos/clojure-emacs/cider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clojure-emacs/cider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clojure-emacs/cider/teams","hooks_url":"https://api.github.com/repos/clojure-emacs/cider/hooks","issue_events_url":"https://api.github.com/repos/clojure-emacs/cider/issues/events{/number}","events_url":"https://api.github.com/repos/clojure-emacs/cider/events","assignees_url":"https://api.github.com/repos/clojure-emacs/cider/assignees{/user}","branches_url":"https://api.github.com/repos/clojure-emacs/cider/branches{/branch}","tags_url":"https://api.github.com/repos/clojure-emacs/cider/tags","blobs_url":"https://api.github.com/repos/clojure-emacs/cider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clojure-emacs/cider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clojure-emacs/cider/git/refs{/sha}","trees_url":"https://api.github.com/repos/clojure-emacs/cider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clojure-emacs/cider/statuses/{sha}","languages_url":"https://api.github.com/repos/clojure-emacs/cider/languages","stargazers_url":"https://api.github.com/repos/clojure-emacs/cider/stargazers","contributors_url":"https://api.github.com/repos/clojure-emacs/cider/contributors","subscribers_url":"https://api.github.com/repos/clojure-emacs/cider/subscribers","subscription_url":"https://api.github.com/repos/clojure-emacs/cider/subscription","commits_url":"https://api.github.com/repos/clojure-emacs/cider/commits{/sha}","git_commits_url":"https://api.github.com/repos/clojure-emacs/cider/git/commits{/sha}","comments_url":"https://api.github.com/repos/clojure-emacs/cider/comments{/number}","issue_comment_url":"https://api.github.com/repos/clojure-emacs/cider/issues/comments{/number}","contents_url":"https://api.github.com/repos/clojure-emacs/cider/contents/{+path}","compare_url":"https://api.github.com/repos/clojure-emacs/cider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clojure-emacs/cider/merges","archive_url":"https://api.github.com/repos/clojure-emacs/cider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clojure-emacs/cider/downloads","issues_url":"https://api.github.com/repos/clojure-emacs/cider/issues{/number}","pulls_url":"https://api.github.com/repos/clojure-emacs/cider/pulls{/number}","milestones_url":"https://api.github.com/repos/clojure-emacs/cider/milestones{/number}","notifications_url":"https://api.github.com/repos/clojure-emacs/cider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clojure-emacs/cider/labels{/name}","releases_url":"https://api.github.com/repos/clojure-emacs/cider/releases{/id}","deployments_url":"https://api.github.com/repos/clojure-emacs/cider/deployments","created_at":"2012-04-23T22:53:44Z","updated_at":"2017-12-05T21:20:42Z","pushed_at":"2017-12-08T00:36:20Z","git_url":"git://github.com/clojure-emacs/cider.git","ssh_url":"git@github.com:clojure-emacs/cider.git","clone_url":"https://github.com/clojure-emacs/cider.git","svn_url":"https://github.com/clojure-emacs/cider","homepage":"https://cider.readthedocs.org","size":11019,"stargazers_count":2272,"watchers_count":2272,"language":"Emacs Lisp","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":413,"mirror_url":null,"archived":false,"open_issues_count":127,"license":null,"forks":413,"open_issues":127,"watchers":2272,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111"},"html":{"href":"https://github.com/clojure-emacs/cider/pull/2111"},"issue":{"href":"https://api.github.com/repos/clojure-emacs/cider/issues/2111"},"comments":{"href":"https://api.github.com/repos/clojure-emacs/cider/issues/2111/comments"},"review_comments":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111/comments"},"review_comment":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/2111/commits"},"statuses":{"href":"https://api.github.com/repos/clojure-emacs/cider/statuses/635557242cb172ca9dd90770dfb82a0489694c8f"}},"author_association":"NONE"}}
{"actor":{"display_login":"bbatsov"}}