Re: [PATCH] ob-java: Allow import to end with asterisk

2021-01-28 Thread John Herrlin
ou feel like updating the patch? > > [1] https://code.orgmode.org/bzg/org-mode/src/master/lisp/ob-java.el#L314 Here is an updated patch. It seems to work on my cases. Of topic, I am very happy with the latest updates on ob-java and I think it works really good! Thanks for the awesome work Ian!

Re: [PATCH] ob-java: Allow import to end with asterisk

2021-01-26 Thread John Herrlin
Thank you for the guidence! I will try to figure it out and sending a updated patch soon. ian martins writes: >> I found this case: >> And it seems to me that the import regex dont see the asterisk. >> >> I attached a possible patch. > > Thanks again, John. You're right the regex is missing

[PATCH] ob-java: Allow import to end with asterisk

2021-01-25 Thread John Herrlin
00:00:00 2001 From: John Herrlin Date: Tue, 26 Jan 2021 08:19:19 +0100 Subject: [PATCH] ob-java: Allow import to end with asterisk * lisp/ob-java.el (org-babel-java--imports-re): Allow import to end with asterisk. TINYCHANGE --- lisp/ob-java.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH] ob-java, a proposal on import improvement

2021-01-16 Thread John Herrlin
Sorry for latency, 9to5 been killing it. Thx for the feedback, make sense! Here is a new patch with the improvements. >From 680e04217c8e4c536875379cac01edccd694c4cb Mon Sep 17 00:00:00 2001 From: John Herrlin Date: Sun, 10 Jan 2021 21:47:26 +0100 Subject: [PATCH] ob-java: Include static impo

Re: [PATCH] ob-java, a proposal on import improvement

2021-01-10 Thread John Herrlin
ian martins writes: > On Fri, Jan 8, 2021 at 11:28 AM John Herrlin wrote: > >> I would like to combine imports from header-args with imports from a >> source block. >> ... >> I didnt get the to work so I made a patch. > > John, Sorry that wasn

[PATCH] ob-java, a proposal on import improvement

2021-01-08 Thread John Herrlin
* 2)) .flatMap(x -> (x != 10) ? just(x) : empty()) .subscribe(System.out::println); #+END_SRC I didnt get the to work so I made a patch. What do you think about it? Stay safe! Best regards John >From a602a86e42c2da5cb531ada6c13184d3c307a0db Mon Sep 17 00:00:00 2001 From: Joh

Re: New website - back to the old unicorn!

2020-10-26 Thread John Herrlin
Looks awesome! "many others" on the landing page points to https://orgmode.org/org.html#History-and-Acknowledgments and returns 404. Bastien writes: > Dear all, > > thanks to the initiative and the patient efforts of Timothy, our > website has been revamped: new contents, new look and... the

Re: [PATCH] ob-java

2020-10-22 Thread John Herrlin
the spacing and allow > non-public classes. > > Thanks again for testing, debugging, and reporting. It's been a pleasure! > > On Wed, Oct 21, 2020 at 9:54 AM John Herrlin wrote: > >> >> ian martins writes: >> >> >> >> >> What do you think

Re: [PATCH] ob-java

2020-10-21 Thread John Herrlin
portant part is the result! I have made a couple of more runs and I cant find anything that doesnt work! > > On Wed, Oct 21, 2020 at 1:59 AM John Herrlin wrote: > >> >> I did and it looks really good. The difference in this example: >> >> #+BEGIN_SRC java >>

Re: [PATCH] ob-java

2020-10-21 Thread John Herrlin
> > btw2, did you notice that you can C-c C-c on source blocks that don't have > main methods and it'll compile without error? > > On Tue, Oct 20, 2020 at 3:17 PM John Herrlin wrote: > >> >> Hey, >> >> Did some debugging and found out that my class did

Re: [PATCH] ob-java

2020-10-20 Thread John Herrlin
Hey, Did some debugging and found out that my class didn't contained =public= and the patch requires it to be. This works fine: #+HEADER: :classname Main #+HEADER: :dir src #+HEADER: :cmdline -classpath ./rxjava-1.3.8.jar:. #+HEADER: :cmpflag -classpath ./rxjava-1.3.8.jar

Re: [PATCH] ob-java

2020-10-20 Thread John Herrlin
Hey Ian, The changes list looks really nice! But I can't get the patch to work. The use case I have is this and it works fine in master. #+HEADER: :classname Main #+HEADER: :dir src #+HEADER: :cmdline -classpath ./rxjava-1.3.8.jar:. #+HEADER: :cmpflag -classpath

Re: ob-java compile only

2020-09-29 Thread John Herrlin
n of > the class if it doesn't define a main, without the need for a new > header. The alternatives are nice and I will manage fine! Looking forward to see what will happen to ob-java! :) > > On Mon, Sep 28, 2020 at 4:11 AM John Herrlin wrote: > >> >> Hey Ian,

Re: ob-java compile only

2020-09-28 Thread John Herrlin
ublic class Main { > public static void main(String[] args) { > System.out.println(Hey.hey()); > } > } > #+end_src > > #+begin_src java :results output :classname pkg/Hey :tangle pkg/Hey.java > package pkg; > > public class Hey { > public static String

ob-java compile only

2020-09-27 Thread John Herrlin
Hey Ian! Happy to see you as the maintainer of the ob-java! I would like to propose a feature to ob-java. The feature allows a source code block to write and compile only, without executing. Here is a common use case for me. Class without a entry point have an :compile-only header.

[PATCH] possible bugfix in ob-java

2020-09-13 Thread John Herrlin
quot;, "No such file or directory" "/tmp/src/se/my-test-package/Main.java" In the patch I rearrange so package dirs are created before the Main.java file is written to file system. It fixes the provided case for me. >From 618b736d895b1e762cdcc8026a673aa6207a0a8b Mon Sep 17 00:00:00

Re: Setting language on result of code block

2020-08-02 Thread John Herrlin
You can use =:wrap= for that. Here is the docs: https://orgmode.org/manual/Results-of-Evaluation.html And here is an example. #+BEGIN_SRC shell :results output :wrap example json curl http://ip.jsontest.com/ #+END_SRC #+RESULTS: #+begin_example json {"ip": "8.8.8.8"} #+end_example Best

Re: Bug: [patch] Fix org-babel-result-to-file never expanding links when babel is evaluated in indirect buffer [9.3.7 (release_9.3.7-728-g1efc4e @ /home/yantar92/.emacs.d/straight/build/org/)]

2020-08-02 Thread John Herrlin
your use-case. Can you explain why you need to > achieve such behaviour? There might be an easier way to get what you > want. I don't have a real world scenario, just the one I made up below. I used that to play around with the function. Best regards John > > Best, > Ihor > &g

Re: file-mode source code block header argument

2020-08-02 Thread John Herrlin
Thank you for the comments Kyle! I updated the patch accordingly. Took your test straight of as I think it's really clean and easy to reason about. Best regards Kyle Meyer writes: > John Herrlin writes: > >> I am looking for a way to set permission on a file created from source &

Re: Bug: [patch] Fix org-babel-result-to-file never expanding links when babel is evaluated in indirect buffer [9.3.7 (release_9.3.7-728-g1efc4e @ /home/yantar92/.emacs.d/straight/build/org/)]

2020-08-01 Thread John Herrlin
It's intended to change directory and dont clone base buffer values. I tried to accomplish "If the `default-directory' is different from the containing file's directory then expand relative links." As I understands it that's when it inserts a relative link, otherwise it just `result'. I was

Re: Bug: [patch] Fix org-babel-result-to-file never expanding links when babel is evaluated in indirect buffer [9.3.7 (release_9.3.7-728-g1efc4e @ /home/yantar92/.emacs.d/straight/build/org/)]

2020-07-31 Thread John Herrlin
Hey Ihor, Could not get the patch to work. I used this use case. (with-current-buffer (find-file "/tmp/tmp.org") (insert "* A\n** b\n** c\n\n some text") (dired "~/") (make-indirect-buffer "tmp.org" "tmp-indirect") (switch-to-buffer "tmp-indirect") (goto-char (point-max))

file-mode source code block header argument

2020-07-24 Thread John Herrlin
regards John >From a58d960092ad944e17e9b22f337379ed90638b65 Mon Sep 17 00:00:00 2001 From: John Herrlin Date: Fri, 24 Jul 2020 13:45:18 +0200 Subject: [PATCH] ob-core: file-mode option in source code block arguments * ob-core.el (org-babel-execute-src-block): Source code block header argument :file-mode