Re: Please help by becoming a maintainer for an Org Babel file

2020-10-27 Thread Alberto Ramos


  Hi,

> The version I use is in the org contrib directory.  How does this differ
> from the one you use?  I believe the contrib one is slightly newer than
> the github one you refer to.

  The file in contrib (and the github) still uses writecsv/readcsv for
  reading an org table as input for other src blocks (this was gone in
  julia 1+) . This is deprecated in favor of
  DelimitedFiles.readdlm/writedlm. 

  But I understand that these are small changes...

  A.

>
> Although I don't have the time to commit to being a maintainer for this,
> I would be happy to test out any updates as I do use Julia a fair bit.


-- 
https://ific.uv.es/~alramos




Re: Please help by becoming a maintainer for an Org Babel file

2020-10-27 Thread Alberto Ramos


  Dear Bastien, all

  I would be very happy to:

  1) Include ob-julia.el At this moment this is in a separate git repo

  https://github.com/gjkerns/ob-julia

  and is unmantained. I made some small changes myself, since this
  outdated version does not work with current julia versions.

  2) Help with ob-fortran.el In fact I submitted a patch some time ago:

  https://lists.gnu.org/archive/html/emacs-orgmode/2019-09/msg00268.html

  That never made it to the org code.

  The problem with all this is that I am a very poor elisp programmer. I
  do not feel confident of being able to resolve all issues...

  Please, let me know what you think... Maybe you think that it is
  better to have someone trying to take care of this, even if maybe not
  all issues are going to be resolved. Maybe you feel that it is better
  to leave it as it is.

  Please, let me know what you think. 

  Many thanks for the great work!

  A.


<#secure method=pgpmime mode=signencrypt>

Bastien  writes:

> Dear all,
>
> we are looking for more maintainers of individual Org Babel files.
>
> Jack and Ian are already in, I added myself to ob-clojure.el.
>
> If you feel like proposing yourself for maintaining an Org Babel
> language, that would be super helpful.
>
> Thanks a lot!


-- 
https://ific.uv.es/~alramos




[O] :libs header in fortran code blocks

2019-09-27 Thread Alberto Ramos

  Hi all,

  I am completely new to this mailing list, and in fact to elisp. I am
  an user of org-babel, and in particular use a lot of fortran code
  blocks. 

  One annoyance is that these blocks were not supporting the :libs
  header: I had to tangle the code and compile it by hand.

  After asking for a solution in emacs-reddit
  
(https://www.reddit.com/r/emacs/comments/d8krp0/org_mode_code_blocks_and_libraries/),
  I was suggested to try to contribute with a patch.

  Here it is. Since it is the first time that I do something like this,
  please let me know if something is wrong or not done correctly.

  Thanks to all for the awesome org-mode!

  A.
>From 5c42f43bc2c1e95a54e0bee0f7f97e4d673238e9 Mon Sep 17 00:00:00 2001
From: Alberto Ramos 
Date: Fri, 27 Sep 2019 23:11:02 +0100
Subject: [PATCH] ob-fortran.el: Add support for :libs header

lisp/ob-fortran.el: Add support for :libs header in fortran code
blocks.

TINYCHANGE
---
 lisp/ob-fortran.el | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-fortran.el b/lisp/ob-fortran.el
index f1285f6ab..6e3421a75 100644
--- a/lisp/ob-fortran.el
+++ b/lisp/ob-fortran.el
@@ -40,6 +40,10 @@
 
 (defvar org-babel-default-header-args:fortran '())
 
+(defconst org-babel-header-args:fortran '((libs. :any))
+  "Fortran-specific header arguments.")
+
+
 (defvar org-babel-fortran-compiler "gfortran"
   "fortran command used to compile a fortran source code file into an
   executable.")
@@ -50,15 +54,23 @@
  (tmp-bin-file (org-babel-temp-file "fortran-bin-" org-babel-exeext))
  (cmdline (cdr (assq :cmdline params)))
  (flags (cdr (assq :flags params)))
+	 (libs (org-babel-read
+		(or (cdr (assq :libs params))
+		(org-entry-get nil "libs" t))
+		nil))
+	 (libs (mapconcat #'identity
+			  (if (listp libs) libs (list libs))
+			  " "))
  (full-body (org-babel-expand-body:fortran body params)))
 (with-temp-file tmp-src-file (insert full-body))
 (org-babel-eval
- (format "%s -o %s %s %s"
+ (format "%s -o %s %s %s %s"
 	 org-babel-fortran-compiler
 	 (org-babel-process-file-name tmp-bin-file)
 	 (mapconcat 'identity
 			(if (listp flags) flags (list flags)) " ")
-	 (org-babel-process-file-name tmp-src-file)) "")
+	 (org-babel-process-file-name tmp-src-file)
+	 libs) "")
 (let ((results
(org-trim
 (org-remove-indentation
-- 
2.22.0