{"action":"created","comment":{"url":"https://api.github.com/repos/clojure-emacs/cider/pulls/comments/177413154","pull_request_review_id":107277047,"id":177413154,"diff_hunk":"@@ -799,24 +800,120 @@ the symbol.\"\n                t)))\n           (t t))))\n \n+(defun cider-repl--display-image (buffer image &optional show-prefix bol string)\n+  \"Insert IMAGE into BUFFER at the current point.\n+\n+For compatibility with the rest of CIDER's REPL machinery, supports\n+SHOW-PREFIX and BOL.\"\n+  (with-current-buffer buffer\n+    (save-excursion\n+      (cider-save-marker cider-repl-output-start\n+        (cider-save-marker cider-repl-output-end\n+          (goto-char cider-repl-input-start-mark)\n+          (when (and bol (not (bolp)))\n+            (insert-before-markers \"\\n\"))\n+          (when show-prefix\n+            (insert-before-markers (propertize cider-repl-result-prefix 'font-lock-face 'font-lock-comment-face)))\n+          (insert-image image string)\n+          (set-marker cider-repl-input-start-mark (point) buffer)\n+          (set-marker cider-repl-prompt-start-mark (point) buffer))))\n+    (cider-repl--show-maximum-output)))\n+\n+(defcustom cider-repl-image-margin 10","path":"cider-repl.el","position":31,"original_position":31,"commit_id":"d070c509d4789f413ef73b3329ec2a4521a901f4","original_commit_id":"d070c509d4789f413ef73b3329ec2a4521a901f4","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":"Probably we should also add some defcustom to turn this functionality off in case someone doesn't like it, or the initial implementation causes problems in some cases. ","created_at":"2018-03-27T12:57:12Z","updated_at":"2018-03-27T12:57:12Z","html_url":"https://github.com/clojure-emacs/cider/pull/2248#discussion_r177413154","pull_request_url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2248","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/comments/177413154"},"html":{"href":"https://github.com/clojure-emacs/cider/pull/2248#discussion_r177413154"},"pull_request":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/2248"}}},"pull_request":{"url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2248","id":177221104,"html_url":"https://github.com/clojure-emacs/cider/pull/2248","diff_url":"https://github.com/clojure-emacs/cider/pull/2248.diff","patch_url":"https://github.com/clojure-emacs/cider/pull/2248.patch","issue_url":"https://api.github.com/repos/clojure-emacs/cider/issues/2248","number":2248,"state":"open","locked":false,"title":"Add support for displaying various images","user":{"login":"arrdem","id":704767,"avatar_url":"https://avatars3.githubusercontent.com/u/704767?v=4","gravatar_id":"","url":"https://api.github.com/users/arrdem","html_url":"https://github.com/arrdem","followers_url":"https://api.github.com/users/arrdem/followers","following_url":"https://api.github.com/users/arrdem/following{/other_user}","gists_url":"https://api.github.com/users/arrdem/gists{/gist_id}","starred_url":"https://api.github.com/users/arrdem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arrdem/subscriptions","organizations_url":"https://api.github.com/users/arrdem/orgs","repos_url":"https://api.github.com/users/arrdem/repos","events_url":"https://api.github.com/users/arrdem/events{/privacy}","received_events_url":"https://api.github.com/users/arrdem/received_events","type":"User","site_admin":false},"body":"Fixes #1510 \r\n\r\nThis is my second-pass changeset to implement support for embedding images in the REPL. It's probably got some sharp edges - my elisp isn't that good - but it definitely functions as advertised. I'd appreocate criticism on how the handlers should be made more configurable both on the nREPL side of the changeset (clojure-emacs/cider-nrepl#517) and on the emacs side.\r\n\r\n### Demo\r\n\r\n![2018-03-23-220235_1188x1542_scrot](https://user-images.githubusercontent.com/704767/37860629-85c7fa22-2ee6-11e8-9094-df398c82c3c2.png)\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- [ ] The commits are consistent with our [contribution guidelines][1]\r\n- [ ] You've added tests (if possible) to cover your change(s)\r\n- [ ] All tests are passing (`make test`)\r\n- [ ] All code passes the linter (`make lint`) which is based on [`elisp-lint`](https://github.com/gonewest818/elisp-lint) and includes\r\n  - [byte-compilation](https://www.gnu.org/software/emacs/manual/html_node/elisp/Byte-Compilation.html), [`checkdoc`](https://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html), [check-declare](https://www.gnu.org/software/emacs/manual/html_node/elisp/Declaring-Functions.html), packaging metadata, indentation, and trailing whitespace checks.\r\n- [ ] You've updated the [changelog][3] (if adding/changing user-visible functionality)\r\n- [ ] You've updated the [user manual][4] (if adding/changing user-visible functionality)\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[3]: https://github.com/clojure-emacs/cider/blob/master/CHANGELOG.md\r\n[4]: https://github.com/clojure-emacs/cider/tree/master/doc\r\n","created_at":"2018-03-24T05:07:14Z","updated_at":"2018-03-27T12:57:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db3af0b1077366e12934a38b1759001a38cd2859","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2248/commits","review_comments_url":"https://api.github.com/repos/clojure-emacs/cider/pulls/2248/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/2248/comments","statuses_url":"https://api.github.com/repos/clojure-emacs/cider/statuses/d070c509d4789f413ef73b3329ec2a4521a901f4","head":{"label":"arrdem:feature/images","ref":"feature/images","sha":"d070c509d4789f413ef73b3329ec2a4521a901f4","user":{"login":"arrdem","id":704767,"avatar_url":"https://avatars3.githubusercontent.com/u/704767?v=4","gravatar_id":"","url":"https://api.github.com/users/arrdem","html_url":"https://github.com/arrdem","followers_url":"https://api.github.com/users/arrdem/followers","following_url":"https://api.github.com/users/arrdem/following{/other_user}","gists_url":"https://api.github.com/users/arrdem/gists{/gist_id}","starred_url":"https://api.github.com/users/arrdem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arrdem/subscriptions","organizations_url":"https://api.github.com/users/arrdem/orgs","repos_url":"https://api.github.com/users/arrdem/repos","events_url":"https://api.github.com/users/arrdem/events{/privacy}","received_events_url":"https://api.github.com/users/arrdem/received_events","type":"User","site_admin":false},"repo":{"id":28539996,"name":"cider","full_name":"arrdem/cider","owner":{"login":"arrdem","id":704767,"avatar_url":"https://avatars3.githubusercontent.com/u/704767?v=4","gravatar_id":"","url":"https://api.github.com/users/arrdem","html_url":"https://github.com/arrdem","followers_url":"https://api.github.com/users/arrdem/followers","following_url":"https://api.github.com/users/arrdem/following{/other_user}","gists_url":"https://api.github.com/users/arrdem/gists{/gist_id}","starred_url":"https://api.github.com/users/arrdem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arrdem/subscriptions","organizations_url":"https://api.github.com/users/arrdem/orgs","repos_url":"https://api.github.com/users/arrdem/repos","events_url":"https://api.github.com/users/arrdem/events{/privacy}","received_events_url":"https://api.github.com/users/arrdem/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arrdem/cider","description":"CIDER is a Clojure IDE and REPL for Emacs","fork":true,"url":"https://api.github.com/repos/arrdem/cider","forks_url":"https://api.github.com/repos/arrdem/cider/forks","keys_url":"https://api.github.com/repos/arrdem/cider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arrdem/cider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arrdem/cider/teams","hooks_url":"https://api.github.com/repos/arrdem/cider/hooks","issue_events_url":"https://api.github.com/repos/arrdem/cider/issues/events{/number}","events_url":"https://api.github.com/repos/arrdem/cider/events","assignees_url":"https://api.github.com/repos/arrdem/cider/assignees{/user}","branches_url":"https://api.github.com/repos/arrdem/cider/branches{/branch}","tags_url":"https://api.github.com/repos/arrdem/cider/tags","blobs_url":"https://api.github.com/repos/arrdem/cider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arrdem/cider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arrdem/cider/git/refs{/sha}","trees_url":"https://api.github.com/repos/arrdem/cider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arrdem/cider/statuses/{sha}","languages_url":"https://api.github.com/repos/arrdem/cider/languages","stargazers_url":"https://api.github.com/repos/arrdem/cider/stargazers","contributors_url":"https://api.github.com/repos/arrdem/cider/contributors","subscribers_url":"https://api.github.com/repos/arrdem/cider/subscribers","subscription_url":"https://api.github.com/repos/arrdem/cider/subscription","commits_url":"https://api.github.com/repos/arrdem/cider/commits{/sha}","git_commits_url":"https://api.github.com/repos/arrdem/cider/git/commits{/sha}","comments_url":"https://api.github.com/repos/arrdem/cider/comments{/number}","issue_comment_url":"https://api.github.com/repos/arrdem/cider/issues/comments{/number}","contents_url":"https://api.github.com/repos/arrdem/cider/contents/{+path}","compare_url":"https://api.github.com/repos/arrdem/cider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arrdem/cider/merges","archive_url":"https://api.github.com/repos/arrdem/cider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arrdem/cider/downloads","issues_url":"https://api.github.com/repos/arrdem/cider/issues{/number}","pulls_url":"https://api.github.com/repos/arrdem/cider/pulls{/number}","milestones_url":"https://api.github.com/repos/arrdem/cider/milestones{/number}","notifications_url":"https://api.github.com/repos/arrdem/cider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arrdem/cider/labels{/name}","releases_url":"https://api.github.com/repos/arrdem/cider/releases{/id}","deployments_url":"https://api.github.com/repos/arrdem/cider/deployments","created_at":"2014-12-27T15:38:11Z","updated_at":"2018-03-18T07:20:26Z","pushed_at":"2018-03-26T04:43:32Z","git_url":"git://github.com/arrdem/cider.git","ssh_url":"git@github.com:arrdem/cider.git","clone_url":"https://github.com/arrdem/cider.git","svn_url":"https://github.com/arrdem/cider","homepage":"","size":11814,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"57d99d392e71e2908464de830e38a97b08e8ce2e","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":"2018-03-27T12:46:16Z","pushed_at":"2018-03-27T12:46:13Z","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":12930,"stargazers_count":2355,"watchers_count":2355,"language":"Emacs Lisp","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":438,"mirror_url":null,"archived":false,"open_issues_count":109,"license":null,"forks":438,"open_issues":109,"watchers":2355,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/2248"},"html":{"href":"https://github.com/clojure-emacs/cider/pull/2248"},"issue":{"href":"https://api.github.com/repos/clojure-emacs/cider/issues/2248"},"comments":{"href":"https://api.github.com/repos/clojure-emacs/cider/issues/2248/comments"},"review_comments":{"href":"https://api.github.com/repos/clojure-emacs/cider/pulls/2248/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/2248/commits"},"statuses":{"href":"https://api.github.com/repos/clojure-emacs/cider/statuses/d070c509d4789f413ef73b3329ec2a4521a901f4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bbatsov"}}