Re: [O] org-babel export table from R to LaTeX

2012-02-15 Thread Riccardo Romoli
Thanks for your suggestion, I solved the problem using:

#+headers: :results output latex
#+begin_src R :session *R* :exports results
...
print(xtable(summary(mypca)))
#+end_src

Regards
Riccardo




2012/2/14 Andreas Leha andreas.l...@med.uni-goettingen.de

 Christophe Pouzat christophe.pou...@gmail.com writes:

  Sorry,
 
  Checking foo.org
  (
 http://orgmode.org/w/?p=worg.git;a=blob_plain;f=org-contrib/babel/examples/foo.org;hb=HEAD
 )
  I got the correct way to do it:
 
  #+begin_src R :results output latex :exports results
library(xtable)
xtable(foo, caption = ANOVA Table, label = tab:one,
digits = c(0, 0, 2, 0, 2, 3, 3))
  #+end_src
 
  Does it solve your problem?
 
  Christophe
 
  Riccardo Romoli ric.rom...@gmail.com writes:
 
  If I set :export latex when I exports to LaTeX I have only the R code,
 not the
  table.
 
  Best
 
  2012/2/14 Christophe Pouzat christophe.pou...@gmail.com
 
  Riccardo Romoli ric.rom...@gmail.com writes:
 
   Hi, I work with org-babel and R.
   In the R session I create a table that I have to export to LaTeX.
   This is the code I use:
  
   #+headers: :results latex
   #+begin_src R :session *R* :exports results
   .
 print(xtable(summary(mypca)))
   #+end_src
  
   I do not understand why the exported table is delimited by |:
  
   |% latex table generated in R 2.14.1 by xtable 1.6-0 package |
   | % Tue Feb 14 16:21:48 2012 |
   | \begin{table}[ht] |
 | \begin{center} |
   | \begin{tabular}{r} |
 | \hline |
 |  PC1  PC2  PC3  PC4  PC5  PC6  PC7  PC8  PC9 
 PC10 
 PC11  PC12  PC13  PC14  PC15  PC16 \\ |
 | \hline |
 | Standard deviation  3.4693  2.8113  2.5561  2.2668 
 2.0015  1.9236  1.7287  1.6220  1.4288  1.3456 
 1.2596 
 1.2195  1.1278  1.0778  0.8390  0. \\ |
 | Proportion of Variance  0.2188  0.1437  0.1188 
 0.0934 
 0.0728  0.0673  0.0543  0.0478  0.0371  0.0329 
 0.0289 
 0.0270  0.0231  0.0211  0.0128  0. \\ |
 | Cumulative Proportion  0.2188  0.3625  0.4813  0.5747
 
 0.6476  0.7149  0.7692  0.8170  0.8541  0.8871 
 0.9159 
 0.9429  0.9661  0.9872  1.  1. \\ |
 | \hline |
 | \end{tabular} |
   | \end{center} |
 | \end{table} |
   | |
  
   Should I change some headers settings??
  
   Best
  
 
  Hi Riccardo,
 
  Try :exports latex instead of :exports results
 
  Christophe
  --
 
  Most people are not natural-born statisticians. Left to our own
  devices we are not very good at picking out patterns from a sea of
  noisy data. To put it another way, we are all too good at picking
 out
  non-existent patterns that happen to suit our purposes.
  Bradley Efron  Robert Tibshirani (1993) An Introduction to the
 Bootstrap
 
  --
 
  Christophe Pouzat
  MAP5 - Mathématiques Appliquées à Paris 5
  CNRS UMR 8145
  45, rue des Saints-Pères
  75006 PARIS
  France
 
  tel: +33142863828
  mobile: +33662941034
  web: http://www.biomedicale.univ-paris5.fr/physcerv/C_Pouzat.html
 
 

 Hi Riccardo,

 additionally, if you do not want to get too tightly bound to LaTeX, check
 out the ascii-package, e.g.

 #+begin_src R :results output org wrap :exports results
  library(ascii)

  ## from the lm help page:
  ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
  trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
  group - gl(2,10,20, labels=c(Ctl,Trt))
  weight - c(ctl, trt)
  lm.D9 - lm(weight ~ group)
  lm.D90 - lm(weight ~ group - 1) # omitting intercept

  print(ascii(anova(lm.D9)), type=org)
 #+end_src


 Cheers,
 Andreas





Re: [O] Archiving old instances of repeating todos

2012-02-15 Thread Bernt Hansen
lbml...@hethcote.com writes:

 How do you archive old instances of repeating todos, C-c C-x C-s archives
 the whole thing. I'd like to have something that would take the following:

 ** TODO Mutter an oath
DEADLINE: 2012-02-13 Mon ++1d -0d
- State DONE   from TODO   [2012-02-12 Sun 16:25]
- State DONE   from TODO   [2012-02-09 Thu 18:43]
- State DONE   from TODO   [2012-02-08 Wed 12:32]
- State DONE   from TODO   [2012-02-07 Tue 19:28]
- State DONE   from TODO   [2012-02-06 Mon 15:45]
- State DONE   from TODO   [2012-02-05 Sun 17:27]
- State DONE   from TODO   [2012-02-03 Fri 12:20]
- State DONE   from TODO   [2012-02-02 Thu 22:00]
- State DONE   from TODO   [2012-02-01 Wed 17:47]
- State DONE   from TODO   [2012-01-31 Tue 19:32]
- State DONE   from TODO   [2012-01-30 Mon 17:52]
- State DONE   from TODO   [2012-01-29 Sun 12:30]
- State DONE   from TODO   [2012-01-28 Sat 23:05]

 and archive it so that the active part would appear something like:

 ** TODO Mutter an oath
DEADLINE: 2012-02-13 Mon ++1d -0d
- State DONE   from TODO   [2012-02-12 Sun 16:25]
- State DONE   from TODO   [2012-02-09 Thu 18:43]
- State DONE   from TODO   [2012-02-08 Wed 12:32]
- State DONE   from TODO   [2012-02-07 Tue 19:28]


 And the archive would look something like:

 ** TODO Mutter an oath
- State DONE   from TODO   [2012-02-06 Mon 15:45]
- State DONE   from TODO   [2012-02-05 Sun 17:27]
- State DONE   from TODO   [2012-02-03 Fri 12:20]
- State DONE   from TODO   [2012-02-02 Thu 22:00]
- State DONE   from TODO   [2012-02-01 Wed 17:47]
- State DONE   from TODO   [2012-01-31 Tue 19:32]
- State DONE   from TODO   [2012-01-30 Mon 17:52]
- State DONE   from TODO   [2012-01-29 Sun 12:30]
- State DONE   from TODO   [2012-01-28 Sat 23:05]



 Any help would be appreciated.

Hi Louis,

After some time when the repeating task has accumulated enough log stuff
I clone the task with time shift of 1 day in this case.
There's a problem with ++ and cloning so I remove the repeater on the
old task (it works fine with just +1d) and delete my LOGBOOK drawer in
the new repeating task.

When the old task is DONE I archive that with C-c C-x C-s and start
accumulating new stuff in the new repeating task.

HTH,
Bernt



[O] org-store-agenda-views ignores org-export-htmlize-output-type 'css

2012-02-15 Thread Sander Boer

Hi,

I'm trying to streamline my agenda views, but I cannot seem to get 
agendas to be exported *without* inline-css.


Right now I have this in my startup files:
(setq org-export-htmlize-output-type 'css)
(setq org-export-htmlized-org-css-url misc/style.css)

Even when trying this in the scratch buffer, the css is still inline.

Help and tips appreciated.

Sander




Re: [O] multilingual presentation with org

2012-02-15 Thread Nick Dokos
Rustom Mody rustompm...@gmail.com wrote:

 Thanks to Nick and Jambunathan I have got a minimal setup to be able to type 
 in English (roman
 script) and easily transliterate to Sanskrit (Devanagari).
 
 Now I am exploring how I could 'zip' the two together. My requirements are 
 like this:
 
 I will be teaching singing to a mixed group using a projector.  Those who can 
 read sanskrit would be
 put off by the roman (English) and those who cant of course need the roman.
 The attached screenshot shows two emacs buffers side-by-side with the two 
 versions.
 
 I am now exploring the possibilities of how to make a 'presentation' putting 
 the two together.
 I am not too comfortable using emacs for the final show because emacs 
 occasionally crashes -- due to
 non-standard fonts, input methods or what I dont know -- and I dont want this 
 to happen in front of
 50 people!
 
 Any thoughts/suggestions?
 

A two-column beamer presentation perhaps?

Nick



Re: [O] multilingual presentation with org

2012-02-15 Thread suvayu ali
On Wed, Feb 15, 2012 at 14:08, Nick Dokos nicholas.do...@hp.com wrote:
 I am now exploring the possibilities of how to make a 'presentation' putting 
 the two together.
 I am not too comfortable using emacs for the final show because emacs 
 occasionally crashes -- due to
 non-standard fonts, input methods or what I dont know -- and I dont want 
 this to happen in front of
 50 people!


 A two-column beamer presentation perhaps?

If I may add, xelatex should let you export presentations with both
Roman and Devanagari text. You might find the following thread useful.

http://thread.gmane.org/gmane.emacs.orgmode/51914/focus=51919

GL

-- 
Suvayu

Open source is the future. It sets us free.



[O] Babel add comma in front of my '*'

2012-02-15 Thread Daniel Dehennin
Hello,

I tryed to babelize an iptables-save file and file to restore it.

Babel put a comma in front of my '*', in the following, the '*mangle'
became ',*mangle':

#+begin_src text
# Generated by iptables-save v1.4.4 on Wed Feb 15 10:16:05 2012
,*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
#+end_src

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1


pgpaHtAz00nrl.pgp
Description: PGP signature


Re: [O] Setting multiple variables for code blocks in one property drawer

2012-02-15 Thread Eric Schulte
Viktor Rosenfeld listuse...@googlemail.com writes:

 Hi,

 after following the discussion about the new BABEL syntax I was under
 the impression that the following should work to set two variables in
 one PROPERTIES drawer:

 :PROPERTIES:
 :var: foo=1
 :var+: bar=2
 :END:

 However, the definition of bar is ignored. It turns out that there can
 only be one :var: or :var+: entry in a drawer and the latter can only be
 used to append to inherited entries, but not to those defined in the
 same drawer. Is this the intended behavior? How would I define multiple
 variables in a drawer (except for putting them all on one line)?

 Thanks,
 Viktor


You are correct, I believe this is a bug.  I've just pushed up a fix, so
your example above should now work as expected.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] issue with babel R evaluate session vs external process

2012-02-15 Thread Eric Schulte
When executing your example below on my system both code blocks work as
shown below.

#+begin_src R :results output :exports results
  foo=matrix(1:2)
  foo
#+end_src

#+RESULTS:
:  [,1]
: [1,]1
: [2,]2

#+begin_src R :results output :exports results :session *R*
  foo=matrix(3:8)
  foo
#+end_src

#+RESULTS:
:  [,1]
: [1,]3
: [2,]4
: [3,]5
: [4,]6
: [5,]7
: [6,]8


If you are not using the latest version of Org-mode (from git) I would
suggesting updating to the Org-mode git HEAD which should hopefully fix
this issue.

Thomas Alexander Gerds tagt...@sund.ku.dk writes:

 still a beginner, and maybe therefore, in my setup (release is: 7.8.03,
 emacs 23.2.1) the following occurs

 -org.snip---
 * here it works: org-ctrl-c-ctrl-c and export

 #+begin_src R :results output :exports results
   foo=matrix(1:2)
   foo
 #+end_src

 #+RESULTS:
 :  [,1]
 : [1,]1
 : [2,]2

 * here it does not:

 #+begin_src R :results output :exports results :session *R*
   foo=matrix(3:8)
   foo
 #+end_src

 the buffer *R* shows this:

 'org_babel_R_eoe'
 [1] org_babel_R_eoe
 org.snap--

 some debugging revealed this:

 ELISP (org-babel-R-evaluate-session *R* foo=matrix(1:2)\nfoo
 ELISP output '(output replace) nil nil)
 *** Eval error ***  
 ELISP (org-babel-R-evaluate-external-process foo=matrix(1:2)\nfoo
 ELISP output '(output replace) nil nil)
  [,1]\n[1,]1\n[2,]2\n

 but strange-enough when I try to edebug org-babel-R-evaluate-session, I
  get an error:

 Symbol's value as variable is void: edebug-after

 can someone explain this? 

 thanks!
 tomy

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] Using org-babel with Scheme

2012-02-15 Thread Eric Schulte
Leo Alekseyev dnqu...@gmail.com writes:

 Is anyone on the list using a recent org-babel with Scheme?  I
 recently started working through SICP, and I'm running into issues
 evaluating scheme src  blocks.  Org-babel error buffer pops up with
 ERROR: Wrong number of arguments to #primitive-generic display,
 and the minibuffer prompts me for a lisp expression.  Is there
 anything I need to configure beyond   (org-babel-do-load-languages
 'org-babel-load-languages  '((scheme . t)))?

 (Running latest org from git in Emacs 24; have Chicken scheme and
 guile installed).


I loaded the ob-scheme.el directly (which should be the same as loading
it with org-babel-do-load-languages as above) and the following works
for me.

#+begin_src scheme
  (+ 1 1 1)
#+end_src

#+RESULTS:
: 3

I have guile installed and I have the `scheme-program-name' variable set
to guile elsewhere in my .emacs init.  I imagine setting the above
variable should enable scheme evaluation.

Best,

while looking into this I did notice that when launching Geiser (a nice
slime-like scheme evaluator) I would sometimes crash my entire Emacs
process by pressing C-g when Geiser prompts for a scheme executable.  I
imagine this is unrelated to your problem, but was certainly surprising.


 --Leo


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] sqlite3 in org-babel

2012-02-15 Thread Eric Schulte
Hi Daniel,

Have you tried using a sqlite code block?  See ob-sqlite.el

Best,

Daniel Clemente n142...@gmail.com writes:

 Hi,
org-babel works well with sqlite3 if you add this (which I propose for 
 inclusion):

 -
 diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
 index 3f7882c..a59db7a 100644
 --- a/lisp/ob-sql.el
 +++ b/lisp/ob-sql.el
 @@ -82,6 +82,10 @@ This function is called by `org-babel-execute-src-block'.
   (org-babel-process-file-name in-file)
   (org-babel-process-file-name out-file)
   (or cmdline )))
 +('sqlite3 (format sqlite3 %s  %s  %s
 +(or cmdline )
 + (org-babel-process-file-name in-file)
 + (org-babel-process-file-name out-file)))
  (t (error no support for the %s sql engine engine)
  (with-temp-file in-file
(insert (org-babel-expand-body:sql body params)))

 -



Then you can use it in this way:
 #+BEGIN_SRC sql :cmdline -header -list ~/pruebas.sqlite3 :engine sqlite3
 select * from web_categorias;
 #+END_SRC

It's very useful! Org's results table is more interactive than the one you 
 can see in sql-mode (M-x sql-sqlite).



By the way, the code in ob-sql.el attempts to remove final newlines. I use 
 (setq require-final-newline 'ask) and I am being asked about the temporary 
 buffer, which is wrong. So I also propose this patch:

 
 diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
 index 3f7882c..8df0d98 100644
 --- a/lisp/ob-sql.el
 +++ b/lisp/ob-sql.el
 @@ -107,7 +107,8 @@ This function is called by `org-babel-execute-src-block'.
   (delete-char 1)
   (goto-char (point-max))
   (forward-char -1))
 -   (write-file out-file))
 +   (let ((require-final-newline nil))
 + (write-file out-file)))
   (org-table-import out-file '(16))
   (org-babel-reassemble-table
(mapcar (lambda (x)

 



   Greetings,

 Daniel


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] [patch] Fix old-way variable assignments

2012-02-15 Thread Sebastien Vauban
From 732a4ef01b93dab34060d64c4deca23ac13aed5e Mon Sep 17 00:00:00 2001
From: Sebastien Vauban s...@mygooglest.com
Date: Mon, 26 Dec 2011 12:36:11 +0100
Subject: [PATCH] Fix old-way variable assignments.

---
 contrib/babel/library-of-babel.org |   68 ++--
 1 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/contrib/babel/library-of-babel.org 
b/contrib/babel/library-of-babel.org
index 571eb70..ecad0fe 100644
--- a/contrib/babel/library-of-babel.org
+++ b/contrib/babel/library-of-babel.org
@@ -1,22 +1,23 @@
 #+title:The Library of Babel
 #+author: Org-mode People
-#+STARTUP:  oddeven hideblocks
+#+STARTUP:  hideblocks
 
 * Introduction
 
-  The Library of Babel is an extensible collection of ready-made and
-  easily-shortcut-callable source-code blocks for handling common tasks.
-  Org-babel comes pre-populated with the source-code blocks located in this
-  file. It is possible to add source-code blocks from any org-mode file to
-  the library by calling =(org-babel-lob-ingest path/to/file.org)=.
-  
-  This file is included in worg mainly less for viewing through the web
-  interface, and more for contribution through the worg git repository.  If
-  you have code snippets that you think others may find useful please add
-  them to this file and 
[[file:~/src/worg/worg-git.org::contribute-to-worg][contribute them]] to worg.
-  
-  The raw Org-mode text of this file can be downloaded at
-  [[repofile:contrib/babel/library-of-babel.org][library-of-babel.org]]
+The Library of Babel is an extensible collection of ready-made and
+easily-shortcut-callable source-code blocks for handling common tasks.
+Org-babel comes pre-populated with the source-code blocks located in
+this file.  It is possible to add source-code blocks from any org-mode
+file to the library by calling =(org-babel-lob-ingest
+path/to/file.org)=.
+
+This file is included in worg mainly less for viewing through the web
+interface, and more for contribution through the worg git repository.
+If you have code snippets that you think others may find useful please
+add them to this file and 
[[file:~/src/worg/worg-git.org::contribute-to-worg][contribute them]] to worg.
+
+The raw Org-mode text of this file can be downloaded at
+[[repofile:contrib/babel/library-of-babel.org][library-of-babel.org]]
 
 * Simple
 
@@ -63,7 +64,7 @@ as a table in traditional Org-mode table syntax.
 
 ** Remote files
 
- json
+*** json
 
 Read local or remote file in [[http://www.json.org/][json]] format into 
emacs-lisp objects.
 
@@ -83,14 +84,14 @@ Read local or remote file in [[http://www.json.org/][json]] 
format into emacs-li
   (json-read
 #+end_src
 
- Google docs
+*** Google docs
 
 The following code blocks make use of the 
[[http://code.google.com/p/googlecl/][googlecl]] Google command line
 tool.  This tool provides functionality for accessing Google services
 from the command line, and the following code blocks use /googlecl/
 for reading from and writing to Google docs with Org-mode code blocks.
 
-** Read a document from Google docs
+ Read a document from Google docs
 
 The =google= command seems to be throwing Moved Temporarily errors
 when trying to download textual documents, but this is working fine
@@ -120,7 +121,7 @@ document as a string.
 
 : #+call: gdoc-read(title=loremi, :format txt)
 
-** Write a document to a Google docs
+ Write a document to a Google docs
 
 Write =data= to a google document named =title=.  If =data= is tabular
 it will be saved to a spreadsheet, otherwise it will be saved as a
@@ -147,18 +148,18 @@ example usage
 :   (flet ((fib (m) (if ( m 2) 1 (+ (fib (- m 1)) (fib (- m 2))
 : (mapcar (lambda (el) (list el (fib el))) (number-sequence 0 (- n 1
 : #+end_src
-: 
+:
 : #+call: gdoc-write(title=fibs, data=fibs(n=10))
 
 * Plotting code
 
 ** R
 
-  Plot column 2 (y axis) against column 1 (x axis). Columns 3 and
-  beyond, if present, are ignored.
+Plot column 2 (y axis) against column 1 (x axis). Columns 3 and
+beyond, if present, are ignored.
 
-#+name: R-plot(data=R-plot-example-data)
-#+begin_src R
+#+name: R-plot
+#+begin_src R :var data=R-plot-example-data
 plot(data)
 #+end_src
 
@@ -275,7 +276,7 @@ are optional.
   %head
   %foot
   %lastfoot
-  
+
   %table
   \\end{longtable}\n
(list
@@ -296,7 +297,6 @@ are optional.
(list :lend   :sep:hline hline)
 #+end_src
 
-
 *** booktabs-notes
 
 This source block builds on [[booktabs]].  It accepts two additional
@@ -350,7 +350,7 @@ span. Note the use of LaTeX, rather than Org-mode, markup.
   )))
 #+end_src
 
-** Elegant lisp for transposing a matrix.
+** Elegant lisp for transposing a matrix
 
 #+tblname: transpose-example
 | 1 | 2 | 3 |
@@ -405,7 +405,7 @@ span. Note the use of LaTeX, rather than Org-mode, markup.
:PROPERTIES:
:AUTHOR: Luke Crook
:END:
-   
+
 This function will attempt to retrieve the entire commit log for the
 

[O] Bug: [Babel] sqlite if: End of file during parsing

2012-02-15 Thread Philip Rooke

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.

(Warning, this is the first time I have tried to use org babel and so
there could be user error in the following.  Sorry if that is the
case.)

Starting from emacs -Q evaluate the following code blocks in
succession.  The #+results: blocks below are what I am seeing on my
system.

#+begin_src emacs-lisp :results silent
  (require 'org)
  (require 'org-install)
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((sqlite . t)
 (sh . t)))
#+end_src

The next block will create a small 2k file, ob-bug.db, in the current
directory.  You will probably want to delete later.

#+begin_src sqlite :db ob-bug.db :results silent
  drop table if exists person;
  create table person (f_name text, l_name text);
  insert into person (f_name, l_name) values ('Joe', 'Bloggs');
#+end_src

Check this worked:

#+begin_src sqlite :db ob-bug.db :results output
  select * from person;
#+end_src

#+results:
| Joe | Bloggs |

Formatting the name using the sqlite string concat operator ||
also works as expected:

#+begin_src sqlite :db ob-bug.db :results output
  select f_name ||   || l_name from person;
#+end_src

#+results:
: Joe Bloggs

Add a second line of data:

#+begin_src sqlite :db ob-bug.db :results output silent
  insert into person (f_name, l_name) values ('Fred', 'Smith');
#+end_src

Repeat the last two queries.
#+begin_src sqlite :db ob-bug.db :results output
  select * from person;
#+end_src

#+results:
| Joe  | Bloggs |
| Fred | Smith  |

but...

#+begin_src sqlite :db ob-bug.db :results output
  select f_name ||   || l_name from person;
#+end_src

errors with the unhelpful message if: End of file during parsing

Although the query works from a shell:

#+begin_src sh :results output
  sqlite3 ob-bug.db 'select f_name ||   || l_name from person;'
#+end_src

#+results:
: Joe Bloggs
: Fred Smith

Remove the debug database file if you want:

#+begin_src sh :results silent
  rm ob-bug.db
#+end_src

(toggle-debug-on-error) offers no information and so I have tried edebug
stepping through the code.  It seems that the error is happening in the
function org-babel-read at line 2335 when it tries to evaluate
(read \Joe).

The query at first ran successfully when there was just one line of
data in the database and stepping through that query shows that the
string being passed through org-babel-read is Joe Bloggs rather than
\Joe and therefore follows a different code path at line 2334.

At this point I am stuck.

Phil

Emacs  : GNU Emacs 24.0.92.1 (i386-apple-darwin10.8.0, NS apple-appkit-1038.36)
 of 2012-01-28 on bo
Package: Org-mode version 7.8.03 (release_7.8.03.346.gf9c4)

current state:
==
(setq
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc 
org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) 
(quote org-show-block-all) (quote append) (quote local)))
 (lambda nil (org-add-hook (quote change-major-mode-hook) 
(quote org-babel-show-result-all) (quote append) (quote local)))
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-blocks '((src org-babel-exp-src-block nil) (export-comment 
org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 

Re: [O] Temp files from testing are permanent...

2012-02-15 Thread Achim Gratz
Olaf Meeuwissen olaf.meeuwis...@avasys.jp writes:
 If running `make check` (or similar) creates these files, `make clean`
 (or similar) should clean them up.

I was asking that question to decide whether I do need to extend my
Makefile fork to handle the cleanup or if the testsuite needs to be
called differently to avoid leaving these stale files.  If you'd take a
look, you can see that the files are obviously made with a function that
ensures they're unique, most likely make-temp-file.  If so, it would
seem logical that the testsuite should remove them after each test
(since it is the only instance to know the complete filename).  It would
also seem logical that for debugging purposes one could leave the files
around.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] multilingual presentation with org

2012-02-15 Thread Nick Dokos
brian powell briangpowel...@gmail.com wrote:

 ... 
 * Now, I know Nick and Jambunathan set up the method to put the translation 
 side-by-side; but, how
 did they do that? Can't find it in this thread (if I may call it that) [O] 
 multilingual
 presentation with org--is there a link to how you set up the 
 English=Sanskrit side-by-side?

We didn't: what Jambunathan and I did was to help Rustom deal with input
methods in batch mode: start with a file of transliterated text and
produce the actual text. That was done mostly in private email, but 
Rustom has updated a thread on gnu.emacs.help with those
suggestions: http://thread.gmane.org/gmane.emacs.help/83724

Nick



Re: [O] Bug: [Babel] sqlite if: End of file during parsing

2012-02-15 Thread Eric Schulte
Does the following work with the addition of :results scalar?

#+begin_src sqlite :db ob-bug.db :results output scalar
  select f_name ||   || l_name from person;
#+end_src

If so could you send me the contents of the results block?  It appears
that ob-sqlite is choking trying to parse the results into a table.

Thanks,

Philip Rooke p...@yax.org.uk writes:

 Remember to cover the basics, that is, what you expected to happen and
 what in fact did happen.  You don't know how to make a good report?  See

  http://orgmode.org/manual/Feedback.html#Feedback

 Your bug report will be posted to the Org-mode mailing list.
 
 (Warning, this is the first time I have tried to use org babel and so
 there could be user error in the following.  Sorry if that is the
 case.)

 Starting from emacs -Q evaluate the following code blocks in
 succession.  The #+results: blocks below are what I am seeing on my
 system.

 #+begin_src emacs-lisp :results silent
   (require 'org)
   (require 'org-install)
   (org-babel-do-load-languages
'org-babel-load-languages
'((sqlite . t)
  (sh . t)))
 #+end_src

 The next block will create a small 2k file, ob-bug.db, in the current
 directory.  You will probably want to delete later.

 #+begin_src sqlite :db ob-bug.db :results silent
   drop table if exists person;
   create table person (f_name text, l_name text);
   insert into person (f_name, l_name) values ('Joe', 'Bloggs');
 #+end_src

 Check this worked:

 #+begin_src sqlite :db ob-bug.db :results output
   select * from person;
 #+end_src

 #+results:
 | Joe | Bloggs |

 Formatting the name using the sqlite string concat operator ||
 also works as expected:

 #+begin_src sqlite :db ob-bug.db :results output
   select f_name ||   || l_name from person;
 #+end_src

 #+results:
 : Joe Bloggs

 Add a second line of data:

 #+begin_src sqlite :db ob-bug.db :results output silent
   insert into person (f_name, l_name) values ('Fred', 'Smith');
 #+end_src

 Repeat the last two queries.
 #+begin_src sqlite :db ob-bug.db :results output
   select * from person;
 #+end_src

 #+results:
 | Joe  | Bloggs |
 | Fred | Smith  |

 but...

 #+begin_src sqlite :db ob-bug.db :results output
   select f_name ||   || l_name from person;
 #+end_src

 errors with the unhelpful message if: End of file during parsing

 Although the query works from a shell:

 #+begin_src sh :results output
   sqlite3 ob-bug.db 'select f_name ||   || l_name from person;'
 #+end_src

 #+results:
 : Joe Bloggs
 : Fred Smith

 Remove the debug database file if you want:

 #+begin_src sh :results silent
   rm ob-bug.db
 #+end_src

 (toggle-debug-on-error) offers no information and so I have tried edebug
 stepping through the code.  It seems that the error is happening in the
 function org-babel-read at line 2335 when it tries to evaluate
 (read \Joe).

 The query at first ran successfully when there was just one line of
 data in the database and stepping through that query shows that the
 string being passed through org-babel-read is Joe Bloggs rather than
 \Joe and therefore follows a different code path at line 2334.

 At this point I am stuck.

 Phil

 Emacs  : GNU Emacs 24.0.92.1 (i386-apple-darwin10.8.0, NS 
 apple-appkit-1038.36)
  of 2012-01-28 on bo
 Package: Org-mode version 7.8.03 (release_7.8.03.346.gf9c4)

 current state:
 ==
 (setq
  org-export-preprocess-before-selecting-backend-code-hook 
 '(org-beamer-select-beamer-code)
  org-tab-first-hook '(org-hide-block-toggle-maybe 
 org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
  org-speed-command-hook '(org-speed-command-default-hook 
 org-babel-speed-command-hook)
  org-occur-hook '(org-first-headline-recenter)
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-export-preprocess-before-normalizing-links-hook 
 '(org-remove-file-link-modifiers)
  org-confirm-shell-link-function 'yes-or-no-p
  org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc 
 org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists)
  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
  org-after-todo-state-change-hook '(org-clock-out-if-current)
  org-src-mode-hook '(org-src-babel-configure-edit-buffer 
 org-src-mode-configure-edit-buffer)
  org-agenda-before-write-hook '(org-agenda-add-entry-text)
  org-babel-pre-tangle-hook '(save-buffer)
  org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) 
 (quote org-show-block-all) (quote append) (quote local)))
  (lambda nil (org-add-hook (quote change-major-mode-hook) 
 (quote org-babel-show-result-all) (quote append) (quote local)))
  org-babel-result-hide-spec org-babel-hide-all-hashes)
  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
 org-babel-execute-safely-maybe)
  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
 

Re: [O] Temp files from testing are permanent...

2012-02-15 Thread Brian Wightman
On Wed, Feb 15, 2012 at 11:11 AM, Achim Gratz strom...@nexgo.de wrote:
 Olaf Meeuwissen olaf.meeuwis...@avasys.jp writes:
 If running `make check` (or similar) creates these files, `make clean`
 (or similar) should clean them up.

 I was asking that question to decide whether I do need to extend my
 Makefile fork to handle the cleanup or if the testsuite needs to be
 called differently to avoid leaving these stale files.  ...  It would
 also seem logical that for debugging purposes one could leave the files
 around.

If created with make-temp-file, and created in the system-configured
$TMPDIR directory, I would urge (wearing my sysadmin hat) that they
get purged at the end of the test run, unless told to do otherwise.
If created in the build/test directory, then either make clean or
immediate purge seems reasonable.

Files created in the system $TMPDIR are not meant (caution: purist
view) to remain beyond the execution of the program (or set of
programs).  Some OS variants are set up to purge the $TMPDIR on
reboot, login, or at other times, and some even store it in a virtual
memory backed filesystem.  When performing as a sysadmin, finding that
an application has littered a (usually) limited system resource such
as the system $TMPDIR with files that are no longer useful is a minor
irritant at best, to a crash-inducing resource consumer at worst.

Just my $0.02 if you are taking donations.

Brian



Re: [O] Temp files from testing are permanent...

2012-02-15 Thread Achim Gratz
Brian Wightman midlife...@wightmanfam.org writes:
 Files created in the system $TMPDIR are not meant (caution: purist
 view) to remain beyond the execution of the program (or set of
 programs).

You are preaching to the choir... :-)

I'm still looking for some wisdom regarding the actual testsuite setup
in orgmode, though.  We have org-test-with-temp-text-in-file in
org-test.el, which supposedly cleans up after itself.  Other tests
aren't as careful, specifically files with the following prefixes: awk-,
C-bin-, C-src-, emacs, fortran-bin-, fortan-src-, maxima-, octave-,
org-test (seems to be an HTML export from a temporary org file that does
get removed), python-, scor and sh-.

Barring any setup or options I might have missed, it looks like I will
have to do two things: first, set TMPDIR to a newly created directory
during the test runs and second, remove that directory after the test
(with an option to keep it for inspection and removing only with
clean).


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] multilingual presentation with org

2012-02-15 Thread Rustom Mody
Nick wrote:

 Rustom has updated a thread on gnu.emacs.help with those suggestions:
 http://thread.gmane.org/gmane.emacs.help/83724


For some reason my latest update is not showing on gmane but showing on
googlegroups

http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/bfa6b05ce565d96d?tvc=2


Re: [O] Defcustoms new in Emacs 24.1 missing :version tags

2012-02-15 Thread Glenn Morris

Bastien wrote (on Mon, 13 Feb 2012 at 16:25 +0100):

 I added the version tags in git:
 http://orgmode.org/w/?p=org-mode.git;a=commit;h=04971de4b9321becfc2f6f1d0fc78f53726abcc6

Thanks, but if it does not get merged to the Emacs repository before
24.1 is released it won't be too useful.



Re: [O] multilingual presentation with org

2012-02-15 Thread brian powell
* Quoting the original query:

I will be teaching singing to a mixed group using a projector.  Those who
can read sanskrit would be put off by the roman (English) and those who
cant of course need the roman.
The attached screenshot shows two emacs buffers side-by-side with the two
versions.

I am now exploring the possibilities of how to make a 'presentation'
putting the two together.
I am not too comfortable using emacs for the final show because emacs
occasionally crashes -- due to non-standard fonts, input methods or what I
dont know -- and I dont want this to happen in front of 50 people!

Any thoughts/suggestions?

** Ideas: I strongly suggest EMACS and learn how to use EDIFF in EMACS--its
the best envirionment for translations and what you want to do--don't toss
out EMACS because it crashed once: suggest you test it before the
demo/presentation sing-along.
*** How to stop it from crashing: Use only what is necessary to show your
SANSKRIT and ENGLISH buffer: Do something like:
Make 2 files with line numbers at the begin of each line:
nl sanskrit-song.txt  sanskrit-song_line-numbers-at-front.txt
nl english-song.txt  english-song_line-numbers-at-front.txt
emacs -q -l
sanskit-blah-mule-multilingual-emacs-programs-needed-to-show-sanskrit.el
 sanskrit-song_line-numbers-at-front.txt english-song_line-numbers-at-front.txt
Mx ediff-buffers
Emacs will pop-up an ediff window--put your mouse cursor on it and tap
?--it will show you the ediff keys--n for next different line will be
most helpful
(ediff will ask for the 1st and 2nd buffer you want to compare--type
in sanskrit-song_line-numbers-at-front.txt
and english-song_line-numbers-at-front.txt

--then tapping n (with your cursor on the popped up ediff window) goes
line-by-songline in both buffers--highlighting the text for a sanskrit
sing-along!

** EDIFF has a slight learning curve; but, a huge pay off.


Re: [O] Setting multiple variables for code blocks in one property drawer

2012-02-15 Thread Viktor Rosenfeld
Hi Eric,

thanks for your input. I just pulled the latest code from git and while
my original example works, the following does not:

:PROPERTIES:
:var: foo=1
:var+: bar=2 
:var+: baz=3
:END:

#+BEGIN_SRC sh
echo foo: $foo
echo bar: $bar
echo baz: $baz
#+END_SRC

If I evaluate the source block I get the following error in the messages
buffer: 

  =: Args out of range: , 0

The following works:

:PROPERTIES:
:var: foo=1
:var+: bar=2 baz=3
:END:

#+BEGIN_SRC sh
echo foo: $foo
echo bar: $bar
echo baz: $baz
#+END_SRC

There also appears to be a difference between quoted and unquoted
values and commatas. E.g. the following works

:PROPERTIES:
:var: foo=1
:var+: bar=2, baz=3
:END:

#+BEGIN_SRC sh
echo foo: $foo
echo bar: $bar
echo baz: $baz
#+END_SRC

If I remove the quotes around 2 I get the following error: 

  ad-Orig-error: reference '2,' not found in this buffer

On the other hand, the following version does not produce an error, but
the value of $baz is not set.

:PROPERTIES:
:var: foo=1
:var+: bar=2,
:var+: baz=3
:END:

#+BEGIN_SRC sh
echo foo: $foo
echo bar: $bar
echo baz: $baz
#+END_SRC

Cheers,
Viktor

Eric Schulte wrote:

 Viktor Rosenfeld listuse...@googlemail.com writes:
 
  Hi,
 
  after following the discussion about the new BABEL syntax I was under
  the impression that the following should work to set two variables in
  one PROPERTIES drawer:
 
  :PROPERTIES:
  :var: foo=1
  :var+: bar=2
  :END:
 
  However, the definition of bar is ignored. It turns out that there can
  only be one :var: or :var+: entry in a drawer and the latter can only be
  used to append to inherited entries, but not to those defined in the
  same drawer. Is this the intended behavior? How would I define multiple
  variables in a drawer (except for putting them all on one line)?
 
  Thanks,
  Viktor
 
 
 You are correct, I believe this is a bug.  I've just pushed up a fix, so
 your example above should now work as expected.
 
 Thanks,
 
 -- 
 Eric Schulte
 http://cs.unm.edu/~eschulte/
 



Re: [O] A manuscript on reproducible research introducing org-mode

2012-02-15 Thread Thomas S. Dye
Aloha Christophe,

Has this article appeared in print?  If so, can you forward publication
details? 

All the best,
Tom

Christophe Pouzat christophe.pou...@parisdescartes.fr writes:

 Thomas S. Dye t...@tsdye.com a écritnbsp;:

 Christophe Pouzat christophe.pou...@parisdescartes.fr writes:

 Dear all,

 M. Delescluse, R. Franconville, S. Joucla, T. Lieury and myself (C.
 Pouzat) have just put a manuscript entitled: Making
 neurophysiological data analysis reproducible. Why and how? on a
 pre-print server: http://hal.archives-ouvertes.fr/hal-00591455/fr/
 Although the paper has been written for a neurobiological journal, the
 reader does not have to be a neuroscientist to read and understand it.
 A toy example illustrating the use of org-mode + Babel (with Python
 and Octave) takes a fair part of the manuscript. Other tools like R +
 Sweave are presented and many more are mentioned.

 I thank Eric Schulte for comments on the manuscript and Eric (again)
 together with the whole org-mode / Babel community for developing such
 a great tool.

 Any comment, remark, suggestion on the manuscript is of course welcome.

 Christophe


 Aloha Christophe,

 Thank you for an interesting and useful paper.  I was happy with the
 distinction you draw between reproducible analysis and reproducible
 research, which certainly applies to my field of archaeology where
 unique sites are typically destroyed by the data collection effort.  I
 also think the emphasis you place on data preprocessing is just the
 right approach; inclusion of the raw data in a reproducible analysis
 opens up many possibilities, which must be a benefit to a scientific
 community's pursuit of knowledge.

 May I offer a suggestion?  Carsten Dominik published the Org Mode 7
 Manual last year and it would be nice to see it cited in your paper.

 @book{dominik10:_org_mode_refer_manual,
   author =   {Carsten Dominik},
   title ={The Org Mode 7 Reference Manual: Organize Your Life
   with GNU Emacs},
   publisher ={Network Theory Ltd.},
   year = 2010
 }

 All the best,
 Tom
 --
 Thomas S. Dye
 http://www.tsdye.com


 Dear Tom,

 Thanks for these interesting and positive comments. I apologize for
 forgetting the obvious reference to Carsten's reference manual. I will
 definitely include it in the next version.
 I hope that people in my field will come to think the way you do about
 sharing their raw data. I'm just afraid that the way is still long…
 but the goal is reachable. Raw data aside, org-mode is surely a tool
 which should help people experimenting with the reproducible research
 paradigm. As I wrote to Eric (Schulte), M. Delescluse and I wrote a
 first RR manuscript 6 years ago based on R/Sweave. The manuscript
 never got submitted for different reasons, among them, the amount of
 work required to learn R and LaTeX. Learning about org-mode convinced
 me that it would be worth re-activating the project.

 Christophe

 Most people are not natural-born statisticians. Left to our own
 devices we are not very good at picking out patterns from a sea of
 noisy data. To put it another way, we are all too good at picking out
 non-existent patterns that happen to suit our purposes.
 Bradley Efron  Robert Tibshirani (1993) An Introduction to the Bootstrap

 --

 Christophe Pouzat
 Laboratoire de Physiologie Cerebrale
 CNRS UMR 8118
 UFR biomedicale de l'Universite Paris-Descartes
 45, rue des Saints Peres
 75006 PARIS
 France

 tel: +33 (0)1 42 86 38 28
 fax: +33 (0)1 42 86 38 30
 mobile: +33 (0)6 62 94 10 34
 web: http://www.biomedicale.univ-paris5.fr/physcerv/C_Pouzat.html


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



Re: [O] multilingual presentation with org

2012-02-15 Thread Nick Dokos
brian powell briangpowel...@gmail.com wrote:


 Make 2 files with line numbers at the begin of each line: 
 nl sanskrit-song.txt  sanskrit-song_line-numbers-at-front.txt
 nl english-song.txt  english-song_line-numbers-at-front.txt
 emacs -q -l 
 sanskit-blah-mule-multilingual-emacs-programs-needed-to-show-sanskrit.el
  sanskrit-song_line-numbers-at-front.txt english-song_line-numbers-at-front.txt
 Mx ediff-buffers
 Emacs will pop-up an ediff window--put your mouse cursor on it and tap 
 ?--it will show you the
 ediff keys--n for next different line will be most helpful
 (ediff will ask for the 1st and 2nd buffer you want to compare--type
 in sanskrit-song_line-numbers-at-front.txt 
 and english-song_line-numbers-at-front.txt
 
 --then tapping n (with your cursor on the popped up ediff window) goes 
 line-by-songline in both
 buffers--highlighting the text for a sanskrit sing-along!
 

That'd be cool if it worked, but at least in my case, it doesn't:
diff decides there is one big diff that covers the whole file,
and ediff does not find a better refinement: no n
to follow the bouncing ball...

Nick





Re: [O] A manuscript on reproducible research introducing org-mode

2012-02-15 Thread Samuel Wales
I applaud all of this.  Raw data need to be made available by default
(with only a few exceptions).  Org can help people reproduce all of
the succeeding steps also.

Another aspect is fraud, which is rampant.  A psychologist in Europe
recently accused of fraud was said to have been able to guard his raw
data from all colleagues for *ten years*.

His method?  Get angry at the requester.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com



Re: [O] multilingual presentation with org

2012-02-15 Thread brian powell
* That'd be cool if it worked, but at least in my case, it doesn't --It
works if you put line numbers at the beginning of each line--then it
highlights the diff per line in both buffers/in both files--you do Mx
ediff-buffers on--I know it works if you do--I tested it before I posted.
I usually use nl (UNIX) to do this (quoting myself):
...
nl sanskrit-song.txt  sanskrit-song_line-numbers-at-front.txt
...

* Also, Thanks Nick for the pointing to notes on how to translate the
english/roman script etc. and the updating of views related to this thread:

updated a thread on gnu.emacs.help with those
suggestions: http://thread.gmane.org/gmane.emacs.help/83724

On Wed, Feb 15, 2012 at 2:49 PM, Nick Dokos nicholas.do...@hp.com wrote:

 brian powell briangpowel...@gmail.com wrote:


  Make 2 files with line numbers at the begin of each line:
  nl sanskrit-song.txt  sanskrit-song_line-numbers-at-front.txt
  nl english-song.txt  english-song_line-numbers-at-front.txt
  emacs -q -l
 sanskit-blah-mule-multilingual-emacs-programs-needed-to-show-sanskrit.el
 
  sanskrit-song_line-numbers-at-front.txt 
 english-song_line-numbers-at-front.txt
  Mx ediff-buffers
  Emacs will pop-up an ediff window--put your mouse cursor on it and tap
 ?--it will show you the
  ediff keys--n for next different line will be most helpful
  (ediff will ask for the 1st and 2nd buffer you want to compare--type
  in sanskrit-song_line-numbers-at-front.txt
 and english-song_line-numbers-at-front.txt
 
  --then tapping n (with your cursor on the popped up ediff window) goes
 line-by-songline in both
  buffers--highlighting the text for a sanskrit sing-along!
 

 That'd be cool if it worked, but at least in my case, it doesn't:
 diff decides there is one big diff that covers the whole file,
 and ediff does not find a better refinement: no n
 to follow the bouncing ball...

 Nick





Re: [O] Bug: [Babel] sqlite if: End of file during parsing

2012-02-15 Thread Philip Rooke
Eric Schulte eric.schu...@gmx.com writes:

 Does the following work with the addition of :results scalar?

Yes, there is no error although the format of the result is different to
the one database line query or the equivalent shell command.  This is
what happens for me:

#+begin_src sqlite :db ob-bug.db :results output scalar
  select f_name ||   || l_name from person;
#+end_src

#+results:
: Joe Bloggs
: Fred Smith

Phil




Re: [O] multilingual presentation with org

2012-02-15 Thread brian powell
* Nick mentioned no n to follow the bouncing ball...--in jest I
believe; but, seriously, you can do that too with EMACS and XAUTOMATION do:

apt-get install xautomation

(this will install xte I believe)

** well, if you wanted a bouncing ball to follow the music, in a say, 1
line per 3 seconds for a presentation/sing-along:

xterm -e watch -p -n3 xte \key n\  

*** Again, you put the cursor on the EDIFF help window --n will go line
per line

*** Which will work too; I do something like this everyday (use xte calling
out of EMACS/OrgMode several times a day at least).


On Wed, Feb 15, 2012 at 3:01 PM, brian powell briangpowel...@gmail.comwrote:

 * That'd be cool if it worked, but at least in my case, it doesn't --It
 works if you put line numbers at the beginning of each line--then it
 highlights the diff per line in both buffers/in both files--you do Mx
 ediff-buffers on--I know it works if you do--I tested it before I posted.
 I usually use nl (UNIX) to do this (quoting myself):
 ...
 nl sanskrit-song.txt  sanskrit-song_line-numbers-at-front.txt
 ...

 * Also, Thanks Nick for the pointing to notes on how to translate the
 english/roman script etc. and the updating of views related to this thread:


 updated a thread on gnu.emacs.help with those
 suggestions: http://thread.gmane.org/gmane.emacs.help/83724

 On Wed, Feb 15, 2012 at 2:49 PM, Nick Dokos nicholas.do...@hp.com wrote:

 brian powell briangpowel...@gmail.com wrote:


  Make 2 files with line numbers at the begin of each line:
  nl sanskrit-song.txt  sanskrit-song_line-numbers-at-front.txt
  nl english-song.txt  english-song_line-numbers-at-front.txt
  emacs -q -l
 sanskit-blah-mule-multilingual-emacs-programs-needed-to-show-sanskrit.el
 
  sanskrit-song_line-numbers-at-front.txt 
 english-song_line-numbers-at-front.txt
  Mx ediff-buffers
  Emacs will pop-up an ediff window--put your mouse cursor on it and tap
 ?--it will show you the
  ediff keys--n for next different line will be most helpful
  (ediff will ask for the 1st and 2nd buffer you want to compare--type
  in sanskrit-song_line-numbers-at-front.txt
 and english-song_line-numbers-at-front.txt
 
  --then tapping n (with your cursor on the popped up ediff window)
 goes line-by-songline in both
  buffers--highlighting the text for a sanskrit sing-along!
 

 That'd be cool if it worked, but at least in my case, it doesn't:
 diff decides there is one big diff that covers the whole file,
 and ediff does not find a better refinement: no n
 to follow the bouncing ball...

 Nick






Re: [O] A manuscript on reproducible research introducing org-mode

2012-02-15 Thread Christophe Pouzat
Aloha Tom,

Not yet in print, still on the accepted papers list
(http://www.sciencedirect.com/science/journal/aip/09284257), sorry. It
seems that I chose the slowest neuroscience journal!

Your JSS paper of last month (with Eric, Dan and Carsten) is great by
the way. It seems that I missed the announcements on the list when the
pre-print was posted, otherwise I would have managed to cite it in mine.

The bibtex entry for my paper (just downloaded from Elsevier site) is:

@article{Delescluse2011,
title = Making neurophysiological data analysis reproducible: Why and how?,
journal = Journal of Physiology-Paris,
volume = ,
number = 0,
pages =  - ,
year = 2011,
note = ,
issn = 0928-4257,
doi = 10.1016/j.jphysparis.2011.09.011,
url = http://www.sciencedirect.com/science/article/pii/S0928425711000374;,
author = Matthieu Delescluse and Romain Franconville and Sébastien Joucla and Tiffany Lieury and Christophe Pouzat,
keywords = Software,
keywords = R,
keywords = Emacs,
keywords = Matlab,
keywords = Octave,
keywords = LATEX,
keywords = Org-mode,
keywords = Python,
abstract = Reproducible data analysis is an approach aiming at complementing classical printed scientific articles with everything required to independently reproduce the results they present. “Everything” covers here: the data, the computer codes and a precise description of how the code was applied to the data. A brief history of this approach is presented first, starting with what economists have been calling replication since the early eighties to end with what is now called reproducible research in computational data analysis oriented fields like statistics and signal processing. Since efficient tools are instrumental for a routine implementation of these approaches, a description of some of the available ones is presented next. A toy example demonstrates then the use of two open source software programs for reproducible data analysis: the “Sweave family” and the org-mode of emacs. The former is bound to R while the latter can be used with R, Matlab, Python and many more “generalist” data processing software. Both solutions can be used with Unix-like, Windows and Mac families of operating systems. It is argued that neuroscientists could communicate much more efficiently their results by adopting the reproducible research paradigm from their lab books all the way to their articles, thesis and books.
}


I will post on the list the official bibliographic reference as soon
as the paper is in print.

Take care,

Christophe  


t...@tsdye.com (Thomas S. Dye) writes:

 Aloha Christophe,

 Has this article appeared in print?  If so, can you forward publication
 details? 

 All the best,
 Tom

 Christophe Pouzat christophe.pou...@parisdescartes.fr writes:

 Thomas S. Dye t...@tsdye.com a écritnbsp;:

 Christophe Pouzat christophe.pou...@parisdescartes.fr writes:

 Dear all,

 M. Delescluse, R. Franconville, S. Joucla, T. Lieury and myself (C.
 Pouzat) have just put a manuscript entitled: Making
 neurophysiological data analysis reproducible. Why and how? on a
 pre-print server: http://hal.archives-ouvertes.fr/hal-00591455/fr/
 Although the paper has been written for a neurobiological journal, the
 reader does not have to be a neuroscientist to read and understand it.
 A toy example illustrating the use of org-mode + Babel (with Python
 and Octave) takes a fair part of the manuscript. Other tools like R +
 Sweave are presented and many more are mentioned.

 I thank Eric Schulte for comments on the manuscript and Eric (again)
 together with the whole org-mode / Babel community for developing such
 a great tool.

 Any comment, remark, suggestion on the manuscript is of course welcome.

 Christophe


 Aloha Christophe,

 Thank you for an interesting and useful paper.  I was happy with the
 distinction you draw between reproducible analysis and reproducible
 research, which certainly applies to my field of archaeology where
 unique sites are typically destroyed by the data collection effort.  I
 also think the emphasis you place on data preprocessing is just the
 right approach; inclusion of the raw data in a reproducible analysis
 opens up many possibilities, which must be a benefit to a scientific
 community's pursuit of knowledge.

 May I offer a suggestion?  Carsten Dominik published the Org Mode 7
 Manual last year and it would be nice to see it cited in your paper.

 @book{dominik10:_org_mode_refer_manual,
   author =   {Carsten Dominik},
   title ={The Org Mode 7 Reference Manual: Organize Your Life
   with GNU Emacs},
   publisher ={Network Theory Ltd.},
   year = 2010
 }

 All the best,
 Tom
 --
 Thomas S. Dye
 http://www.tsdye.com


 Dear Tom,

 Thanks for these interesting and positive comments. I apologize for
 forgetting the obvious reference to Carsten's reference manual. I will
 definitely include it in the next version.
 I hope that people in my field will come to think the way you do about
 sharing their raw data. I'm 

Re: [O] multilingual presentation with org

2012-02-15 Thread Nick Dokos
brian powell briangpowel...@gmail.com wrote:


 --It works if you put line numbers at the beginning of each
 line--then it highlights the diff per line in both buffers/in both
 files--you do Mx ediff-buffers on--I know it works if you do--I
 tested it before I posted.

I did and it did not. I did it with cat -n at first and then tried nl
just to see if it had some magic (as one might have guessed, no magic):
there is one diff region for the whole buffer, not one per line.

Nick

PS. I attach the two files in case you, or somebody else, want to try it
although I'm not sure the attachments are going to make it through the
list unscathed. I'm making them octet-streams to try to preserve the contents
unscathed. Here are SHA1s for them if you want to check (foo.txt.n is
the transliterated file, foo-hi.txt.n is the devanagari)

85fd89d20ba4d1443089726fdb7a8bee7c7698ec  foo-hi.txt.n
e35932a206d2c129b8da1f855694d23838ea1013  foo.txt.n




foo.txt.n
Description: transliterated sanskrit - latin chars


foo-hi.txt.n
Description: sanskrit - devanagari - utf-8


Re: [O] multilingual presentation with org

2012-02-15 Thread Jambunathan K

Nick

What Brian is saying is this and I am interpreting.

There is a line by line correspondence between the two files. So,

1. Put the English file under version control and check it in.

2. Overwrite the English file with the Sanskrit file (remember to
   preserve line by line correspondence) and check the sanskrit file in.

3. Now do a C-x v u to launch ediff on the two versions of the file. Two
   windows will pop up and IIRC, you can arrange for the windows to be
   either arranged side by side or one on top of another.

4. Press q on Ediff control panel so that diff overlays are removed
   while leaving the windows intact.

5. Now do M-x scroll-all-mode so that the two windows scroll
   together. Cursor position in the two windows can be used to guiding
   the eyeballs of the audience.

An advanced option will be to siphon off each stanza in the recital in
to separate files of their own and put the sanskrit and english files in
separate directories (but with the same name) as below.

english/stanza1
english/stanza2

sanskrit/stanza1
sanskrit/stanza2

Then one can do M-x ediff-directories to have all the stanzas show up
and then launch ediff on each of the stanzas.

 brian powell briangpowel...@gmail.com wrote:


 --It works if you put line numbers at the beginning of each
 line--then it highlights the diff per line in both buffers/in both
 files--you do Mx ediff-buffers on--I know it works if you do--I
 tested it before I posted.

 I did and it did not. I did it with cat -n at first and then tried nl
 just to see if it had some magic (as one might have guessed, no magic):
 there is one diff region for the whole buffer, not one per line.

 Nick

 PS. I attach the two files in case you, or somebody else, want to try it
 although I'm not sure the attachments are going to make it through the
 list unscathed. I'm making them octet-streams to try to preserve the contents
 unscathed. Here are SHA1s for them if you want to check (foo.txt.n is
 the transliterated file, foo-hi.txt.n is the devanagari)

 85fd89d20ba4d1443089726fdb7a8bee7c7698ec  foo-hi.txt.n
 e35932a206d2c129b8da1f855694d23838ea1013  foo.txt.n


  1OM bhUrbhuvaH suvaH
  2tatsaviturvarenyam
  3bhargo devasya dhImahi
  4dhiyo yonaH prachodayAt



-- 



Re: [O] multilingual presentation with org

2012-02-15 Thread Nick Dokos
Jambunathan K kjambunat...@gmail.com wrote:

 
 Nick
 
 What Brian is saying is this and I am interpreting.
 
 There is a line by line correspondence between the two files. So,
 
 1. Put the English file under version control and check it in.
 
 2. Overwrite the English file with the Sanskrit file (remember to
preserve line by line correspondence) and check the sanskrit file in.
 
 3. Now do a C-x v u to launch ediff on the two versions of the file. Two
windows will pop up and IIRC, you can arrange for the windows to be
either arranged side by side or one on top of another.
 
 4. Press q on Ediff control panel so that diff overlays are removed
while leaving the windows intact.
 

I don't understand what the first four steps do for you.

 5. Now do M-x scroll-all-mode so that the two windows scroll
together. Cursor position in the two windows can be used to guiding
the eyeballs of the audience.
 

All you need for this is two side-by-side windows with the two files and
scroll-all-mode[fn:1]. Ediff (and source control) is irrelevant -
correct?

If only hl-line-highlight played well with scroll-all-mode...

 An advanced option will be to siphon off each stanza in the recital in
 to separate files of their own and put the sanskrit and english files in
 separate directories (but with the same name) as below.
 
 english/stanza1
 english/stanza2
 
 sanskrit/stanza1
 sanskrit/stanza2
 
 Then one can do M-x ediff-directories to have all the stanzas show up
 and then launch ediff on each of the stanzas.
 

I might try this to see how it works but it'd take more time than I can
afford right now.

Thanks,
Nick

Footnotes:

[fn:1] I was looking for that and didn't find it - thanks for pointing
   it out. I thought at first that follow-mode was what was needed,
   but that wasn't it.



Re: [O] Defcustoms new in Emacs 24.1 missing :version tags

2012-02-15 Thread Jambunathan K

Bastien

 Thanks, but if it does not get merged to the Emacs repository before
 24.1 is released 

I am a planning a commit to org.texi sometime tomorrow and I would to
see the changes hit the bzr repo. Just giving you a heads up so that you
can plan accordingly.
-- 



Re: [O] multilingual presentation with org

2012-02-15 Thread Jambunathan K
Nick Dokos nicholas.do...@hp.com writes:

 Jambunathan K kjambunat...@gmail.com wrote:

 
 Nick
 
 What Brian is saying is this and I am interpreting.
 
 There is a line by line correspondence between the two files. So,

See the attached screenshot.

 1. Put the English file under version control and check it in.

This is recital.txt.~HEAD~ in the upper window.

 2. Overwrite the English file with the Sanskrit file (remember to
preserve line by line correspondence) and check the sanskrit file in.

Just overwrite but don't check it in. This recital.txt is in the lower
window.

 3. Now do a C-x v u to launch ediff on the two versions of the file. Two
windows will pop up and IIRC, you can arrange for the windows to be
either arranged side by side or one on top of another.
 4. Press q on Ediff control panel so that diff overlays are removed
while leaving the windows intact.
 

The command should be C-x v = which I have arranged so that it launches
ediff for me with the two buffers arranged one below the other. (I have
some customizations and I can dig out my customization if you need. My
customizations pre-date Emacs-24.1) But Emacs-24.1 does have a
vc-ediff. So I believe C-x v = can rebound to vc-ediff if it isn't
already.

Also note the cursors in the two windows.

 I don't understand what the first four steps do for you.

My setup is so old (and is so part of the way I do commits for as long
as I remember) that I confused myself into thinking that they are part
of Emacs. I am not to blame here, only my memory.

 5. Now do M-x scroll-all-mode so that the two windows scroll
together. Cursor position in the two windows can be used to guiding
the eyeballs of the audience.
 

 All you need for this is two side-by-side windows with the two files and
 scroll-all-mode[fn:1]. Ediff (and source control) is irrelevant -
 correct?

Correct. Ediff is not needed. But it is convenient. No C-x C-fs twice
over or splitting windows (atleast in my case)

 If only hl-line-highlight played well with scroll-all-mode...

We can make a feature request.


 An advanced option will be to siphon off each stanza in the recital in
 to separate files of their own and put the sanskrit and english files in
 separate directories (but with the same name) as below.
 
 english/stanza1
 english/stanza2
 
 sanskrit/stanza1
 sanskrit/stanza2
 
 Then one can do M-x ediff-directories to have all the stanzas show up
 and then launch ediff on each of the stanzas.
 

 I might try this to see how it works but it'd take more time than I can
 afford right now.

 Thanks,
 Nick

 Footnotes:

 [fn:1] I was looking for that and didn't find it - thanks for pointing
it out. I thought at first that follow-mode was what was needed,
but that wasn't it.

attachment: recital-slideshow.PNG

Re: [O] requesting help debugging tangle on windows

2012-02-15 Thread Andrew Cheng
Reproduced the issue with a clean Emacs 24 on Windows with and without my
.emacs and .emacs.d on the same machine and on a different machine.

Is this message related? Could not read org-id-values from
~\.emacs.d\.org-id-locations. Setting it to nil.


Re: [O] O[PATCH] org-export-generic table exporting

2012-02-15 Thread Wes Hardaker
 On Tue, 7 Feb 2012 23:44:42 -0500, Tom Alexander 
 tomalexan...@paphus.com said:

TA I noticed that the org-export-generic.el script had options for basic
TA features like checkboxes but not for tables, which were locked into
TA ascii exporting. The attached patch creates many variables to allow
TA users to change the table formatting (much like how there are
TA variables like :body-list-checkbox-done). I also created a generic
TA exporter named mediawiki that demonstrates use of the table
TA exporting.

Awesome!

TA This is my first post to this mailing list, and my first ever
TA contribution to an open-source project so I look forward to feedback
TA and be kind when you point out any sort of mailing list etiquette I
TA might have broken.

Well, I think you've certainly given a good first shot at a
contribution!

[Hopefully someone with write access will apply it soon]
-- 
Wes Hardaker 
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/



[O] highlight latex code

2012-02-15 Thread Riccardo Romoli
Hi, is there a way to highlight latex code like \ref{},  \si{}, \ce{},  
and so on, such as in org *bold* and /emph/?


Regards
Riccardo



Re: [O] Temp files from testing are permanent...

2012-02-15 Thread Olaf Meeuwissen
Achim Gratz strom...@nexgo.de writes:

 Olaf Meeuwissen olaf.meeuwis...@avasys.jp writes:
 If running `make check` (or similar) creates these files, `make clean`
 (or similar) should clean them up.

 I was asking that question to decide whether I do need to extend my
 Makefile fork to handle the cleanup or if the testsuite needs to be
 called differently to avoid leaving these stale files.  If you'd take a
 look, you can see that the files are obviously made with a function that
 ensures they're unique, most likely make-temp-file.  If so, it would
 seem logical that the testsuite should remove them after each test
 (since it is the only instance to know the complete filename).  It would
 also seem logical that for debugging purposes one could leave the files
 around.

Successful tests can clean up after themselves but failed tests should
not so you can debug.  The decision to remove these files should be left
to whoever runs the test suite.  That implies that even successful tests
don't really have to bother cleaning up after themselves.

I normally instruct my tests to create files in a dedicated directory
with a fixed name somewhere below $(top_builddir).  Then a `make clean`
can just remove the whole directory.

If you use `make check` to run the test suite, you can easily set TMPDIR
via the TESTS_ENVIRONMENT Makefile variable (assuming that that variable
is taken into account when making unique file names).  Something like

  TESTS_ENVIRONMENT = TMPDIR=$(builddir)/test-outputs

and then add a clean-local target like

  clean-local:
-rm -rf $(builddir)/test-outputs

See [[info:automake-1.11#Simple%20Tests][info:automake-1.11#Simple
Tests]] and [[info:automake-1.11#Extending]] for details.

Hope this helps,
-- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962



Re: [O] Defcustoms new in Emacs 24.1 missing :version tags

2012-02-15 Thread Bastien
Hi Jambunathan,

Jambunathan K kjambunat...@gmail.com writes:

 Bastien

 Thanks, but if it does not get merged to the Emacs repository before
 24.1 is released 

 I am a planning a commit to org.texi sometime tomorrow and I would to
 see the changes hit the bzr repo. Just giving you a heads up so that you
 can plan accordingly.

I know you know that already, but just a reminder: the changes should
not document features that are not in Emacs by now.

Thanks for the heads up!

-- 
 Bastien



Re: [O] Defcustoms new in Emacs 24.1 missing :version tags

2012-02-15 Thread Bastien
Hi Glenn,

Glenn Morris r...@gnu.org writes:

 Bastien wrote (on Mon, 13 Feb 2012 at 16:25 +0100):

 I added the version tags in git:
 http://orgmode.org/w/?p=org-mode.git;a=commit;h=04971de4b9321becfc2f6f1d0fc78f53726abcc6

 Thanks, but if it does not get merged to the Emacs repository before
 24.1 is released it won't be too useful.

I know, I will take care of this.

I didn't discipline myself enough and checked this change directly in
the master branch instead of the maint branch -- cherry-picking the
commit results in merging conflicts... so I will do this manually,
independantly from any bugfix release.

Thanks,

-- 
 Bastien



[O] Weirdness re: inclusion of figures

2012-02-15 Thread Paul Magwene
Hi All,

I'm trying to get up to speed with org-mode and babel for doing
reproducible computational research.  I'm just starting to play around
with simple examples, and I'm baffled by the following.

This first example, when exported to HTML or LaTeX produces the
expected result -- a simply code block with one embedded figure.

# Example 1.

This is my R example:

#+begin_src R :file z.png :results output graphics
plot(matrix(rnorm(100), ncol=2), type=l)
#+end_src

Some intervening text...

#+results:
[[file:z.png]]


However, this almost identical example, minus the intervening text
between the code and the results, doesn't include the figure:

# Example 2

This is my R example:

#+begin_src R :file z.png :results output graphics
plot(matrix(rnorm(100), ncol=2), type=l)
#+end_src

#+results:
[[file:z.png]]


What gives here? Do I always need to have intervening text between the
source code and results in order to get a figure in the exported
document?

Thanks,
Paul



Re: [O] Weirdness re: inclusion of figures

2012-02-15 Thread Paul
Paul Magwene pmmagic at gmail.com writes:

 
 Hi All,
 
 I'm trying to get up to speed with org-mode and babel for doing
 reproducible computational research.  I'm just starting to play around
 with simple examples, and I'm baffled by the following.
 


Oh, and I forgot to mention, my setup is:

Org version 7.8.03 with Emacs version 24




Re: [O] Weirdness re: inclusion of figures

2012-02-15 Thread Nick Dokos
Paul Magwene pmma...@gmail.com wrote:

 Hi All,
 
 I'm trying to get up to speed with org-mode and babel for doing
 reproducible computational research.  I'm just starting to play around
 with simple examples, and I'm baffled by the following.
 
 This first example, when exported to HTML or LaTeX produces the
 expected result -- a simply code block with one embedded figure.
 
 # Example 1.
 
 This is my R example:
 
 #+begin_src R :file z.png :results output graphics
 plot(matrix(rnorm(100), ncol=2), type=l)
 #+end_src
 
 Some intervening text...
 
 #+results:
 [[file:z.png]]
 
 
 However, this almost identical example, minus the intervening text
 between the code and the results, doesn't include the figure:
 
 # Example 2
 
 This is my R example:
 
 #+begin_src R :file z.png :results output graphics
 plot(matrix(rnorm(100), ncol=2), type=l)
 #+end_src
 
 #+results:
 [[file:z.png]]
 
 
 What gives here? Do I always need to have intervening text between the
 source code and results in order to get a figure in the exported
 document?
 

You need an :exports both header:

#+begin_src R :file z.png :results output graphics :exports both
plot(matrix(rnorm(100), ncol=2), type=l)
#+end_src

I don't know how or why the intervening text affects anything, but
it just smells like a red herring to me...

Nick :-)



[O] Usage tip: M-x list-load-path-shadows

2012-02-15 Thread Jambunathan K

Frequently there are issues wrt load-paths and multiple org trees in the
load-path. To isolate these issues one can do 

   M-x list-load-path-shadows
--