Re: [BUG] Failing tests for ob-clojure

2023-08-25 Thread Daniel Kraus
Ihor Radchenko writes: >> Unfortunately you're right and I would even say we can completely >> remove `test-ob-clojure.el`. >> There seems to be only tests for session support which currently >> doesn't exist anymore and another one which tests plain tangle >> and is not really Clojure

Re: [BUG] Failing tests for ob-clojure

2023-08-24 Thread Daniel Kraus
Hi! Ihor Radchenko writes: > I am now going through all the babel tests that are disabled by default. > > ob-clojure tests appear to be completely broken: > > 1. (org-test-for-executable "cider") assertion is strange as cider >package does not have any executable. > > 2. All the tests seems

Re: ob-clojure: results quoted nil

2023-05-17 Thread Daniel Kraus
Ihor Radchenko writes: >> #+RESULTS: >> : nil is falsey > > Even if it is the case, it is still worth checking :results table > parsing. nils might be slurped when converting output to tables. Right. I just double checked the results for value and table results with different Clojure backends

Re: ob-clojure: results quoted nil

2023-05-17 Thread Daniel Kraus
Hi! r...@devsphoto.com writes: > The quoted NIL is not showing on the Result block. > > Org mode version 9.6.1 (9.6.1-??-fe92a3ced @ > /Users/rafiks/.emacs.d/.local/straight/build-28.2/org/) > > #+begin_src clojure :results value > (nil? 1) > (nil? nil) > (if "bears eat beets" >

Re: [BUG] Tangling of clojure code blocks is broken [9.7 (9.7-??-0807107 @ /Users/ag/.emacs.d/.local/straight/build-30.0.50/org/)]

2023-05-08 Thread Daniel Kraus
Hi! Ag writes: > Setting :results output header makes it work as expected. Without it - > it's as I described, wrapped. I can reproduce the bug. The problem is that or :results value (/the default) I only want the result of the last expression and I do that `binding` of stdout to surpress all

Re: [patch] ob-clojure: Fix results output

2023-03-23 Thread Daniel Kraus
Ihor Radchenko writes: >> Or rather something like: >> >> (defun ob-clojure-eval-with-cider (expanded _params cljs-p) >> "Evaluate EXPANDED code block using cider. >> When CLJS-P is non-nil, use a cljs connection instead of clj. >> The PARAMS from Babel are not used in this function." > > I

Re: [patch] ob-clojure: Fix results output

2023-03-23 Thread Daniel Kraus
Ihor Radchenko writes: > Now, the docstring appears to be a bit confusing: > > (defun ob-clojure-eval-with-cider (expanded _params cljs-p) > "Evaluate EXPANDED code block with PARAMS using cider. > When CLJS-P is non-nil, use a cljs connection instead of clj." > > It would be useful to

Re: [SUGGESTION] separate ob-clojure.el into Clojure part ob-clojure.el and ClojureScript part ob-clojurescript.el

2023-03-19 Thread Daniel Kraus
Ihor Radchenko writes: > stardiviner 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

Re: [patch] ob-clojure: Fix results output

2023-03-19 Thread Daniel Kraus
Ihor Radchenko writes: > I note that we now have a new compiler warning after your changes: > ⛔ Warning (comp): ob-clojure.el:268:45: Warning: Unused lexical argument > ‘params’ > > May you please take a look? > If the function argument is really unused, replace it with _ in >

Re: [patch] ob-clojure: Fix results output

2023-03-15 Thread Daniel Kraus
r they affect Clojure or ClojureScript blocks. I changed the docstrings to always mention either Clojure or ClojureScript. I'm open for more improvements/suggestions. Attached a new patch. Thanks, Daniel >From 391bdd403f643fa75cceeb0c81f117996c2374b0 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Thu,

Re: [patch] ob-clojure: Fix results output

2023-03-14 Thread Daniel Kraus
Daniel Kraus writes: > Attached is the new patch with the changes. > > [2. text/x-patch; 0001-lisp-ob-sql.el-Add-support-for-Athena.patch]... Ups, I attached the wrong one. Here the correct patch.. >From db0634b5ab0b5c8c996c5dcbbeb266b720c67459 Mon Sep 17 00:00:00 2001 From:

Re: [patch] ob-clojure: Fix results output

2023-03-14 Thread Daniel Kraus
Hi! Ihor Radchenko writes: > Daniel Kraus writes: > >> This was apparently a kludge that ob-clojure used to evaluate ClojureScript >> in the normal clojure:execute function. >> I simply used the same kludge where I need to check for cljs, but after >> reviewing i

Re: [patch] ob-clojure: Fix results output

2023-03-13 Thread Daniel Kraus
emoved the :target parameter completely. As this was undocumented I guess it's ok to remove?! >> -(defun ob-clojure-eval-with-babashka (bb expanded) >> - "Evaluate EXPANDED code block using BB (babashka or nbb)." >> - (let ((script-file (org-babel-temp-file "cloju

[patch] ob-clojure: Fix results output

2023-03-09 Thread Daniel Kraus
instead of only the last one, they get a different result now. Is it ok to install? Other feedback? Cheers, Daniel >From 77783d864d81ef1d962c302523d7c588f248c088 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Thu, 9 Mar 2023 16:11:27 +0100 Subject: [PATCH] ob-clojure.el: Fix results out

Re: org-babel guile source block bug in handling multiple values

2023-03-09 Thread Daniel Kraus
Ihor Radchenko writes: > Zelphir Kaltstahl writes: >> (q1) What is a rationale, if any, behind the let-wrapping? > > It makes sense in ob-emacs-lisp to not litter global Emacs state. > In other ob-* lisp backends, I am not sure. > I am CCing Daniel, the maintainer of ob-clojure (we have no

Re: [BUG] ob-sql sql-connection-alist

2023-01-30 Thread Daniel Kraus
Hi! Andreas Gerler writes: > I added the missing changelog entry. Thanks. I installed the patch. (I'll also answer to your dbconnection engine mail soon. Just very busy atm) Thanks, Daniel

Re: [BUG] ob-sql sql-connection-alist

2023-01-20 Thread Daniel Kraus
Thanks. @Ihor, since this is the first patch I install from another contributor, is there anything I should look out for? E.g. does this need a TINYCHANGE entry or something? Or do you have already copyright assignments filled out, Andreas and then it's not necessary? Can I see somewhere who I

Re: [PATCH] ob-sql: Add support for Athena

2023-01-17 Thread Daniel Kraus
Tim Cross writes: > I think you run a high risk of running into GNU policy issues wrt > licensing and free software support given this is a cleint for an AWS > only database. Is it because it's cloud only or because it's proprietary? Because we already support Orcale, SAP Hana, MSSql and

Re: [PATCH] ob-sql: Add support for Athena

2023-01-16 Thread Daniel Kraus
Ihor Radchenko writes: > Daniel Kraus writes: > >> I'm using this patch since a few month that adds support >> for AWS Athena. >> The only thing that's maybe against adding it is that >> `athenacli` (https://github.com/dbcli/athenacli) is not an >> offici

[PATCH] ob-sql: Add support for Athena

2023-01-16 Thread Daniel Kraus
rom ddace051205d20b24c047962ca9d1335bdd90284 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 16 Jan 2023 11:35:02 +0100 Subject: [PATCH] lisp/ob-sql.el: Add support for Athena * lisp/ob-sql.el (org-babel-execute:sql): Add support for Athena --- lisp/ob-sql.el | 18 -- 1 file changed,

Re: [BUG] ob-sql sql-connection-alist

2023-01-16 Thread Daniel Kraus
Ihor Radchenko writes: > Andreas Gerler writes: >> (setq sql-connection-alist >> '((testdb (sql-product 'mysql) >> (sql-server "127.0.0.1") >> (sql-user "mysql”) >> (sql-port 3306) >> (sql-password “foo") >>

Re: [BUG] ob-sql sql-connection-alist

2023-01-16 Thread Daniel Kraus
Hi! Andreas Gerler writes: > Last week I heard about using ob-sql with credentials stored in the variable > used by isql. > However I had to modify ob-sql to get it actually working. > Can somebody test the pach before I send in a commit? > > #+begin_src sql :engine mysql :dbconnection testdb

Re: [PATCH] ob-sql: Respect database param when using dbconnection

2022-11-02 Thread Daniel Kraus
Ihor Radchenko writes: >> Otherwise, the patch itself is not much and I use it daily. > > Thanks! > Applied onto main with minor amendments to the commit message (I added > "." at the end of the sentences). >

Re: [PATCH] ob-sql: Respect database param when using dbconnection

2022-10-31 Thread Daniel Kraus
. Thanks, Daniel >From cd170dd691ba12ec81ef5c71db2868b33cd63ddf Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 31 Oct 2022 07:52:09 +0100 Subject: [PATCH] ob-sql.el: Respect all params when using dbconnection * etc/ORG-NEWS (Miscellaneous): Document change * lisp/ob-sql.el (org-ba

Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Daniel Kraus
Tim Cross writes: > I think bb is a much better solution from a babel perspective and would > love to see it as the default, even when you have both bb and cider > installed. I just installed the patch. So if you have `bb` in your path, ob-clojure should use babashka as default and only fall

Re: Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Daniel Kraus
Ihor Radchenko writes: > Daniel Kraus writes: > >> +(defcustom org-babel-clojure-backend (cond >> + ((executable-find "bb") 'babashka) >> +

Re: ob-clojure session support (was: ob-clojure eval error when has comment at end of code line)

2022-10-30 Thread Daniel Kraus
Ihor Radchenko writes: > > If Bastien removed session support, and you do not see any justification, > it was most likely an oversight. We generally avoid feature regressions: > https://bzg.fr/en/the-software-maintainers-pledge/ > > So, if sessions are currently not supported, it should be

Auto detect ob-clojure backend (was: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list)

2022-10-30 Thread Daniel Kraus
Bastien writes: > Daniel Kraus writes: > >> I think I'll go with the big `cond` above to auto-detect what's >> installed. That's probably the best out-of-the-box experience. > Indeed, thank you! I would push the attached patch. I'm not sure about the `:package-version` ke

indent-tabs-mode in org (was: ob-clojure eval error when has comment at end of code line)

2022-10-29 Thread Daniel Kraus
Ihor Radchenko writes: > Daniel Kraus writes: > >> - What should I use for indention? Looking in ob-clojure and org.el >> it seems that using tabs with tab-width 8 is standard but there's >> quite a few lines where it's spaces only. > That is a good question.

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-29 Thread Daniel Kraus
Hi Ihor Radchenko writes: > "Christopher M. Miles" writes: >> Any review comments about this patch? > I have sent the following comment shortly after your followup: I even made another post after that, suggesting that the if condition is not even needed. Simply always quoting seems to work and

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Daniel Kraus
Bastien writes: > Daniel Kraus writes: >> I would set it to (and (executable-find "bb") 'babashka) so it's still nil >> when babashka is installed? > (You mean "not installed", right?) Of course. >> Or we could even test more available backend

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-28 Thread Daniel Kraus
Hi! Bastien Guerry writes: > For now `org-babel-clojure-backend' is nil. > > I suggest to set it to babashka by default: babashka is stable and > well established now, it is by far the most efficient way to run > Clojure code. Also, it is particularily suitable for Babel use. > > What do you

ob-clojure session support (was: ob-clojure eval error when has comment at end of code line)

2022-10-28 Thread Daniel Kraus
Ihor Radchenko writes: > make test BTEST_POST="-L /path/to/cider.el" BTEST_OB_LANGUAGES="clojure" > BTEST_RE="ob-clojure" > > Note that our tests demand cider executable and library. > Testing with external libraries is a bit manual. Thanks. I think cider is falsely required in the test. It

Re: [PATCH] Fix ob-clojure handling source block variable's value is a org-mode table or list

2022-10-27 Thread Daniel Kraus
prn v3) (prn v4) #+end_src #+RESULTS: : 47 : "foobar" : ((1 2 3)) : ((1 2 3) (4 5 6)) --cut-- Cheers, Daniel >From 1a2fa382e7a5925d4b85d90f1fe4ac7c012f81a4 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Thu, 27 Oct 2022 16:04:02 +0200 Subject: [PATCH] lisp/ob-clojure.el: Fix h

Re: ob-clojure eval error when has comment at end of code line

2022-10-27 Thread Daniel Kraus
t more on ob-clojure the next few days, I think I missed a few emails, sorry. Now I have a filter rule where mails with Clojure in the subject go to my inbox. Cheers, Daniel >From 87054023df0876d17771ee3885e7b1091ccdeab1 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Thu, 27 Oct 2022 14:16:3

Re: [PATCH] ob-clojure.el: Add support for babashka and nbb backend

2022-09-26 Thread Daniel Kraus
Hi! Bastien writes: > Applied in main as 764642f5, thanks a lot and sorry for the delay. > > I also added you to https://orgmode.org/worg/contributors.html. Thank you very much :) > Would you consider taking over the maintainance of ob-clojure.el? I think I would. What does this exactly

Re: [PATCH] ob-clojure.el: Add support for babashka and nbb backend

2022-01-31 Thread Daniel Kraus
Hi, just wanted to bump this thread and ask if I can do anything to move this forward? I'm using it since a few month and works for me. Thanks, Daniel Daniel Kraus writes: > Thanks, now I got it :) > > Attached is the patch changed the logic to use a temp file with > or

Re: [PATCH] ob-clojure.el: Add support for babashka and nbb backend

2021-12-22 Thread Daniel Kraus
Daniel Kraus writes: > I filled out the copyright assignment and waiting for them. > I'll mail again when it's done. Just want to mention that I finally received my signed of the copyright agreement. so there is no blocker from this site in case it doesn't count as tinychange.

Re: [PATCH] ob-clojure.el: Add support for babashka and nbb backend

2021-11-20 Thread Daniel Kraus
Max Nikulin writes: > Thank you for contribution. I do not have strong objection any more. I am not > familiar with babel internals, so I leave further discussion to maintainers. > > If you have not signed copyright assignment yet, likely you should do it to > proceed (I am unsure concerning

Re: Bug: org-no-popups disregards display-buffer-fallback-action [9.4.6 (9.4.6-13-g4be129-elpaplus @ /home/jeeger/.emacs.d/elpa/org-plus-contrib-20210920/)]

2021-11-15 Thread Daniel Kraus
Eric S Fraga writes: > On Monday, 15 Nov 2021 at 00:03, dal-bla...@onenetbeyond.org wrote: >> So if we want to make org cooperate with window.el we must ban theses >> functions and instead delegate the window management with calls to >> proper display functions. > > I agree completely. One of

Re: [PATCH] ob-clojure.el: Add support for babashka and nbb backend

2021-11-15 Thread Daniel Kraus
babel-eval. Somehow it doesn't feel too great to create unnecessary temp files but I looked how other babel backends do it and e.g. ob-js and ob-haskell use the same logic. Thanks, Daniel >From cc9a24fcc42756cc76d59697bddc94a4ee2c475d Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Sat, 13 N

Re: [PATCH] ob-clojure.el: Add support for babashka and nbb backend

2021-11-14 Thread Daniel Kraus
Hi! Max Nikulin writes: > On 14/11/2021 22:28, Daniel Kraus wrote: >> +(defun ob-clojure-escape-quotes (str-val) >> + "Escape quotes for STR-VAL." >> + (replace-regexp-in-string "\"" "\\\"" str-val 'FIXEDCASE 'LITERAL

[PATCH] ob-clojure.el: Add support for babashka and nbb backend

2021-11-14 Thread Daniel Kraus
* lisp/ob-clojure.el: Add support for babashka and nbb backend. --- This adds support to ob-clojure for babashka (https://github.com/babashka/babashka) and nbb (node version of babashka). It doesn't use `params` as I'm not really sure what they're used for and if they're important for evaluation.

[PATCH] ob-sql: Respect database param when using dbconnection

2020-05-28 Thread Daniel Kraus
rom a8dccff104d7426e2f353b1005e0bdcc51de6e99 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Tue, 26 May 2020 16:07:34 +0200 Subject: [PATCH] ob-sql: Respect database param when using dbconnection --- lisp/ob-sql.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-sql

Re: Debugging at least 2 regressions in org-mode master breaking ox-hugo

2020-04-24 Thread Daniel Kraus
Hi! Kyle Meyer writes: > Despite being sympathetic to any attempt to break up org.el, I agree > that it'd be good to move the outline path functionality back. Also, > there are a number of loading issues related to the org-refile move, > which can be seen by running `make single'. > > I've

[O] [PATCH] org-src.el: Fix org-edit-src-exit with split-window-below

2019-01-22 Thread Daniel Kraus
This fixes a bug that got introduced in 819e98afd where you end up with 3 split windows if you exit an org source buffer with your `org-src-window-setup` function set to `split-window-below`. >From 7b3df7891d7c8ecdb489edda0e908a306090ebfc Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Tue,

Re: [O] let org-git-link.el suport Magit related buffers

2018-03-27 Thread Daniel Kraus
Hi! stardiviner writes: > I hope can combine Org-mode links with Magit through `org-git-link.el`. > [...] > Is there anyone want to or can implement this? There is https://github.com/magit/orgit Cheers, Daniel

[O] Feature request: Add window-setup options to capture and note taking

2017-12-13 Thread Daniel Kraus
Hi, I don't like that org fiddles with my window setup, even if it's only temporary. I can set `org-agenda-window-setup` and `org-src-window-setup` to change the behavior for the babel and agenda window but for other functions it seems to be hard coded. I would be interested especialy in the