* lisp/ob-clojure.el (org-babel-expand-body:clojure): Leave the
comments intact if the code block does not have :var.
Reported-by: "Anoop G R" <anoopemacs@gmail.com>
Link: https://list.orgmode.org/874j5azk2p.fsf@localhost/T/#t
TINYCHANGE
* lisp/ob-comint.el (org-babel-comint-prompt-regexp-fallback): Rename
to more accurate name. Leave the old name as an alias.
(org-babel-comint--set-fallback-prompt): Use the new name.
(org-babel-comint-with-output):
(org-babel-comint-wait-for-output):
* lisp/ob-clojure.el (ob-clojure-eval-with-inf-clojure):
* lisp/ob-haskell.el (org-babel-interpret-haskell):
* lisp/ob-ruby.el (org-babel-ruby-initiate-session):
* lisp/ob-shell.el (org-babel-sh-initiate-session):
* lisp/ob-clojure.el (ob-clojure-cli-command): Allow nil value. It
can happen, even though it will yield error (which is a different
issue). But let's follow other defcustoms in the file.
Reported-by: Mattias Engdegård <mattias.engdegard@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71566
* lisp/ob-comint.el (org-babel-comint-prompt-regexp-old): New variable
storing the default value of `comint-prompt-regexp' to be used when
the prompt set by Org mode changes for some reason.
(org-babel-comint-fallback-regexp-threshold): New customization to set
the time Org babel waits for comint command to finish until trying
fallback prompt regexp.
(org-babel-comint--set-fallback-prompt): New internal function that
sets the fallback prompt regexp, if there is any available.
(org-babel-comint-with-output):
(org-babel-comint-wait-for-output): Try fallback prompt regexp when we
cannot find comint command end for too long.
* lisp/ob-haskell.el (org-babel-interpret-haskell):
* lisp/ob-ruby.el (org-babel-ruby-initiate-session):
* lisp/ob-shell.el (org-babel-sh-initiate-session):
* lisp/ob-clojure.el (ob-clojure-eval-with-inf-clojure): Set
`org-babel-comint-prompt-regexp-old' when initializing the inferior
shell.
* etc/ORG-NEWS (New option
~org-babel-comint-fallback-regexp-threshold~): Document the new
customization.
Reported-by: Jack Kamm <jackkamm@tatersworld.org>
Link: https://orgmode.org/list/87sf2q9ubd.fsf@gmail.com
* lisp/ob-clojure.el (org-babel-clojure-backend): Add support for
clojure-cli.
* lisp/ob-clojure.el (org-babel-clojurescript-backend): Move nbb to
clojurescript.
* lisp/ob-clojure.el (org-babel-expand-body:clojure)
* lisp/ob-clojure.el (ob-clojure-eval-with-cider): Return only the
last expression when :results is not set or value, and return only
stdout when :results is set to output.
* lisp/ob-clojure.el (ob-clojure-eval-with-cmd): Rename function as
it is not only for babashka.
* lisp/ob-clojure.el (org-babel-execute:clojure): Differentiate
between Clojure and ClojureScript source blocks.
The problem was that the ob-clojure results where not correctly
taking the results parameter into account.
E.g. with the cider backend, you would get all printed or returned
values for each line in your block:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)
| #'user/small-map |
| {:some :map} |
| 4 |
or for babashka you would only get the printed values but not the
last return value:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)
: :xx
Now when you specify :results value, the result is only the last
returned value, and with :results output you get all values
printed to stdout.
So the examples above would all result in the same:
(def small-map {:a 2 :b 4 :c 8})
{:some :map}
(prn :xx)
(:b small-map)
: 4
* lisp/ob-clojure.el
(ob-clojure-babashka-command, ob-clojure-nbb-command):
Account for the possibility of nil (commands absent).
* lisp/org.el (org-safe-remote-resources):
* lisp/ox-md.el (org-md-toplevel-hlevel):
Fix incorrect or invalid types.
Fix types in various defcustom declarations
4b2f5425d7af1a6f992ad8ce0a4452a2e778815a
Mattias Engdegård
Thu Dec 1 13:03:19 2022 +0100
[km] The natnum change will be adjusted in an upcoming commit because
natnum not available until Emacs 28.
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Always quote
the variables passed from org-mode in Clojure let binding.
When a variable is a table or list, it's value is "(..data..)"
and without quotes, Clojure would try to execute the first
value as a function.
* lisp/ob-clojure.el (org-babel-expand-body:clojure): When The source
block specified header argument :backend, the global option
`org-babel-clojure-backend' value is default 'cider, the
`cider-buffer-ns` is not void error.
* ob-clojure.el (org-babel-header-args:clojure,
org-babel-execute:clojure): Add a :backend header arg that can
override the configured `org-babel-clojure-backend'.
TINYCHANGE
Emacs now advises using "website" (instead of "homepage") and
consequently to use the "URL" comment header instead of "Homepage".
* README:
* README_ELPA:
* doc/org-guide.org (Creating Footnotes):
* doc/org-manual.org (Creating Footnotes):
* etc/styles/README (URL): Prefer "website" to "homepage".
* lisp/*.el:
* mk/org-fixup.el: Replace the "Homepage" header comment with "URL".
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Inline
namespace setting.
(org-babel-clojure-cider-current-ns): Delete.
(ob-clojure-inf-clojure-filter-out): New variable.
(ob-clojure-inf-clojure-output): Use it.
(ob-clojure-eval-with-inf-clojure): Update the filter variable
depending on the current namespace.
* lisp/ob-clojure.el (org-babel-clojure-backend): Allow to use
inf-clojure.el and set to nil by default.
(ob-clojure-inf-clojure-output): New function.
(org-babel-execute:clojure): Support using inf-clojure.el.
Remove the :show-process parameter.
(org-babel-execute:clojurescript)
(org-babel-edit-prep:clojure): Fix docstrings.
(org-babel-clojure-initiate-session): Make the session
parameter mandatory. Initiate a cider session if needed.
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Remove
comment while expanding the body of the source block.
(org-babel-expand-body:clojure): Don't quote the value of src
block variables.
* ob-clojure.el (org-babel-clojure-initiate-session): Improve ob-clojure
initialize session way to support CIDER new API.
* etc/ORG-NEWS: Add declare for new :session support feature.
* lisp/ob-clojure.el (org-babel-execute:clojure): Use
`cider-current-ns' instead of `cider-current-session'.
org-babel-execute-clojure was calling nrepl-sync-request:eval and
nrepl-request:eval with the session ID as the 3rd argument when the
functions expected a clojure namespace.
TINYCHANGE