[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ob-clojure eval error when has comment at end of code line
From: |
Daniel Kraus |
Subject: |
Re: ob-clojure eval error when has comment at end of code line |
Date: |
Thu, 27 Oct 2022 14:25:33 +0200 |
Hi!
I had a look and apparently cider-eval returns nil when the expression
is a comment, vs the string "nil" when the Clojure expression returns nil.
Simply filtering nil values out seems to have fixed the issue
for me.
@Christopher, can you check the attached patch if this works for you?
@Ihor, a few developer related questions:
- I wanted to add a test, how can I run only test-ob-clojure?
I don't think the tests work currently and I would fix them and add more.
- 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.
- If this simple patch for example or fixing tests is good,
should I just install it?
Can I "freely" install minor changes to ob-clojure or should
everything go over the mailinglist?
Thanks. I hope I can work a bit 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
0001-lisp-ob-clojure.el-Fix-bug-with-inline-comments.patch
Description: Text Data
Ihor Radchenko <yantar92@posteo.net> writes:
> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> I have following Clojure source block:
>>
>> #+begin_src clojure
>> (re-find #"\d+" "I've just finished reading Fahrenheit 451");; => "451"
>> (re-find #"Bees" "Beads aren't cheap.");; => nil
>> #+end_src
>>
>> When I press =[C-c C-c]= to evaluate source block, got error:
>>
>> When there is no comments behind code lines. No this error.
>>
>> #+begin_example
>> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>> replace-regexp-in-string("nil" "" nil)
>
> Daniel, could you please take a look?
- Re: ob-clojure eval error when has comment at end of code line, Ihor Radchenko, 2022/10/26
- Re: ob-clojure eval error when has comment at end of code line,
Daniel Kraus <=
- Re: ob-clojure eval error when has comment at end of code line, Max Nikulin, 2022/10/27
- Re: ob-clojure eval error when has comment at end of code line, Ihor Radchenko, 2022/10/28
- ob-clojure session support (was: ob-clojure eval error when has comment at end of code line), Daniel Kraus, 2022/10/28
- Re: ob-clojure session support, Bastien Guerry, 2022/10/28
- Re: ob-clojure session support (was: ob-clojure eval error when has comment at end of code line), Ihor Radchenko, 2022/10/29
- Re: ob-clojure session support, Bastien Guerry, 2022/10/29
- Re: ob-clojure session support (was: ob-clojure eval error when has comment at end of code line), Daniel Kraus, 2022/10/30
- Re: ob-clojure session support (was: ob-clojure eval error when has comment at end of code line), Ihor Radchenko, 2022/10/30
- indent-tabs-mode in org (was: ob-clojure eval error when has comment at end of code line), Daniel Kraus, 2022/10/29
- Re: indent-tabs-mode in org, Bastien Guerry, 2022/10/31