[O] Unable to reuse the result of a cached function call as argument of a gnuplot call

2015-06-10 Thread bernardH
Hi all !
First, I would like to thank the org-mode community for the great fun I'm
having with babel. Unfortunately, I'm currently stumped by what appears to
be a bug (or unhandled corner-case).
Here is a org-mode style write-up to describe the problem :

* Versions
#+BEGIN_SRC elisp
(org-version)
#+END_SRC

#+RESULTS:
: 8.3beta

#+BEGIN_SRC elisp
(emacs-version)
#+END_SRC

#+RESULTS:
: GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.6)
:  of 2014-01-01 on prometheus, modified by Debian

* Minimal (!) example

Defining a function, I'll want to use the result of a _cached_ call as
an arg to a a gnuplot function.

#+name: fun
#+BEGIN_SRC sh :var nb=10 :results output
seq $(( ${nb} * 2 )) | paste - -
#+END_SRC

First a regular call, to show that I'll be able to reuse the result of
this call.
#+name: my-call
#+call: fun[:results table](nb=5)

#+RESULTS: my-call
| 1 |  2 |
| 3 |  4 |
| 5 |  6 |
| 7 |  8 |
| 9 | 10 |


Now a cached call.

#+name: my-call-cached
#+call: fun[:results table](nb=5) :cache yes 

#+RESULTS[f2b650eb5296f72a1f7237c2a65b7fb3443acf5f]: my-call-cached
| 1 |  2 |
| 3 |  4 |
| 5 |  6 |
| 7 |  8 |
| 9 | 10 |


Dummy data that I only use as default value for the gnuplot function
definition.
#+name:dummy-data
| 1 |  2 |

#+name: plotting
#+begin_src gnuplot :var data=dummy-data my_title=dummy title :file dummy.png
  set title my_title
  plot data
#+end_src

#+RESULTS: plotting
[[file:dummy.png]]

I can call the gnuplot function on the result of the uncached call :

#+name: plot-result
#+call: plotting[:file result-call.png](data= my-call) :results file

#+RESULTS: plot-result
[[file:result-call.png]]

#+BEGIN_SRC sh :results output
file result-call.png
#+END_SRC

#+RESULTS:
: result-call.png: PNG image data, 640 x 480, 8-bit colormap, non-interlaced


But if I try to use the cached call :

#+name: plot-result-cached
#+call: plotting[:file result-call-cached.png](data= my-call-cached)
:results file

#+RESULTS: plot-result-cached
[[file:result-call-cached.png]]

#+BEGIN_SRC sh
file result-call-cached.png
#+END_SRC

#+RESULTS:
: result-call-cached.png: empty

* gnuplot console
Working gnuplot invocation had :
#+BEGIN_EXAMPLE
gnuplot  data = /tmp/babel-262957O1/gnuplot-26295F9G
#+END_EXAMPLE


Failed invocation on result of a cached call had :
#+BEGIN_EXAMPLE
gnuplot data = ((1 2) (3 4) (5 6) (7 8) (9 10))
gnuplot set term png
Terminal type set to 'png'
Options are 'nocrop font
/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf,12
fontscale 1.0 size 640,480 '
gnuplot set output result-call-cached.png
gnuplot set title my_title
gnuplot plot data
 warning: Skipping unreadable file ((1 2) (3 4) (5 6) (7 8) (9 10))
 No data in plot

#+END_EXAMPLE

* References

[[https://lists.gnu.org/archive/html/emacs-orgmode/2010-10/msg01379.html][message
on arg passing to gnuplot]]

[[http://emacs.stackexchange.com/a/12690/8545][stackexchange answer pointing
to the implementation of the results of named function calls as arguments]]


Thank you very much if a fix is possible (I really need to cache the very
expensive function calls of my real use-case, but I should be able to make a
cheap uncached identity function before the gnuplot invocation as a workaround).

Best Regards,

Bernard






Re: [O] Please consider making a donation

2012-08-26 Thread BernardH
Bastien bzg at altern.org writes:

 
 Hello all,
 
 I've been a freelancer for the last two months and I want to continue
 this experience.
 
 As such, my main challenge is to discipline myself not to spend too 
 much time on Org -- because, as you can imagine, it *is* very tempting.
 
 So the more donation I receive, the more time I will have for Org.

Great !
You might want to lower the barrier to donate by providing a link to
http://orgmode.org/org-mode-donate.html ☺.
 
BTW, if it is to give you money, why not cut the middlemen and provide
your IBAN ?(As a fellow countryman, it saddened me to pay for €→$(→€ ?)
and to Visa™ and PayPal™ (which I despise) for naught.

Kudos for your great work on Org !

B.




Re: [O] Organizing a collection of papers

2012-06-04 Thread BernardH
Victor Miller victorsmiller at gmail.com writes:

 
 I've just started using org-mode, and so far find it quite
 useful. I have a very large collection of technical papers in a
 directory tree, and I'd like to go through them and index them
 through org-mode. What I'd like is to have a way of going through
 them and look at the unannotated ones, and annotate them one by
 one. I imagine doing this by first making up a file of links like
 [[xxx.pdf][not done yet]], and then being presented with the not
 done ones, glancing at them and deciding how what annotations to
 put in. In addition I'd like to add tags. What I'd really like is
 to be able to make up new tags on the fly. Has anyone done
 anything like this in org-mode?
 
 Victor
 
 
Hi,
For organizing papers, I've recently found
[[http://www-public.it-sudparis.eu/~berger_o/weblog/2012/03/23/how-to-manage-and-export-bibliographic-notesrefs-in-org-mode/][an
interesting blog post]].
Actually doing it is still on my TODO list unfortunately.
However, the use-case seems common enough amongst orgmode users that
if something is recognized as best-practice, maybe an entry in
[[http://orgmode.org/worg/org-tutorials/][the worg tutorials section]] would be
warranted.

Best Regards,

B.





[O] Unicode characters export from babel code blocks ?

2012-05-18 Thread BernardH
Hi, In some literate program, I'd like to generate a data file. I do
it with a shell here-document (is there a better way just to inline
some text to tangle in a file?).  It works when tangling but not when
exporting to the pdf. Because there is a catch : I wanted to use
unicode \25A0 ■ and \25A1 □ instead of '#' and ' '. With
#+LATEX_HEADER: \usepackage{xltxtra} 
#+LATEX_HEADER: \setmainfont{DejaVu Serif} 
I can get the squares in the rgular text,
however, the exported code remains blank where the squares should be
☹.


Any help greatly appreciated !
Best Regards (and thx for the great ord-mode !)

Bernard

PS: excerpt from my babel code below
…
Using =\25A0= aka «black square» (■) and =\25A1= aka «white square» (□) to
represent the wall and empty spaces of the maze.

#+begin_src sh :file maze.txt :exports code :tangle yes
cat - END
□
□■■□□□■■□
□
□□□■□■□□□
□□□■□■□□□
□□□■■■□□□
□
□■■□□□■■□
□
END
#+end_src
…

the pdf does not containanything





[O] HTML slides

2012-04-19 Thread BernardH
Hi,

First and foremost, thank you for making such a great emacs mode !
Whatever I'm doing with orgmode (and I do as much as possible in orgmode !), it
is always a joy.

Recently, i've been switching to orgmode for my presentations.
I'm a happy user of [[https://github.com/eschulte/org-S5][org-S5]] but I just
stumbled upon
[[https://github.com/relevance/org-html-slideshow][org-html-slideshow]].
I have the utmost respect for their respective authors (of org-S5 for
obvious reasons, of org-html-slideshow for Clojure contributions) and
now I have a hard time deciding which one to choose.

Does anyone have experience with any / both of them ?
How would you make the choice ?

Thanks for any advice !

Best Regards,

Bernard





Re: [O] How do teachers use org-mode

2012-02-01 Thread BernardH
Venkatesh Choppella venkatesh.choppella at iiit.ac.in writes:

 
 Dear Org-mode users:
 
 I am using  org-mode this semester  to host my course notes.   For me
 org-mode was a god-send, since I had been struggling to organize
 course notes in plain html  before that.
…
 
 I am interested to  hear from others who have used org-mode as part of
 their teaching activities.
 
 Sincerely,

Thanks for sharing your experience.
I recently discovered orgmode, and I'm currently using it :
 - for presentations with export-as-s5 from https://github.com/eschulte/org-S5
 - to check various points for students works (cloning trees of checkboxes)

I put some files on github:
 https://github.com/scientific-coder/Teaching-Materials

I'd like to use it for project planning with taskjuggler, but I'm currently
unable to do it (with taskjuggler v 3.1.0) (tried
https://github.com/alander/org-taskjuggler3.git to no avail,
http://orgmode.org/tmp/worg/org-issues.html has DONE for TaskJuggler 3,
revisited but I could not figure why).

Best Regards,

Bernard