{"action":"created","issue":{"url":"https://api.github.com/repos/clojure-emacs/cider/issues/2016","repository_url":"https://api.github.com/repos/clojure-emacs/cider","labels_url":"https://api.github.com/repos/clojure-emacs/cider/issues/2016/labels{/name}","comments_url":"https://api.github.com/repos/clojure-emacs/cider/issues/2016/comments","events_url":"https://api.github.com/repos/clojure-emacs/cider/issues/2016/events","html_url":"https://github.com/clojure-emacs/cider/issues/2016","id":236719898,"number":2016,"title":"Auto change working default directory in Emacs/Org-mode Babel.","user":{"login":"stardiviner","id":378699,"avatar_url":"https://avatars3.githubusercontent.com/u/378699?v=4","gravatar_id":"","url":"https://api.github.com/users/stardiviner","html_url":"https://github.com/stardiviner","followers_url":"https://api.github.com/users/stardiviner/followers","following_url":"https://api.github.com/users/stardiviner/following{/other_user}","gists_url":"https://api.github.com/users/stardiviner/gists{/gist_id}","starred_url":"https://api.github.com/users/stardiviner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stardiviner/subscriptions","organizations_url":"https://api.github.com/users/stardiviner/orgs","repos_url":"https://api.github.com/users/stardiviner/repos","events_url":"https://api.github.com/users/stardiviner/events{/privacy}","received_events_url":"https://api.github.com/users/stardiviner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-06-18T13:03:48Z","updated_at":"2017-08-09T22:40:21Z","closed_at":null,"body":"I think CIDER should use dynamic working default directory in CIDER.\r\n\r\nThis is necessary for Org-mode Babel src block evaluation.\r\n\r\nfor example:\r\n```org\r\n#+BEGIN_SRC clojure :results output :session\r\n(prn *file*)\r\n#+END_SRC\r\n\r\n#+RESULTS:\r\n: \"/home/stardiviner/Org/Wiki/Computer Technology/Programming/Programming Languages/Clojure/Data/Manuals/My Clojure Examples/My Clojure Examples.org\"\r\n```\r\nAnd it is fixed, not changed.\r\n\r\nBut current file when I evaluate upper Org-mode babel src code is:\r\n```\r\n: Directory /home/stardiviner/Org/Projects/Code.org\r\n```\r\n(from Emacs command \"pwd\").\r\n\r\nWhen I generate plot image which is generated from Clojure package \"Incanter\"'s `incanter.core/save`. Here is my org-mode babel clojure example:\r\n```org\r\n#+BEGIN_SRC clojure :session :results file :file \"clojure-babel-figure-result.png\" :dir \"data/images\" :var fname=\"clojure-babel-figure-result.png\"\r\n(use '(incanter core stats datasets charts io pdf))\r\n(import 'java.io.FileOutputStream)\r\n\r\n;; (def output-file (FileOutputStream. \"clojure-babel-figure-result.png\"))\r\n(def output-file (FileOutputStream. fname))\r\n\r\n(def my-plot (histogram (sample-normal 1000)))\r\n\r\n(save my-plot \"clojure-babel-figure-result.png\")\r\n;; (save my-plot output-file)\r\n(.close output-file)\r\n\r\n(print output-file)\r\n\r\n;; (view my-plot)\r\n#+END_SRC\r\n```"},"comment":{"url":"https://api.github.com/repos/clojure-emacs/cider/issues/comments/321401063","html_url":"https://github.com/clojure-emacs/cider/issues/2016#issuecomment-321401063","issue_url":"https://api.github.com/repos/clojure-emacs/cider/issues/2016","id":321401063,"user":{"login":"stardiviner","id":378699,"avatar_url":"https://avatars3.githubusercontent.com/u/378699?v=4","gravatar_id":"","url":"https://api.github.com/users/stardiviner","html_url":"https://github.com/stardiviner","followers_url":"https://api.github.com/users/stardiviner/followers","following_url":"https://api.github.com/users/stardiviner/following{/other_user}","gists_url":"https://api.github.com/users/stardiviner/gists{/gist_id}","starred_url":"https://api.github.com/users/stardiviner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stardiviner/subscriptions","organizations_url":"https://api.github.com/users/stardiviner/orgs","repos_url":"https://api.github.com/users/stardiviner/repos","events_url":"https://api.github.com/users/stardiviner/events{/privacy}","received_events_url":"https://api.github.com/users/stardiviner/received_events","type":"User","site_admin":false},"created_at":"2017-08-09T22:40:21Z","updated_at":"2017-08-09T22:40:21Z","body":"I saw CIDER maintainer is discussing improving cider multiple project connections. I hope maintainer also can consider my feature request, support for:\r\n- let ob-clojure :session header argument can specify CIDER REPL connection or project name.\r\nLike append project name behind connection buffer name or other ways, so that extra elisp package like ob-clojure.el can make advantage to know which CIDER REPL connection to execute code."}}
{"actor":{"display_login":"stardiviner"}}