Re: [O] Should C-c C-c always jump between a footnote and its definition? C-c C-x f, too?

2014-06-21 Thread Nicolas Richard
Grant Rettke  writes:

> On Fri, Jun 20, 2014 at 5:13 PM, Nicolas Goaziou  
> wrote:
>> I cannot reproduce it, neither on maint nor on master. Each time, cursor
>> ends up on line 3898.
>
> Understood. Thank you much for trying.
>
> I will convert the document to in-line footnotes.

You tried with org 8.2.7, whereas Nicolas tried with latest maint. A
navigation bug was fixed meanwhile, so it'd be worth trying the latest
maint version before changing your data. (the bugfix isn't in 8.2.7a
unfortunately afaict).

-- 
Nico.



Re: [O] BEGIN_LATEX_HEADER [cont]

2014-06-21 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> The first is that editing non-trivial latex code embedded in an elisp
> string quickly becomes tedious, whereas it’s much pleasanter in org
> using org-edit-special, syntax highlighting of src blocks, etc.

This is a no-op since you only do it a limited number of times, i.e.
once for each document type.

> The second is that it’s impossible to share without distributing elisp
> code.  From the twin standpoints of reproducible research and security,
> I think org ought to maximize the degree to which export use cases are
> sharable without resorting to executing elisp code.

This is also a no-op. You cannot be serious about reproducible research
if you don't share `org-export-async-init-file' anyway.

Eventually, if you insist on writing your full preamble within the
document, you can start to write it in a LaTeX-mode buffer, copy it in
your Org document and add "#+LATEX_HEADER: " in front of each line.
This last step is done easily with `string-rectangle' (C-x r t).


Regards,

-- 
Nicolas Goaziou



Re: [O] Bulk select and tag

2014-06-21 Thread Bastien
Hi Chris,

Chris Henderson  writes:

> Wondering how can I select multiple ** items and apply tag on them.

(setq org-loop-over-headlines-in-active-region t)

Then create an active region with multiple headlines and hit C-c C-q.

HTH,

-- 
 Bastien



Re: [O] Get links from Firefox/Safari into orgmode

2014-06-21 Thread Daniel Franke
hi Rizvi,

thanks for your reply! As far as i can see you run that from

emacs => firefox/safari

but i want it like

browser => emacs

Thank you so much! :)

Regards,
Daniel

On 20 Jun 2014, at 20:05, Haider Rizvi  wrote:

> Daniel Franke  writes:
> 
>> as the subject says, I would like to get links from any browser (i almost 
>> don’t care which
>> one) into org mode. 
> 
> Since you mention Safari, assume you are running on a Mac. Here is what you 
> are looking for. 
> 
> ;;; setup org-mac-link-grabber
> (require 'org-mac-link)
> (add-hook 'org-mode-hook (lambda () 
>  (define-key org-mode-map (kbd "C-c g") 'org-mac-grab-link)
>  ))
> 
> 
> Regards, 
> -- 
> Haider
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


[O] How to never have the Footnote heading generated?

2014-06-21 Thread Grant Rettke
Good afternoon,

I want only to use in-line footnotes and never to have them
automatically entered into an auto created
Footnote heading. Rather I want that auto-generated, just like it is
now. My goal is to allow refactoring
literature with footnotes without having to update anything else in
that document (barring references).

Is there a setting to get that behavior. I read the docs and am not seeing it.

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] [PATCH] -for review- Tangling with variable transfer of variables

2014-06-21 Thread Charles C. Berry

On Fri, 20 Jun 2014, Rainer M Krug wrote:


Attached please find =the reworked patch.

1) uses local() and closes connection
2) does not leave a variable cal;led file behind



Seems to work on a few test cases.

I'd move the strings to defconsts.

Putting a newline before each `%S' will outdent the first line of 
:var value when it is echoed in the session log so it will be easier to 
view.


===

With Eric's input on this:

Would you also change this at the end of org-babel-R-assign-elisp:

res})" name file header row-names max
-(format "%s <- %s" name (org-babel-R-quote-tsv-field value
+(format "%s <- %S" name
+   (if (stringp value) value (prin1-to-string value)

??

I think this is innocuous for plain strings with no internal quotes, but 
allows almost anything to be passed to R as a string.


So
:var x=[1 2 3 "4" 5]

will be passed to R as x <- "[1 2 3 \"4\" 5]"

instead of x <- "[1 2 3 "4" 5] which throws an error.

And this just works:

#+NAME: latex-capt
#+BEGIN_SRC latex
  \begin{math}
y = X\beta,
\mbox{where } \beta = %beta%
  \end{math}
#+END_SRC

#+BEGIN_SRC R :var ytxt=latex-capt :results raw :wrap latex
beta <- 1.234
sub("%beta%",beta,ytxt)
#+END_SRC


HTH,

Chuck



Re: [O] Get links from Firefox/Safari into orgmode

2014-06-21 Thread Haider Rizvi
Daniel Franke  writes:

> emacs => firefox/safari
That's correct.

> browser => emacs

Probably the best is to use an Applescript like below, and save it in
~/Library/Scripts/Applications/Safari. You can kick off this
Applescript using a variety of methods (Quicksilver, menu bar, etc.)

http://www.tuaw.com/2006/08/08/tuaw-tip-enable-the-applescript-menu/


tell application "Safari"
set theUrl to URL of document 1
set theName to the name of the document 1
set theOrglink to "[[" & theUrl & "][" & theName & "]]"
set the clipboard to theOrglink
end tell

activate application "Emacs"

-- this last bit is iffy, since Emacs will not always have an org file
--  open in the frame that pops up. 
tell application "System Events"
keystroke "y" using control down
end tell

Hope this helps.

Regards, 
-- 
Haider




Re: [O] Thoughts on weaving variable documentation

2014-06-21 Thread Grant Rettke
Understood. Thanks for sharing and elaborating.

The use case on my mind was for people scouring the Internet for
interesting things
inside of other people's configuration files.

That is what I did for a while, but now I just load stuff and use
Emacs to read the documentation.

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Sat, Jun 21, 2014 at 12:58 AM, Aaron Ecay  wrote:
> Hi Grant,
>
> 2014ko ekainak 20an, Grant Rettke-ek idatzi zuen:
>>
>> Good morning,
>>
>> A lot of people are weaving their Emacs init files for the obvious
>> reason: it is difficult to remember why
>> we configured stuff and other people definitely won't know why we did
>> it. There is a common operation
>> that occurs though when other people read our Emacs init:
>>
>> 1. They open it up in Emacs
>> 2. Find what looks interesting
>> 3. Do a C-h f or C-h v on it and learn about it
>>
>> Makes total sense.
>>
>> What I got curious about is for this specific use case, people
>> scanning other people's configs, how I
>> could make it easier. A thought is to weave the docstrings for
>> variables right into the weaved file any
>> time a variable is set. I am thinking something like this:
>>
>> 1. When the weave occurs
>> 2. Look at each line of code that starts with a setq
>> 3. Look up the docstring for the variable
>> 4. TBD: Weave that documentation into the output.
>>
>> That is the idea, at least.
>>
>> My question is:
>> 1. What are the standard mechanisms to do something like this within
>> the ob lifecycle?
>> 2. What do you think in general?
>
> I don’t really see the use case.  One of the best parts of developing
> elisp in emacs is the level of interactive documentation:
> describe-function, find-function, interactive info manuals, etc.  It’s
> there when you need it, but not in the way when you don’t.  I almost
> never read elisp code in a non-emacs environment (except for short
> snippets in blog posts, I suppose).
>
> FWIW, my wishlist for literate programming in org/elisp is something
> like (in approximately increasing order of estimated difficulty):
>
> - allow find-function/variable to jump to the location in an org file
>   where something is defined, rather than the tangled elisp file.
>
> - allow org-mode text “near” a function definition to be used as the
>   function’s docstring (for describe-function et al.):
>
> ,
> | docstring docstring docstring
> | #+begin_src elisp
> |   (defun foo ()
> | ...)
> | #+end_src
> `
>
> rather than:
>
> ,
> | #+begin_src elisp
> |   (defun foo ()
> | "docstring docstring docstring"
> | ...)
> | #+end_src
> `
>
> - allow more features of underlying source code editing modes to be used
>   in org buffers directly (no org-edit-special context switch needed).
>   For me, this would include:
>   - eval-defun (C-M-x)
>   - paredit
>   - eldoc
>   - auto-complete (company etc.)
>   For your use case, a mode which shows the docstring for a fn/var in a
>   tooltip on mouseover/keystroke could be added (I couldn’t find
>   anything like this already existing for emacs-lisp-mode, which is
>   kind of surprising to me – but I did not look very hard)
>
> - make it easier to develop parts of org using these LP features.
>
> Cheers,
>
> --
> Aaron Ecay



Re: [O] Get links from Firefox/Safari into orgmode

2014-06-21 Thread Daniel Franke
On 21 Jun 2014, at 22:34, Haider Rizvi  wrote:

> Daniel Franke  writes:
> 
>> emacs => firefox/safari
> That's correct.
> 
>> browser => emacs
> 
> Probably the best is to use an Applescript like below, and save it in
> ~/Library/Scripts/Applications/Safari. You can kick off this
> Applescript using a variety of methods (Quicksilver, menu bar, etc.)
> 
> http://www.tuaw.com/2006/08/08/tuaw-tip-enable-the-applescript-menu/
> 
> 
> tell application "Safari"
>   set theUrl to URL of document 1
>   set theName to the name of the document 1
>   set theOrglink to "[[" & theUrl & "][" & theName & "]]"
>   set the clipboard to theOrglink
> end tell
> 
> activate application "Emacs"
> 
> -- this last bit is iffy, since Emacs will not always have an org file
> --  open in the frame that pops up. 
> tell application "System Events"
>   keystroke "y" using control down
> end tell
> 
> Hope this helps.
> 
> Regards, 
> -- 
> Haider
> 
> 

Good evening Haider.

thank you so much for your input, this helps a lot!! :) Now i have a working 
solution.

I used the script you suggest with a small change :

tell application "Safari"
set theUrl to URL of document 1
set theName to the name of the document 1
set theOrglink to "[[" & theUrl & "][" & theName & "]]"
set the clipboard to theOrglink
end tell


activate application "Emacs"
tell application "System Events"
keystroke "v" using {command down}
keystroke return
end tell
activate application "Safari"

and then I opened it with the application Fastscripts 
(http://www.red-sweater.com/fastscripts/). No i have the option to add the 
bookmark by keystroke  to the 
actual open Emacs window.

Regards,
Daniel!




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] BEGIN_LATEX_HEADER [cont]

2014-06-21 Thread Aaron Ecay
Hi Nicolas,

2014ko ekainak 21an, Nicolas Goaziou-ek idatzi zuen:
> 
> Hello,
> 
> Aaron Ecay  writes:
> 
>> The first is that editing non-trivial latex code embedded in an elisp
>> string quickly becomes tedious, whereas it’s much pleasanter in org
>> using org-edit-special, syntax highlighting of src blocks, etc.
> 
> This is a no-op since you only do it a limited number of times, i.e.
> once for each document type.

If you do it once, then it’s not a no-op, by definition.  I think you
mean that you disagree in the amount which you weight this as a concern,
which is a reasonable opinion to have.  But phrasing it in the way you
did is inaccurate and rather curt.

FWIW, in my experience latex (or any) code rarely flows from mind to
keyboard perfectly in the first attempt; there is some period of
revision, during which convenient editing matters.

> 
>> The second is that it’s impossible to share without distributing elisp
>> code.  From the twin standpoints of reproducible research and security,
>> I think org ought to maximize the degree to which export use cases are
>> sharable without resorting to executing elisp code.
> 
> This is also a no-op. You cannot be serious about reproducible research
> if you don't share `org-export-async-init-file' anyway.

This is also not true (or it’s some kind of value judgment).  Org’s
default settings + #+bind + local variables can do quite a bit.

> 
> Eventually, if you insist on writing your full preamble within the
> document, you can start to write it in a LaTeX-mode buffer, copy it in
> your Org document and add "#+LATEX_HEADER: " in front of each line.
> This last step is done easily with `string-rectangle' (C-x r t).

This is basically making the user do (something like) org-edit-special
manually.  It can probably be automated somewhat – I’ll work on a patch.

Thanks,

-- 
Aaron Ecay



Re: [O] [RFC] [PATCH] org-mtags: remove

2014-06-21 Thread Aaron Ecay
2014ko ekainak 14an, Aaron Ecay-ek idatzi zuen:
> 
> * contrib/lisp/org-mtags.el: Delete file.
> * lisp/org.el (org-structure-template-alist): Remove -style tags.
> (org-complete-expand-structure-template): Don't handle -style tags.
> ---
>  contrib/lisp/org-mtags.el | 255 
> --
>  lisp/org.el   |  43 
>  2 files changed, 20 insertions(+), 278 deletions(-)
>  delete mode 100644 contrib/lisp/org-mtags.el
> 
> The recent discussion of org-structure-template-alist[1] made me take
> a look at that variable, and I realized it includes infrastructure for
> an outdated method of using -style tags instead of canonical org
> syntax.  The implementation in contrib was never updated to the new
> exporter, and the approach seems out of line with the goals of that
> project.  So this patch removes this extension from core and contrib.
> 
> Does anyone have an opinion on whether this is a good idea?
> 
> Thanks,
> Aaron
> 
> [1] http://mid.gmane.org/87egz0sbfc@gmail.com

I pushed this patch to master, since there was no feedback.  It can be
reverted if it causes any problems, of course (and if you notice it
does, please feel free to revert it yourself).

-- 
Aaron Ecay



[O] [ANN] ox-extras (was: BEGIN_LATEX_HEADER [cont])

2014-06-21 Thread Aaron Ecay
2014ko ekainak 21an, Aaron Ecay-ek idatzi zuen:

[...]

>> Eventually, if you insist on writing your full preamble within the
>> document, you can start to write it in a LaTeX-mode buffer, copy it in
>> your Org document and add "#+LATEX_HEADER: " in front of each line.
>> This last step is done easily with `string-rectangle' (C-x r t).
> 
> This is basically making the user do (something like) org-edit-special
> manually.  It can probably be automated somewhat – I’ll work on a
> patch.

This is now implemented in a new library in contrib, ox-extras.  This is
intended as a semi-official, semi-curated repository for helpful pieces of
org export hooks and customizations.  Differently than worg, the aim is to
make it easy for users to load the snippets through the ox-extras-activate
function.  Even so, I hope this will be an “executable wiki” where anyone
(who has commit access to the org repo) is free to contribute new hook
functions and improve existing ones.

In the present case, if you execute

(ox-extras-activate '(latex-header-blocks))

you will be able to use blocks of the following form:

#+header: :header yes
#+begin_latex
  \foo{}
  \bar{}
#+end_latex

These will be transformed so that the begin/end wrapper is removed and
each line is prepended with #+latex_header: on export.  They can be
edited as latex code with the usual org-edit-special function (C-c ').

The #+header: :header yes line is a bit confusing.  The first #+header:
is part of org syntax that allows us to tag blocks (and other elements)
with plists.  The :header yes in the plist indicates that this block
should be treated as a latex_header, and not a normal type of latex
block.

Thanks,

-- 
Aaron Ecay



Re: [O] proposal to have ignoreheading tags/properties

2014-06-21 Thread Aaron Ecay
Hi Eric,

Thanks for your work on this code.  Partially inspired by this discussion,
I’ve just created contrib/lisp/ox-extras.el, which I hope will become a
home for useful export hook functions like this one.  Would you like to
add your code there (or would you mind if I did so)?

Thanks,

-- 
Aaron Ecay



Re: [O] BEGIN_LATEX_HEADER [cont]

2014-06-21 Thread Ken Mankoff

On 2014-06-21 at 20:42, Aaron Ecay wrote:
> 2014ko ekainak 21an, Nicolas Goaziou-ek idatzi zuen:
>> 
>> Aaron Ecay  writes:
>> 
>>> The first is that editing non-trivial latex code embedded in an
>>> elisp string quickly becomes tedious, whereas it’s much pleasanter
>>> in org using org-edit-special, syntax highlighting of src blocks,
>>> etc.
>> 
>> This is a no-op since you only do it a limited number of times, i.e.
>> once for each document type.
>
> If you do it once, then it’s not a no-op, by definition.  I think you
> mean that you disagree in the amount which you weight this as a
> concern, which is a reasonable opinion to have.  But phrasing it in
> the way you did is inaccurate and rather curt.
>
> FWIW, in my experience latex (or any) code rarely flows from mind to
> keyboard perfectly in the first attempt; there is some period of
> revision, during which convenient editing matters.

It is not a 1x operation, it is a per-document operation. For example,
in my use-case that started this whole discussion, each publication
requires tweaking a dozen or more lines of biblatex config.

  -k.



Re: [O] How to never have the Footnote heading generated?

2014-06-21 Thread Matt Lundin
Grant Rettke  writes:

> I want only to use in-line footnotes and never to have them
> automatically entered into an auto created Footnote heading.

An easy way to create inline footnotes is to use the following setting:

(setq org-footnote-auto-label nil)

Then, when you call org-footnote-action, simply press return for an
"anonymous" (i.e., inline) footnote.

 - The footnote looks like this.[fn:: Like this one]

Best,
Matt



[O] Invalid function

2014-06-21 Thread Thomas S. Dye
Aloha all,

Today I updated Org mode from its git repo using the makefile I've had
for a long time.  It usually works flawlessly, but today it didn't:

In toplevel form:
ox.el:77:1:Error: Invalid function: "Org"
Done (Total of 65 files compiled, 43 failed, 3 skipped)

What's going on?

Worg suggests that the invalid function problem might be solved by
running make clean and then make again, but doing this didn't help me.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Invalid function

2014-06-21 Thread Thorsten Jolitz
t...@tsdye.com (Thomas S. Dye) writes:

Hi,

> ox.el:77:1:Error: Invalid function: "Org"

Is that line 77 in /lisp/ox.el? Maybe have a look ...

-- 
cheers,
Thorsten




Re: [O] Invalid function

2014-06-21 Thread Thomas S. Dye
Thorsten Jolitz  writes:

> t...@tsdye.com (Thomas S. Dye) writes:
>
> Hi,
>
>> ox.el:77:1:Error: Invalid function: "Org"
>
> Is that line 77 in /lisp/ox.el? Maybe have a look ...

Nothing that looks like "Org" there.  And there are still the other 42
failures ...

Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] [PATCH] -for review- Tangling with variable transfer of variables

2014-06-21 Thread Aaron Ecay
Hi Rainer,

2014ko ekainak 21an, "Charles C. Berry"-ek idatzi zuen:
> 
> On Fri, 20 Jun 2014, Rainer M Krug wrote:
> 
>> Attached please find =the reworked patch.
>> 
>> 1) uses local() and closes connection
>> 2) does not leave a variable cal;led file behind
>> 
> 
> Seems to work on a few test cases.
> 
> I'd move the strings to defconsts.
> 
> Putting a newline before each `%S' will outdent the first line of 
> :var value when it is echoed in the session log so it will be easier to 
> view.

+1 to both of the above suggestions but otherwise the patch looks good
and I think it should be applied.

-- 
Aaron Ecay



Re: [O] [babel][PATCHES] exporting inline source code

2014-06-21 Thread Aaron Ecay
Hi Nicolas,

These both seem like good patches to me.  Did you run the test suite to
make sure that no tests are broken by them?  It would also be good if
you added some tests for this functionality – the example included at
the bottom of your email is a good starting point.  The other babel
export tests live in the file testing/lisp/test-ob-exp.el, so that’s the
spot to look for examples.

Have you heard back from the FSF about your copyright assignment?

Thanks for the patches,

-- 
Aaron Ecay



[O] Get total number of items

2014-06-21 Thread Chris Henderson
Is there a way to get the total number of items at the parent level? I have
lots of ** under a * and I'd like to see the number at a glance.

Thanks.


[O] LaTex best practice in org-mode

2014-06-21 Thread Shiyuan
Hi all,
Hi all,
   We can write LaTex directly in org-mode without put it in a SRC block.
When the code is exported, the latex syntax will be handled correctly to
html or pdf. That's very nice part of org mode. However, if we don't put
the latex code into a SRC block, the latex syntax is not correctly
highlighted (in the code attached below, the first equation is not
highlighted). Another benefit of putting the latex code into SRC block is
that we can easily switch to the latex mode to edit the code snippet using
C-c ' and in the latex mode, we can use some full-fleged latex package like
auctex. However, the latex code in the SRC block is ignored when exported
to html. For example, when I exported the following to html, the first
equation shows up in the html but the second seconed does not.  Any way to
make the html exporter to generated the second equation too without taking
away the BEGIN_SRC/END_SRC? What's the best practice to write latex in
org-mode. Thanks.

\begin{equation}
\label{eq:test}
Bx=b
\end{equation}

#+BEGIN_SRC latex

  \begin{equation}
\label{eq:test}
Ax=b
  \end{equation}
#+END_SRC


Re: [O] [RFC] [PATCH] org-mtags: remove

2014-06-21 Thread Bastien
Hi Aaron,

sorry for the lack of feedback on this -- I don't have enough time
right now.

Aaron Ecay  writes:

> I pushed this patch to master, since there was no feedback.  It can be
> reverted if it causes any problems, of course (and if you notice it
> does, please feel free to revert it yourself).

I don't expect any problem, thanks for taking care of this.

-- 
 Bastien



[O] [PATCH] ob-java.el: Add `:var' variables import

2014-06-21 Thread Bart Post

* lisp/ob-java.el: (org-babel-execute:java): Inject a private static
class inside the Java class designated by
`:classname'.
(org-babel-variable-assignments:java): Assign the header variables to
static fields in a private static class
`Data'.
(org-babel-java-var-to-java): Translate string to String, list to
java.util.List, float to double and others to int.
---
 lisp/ob-java.el | 39 ++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-java.el b/lisp/ob-java.el
index 8c64171..a2a1f40 100644
--- a/lisp/ob-java.el
+++ b/lisp/ob-java.el
@@ -58,7 +58,13 @@ parameters may be used, like javac -verbose"
 (src-file (concat classname ".java"))
 (cmpflag (or (cdr (assoc :cmpflag params)) ""))
 (cmdline (or (cdr (assoc :cmdline params)) ""))
-(full-body (org-babel-expand-body:generic body params))
+(split-body
+ (split-string body (concat classname "[\n\t ]*{")))
+(full-body
+ (org-babel-expand-body:generic
+  (concat (car split-body) (concat classname " {\n") 
(org-babel-variable-assignments:java params)
+  (mapconcat 'identity (cdr split-body) (concat classname " 
{")))
+  params))
 (compile
  (progn (with-temp-file src-file (insert full-body))
 (org-babel-eval
@@ -80,6 +86,37 @@ parameters may be used, like javac -verbose"
(org-babel-pick-name
 (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params)))
 
+(defun org-babel-variable-assignments:java (params)
+  "Return an internal Java class assigning the block's variables."
+  (concat "private static class Data {\n"
+ (mapconcat 'identity
+(mapcar
+ (lambda (pair)
+   (format "public static %s %s = %s;"
+   (cond
+((stringp (cdr pair)) "String")
+((listp (cdr pair)) "java.util.List")
+((floatp (cdr pair)) "double")
+(t "int"))
+   (car pair)
+   (org-babel-java-var-to-java (cdr pair
+ (mapcar #'cdr (org-babel-get-header params :var)))
+"\n")
+ "\n}")
+  )
+
+(defun org-babel-java-var-to-java (var)
+  "Convert an elisp value to a java string.
+Convert an elisp value, VAR, into a string of Java source code
+specifying a variable of the same value."
+  (if (listp var)
+  (concat "java.util.Arrays.asList(" (mapconcat 
#'org-babel-java-var-to-java var ", ") ")")
+(if (equal var 'hline)
+   "null"
+  (format
+   (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%S\"\"" "%S")
+   var
+
 (provide 'ob-java)
 
 
-- 
1.9.1