emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Christopher M. Miles" <numbchild@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: stardiviner <numbchild@gmail.com>, Daniel Kraus <daniel@kraus.my>,
	Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [SUGGESTION] separate ob-clojure.el into Clojure part ob-clojure.el and ClojureScript part ob-clojurescript.el
Date: Mon, 20 Mar 2023 19:36:35 +0800	[thread overview]
Message-ID: <m2fs9z643f.fsf@numbchild@gmail.com> (raw)
In-Reply-To: <87o7oqxn6r.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 1943 bytes --]


Ihor Radchenko <yantar92@posteo.net> writes:

> stardiviner <numbchild@gmail.com> writes:
>
>> For now, ob-clojure.el contains lot of code for ClojureScript. Only some
>> code has same functionality. Like CIDER backend. In the future,
>> ClojureScript part code will increase and different. So I suggest
>> separate them into two source code files.
>>
>> WDYT?
>
> The only downside is that people might need to
> (require 'ob-clojurescript)
> I am thinking if ob-core.el should try to automatically guess the
> correct library to be loaded.

I think this is an good idea. It let user don't need to load
ob-<lang>.el before user really need it. The ob-core.el will
automatically load <lang> related libraries. For now I have to configure
ob-<lang>.el like bellowing to defer loading:

#+begin_src emacs-lisp
(use-package ob-clojure
  :custom (org-babel-clojurescript-backend 'cider)
  :commands (org-babel-execute:clojurescript)
  :config
  (add-to-list 'org-babel-load-languages '(clojurescript . t))
  (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)
  ;; let `ob-clojurescript' babel source blocks allow evaluation.
  (add-to-list 'org-babel-default-header-args:clojurescript '(:eval . "yes"))
  (add-to-list 'org-babel-default-header-args:clojurescript '(:noweb . "yes")))
#+end_src

The duplicated part code bellowing is repeated for every <lang>:

#+begin_src emacs-lisp
(add-to-list 'org-babel-load-languages '(clojurescript . t))
(org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)
#+end_src

>
> Otherwise, I am neutral towards this split.
>
> Up to Daniel.


-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2023-03-20 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18  3:17 [SUGGESTION] separate ob-clojure.el into Clojure part ob-clojure.el and ClojureScript part ob-clojurescript.el stardiviner
2023-03-18 12:23 ` Ihor Radchenko
2023-03-19 20:46   ` Daniel Kraus
2023-03-20 11:20     ` Ihor Radchenko
2023-03-20 11:44       ` Christopher M. Miles
2023-03-20 11:36   ` Christopher M. Miles [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-03-18  2:47 Christopher M. Miles

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=m2fs9z643f.fsf@numbchild@gmail.com \
    --to=numbchild@gmail.com \
    --cc=daniel@kraus.my \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).