emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: roberthambrock@gmail.com
To: emacs-orgmode@gnu.org
Cc: Robert Hambrock <roberthambrock@gmail.com>
Subject: [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit
Date: Sun, 22 Apr 2018 22:50:02 +0200	[thread overview]
Message-ID: <20180422205003.87836-4-roberthambrock@gmail.com> (raw)
In-Reply-To: <20180422205003.87836-1-roberthambrock@gmail.com>

From: Robert Hambrock <roberthambrock@gmail.com>

* lisp/ob-clojure.el (org-babel-edit-prep:clojure): New function that
sets the buffer's namespace to the value of :ns, if provided.
(org-babel-edit-prep:clojurescript): Alias for
org-babel-edit-prep:clojure.
---
 lisp/ob-clojure.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index 7f7c24ff1..c59ac96ab 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -215,6 +215,12 @@ using the :show-process parameter."
 (defun org-babel-execute:clojurescript (body params)
   (org-babel-execute:clojure body (cons '(:target . "cljs") params)))
 
+(defun org-babel-edit-prep:clojure (babel-info)
+  (if-let* ((namespace (cdr (assq :ns (nth 2 babel-info)))))
+      (setq-local cider-buffer-ns namespace)))
+
+(defalias 'org-babel-edit-prep:clojurescript 'org-babel-edit-prep:clojure)
+
 (provide 'ob-clojure)
 
 ;;; ob-clojure.el ends here
-- 
2.16.3

  parent reply	other threads:[~2018-04-22 20:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-22 20:49 [PATCH 0/4] Clojure mode patches roberthambrock
2018-04-22 20:50 ` [PATCH 1/4] org-src.el: Fixed dynamic fontification bug roberthambrock
2018-04-23  9:23   ` Nicolas Goaziou
2018-04-22 20:50 ` [PATCH 2/4] ob-clojure.el: Add ClojureScript interface roberthambrock
2018-04-23  2:45   ` stardiviner
2018-04-23  9:24   ` Nicolas Goaziou
2018-04-29 14:47   ` stardiviner
2018-10-25  6:11   ` stardiviner
2020-02-12 13:16   ` stardiviner
2020-02-12 17:09     ` Bastien
     [not found]       ` <87y2t6fqwj.fsf@gmail.com>
2020-02-13 16:04         ` [PATCH] " Bastien
2020-02-14  5:14           ` stardiviner
2020-02-14 10:02             ` Bastien
2020-02-14 15:17               ` stardiviner
2020-02-14  5:24           ` stardiviner
2020-02-14 10:02             ` Bastien
2020-02-14 15:15               ` stardiviner
2020-02-14 20:40                 ` Bastien
2020-02-15  0:42                   ` Tim Cross
2020-02-16 23:17                     ` Bastien
2020-02-16 23:33                       ` Tim Cross
2020-02-16 23:51                         ` Bastien
2020-04-28  9:29                       ` [BUG] ob-clojure.el new backend 'inf-clojure not compatible with latest version inf-clojure stardiviner
2020-05-22 15:12                         ` Bastien
2020-02-18 13:01                   ` [PATCH] Re: ob-clojure.el: Add ClojureScript interface stardiviner
2020-02-18 13:15                     ` Bastien
2020-02-19 15:51                       ` stardiviner
2018-04-22 20:50 ` roberthambrock [this message]
2018-04-23  9:26   ` [PATCH 3/4] ob-clojure.el: Use :ns flag in org-src-edit Nicolas Goaziou
2018-04-29 14:47   ` stardiviner
2018-04-22 20:50 ` [PATCH 4/4] ob-clojure.el: Add ClojureScript tangle language extension roberthambrock
2018-04-23  9:28   ` Nicolas Goaziou
2018-04-23  9:29 ` [PATCH 0/4] Clojure mode patches Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180422205003.87836-4-roberthambrock@gmail.com \
    --to=roberthambrock@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).