[O] Git repo not cloneable?

2012-03-02 Thread jeremiah . dodds

I was looking to add scala support to org-babel, but the repo linked
from http://orgmode.org/worg/org-contribute.html appears to need some
server-side love:

$ git --version
git version 1.7.9.2

$ git clone http://orgmode.org/w/org-mode.git
Cloning into 'org-mode'...
fatal: http://orgmode.org/w/org-mode.git/info/refs not found: did
you run git update-server-info on the server? 





[O] Participating in Google Summer of Code 2012

2012-03-02 Thread Bastien
Dear all,

Thorsten wrote a page about the Google Summer of Code on Worg:
  http://orgmode.org/worg/org-contrib/gsoc2012/

He described his own project on the ideas page:
  http://orgmode.org/worg/org-contrib/gsoc2012/orgmode-gsoc2012-ideas.html

(See Real webprogramming with Org Mode and PicoLisp.)

If you are a student and want to submit an Org-mode project for the 
GSoC 2012, please reply in this thread - we will give directions on
how to edit the Worg page.  When you have the first draft for your
project, you'll then have to find a mentor for it, which I guess 
will also happen by discussing it in this list.

The timeline for applications is here:

  http://www.google-melange.com/gsoc/events/google/gsoc2012

  Organization (GNU) should register *before March 9th*.

  Students should register before *April 6th*.

Org-mode related projects are likely to be presented under the GNU
umbrella, but we are still waiting to know if GNU will apply as an
Organization this year.

Let's make this happen!  And thanks to Thorsten who paved the way
for _any_ project, not only his own.

-- 
 Bastien



Re: [O] spot the LaTeX error

2012-03-02 Thread Peter Salazar
With some help I was able to fix the problem. If anyone is interested in
the template, let me know and I can supply the corrected code.


On Thu, Mar 1, 2012 at 11:26 PM, Peter Salazar cycleofs...@gmail.comwrote:

 Not sure if this is the right forum for this question, so feel free to
 direct me elsewhere...

 I'm trying to quit Markdown and switch to org-mode completely. To do that,
 I need to get my LaTeX template working with org-mode.

 I had a LaTeX template I cobbled together and successfully used with
 Pandoc for Markdown - LaTeX - PDF.

 I tried to convert my template to work with org-mode, but I haven't had
 any success. The .tex file it generates looks valid as far as I can tell,
 but when I do org-export to LaTeX and open resulting PDF, it crashes Emacs.

 Here's what I added to my .emacs file. Can anyone see what I've done
 wrong? As may be apparent, I don't really know what I'm doing.


 (add-to-list 'org-export-latex-classes
   '(salazar
 \\documentclass[12pt]{article}
 \\usepackage{float}
 \\usepackage{hyperref}
 \\usepackage{algorithm}
 \\usepackage{amsmath}
 \\usepackage{ifxetex}
 \\ifxetex
   \\usepackage{fontspec,xltxtra,xunicode}
   \\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
   \\setromanfont{Adobe Garamond Pro}
   \\setsansfont{Arial}
   \\setmonofont{Courier}
 \\else
   \\usepackage[mathletters]{ucs}
   \\usepackage[utf8x]{inputenc}
 \\fi
 \\usepackage{microtype}
 \\usepackage{fancyhdr}
 \\pagestyle{fancy}
 \\pagenumbering{arabic}
 \\lhead{\\href{mailto:cycleofs...@gmail.com}{Peter Salazar}}
 \\chead{\itshape}
 \\rhead{\\itshape{\\nouppercase{\\@title}: {\\nouppercase\\leftmark}}}
 \\lfoot{}
 \\cfoot{\\thepage}
 \\rfoot{}
 \\usepackage{listings}

 \\lstnewenvironment{code}{\\lstset{language=Haskell,basicstyle=\\small\\ttfamily}}{}
 \\setlength{\\parindent}{0pt}
 \\setlength{\\parskip}{12pt plus 2pt minus 1pt}
 \\usepackage{fancyvrb}
 \\usepackage{enumerate}
 \\usepackage{ctable}
 \\setlength{\\paperwidth}{8.5in}
 \\setlength{\\paperheight}{11in}
  \\usepackage[margin=1.5in,hmargin=1.5in,vmargin=1.5in]{geometry}
   \\tolerance=1000
 \\usepackage{tocloft}
 \\renewcommand{\\cftsecleader}{\\cftdotfill{\\cftdotsep}}
 \\usepackage[normalem]{ulem}
 \\newcommand{\\textsubscr}[1]{\\ensuremath{_{\\scriptsize\\textrm{#1


 \\usepackage[breaklinks=true,linktocpage,pdftitle={\\@title},pdfauthor={\\@author},xetex]{hyperref}

 \\usepackage{url}
 \\usepackage{graphicx}
 \\hypersetup{ colorlinks,
 citecolor=black,filecolor=black,linkcolor=black,urlcolor=blue}
 \\makeatletter
 \\def\\maketitle{
   \\thispagestyle{empty}
 \\vfill
   \\begin{raggedright}
   \\leavevmode
 \\vskip 1cm
 \{\\fontsize{50}{60}\\selectfont \\@title\\par}
 \\vskip 1cm
 \\normalfont
 \{\\huge {\\@author\\par}}
   \\vfill
 \{\\Large Peter Salazar}
 \\newline
   \{\\Large \\href{mailto:cycleofs...@gmail.com}{
 cycleofs...@gmail.com}}
 \\newline
 \{\\Large \\@date\\par}
\\end{raggedright}
   \\null
   \\cleardoublepage
 \}
   [NO-DEFAULT-PACKAGES]
   [NO-PACKAGES]
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))


 (setq org-latex-to-pdf-process
   '(xelatex -interaction nonstopmode %f
  xelatex -interaction nonstopmode %f)) ;; for multiple passes




[O] [BABEL] Redirect stderr to stdout?

2012-03-02 Thread Viktor Rosenfeld
Hi,

is there a way to capture stderr output of a babel block and have it
appear in the results block (instead of being printed in the *Shell
Command Output* buffer)? On sh blocks I could redirect myself, but I'm
trying to capture the output of psql (the PostgreSQL client).

Specifically, I have the following code block:

#+BEGIN_SRC sql :noweb yes :results output verbatim
\timing on
exp8-test-query
#+END_SRC

#+RESULTS:
: count
: 95977

The \timing directive causes psql to print the runtime of the query on
stderr. If I run the query on the psql command line, the following
output appears:

 count 
 ---
 95977
 (1 row)

 Time: 1895,558 ms

I suppose that duplicating this output in Babel would be difficult,
because it interferes with the parsing of the result set.

Cheers,
Viktor



Re: [O] Git repo not cloneable?

2012-03-02 Thread suvayu ali
On Fri, Mar 2, 2012 at 09:00,  jeremiah.do...@gmail.com wrote:

 I was looking to add scala support to org-babel, but the repo linked
 from http://orgmode.org/worg/org-contribute.html appears to need some
 server-side love:

    $ git --version
    git version 1.7.9.2

    $ git clone http://orgmode.org/w/org-mode.git
    Cloning into 'org-mode'...
    fatal: http://orgmode.org/w/org-mode.git/info/refs not found: did
    you run git update-server-info on the server?


I believe the url is incorrect (http cloning is not enabled I think).

http://orgmode.org/worg/worg-git.html#contribute-to-worg

That said, it might be nice to have the clone and push urls mentioned
on the gitweb summary page as in the repo.or.cz mirror:
http://repo.or.cz/w/Worg.git.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Git repo not cloneable?

2012-03-02 Thread Jonathan Leech-Pepin
Seems that the URL listed on that page is not correct for cloning.
The URL is the correct one for web access.

The following works for me (stuck behind a firewall that blocks git://):
,
| [remote origin]
| fetch = +refs/heads/*:refs/remotes/origin/*
| url = http://orgmode.org/org-mode.git
`

So http cloning is enabled, the URL simply isn't mentioned (And I
can't remember where I found it originally)

Hope this helps,

Jonathan

On Fri, Mar 2, 2012 at 07:40, suvayu ali fatkasuvayu+li...@gmail.com wrote:

 On Fri, Mar 2, 2012 at 09:00,  jeremiah.do...@gmail.com wrote:
 
  I was looking to add scala support to org-babel, but the repo linked
  from http://orgmode.org/worg/org-contribute.html appears to need some
  server-side love:
 
     $ git --version
     git version 1.7.9.2
 
     $ git clone http://orgmode.org/w/org-mode.git
     Cloning into 'org-mode'...
     fatal: http://orgmode.org/w/org-mode.git/info/refs not found: did
     you run git update-server-info on the server?
 

 I believe the url is incorrect (http cloning is not enabled I think).

 http://orgmode.org/worg/worg-git.html#contribute-to-worg

 That said, it might be nice to have the clone and push urls mentioned
 on the gitweb summary page as in the repo.or.cz mirror:
 http://repo.or.cz/w/Worg.git.

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Git repo not cloneable?

2012-03-02 Thread suvayu ali
Hi Jonathan and Jeremiah,

On Fri, Mar 2, 2012 at 14:29, Jonathan Leech-Pepin
jonathan.leechpe...@gmail.com wrote:
 Seems that the URL listed on that page is not correct for cloning.
 The URL is the correct one for web access.


[...]


 So http cloning is enabled, the URL simply isn't mentioned (And I
 can't remember where I found it originally)

I updated the page. Please take a look and feel free to edit/comment if
its still unclear. :)

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [Bug] Tests for experimental org-features should expect to fail if not activated by the user

2012-03-02 Thread Nicolas Goaziou
Hello,

Achim Gratz strom...@nexgo.de writes:

 There's another patch by Nicolas that added a few test, one of which
 seems broken:

This should be fixed now. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] [babel] Is Org Babel an X11 application?

2012-03-02 Thread Eric Schulte
Can you provide a minimal example?  I have a similar usage pattern
(emacs daemon and a mixture of X11 and screen Emacs windows) and I have
never experienced what you describe.

Also, try to reproduce with Emacs -Q, maybe you have some inline-image
configuration set.

Best,

Thorsten quintf...@googlemail.com writes:

 Hi List, 

 having figured out that it is really nice to have one emacs daemon
 running and then open several emacsclient-windows managed by tmux (a
 modern gnu screen) instead of winring.el e.g (a console session)
 I tried to use Org Babel with that setting. Only to find out that the
 results of code block evaluations seem to be inserted as pictures in the
 org document - and need X11 or there is an error message.

 Is that true - Org Babel only works in an X11 session and not on the
 console? Or is there some configuration/trick to make it work on a
 console too? 

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



Re: [O] [babel] Is Org Babel an X11 application?

2012-03-02 Thread Rick Frankel

On 02.03.2012 02:11, Thorsten wrote:

Hi List,

results of code block evaluations seem to be inserted as pictures in 
the

org document - and need X11 or there is an error message.

Is that true - Org Babel only works in an X11 session and not on the
console? Or is there some configuration/trick to make it work on a
console too?


Are you running babel code which generates images (e.g., dot, mscgen, 
etc.)?

If so, check if =org-display-inline-images= is being executed in the
=org-babel-after-execute-hook=. It automatically replaces the file link
results with the inline image, therefore requiring a GUI emacs.

rick



[O] How to include pre-existing pdf files/pages into orgmode pdf or other export output

2012-03-02 Thread Martin Weigele
Hi, is there an easy way to do this (rather than to fiddle around with 
resulting pdfs)?

Thanks, Martin



Re: [O] How to include pre-existing pdf files/pages into orgmode pdf or other export output

2012-03-02 Thread suvayu ali
Hey Martin,

On Fri, Mar 2, 2012 at 16:57, Martin Weigele mar...@weigele.de wrote:
 Hi, is there an easy way to do this (rather than to fiddle around with
 resulting pdfs)?


If you want to include the preexisting pdf as an image, just do

[[file:/path/to/preexisting.pdf]]

and export. I don't think there is any straight forward way to include
it as text though.

 Thanks, Martin


HTH

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [BABEL] Redirect stderr to stdout?

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

 Hi,

 is there a way to capture stderr output of a babel block and have it
 appear in the results block (instead of being printed in the *Shell
 Command Output* buffer)? On sh blocks I could redirect myself, but I'm
 trying to capture the output of psql (the PostgreSQL client).

 Specifically, I have the following code block:

 #+BEGIN_SRC sql :noweb yes :results output verbatim
 \timing on
 exp8-test-query
 #+END_SRC

 #+RESULTS:
 : count
 : 95977

 The \timing directive causes psql to print the runtime of the query on
 stderr. If I run the query on the psql command line, the following
 output appears:

  count 
  ---
  95977
  (1 row)

  Time: 1895,558 ms

 I suppose that duplicating this output in Babel would be difficult,
 because it interferes with the parsing of the result set.


Hi Viktor,

Currently the only action Babel takes with STDERR is to display it in a
pop-up buffer when code block evaluation fails.  It would certainly be
possible to add :results header argument to incorporate STDERR into
results (and this desire has been expressed previously).  Reasonable
combination options would likely include (at least) the following.

| stderr-only | return stderr instead of stdout|
| 21| interleave stderr and stdout   |
| concat  | add stderr to the end of stdout|
| list| return a list of stderr and stdotu |

The best (read simple and extensible) implementation and syntax for this
behavior is not obvious to me (and I simply don't have time).  If you
(or anyone on the list) have any interest in hacking elisp code the
place to start would be `org-babel-eval' for a serious implementation,
or an quick hack may be possible through customization of the
`org-babel-eval-error-notify' function.

Hope this helps.

Best,


 Cheers,
 Viktor


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



Re: [O] [BUG?] subtle sequencing error when setting org-bbdb-old in org-bbdb.el

2012-03-02 Thread David Maus
At Mon, 27 Feb 2012 17:21:59 -0500,
Nick Dokos wrote:
 
 David Maus dm...@ictsoc.de wrote:
 
   The problem was that org-bbdb is part of org-modules by default and that
   was loading org-bbdb way too early, certainly before bbdb itself was
   loaded.  That would set the value to nil and nothing I would do could
   change it (short of whacking it with a setq).
  
  I pushed a patch that should fix this problem. I wrapped a
  `eval-after-load' around the `defvar', this should make sure that the
  variable is set after bbdb was loaded.
  
 
 I still have a problem with one configuration (but not with another),
 but I haven't drilled down to figure out what the problem is. I was
 wondering however if the eval-after-load should be predicated on
 bbdb-com rather than bbdb[fn:1]: with this change, both of my tested
 configurations work (hardly a definitive test but perhaps better than
 nothing).

Thanks for the feedback. Eval after load 'bbdb-com would have been
better -- I just replaced the entire defvar by a check in
`org-bbdb-open' and `org-bbdb-store-link' for the required functions.

So this should really work now.

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de



[O] Double SCHEDULED: problem

2012-03-02 Thread François Pinard
Hi, Org friends!

For my employer, I have to fill a time form every two weeks for
salary, and also every month for customer billing.  So, I have one
SCHEDULED: line for each of these recurrences.  Last week, the entry
started like this:


** TODO *Rapport d'heures (Formation):projet:
SCHEDULED: 2012-02-27 lun ++2w
SCHEDULED: 2012-03-01 dim ++1m


Last Monday, turning the entry to DONE produced the following:


** TODO *Rapport d'heures (Formation):projet:
SCHEDULED: 2012-03-12 lun ++2w
SCHEDULED: 2012-04-01 dim ++1m


That is, *both* SCHEDULED: lines were advanced, and so, I missed to be
remembered to do my little filling duty yesterday, which has not been a
problem because others and I also received an email to that effect.

I wonder if or how Org could have helped me better.  I would prefer
keeping a single entry, because there many lines of contents ( the
recipe details about how to fill the company form, clocktables,
logbooks, and such things), which I would not like duplicated.

François



Re: [O] Participating in Google Summer of Code 2012

2012-03-02 Thread Eric Schulte
Hi,

Thanks to Bastien and Thorsten for advancing this opportunity.  I think
this could be a good chance for the community to collect and prioritize
some of our more ambitious development goals, and to widen the pool of
users who are familiar with the Org-mode internals -- a wonderful
journey to take through some of the most hackable code I've ever had the
pleasure of working on [1].

If there is any interest in working on the Babel (source code) elements
of Org-mode I would be happy to serve as a mentor.  Some ideas that come
to mind include;
- implementing a multi-programming-language notebook like console
  interface build on top of Org-mode and Babel (with both Emacs and
  HTML interfaces)
- adding support for asynchronous code block execution
- adding support for piping results between code blocks allowing many
  blocks to run concurrently (probably best combined with asynchronous
  execution)
- adding support for handling output written to STDERR

I'm sure there are many more exciting things to be done, the above are
just those that come to mind at the moment.

Best,

Bastien b...@altern.org writes:

 Dear all,

 Thorsten wrote a page about the Google Summer of Code on Worg:
   http://orgmode.org/worg/org-contrib/gsoc2012/

 He described his own project on the ideas page:
   http://orgmode.org/worg/org-contrib/gsoc2012/orgmode-gsoc2012-ideas.html

 (See Real webprogramming with Org Mode and PicoLisp.)

 If you are a student and want to submit an Org-mode project for the 
 GSoC 2012, please reply in this thread - we will give directions on
 how to edit the Worg page.  When you have the first draft for your
 project, you'll then have to find a mentor for it, which I guess 
 will also happen by discussing it in this list.

 The timeline for applications is here:

   http://www.google-melange.com/gsoc/events/google/gsoc2012

   Organization (GNU) should register *before March 9th*.

   Students should register before *April 6th*.

 Org-mode related projects are likely to be presented under the GNU
 umbrella, but we are still waiting to know if GNU will apply as an
 Organization this year.

 Let's make this happen!  And thanks to Thorsten who paved the way
 for _any_ project, not only his own.


Footnotes: 
[1]  I can't count the number of times I've sat down to implement
 something thinking I had hours of work ahead of me, only to find
 that thanks to well placed hooks, and thoughtfully created and
 exposed variables the task was trivial.

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



Re: [O] Participating in Google Summer of Code 2012

2012-03-02 Thread Jambunathan K

Git merge tool for Org files

http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00601.html



Re: [O] Participating in Google Summer of Code 2012

2012-03-02 Thread Eric Schulte
Jambunathan K kjambunat...@gmail.com writes:

 Git merge tool for Org files

 http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00601.html


Interesting, along these lines, I know git is able to use custom diffs
(e.g., there exist sentence rather than line-based diffs for writing
prose).  I wonder if an outline diff would be useful, so that
re-ordering subtrees in an Org-mode file was represented as a single
operation rather than many un-related deletions and insertions.

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



Re: [O] Participating in Google Summer of Code 2012

2012-03-02 Thread Jambunathan K
Eric Schulte eric.schu...@gmx.com writes:

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

 Git merge tool for Org files

 http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00601.html


 Interesting, along these lines, I know git is able to use custom diffs
 (e.g., there exist sentence rather than line-based diffs for writing
 prose).  I wonder if an outline diff would be useful, so that
 re-ordering subtrees in an Org-mode file was represented as a single
 operation rather than many un-related deletions and insertions.

Caveat: I know practically nothing - technically - about the project
being discussed. I am commenting here as a lay user.

Sometime back while looking at change tracking within OpenDocument
files, I stumbled upon the following two entries.

http://wiki.documentfoundation.org/Track_changes#Google_Summer_of_Code_2009:_Improve_Writer.27s_compare_function

http://gsoc-tzvetelina.blogspot.in/

In the above blog, the author is talking about paragraphs as a unit and
makes a note of the algorithms he uses to narrow down the paragraphs of
interest. I think in Org's context, outline could (also) be considered
as a unit.





Re: [O] Double SCHEDULED: problem

2012-03-02 Thread Bernt Hansen
pin...@iro.umontreal.ca (François Pinard) writes:

 Hi, Org friends!

 For my employer, I have to fill a time form every two weeks for
 salary, and also every month for customer billing.  So, I have one
 SCHEDULED: line for each of these recurrences.  Last week, the entry
 started like this:


 ** TODO *Rapport d'heures (Formation):projet:
 SCHEDULED: 2012-02-27 lun ++2w
 SCHEDULED: 2012-03-01 dim ++1m


 Last Monday, turning the entry to DONE produced the following:


 ** TODO *Rapport d'heures (Formation):projet:
 SCHEDULED: 2012-03-12 lun ++2w
 SCHEDULED: 2012-04-01 dim ++1m


 That is, *both* SCHEDULED: lines were advanced, and so, I missed to be
 remembered to do my little filling duty yesterday, which has not been a
 problem because others and I also received an email to that effect.

 I wonder if or how Org could have helped me better.  I would prefer
 keeping a single entry, because there many lines of contents ( the
 recipe details about how to fill the company form, clocktables,
 logbooks, and such things), which I would not like duplicated.


Two SCHEDULED: lines on a single entry is not supported by org-mode
AFAIK.  I would create a subtask for each of these

untested

* TODO Parent task with the details
  All your notes and procedures go here
** TODO Subtask 1
   SCHEDULED: 2012-03-12 lun ++2w
** TODO subtask 2
   2012-04-01 dim ++1m

HTH,
Bernt



Re: [O] Selectively export RESULTS

2012-03-02 Thread Matthew Landis
 cberry at tajo.ucsd.edu writes:

 
 Eric Schulte eric.schulte at gmx.com writes:
 
  Does this do what you want?

 
  Have you looked at the :cache header argument [1], from my understanding
  of your use case it should be exactly what you are after.
 
 
 Its a step in the right direction.
 
 It seems I have to set :cache yes on every block I use before I invoke
 it. My attempt to use a buffer-wide PROPERTY setting for cache did not
 pan out. 
 

I'd like to put in a vote for the kind of functionality that cberry is 
describing.  I have a very similar situation - a large org file that uses R to 
do a lot of time consuming data manipulation and model fitting, resulting in 
statistical tables and graphs.  I run a lot of the code blocks as I'm writing 
it, resulting in :results in the org file.  

In the end, I'd like to export the org file to html or ODT, but I'd like to be 
able to choose buffer-wide whether to rerun all of the code blocks or just use 
the results that are already in the buffer.  I tried setting #+PROPERTY: eval 
no 
at the top of the buffer in the hopes that on export, it would ignore all my 
code blocks and just incorporate the :results, but this was ignored and my code 
blocks were rerun.

The cache argument only partially deals with the problem, as this example 
illustrates:

#+begin_src R :session :cache yes
x - rnorm(100)
#+end_src

#+begin_src R :session :results graphics :exports results :file hist.png :cache 
yes
hist(x)
#+end_src

Now after the first export, I change code block 2, but not code block 1.  If I 
understand how cache works correctly, code block 2 will be rerun, but it will 
fail because code block 1 is not rerun, so x doesn't exist in the R session.  

For this reason, I'd prefer to be able to decide whether to re-run on a file-
wide basis.

Many thanks to all of you who have created such an amazing system.  

M





Re: [O] org-export-blocks-preprocess: Marker does not point anywhere

2012-03-02 Thread Matthew Landis
Nick Dokos nicholas.dokos at hp.com writes:

 
 Matthew Landis landis at isciences.com wrote:

 
 I can't reproduce it either with latest (more or less) or with 7.8.03.
 The html export succeeds and the code is exported, pdf export (with
 minted) succeeds except that the code block is not processed, because
 there is no minted lexer for R (at least in my setup). But I get no
 error.
 
 Nick

Well, thanks for trying.  In my current work flow, I tend to have an R session 
running before I try to export, so I'm not troubled by this anymore.  I guess 
I'll just wait until it's a problem.

M







Re: [O] Git repo not cloneable?

2012-03-02 Thread jeremiah . dodds
suvayu ali fatkasuvayu+li...@gmail.com writes:

 Hi Jonathan and Jeremiah,

 On Fri, Mar 2, 2012 at 14:29, Jonathan Leech-Pepin
 jonathan.leechpe...@gmail.com wrote:
 Seems that the URL listed on that page is not correct for cloning.
 The URL is the correct one for web access.


 [...]


 So http cloning is enabled, the URL simply isn't mentioned (And I
 can't remember where I found it originally)

 I updated the page. Please take a look and feel free to edit/comment if
 its still unclear. :)


Thanks for putting the correct url in, that cleared up all the issues I
was having :D



Re: [O] [Bug] Tests for experimental org-features should expect to fail if not activated by the user

2012-03-02 Thread Achim Gratz
Nicolas Goaziou n.goaz...@gmail.com writes:
 This should be fixed now. Thank you for reporting it.

I confirm the fix, testing is clean again, thank you very much.


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

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Selectively export RESULTS

2012-03-02 Thread Eric Schulte
Matthew Landis lan...@isciences.com writes:

  cberry at tajo.ucsd.edu writes:

 
 Eric Schulte eric.schulte at gmx.com writes:
 
  Does this do what you want?

 
  Have you looked at the :cache header argument [1], from my understanding
  of your use case it should be exactly what you are after.
 
 
 Its a step in the right direction.
 
 It seems I have to set :cache yes on every block I use before I invoke
 it. My attempt to use a buffer-wide PROPERTY setting for cache did not
 pan out. 
 

Were these technical problems with the implementation of :cache, or
logistical problems specific to your organization of code blocks?


 I'd like to put in a vote for the kind of functionality that cberry is 
 describing.  I have a very similar situation - a large org file that uses R 
 to 
 do a lot of time consuming data manipulation and model fitting, resulting in 
 statistical tables and graphs.  I run a lot of the code blocks as I'm writing 
 it, resulting in :results in the org file.  

 In the end, I'd like to export the org file to html or ODT, but I'd like to 
 be 
 able to choose buffer-wide whether to rerun all of the code blocks or just 
 use 
 the results that are already in the buffer.  I tried setting #+PROPERTY: eval 
 no 
 at the top of the buffer in the hopes that on export, it would ignore all my 
 code blocks and just incorporate the :results, but this was ignored and my 
 code 
 blocks were rerun.

 The cache argument only partially deals with the problem, as this example 
 illustrates:

 #+begin_src R :session :cache yes
 x - rnorm(100)
 #+end_src
 #+begin_src R :session :results graphics :exports results :file hist.png 
 :cache yes
 hist(x)
 #+end_src

 Now after the first export, I change code block 2, but not code block 1.  If 
 I 
 understand how cache works correctly, code block 2 will be rerun, but it will 
 fail because code block 1 is not rerun, so x doesn't exist in the R session.  


Have you tried this?  The cache header argument has special handling of
code blocks with sessions to handle such cases.


 For this reason, I'd prefer to be able to decide whether to re-run on a file-
 wide basis.


I'm not clear on why file-wide setting of cache does not work.

Are you requesting a new option to :cache, such that even if the code
block has changes the old results are used anyway?


 Many thanks to all of you who have created such an amazing system.


Thanks,


 M




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



Re: [O] [BUG?] subtle sequencing error when setting org-bbdb-old in org-bbdb.el

2012-03-02 Thread Nick Dokos
David Maus dm...@ictsoc.de wrote:

 At Mon, 27 Feb 2012 17:21:59 -0500,
 Nick Dokos wrote:
  
  David Maus dm...@ictsoc.de wrote:
  
The problem was that org-bbdb is part of org-modules by default and that
was loading org-bbdb way too early, certainly before bbdb itself was
loaded.  That would set the value to nil and nothing I would do could
change it (short of whacking it with a setq).
   
   I pushed a patch that should fix this problem. I wrapped a
   `eval-after-load' around the `defvar', this should make sure that the
   variable is set after bbdb was loaded.
   
  
  I still have a problem with one configuration (but not with another),
  but I haven't drilled down to figure out what the problem is. I was
  wondering however if the eval-after-load should be predicated on
  bbdb-com rather than bbdb[fn:1]: with this change, both of my tested
  configurations work (hardly a definitive test but perhaps better than
  nothing).
 
 Thanks for the feedback. Eval after load 'bbdb-com would have been
 better -- I just replaced the entire defvar by a check in
 `org-bbdb-open' and `org-bbdb-store-link' for the required functions.
 
 So this should really work now.
 

It does, at least in the two configurations I've tested: my full-blown one
and a minimal org one with bbdb loaded after the fact.

I'll be trying it with bbdb 3.x some time soon, I hope.

Thanks very much!
Nick



Re: [O] [babel] Is Org Babel an X11 application?

2012-03-02 Thread Thorsten
Rick Frankel r...@rickster.com writes:

Hi Eric, Hi Rick,

 Are you running babel code which generates images (e.g., dot, mscgen,
 etc.)?
 If so, check if =org-display-inline-images= is being executed in the
 =org-babel-after-execute-hook=. It automatically replaces the file link
 results with the inline image, therefore requiring a GUI emacs.

Yes, that was the culprit:
,---
| org-babel-after-execute-hook is a variable defined in `ob.el'.
| Its value is (org-display-inline-images)
`---

thanks for the tip
-- 
cheers,
Thorsten




Re: [O] Selectively export RESULTS

2012-03-02 Thread Christophe Pouzat
Matthew Landis lan...@isciences.com writes:

  cberry at tajo.ucsd.edu writes:

 
 Eric Schulte eric.schulte at gmx.com writes:
 
  Does this do what you want?

 
  Have you looked at the :cache header argument [1], from my understanding
  of your use case it should be exactly what you are after.
 
 
 Its a step in the right direction.
 
 It seems I have to set :cache yes on every block I use before I invoke
 it. My attempt to use a buffer-wide PROPERTY setting for cache did not
 pan out. 
 

 I'd like to put in a vote for the kind of functionality that cberry is 
 describing.  I have a very similar situation - a large org file that uses R 
 to 
 do a lot of time consuming data manipulation and model fitting, resulting in 
 statistical tables and graphs.  I run a lot of the code blocks as I'm writing 
 it, resulting in :results in the org file.  

 In the end, I'd like to export the org file to html or ODT, but I'd like to 
 be 
 able to choose buffer-wide whether to rerun all of the code blocks or just 
 use 
 the results that are already in the buffer.  I tried setting #+PROPERTY: eval 
 no 
 at the top of the buffer in the hopes that on export, it would ignore all my 
 code blocks and just incorporate the :results, but this was ignored and my 
 code 
 blocks were rerun.

 The cache argument only partially deals with the problem, as this example 
 illustrates:

 #+begin_src R :session :cache yes
 x - rnorm(100)
 #+end_src
 #+begin_src R :session :results graphics :exports results :file hist.png 
 :cache 
 yes
 hist(x)
 #+end_src

 Now after the first export, I change code block 2, but not code block 1.  If 
 I 
 understand how cache works correctly, code block 2 will be rerun, but it will 
 fail because code block 1 is not rerun, so x doesn't exist in the R session.  

 For this reason, I'd prefer to be able to decide whether to re-run on a file-
 wide basis.

 Many thanks to all of you who have created such an amazing system.  

 M


Matthew,

I think that you're wrongly expecting babel's cache header argument to
behave like the argument of the same name in Sweave code chunks. Babel
will cache, in your case, the value of your code block evaluation and
there is none in your first code block, therefore nothing gets cached by
babel, try that instead:

#+name: my-random-vector
#+begin_src R :session :cache yes
rnorm(100)
#+end_src

#+headers: :var x=my-random-vector
#+headers: :results graphics :exports results :file hist.png
#+begin_src R :session  :cache yes
hist(x)
#+end_src

Does it work better? In that case you don't even need a session.

Christophe
-- 

Président, Nicolas Sarkozy représente une sorte de triomphe bouffon de 
l'égalitarisme français ; pour la première fois de notre histoire, nous avons 
un chef de l'État qui se comporte comme s'il ne valait pas mieux que les 
citoyens. C'est en réalité toujours le cas, mais cette vérité doit être cachée 
pour que les institutions et le système social tournent de façon, si ce n'est 
harmonieuse, du moins raisonnable.

E. Todd, Après la démocratie. 
--

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



Re: [O] Double SCHEDULED: problem

2012-03-02 Thread François Pinard
Bernt Hansen be...@norang.ca writes:

 pin...@iro.umontreal.ca (François Pinard) writes:

 Two SCHEDULED: lines on a single entry is not supported by org-mode
 AFAIK.

OK!

 I would create a subtask for each of these

I'll use this, thanks Bernt!

François



Re: [O] Selectively export RESULTS

2012-03-02 Thread Matthew Landis
Eric Schulte eric.schulte at gmx.com writes:

 
 Matthew Landis landis at isciences.com writes:
 
 Have you tried this?  The cache header argument has special handling of
 code blocks with sessions to handle such cases.

Fair enough!  I hadn't tried it.  But I did just try this example:

-
#+TITLE: Super simple example using cache header arguments
#+PROPERTIES: eval no

Here is a really simple example.

#+begin_src R :session :results silent :exports code :cache yes
x - rnorm(100)
cat('ran this code block')
#+end_src

here is code block two.

#+begin_src R :session :results graphics :exports both :file hist.png :cache yes
hist(x, main = 'A new title' )
#+end_src

#+results[1987d49b46ffd8b7263dc04e7c7b5d25f90342aa]:
[[file:hist.png]]
-

RESULTS:
On 1st export to html, both code blocks are run, and #+results block is *not* 
created.  

On 2nd export, both code blocks are run again, counter to my desires.

IF I run the code blocks interactively first using C-c C-c, the #+results block 
is created for the code block 2.  After that, subsequent exports run code block 
1 but not code block 2.  Again, this is counter to my desires because I want 
code block 1 to be ignored as well.  I understand why code block 1 is rerun, 
because I have :results silent, but I'd rather not have to change that.  
Generally, code block 1 is producing large R data.frames which don't need to be 
viewed anywhere.

 Are you requesting a new option to :cache, such that even if the code
 block has changes the old results are used anyway?

Sort of.  I think I'm asking for a file wide option to decide whether to run 
any 
code blocks, or just do the export based on whatever is currently existing in 
the #+results blocks.

As in this example, I tried #+PROPERTIES: eval no but it is ignored.  It would 
be great if I could set an eval argument at the top of the file to be either 
'no' (don't run any code blocks) 'yes' (run all code blocks) or 'block' respect 
block level eval settings 

Maybe such functionality exists in some other way - I claim only beginners 
knowledge of org-babel.







Re: [O] Selectively export RESULTS

2012-03-02 Thread Matthew Landis



On 3/2/2012 12:59 PM, Christophe Pouzat wrote:


Matthew,

I think that you're wrongly expecting babel's cache header argument to
behave like the argument of the same name in Sweave code chunks. Babel
will cache, in your case, the value of your code block evaluation and
there is none in your first code block, therefore nothing gets cached by
babel, try that instead:

#+name: my-random-vector
#+begin_src R :session :cache yes
rnorm(100)
#+end_src

#+headers: :var x=my-random-vector
#+headers: :results graphics :exports results :file hist.png
#+begin_src R :session  :cache yes
hist(x)
#+end_src

Does it work better? In that case you don't even need a session.

Christophe
Christophe - thanks for the suggestion.  I haven't messed around much 
with variables passed between code blocks.  When I try this, R tells me 
that 'x' must be numeric.  When I query x in the R buffer, x is a 
data.frame.  So the second code block reads x in as a data.frame instead 
of a numeric vector.


For most purposes this would be OK (since a data.frame is the most usual 
outcome), but I'm reluctant to use this approach -- I'd like all of the 
variable passing to be in the R session.  Intuitively this seems 
simpler, less error prone, and more conducive to tangling later.  (Of 
course, I could be totally wrong - since I haven't really tried that 
approach).


M

--
~~
Matthew Landis, Ph.D.
Research Scientist
ISciences, LLC
61 Main St. Suite 200
Burlington VT 05401
802.864.2999
www.isciences.com
~~




[O] org-odt: cannot find factory styles

2012-03-02 Thread Matthew Landis

Hello all,

I've been googling this problem and searching the archives, but I can't 
seem to find a solution.  When I try to export to ODT, I get


Error (org-odt): Cannot find factory styles files. Aborting.

Looking in my *Messages* buffer, I see at startup:

Debug (org-odt): Searching for OpenDocument schema files...
Debug (org-odt): Trying 
c:/c/Emacs-modified/tmpdir/emacs-23.4/etc/org/schema/...

Debug (org-odt): Trying c:/emacs-23.4/site-lisp/contrib/odt/etc/schema/...
Debug (org-odt): No OpenDocument schema files installed
Debug (org-odt): Searching for OpenDocument styles files...
Debug (org-odt): Trying 
c:/c/Emacs-modified/tmpdir/emacs-23.4/etc/org/styles/...

Debug (org-odt): Trying c:/emacs-23.4/site-lisp/etc/styles/...
Debug (org-odt): Trying c:/emacs-23.4/site-lisp/org/etc/styles/...
Debug (org-odt): Trying c:/emacs-23.4/etc/org/...
Problems while trying to load feature `org-odt'

So you can see that i am using Windows (Win 7 64 bit).  In fact, I am 
using Vincent Goulet's Windows installer (modified-2, FWIW), and I 
directed it to install into C:/emacs-23.4 instead of the default 
C:/Program Files (x86) directory.


Looking in the site-lisp directories for the folders org-odt is 
searching, I don't see contrib, org, or etc directories.


But I do see C:/emacs-23.4/etc/org/styles, which has OrgOdtStyles.xml, 
and C:/emacs-23.4/etc/schema, which doesn't obviously have any files to 
do with ODT.


Is there a workaround or alternative installation to fix it?  It would 
be really cool to export to ODT!


M


--
~~
Matthew Landis, Ph.D.
Research Scientist
ISciences, LLC
61 Main St. Suite 200
Burlington VT 05401
802.864.2999
www.isciences.com
~~




Re: [O] Selectively export RESULTS

2012-03-02 Thread Eric Schulte
Matthew Landis lan...@isciences.com writes:

 Eric Schulte eric.schulte at gmx.com writes:

 
 Matthew Landis landis at isciences.com writes:
 
 Have you tried this?  The cache header argument has special handling of
 code blocks with sessions to handle such cases.

 Fair enough!  I hadn't tried it.  But I did just try this example:

 -
 #+TITLE: Super simple example using cache header arguments
 #+PROPERTIES: eval no


The above line should be #+PROPERTY: singular.  That explains why
file-wide settings aren't working for you.


 Here is a really simple example.

 #+begin_src R :session :results silent :exports code :cache yes
 x - rnorm(100)
 cat('ran this code block')
 #+end_src

 here is code block two.

 #+begin_src R :session :results graphics :exports both :file hist.png :cache 
 yes
 hist(x, main = 'A new title' )
 #+end_src

 #+results[1987d49b46ffd8b7263dc04e7c7b5d25f90342aa]:
 [[file:hist.png]]
 -


Thanks for the example, after working through it I now know what is
causing this issue.  The first code block will always be run for two
reasons.
1. it is run in a session, which means that Babel can not guess at to
   what state it could be changing internal to the session, so it
   defaults to the safest option which is allowing the code block to run
2. since this code block returns no results, there is no place for Babel
   to store the hash key holding the information on the code block and
   arguments used to produce the results.  Remember that Org-mode is
   nothing more than the text in the file, so without this stored hash,
   there is no way for Babel to know that the code block was previously
   run, or that it may have results.

For these reasons I would suggest either fixing the properties issue
above, which will allow you to set eval to no before export when you
are content with your current results, or I would suggest that you
switch from session based evaluation to explicitly passing the values
through Org-mode, which will allow babel to cache results.

I will update the :cache section of the manual so that it mentions the
issues around mixing :session and :cache header arguments.

Best,


 RESULTS:
 On 1st export to html, both code blocks are run, and #+results block is *not* 
 created.  

 On 2nd export, both code blocks are run again, counter to my desires.

 IF I run the code blocks interactively first using C-c C-c, the #+results 
 block 
 is created for the code block 2.  After that, subsequent exports run code 
 block 
 1 but not code block 2.  Again, this is counter to my desires because I want 
 code block 1 to be ignored as well.  I understand why code block 1 is rerun, 
 because I have :results silent, but I'd rather not have to change that.  
 Generally, code block 1 is producing large R data.frames which don't need to 
 be 
 viewed anywhere.

 Are you requesting a new option to :cache, such that even if the code
 block has changes the old results are used anyway?

 Sort of.  I think I'm asking for a file wide option to decide whether to run 
 any 
 code blocks, or just do the export based on whatever is currently existing in 
 the #+results blocks.

 As in this example, I tried #+PROPERTIES: eval no but it is ignored.  It 
 would 
 be great if I could set an eval argument at the top of the file to be either 
 'no' (don't run any code blocks) 'yes' (run all code blocks) or 'block' 
 respect 
 block level eval settings 

 Maybe such functionality exists in some other way - I claim only beginners 
 knowledge of org-babel.






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



Re: [O] Selectively export RESULTS

2012-03-02 Thread cberry
Eric Schulte eric.schu...@gmx.com writes:

 Matthew Landis lan...@isciences.com writes:

  cberry at tajo.ucsd.edu writes:

 
 Eric Schulte eric.schulte at gmx.com writes:
 
  Does this do what you want?

 
  Have you looked at the :cache header argument [1], from my understanding
  of your use case it should be exactly what you are after.
 
 
 Its a step in the right direction.
 
 It seems I have to set :cache yes on every block I use before I invoke
 it. My attempt to use a buffer-wide PROPERTY setting for cache did not
 pan out. 
 

 Were these technical problems with the implementation of :cache, or
 logistical problems specific to your organization of code blocks?

[rest deleted]

Eric,

your response is threaded as a reply to Matthew, but here you have
replied to my comment about buffer wide PROPERTY setting of :cache.

Here is an example of the difficulty I face:

,
| #+property: :cache yes
| 
| 
| #+name: Ablock
| #+begin_src emacs-lisp :results value :exports both 
|   (current-time-string)
| #+end_src
| 
| #+results[2ca40f0dc0f23e5743133e229d9e8f31b31830c5]: Ablock
| : Wed Feb 29 11:57:19 2012
| 
| 
| * headline 1
|   :PROPERTIES:
|   :cache:   no
|   :END:
| 
| #+CALL: Ablock() :exports results
| 
`

When I place point under the headline and issue 

 C-c @ C-c C-e a

I get 

,
|   headline 1
|   ==
| 
| Author: 
| Date: 2012-03-02 11:28:54 PST
| 
| 
| 
| 
| Fri Mar  2 11:28:52 2012
| 
`

showing that Ablock() actually was executed.

If the :cache setting under 'headline 1' is omitted then no update of
the time string is performed.

I understand that this behavior might be considered a *feature*, not a
*bug*. 

Either way, having an easy way to copy results into other parts of a
document would help me out.

Best,

Chuck

-- 
Charles C. BerryDept of Family/Preventive Medicine
cberry at ucsd edu  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901




Re: [O] [BABEL] Redirect stderr to stdout?

2012-03-02 Thread Viktor Rosenfeld
Hi Eric,

Eric Schulte wrote:

 Currently the only action Babel takes with STDERR is to display it in a
 pop-up buffer when code block evaluation fails.  

On my system (OS X) the buffer does not popup. I just tried

#+BEGIN_SRC sh
echo foo 12
#+END_SRC

in Aquamacs and Cocoa Emacs. Strangely, the output seems to be lost
entirely. Normally, stderr is captured in another buffer which I have to
open manually.

 It would certainly be
 possible to add :results header argument to incorporate STDERR into
 results (and this desire has been expressed previously).  Reasonable
 combination options would likely include (at least) the following.
 
 | stderr-only | return stderr instead of stdout|
 | 21| interleave stderr and stdout   |
 | concat  | add stderr to the end of stdout|
 | list| return a list of stderr and stdotu |
 
 The best (read simple and extensible) implementation and syntax for this
 behavior is not obvious to me (and I simply don't have time).  If you
 (or anyone on the list) have any interest in hacking elisp code the
 place to start would be `org-babel-eval' for a serious implementation,
 or an quick hack may be possible through customization of the
 `org-babel-eval-error-notify' function.
 
 Hope this helps.

Okay, thanks. My elisp skills are very rudimentary and this is beyond
me. Maybe somebody else will pick it up if the interest is big enough.

Cheers,
Viktor



Re: [O] How to include pre-existing pdf files/pages into orgmode pdf or other export output

2012-03-02 Thread Skip Collins
On Fri, Mar 2, 2012 at 10:57 AM, Martin Weigele mar...@weigele.de wrote:
 Hi, is there an easy way to do this (rather than to fiddle around with
 resulting pdfs)?

I think the LaTeX package pdfpages is what you are looking for.



[O] Export anchor to latex

2012-03-02 Thread Markus Grebenstein

Dear List,

I am regularly running into problems with internal links to headings, 
since my document meanwhile is 200pp+ long and I tend to change headings.


Since I loose the ability to jump to the heading, I do not like to use 
the classic latex approach using \label.


I am wondering why anchors are not exported as a label. Alternatively 
having an option for headings would be nice like:

* Heading [label:anchor]

Is there a possibility to tweak orgmode to export anchors?

Thanks in advance,

Markus




[O] ConTeXt export

2012-03-02 Thread Markus Grebenstein

Dear List,

Since the name of ConTeXt makes it almost impossible to search for that 
topic I'd like to ask you:


Is there an ConTeXt exporter (planned??). I am getting more and more fed 
up with all the package trouble...


Thanks in advance,

Markus




Re: [O] Selectively export RESULTS

2012-03-02 Thread Matthew Landis



On 3/2/2012 2:33 PM, Eric Schulte wrote:


The above line should be #+PROPERTY: singular.  That explains why
file-wide settings aren't working for you.
THANK YOU.  That makes it work, especially once I realized that the 
Property has to be set when the buffer is loaded.  Now I have

#+PROPERTY: eval no-export

I would suggest either fixing the properties issue above, which will 
allow you to set eval to no before export when you are content with 
your current results, 
This is exactly what I did, and it does exactly what I want.  org-babel 
totally rocks.



--
~~
Matthew Landis, Ph.D.
Research Scientist
ISciences, LLC
61 Main St. Suite 200
Burlington VT 05401
802.864.2999
www.isciences.com
~~




Re: [O] Export anchor to latex

2012-03-02 Thread Nick Dokos
Markus Grebenstein p...@mgrebenstein.de wrote:

 Dear List,
 
 I am regularly running into problems with internal links to headings,
 since my document meanwhile is 200pp+ long and I tend to change
 headings.
 
 Since I loose the ability to jump to the heading, I do not like to use
 the classic latex approach using \label.
 
 I am wondering why anchors are not exported as a label. Alternatively
 having an option for headings would be nice like:
 * Heading [label:anchor]
 
 Is there a possibility to tweak orgmode to export anchors?
 
 Thanks in advance,
 

I may be misunderstanding what you mean, but when I try exporting to latex
the following org file:

--8---cut here---start-8---

* foo
# fooanchor

foo text

* bar
# baranchor

bar text
--8---cut here---end---8---

I get the following latex code:

,
| ...
| \section{foo}
| \label{sec-1}
| \label{fooanchor}
| 
| 
| foo text
| \section{bar}
| \label{sec-2}
| \label{baranchor}
| 
| 
| bar text
| ...
`

Isn't that enough?

Nick




Re: [O] Selectively export RESULTS

2012-03-02 Thread Eric Schulte
Matthew Landis lan...@isciences.com writes:

 On 3/2/2012 2:33 PM, Eric Schulte wrote:

 The above line should be #+PROPERTY: singular.  That explains why
 file-wide settings aren't working for you.
 THANK YOU.  That makes it work,

Good to hear.

 especially once I realized that the Property has to be set when the
 buffer is loaded.

You can also press C-c C-c on the #+Property line to apply it's effects.

 Now I have #+PROPERTY: eval no-export

 I would suggest either fixing the properties issue above, which will 
 allow you to set eval to no before export when you are content with 
 your current results, 
 This is exactly what I did, and it does exactly what I want.  org-babel 
 totally rocks.

Great, happy this was resolved successfully.

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



Re: [O] [BABEL] Redirect stderr to stdout?

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

 Hi Eric,

 Eric Schulte wrote:

 Currently the only action Babel takes with STDERR is to display it in a
 pop-up buffer when code block evaluation fails.  

 On my system (OS X) the buffer does not popup. I just tried

 #+BEGIN_SRC sh
 echo foo 12
 #+END_SRC


That is because the evaluation did not fail, try

#+BEGIN_SRC sh
echo foo 12
exit 1
#+END_SRC


 in Aquamacs and Cocoa Emacs. Strangely, the output seems to be lost
 entirely.

I don't pretend to understand the many oddities of Aquamacs, and I don't
know what Cocoa Emacs is.

 Normally, stderr is captured in another buffer which I have to open
 manually.

 It would certainly be
 possible to add :results header argument to incorporate STDERR into
 results (and this desire has been expressed previously).  Reasonable
 combination options would likely include (at least) the following.
 
 | stderr-only | return stderr instead of stdout|
 | 21| interleave stderr and stdout   |
 | concat  | add stderr to the end of stdout|
 | list| return a list of stderr and stdotu |
 
 The best (read simple and extensible) implementation and syntax for this
 behavior is not obvious to me (and I simply don't have time).  If you
 (or anyone on the list) have any interest in hacking elisp code the
 place to start would be `org-babel-eval' for a serious implementation,
 or an quick hack may be possible through customization of the
 `org-babel-eval-error-notify' function.
 
 Hope this helps.

 Okay, thanks. My elisp skills are very rudimentary and this is beyond
 me. Maybe somebody else will pick it up if the interest is big enough.


This feature has been requested previously on the mailing list, so there
is certainly demand.  As always demand outstrips development resources.

Best,


 Cheers,
 Viktor


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



Re: [O] org-odt: cannot find factory styles

2012-03-02 Thread Jambunathan K

The easiest solution is to use ELPA. There is some instruction on how to
use ELPA here:

http://orgmode.org/worg/org-faq.html#installing-via-elpa

If you are installing through ELPA for the first time, make sure that
you have no installation of org in your load-path. M-x locate-library
RET org RET will show where the current Org is located. Rename the
parent dir to someother name, so that it is removed out of load
path. Repeat this process until there is no more Org in your
load-path. Then proceed with ELPA installation.

Another solution is to download the tar and use

$ make install

More specifically, use of byte-compile-directory to compile and
install Org will definitely *break* the ODT exporter. Copying the .elc
files by hand will also break the exporter. The only solution to have a
working installation is to use make install to install the Org = 7.8.

,
| # Where local software is found
| prefix=/usr/local
| 
| # Where local lisp files go
| lispdir   = $(prefix)/share/emacs/site-lisp
| 
| # Where data files go
| # $(datadir) contains auxiliary files for use with ODT exporter.
| # See comments under DATAFILES.
| datadir = $(prefix)/share/emacs/etc
`

 Debug (org-odt): Trying c:/emacs-23.4/site-lisp/etc/styles/...
 Debug (org-odt): Trying c:/emacs-23.4/site-lisp/org/etc/styles/...
 Debug (org-odt): Trying c:/emacs-23.4/etc/org/...

The above two messages suggests that whoever built the binaries had the
following setting for lispdir.

lispdir = c:/emacs-23.4/site-lisp/org

and *didn't* use 'make install'.

If the Org is meant for a global distribution (as opposed to personal
installation), the distributor has to specifically ask the users to copy
the styles file to data-directory/etc/org.

C-h v data-directory

In your case, the data-directory is c:/emacs-23.4/etc/org/.

Emacs-24.1 (pretest) users will not see this problem because the styles
files are already part of the emacs tree. See
http://bzr.savannah.gnu.org/lh/emacs/trunk/files/head:/etc/org/.


Style files from the git repo is here:
http://orgmode.org/w/?p=org-mode.git;a=tree;f=etc/styles;hb=HEAD

Schema files form the git repo is here:
http://orgmode.org/w/?p=org-mode.git;a=tree;f=contrib/odt/etc/schema;hb=HEAD

Remember to download the raw files if you are downloading from git repo.


 Hello all,

 I've been googling this problem and searching the archives, but I
 can't seem to find a solution.  When I try to export to ODT, I get

 Error (org-odt): Cannot find factory styles files. Aborting.

 Looking in my *Messages* buffer, I see at startup:

 Debug (org-odt): Searching for OpenDocument schema files...
 Debug (org-odt): Trying
 c:/c/Emacs-modified/tmpdir/emacs-23.4/etc/org/schema/...
 Debug (org-odt): Trying c:/emacs-23.4/site-lisp/contrib/odt/etc/schema/...
 Debug (org-odt): No OpenDocument schema files installed
 Debug (org-odt): Searching for OpenDocument styles files...
 Debug (org-odt): Trying
 c:/c/Emacs-modified/tmpdir/emacs-23.4/etc/org/styles/...
 Debug (org-odt): Trying c:/emacs-23.4/site-lisp/etc/styles/...
 Debug (org-odt): Trying c:/emacs-23.4/site-lisp/org/etc/styles/...
 Debug (org-odt): Trying c:/emacs-23.4/etc/org/...
 Problems while trying to load feature `org-odt'

 So you can see that i am using Windows (Win 7 64 bit).  In fact, I am
 using Vincent Goulet's Windows installer (modified-2, FWIW), and I
 directed it to install into C:/emacs-23.4 instead of the default
 C:/Program Files (x86) directory.

 Looking in the site-lisp directories for the folders org-odt is
 searching, I don't see contrib, org, or etc directories.

 But I do see C:/emacs-23.4/etc/org/styles, which has OrgOdtStyles.xml,
 and C:/emacs-23.4/etc/schema, which doesn't obviously have any files
 to do with ODT.

 Is there a workaround or alternative installation to fix it?  It would
 be really cool to export to ODT!

 M

-- 



[O] How to build a project from org files using ant/make?

2012-03-02 Thread Robert McIntyre
Hi,

I use org-babel to produce the source and html documentation for my projects.

My projects generally look like this:

[~/tmp/org-project] $ tree
.
|-- html
|   `-- proj.html
|-- org
|   `-- proj.org
`-- src
`-- namesace
|-- prog_1.clj
`-- prog_2.clj

Here prog_1.clj, prog_2.clj, and proj.html are all generated from the
proj.org file.

Because the source and html files are generated files, I don't include
them in source control.

When I download my project on another computer, I want to be able to
generate all these files again, preferably from a makefile/build.xml,
etc.

What is the best practice for doing this?  Right now, I maintain two
shell scripts called tangle and weave that invoke emacs on the
project, but these rely on my specific emacs setup.  How can I make it
possible for someone to build my project if they have emacs and
make/ant?  What are other people doing when it comes to automatically
building a project whose source files are generated from org files?

sincerely,
--Robert McIntyre



Re: [O] org-odt: cannot find factory styles

2012-03-02 Thread Jambunathan K
Jambunathan K kjambunat...@gmail.com writes:

 But I do see C:/emacs-23.4/etc/org/styles, which has
 OrgOdtStyles.xml,

I didn't see this in your earlier message.

This is how it is on my Emacs-24.0.94. There is no styles subdir. The
XML files are directly under etc/org.

,
|   c:/Program Files/emacs-24.0.94/etc/org:
|   total used in directory 78 available 33663996
|   drwxrwxrwx  1 kjambunathan None 0 02-26 22:35 .
|   drwxrwxrwx  1 kjambunathan None 0 02-26 22:35 ..
|   -rw-rw-rw-  1 kjambunathan None 17036 02-26 22:35 OrgOdtContentTemplate.xml
|   -rw-rw-rw-  1 kjambunathan None 61383 02-26 22:35 OrgOdtStyles.xml
|   -rw-rw-rw-  1 kjambunathan None  1352 02-26 22:35 README
`




Re: [O] How to build a project from org files using ant/make?

2012-03-02 Thread Eric Schulte
Robert McIntyre r...@mit.edu writes:

 Hi,

 I use org-babel to produce the source and html documentation for my projects.

 My projects generally look like this:

 [~/tmp/org-project] $ tree
 .
 |-- html
 |   `-- proj.html
 |-- org
 |   `-- proj.org
 `-- src
 `-- namesace
 |-- prog_1.clj
 `-- prog_2.clj

 Here prog_1.clj, prog_2.clj, and proj.html are all generated from the
 proj.org file.

 Because the source and html files are generated files, I don't include
 them in source control.

 When I download my project on another computer, I want to be able to
 generate all these files again, preferably from a makefile/build.xml,
 etc.

 What is the best practice for doing this?  Right now, I maintain two
 shell scripts called tangle and weave that invoke emacs on the
 project, but these rely on my specific emacs setup.  How can I make it
 possible for someone to build my project if they have emacs and
 make/ant?  What are other people doing when it comes to automatically
 building a project whose source files are generated from org files?


I've attached the Makefile I use to build a pdf of my proposal from the
Org-mode source.  Notice the EMACS, BATCH_EMACS, and proposal.tex lines.
You should be able to adopt proposal.tex to export source code by
replacing org-export-as-latex with org-babel-tangle.  This setup has
worked very reliably for me and should extend naturally.

I use an init.el file to holds project-specific customization.  If you
can assume that the user has Emacs24 installed, then you need not do
anything special and can omit init.el entirely, otherwise you will have
to ensure that a recent version of Org-mode is installed and loaded.

Hope this helps -- Eric



Makefile
Description: Binary data


 sincerely,
 --Robert McIntyre


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


Re: [O] Selectively export RESULTS

2012-03-02 Thread cberry
cbe...@tajo.ucsd.edu writes:

inline correction below.

 Eric Schulte eric.schu...@gmx.com writes:

 Matthew Landis lan...@isciences.com writes:

  cberry at tajo.ucsd.edu writes:

 
 Eric Schulte eric.schulte at gmx.com writes:
 
  Does this do what you want?

 
  Have you looked at the :cache header argument [1], from my understanding
  of your use case it should be exactly what you are after.
 
 
 Its a step in the right direction.
 
 It seems I have to set :cache yes on every block I use before I invoke
 it. My attempt to use a buffer-wide PROPERTY setting for cache did not
 pan out. 
 

 Were these technical problems with the implementation of :cache, or
 logistical problems specific to your organization of code blocks?

 [rest deleted]

 Eric,

 your response is threaded as a reply to Matthew, but here you have
 replied to my comment about buffer wide PROPERTY setting of :cache.

 Here is an example of the difficulty I face:

 ,
 | #+property: :cache yes
 | 

Of course that should have been 


#+property: cache yes

but the result below is the same.

Chuck

 | 
 | #+name: Ablock
 | #+begin_src emacs-lisp :results value :exports both 
 |   (current-time-string)
 | #+end_src
 | 
 | #+results[2ca40f0dc0f23e5743133e229d9e8f31b31830c5]: Ablock
 | : Wed Feb 29 11:57:19 2012
 | 
 | 
 | * headline 1
 |   :PROPERTIES:
 |   :cache:   no
 |   :END:
 | 
 | #+CALL: Ablock() :exports results
 | 
 `

 When I place point under the headline and issue 

  C-c @ C-c C-e a

 I get 

 ,
 |   headline 1
 |   ==
 | 
 | Author: 
 | Date: 2012-03-02 11:28:54 PST
 | 
 | 
 | 
 | 
 | Fri Mar  2 11:28:52 2012
 | 
 `

 showing that Ablock() actually was executed.

 If the :cache setting under 'headline 1' is omitted then no update of
 the time string is performed.

 I understand that this behavior might be considered a *feature*, not a
 *bug*. 

 Either way, having an easy way to copy results into other parts of a
 document would help me out.

 Best,

 Chuck

-- 
Charles C. BerryDept of Family/Preventive Medicine
cberry at ucsd edu  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901




Re: [O] Selectively export RESULTS

2012-03-02 Thread Eric Schulte

 Eric,

 your response is threaded as a reply to Matthew, but here you have
 replied to my comment about buffer wide PROPERTY setting of :cache.

 Here is an example of the difficulty I face:

 ,
 | #+property: :cache yes
 | 
 | 
 | #+name: Ablock
 | #+begin_src emacs-lisp :results value :exports both 
 |   (current-time-string)
 | #+end_src
 | 
 | #+results[2ca40f0dc0f23e5743133e229d9e8f31b31830c5]: Ablock
 | : Wed Feb 29 11:57:19 2012
 | 
 | 
 | * headline 1
 |   :PROPERTIES:
 |   :cache:   no
 |   :END:
 | 
 | #+CALL: Ablock() :exports results
 | 
 `

 When I place point under the headline and issue 

  C-c @ C-c C-e a

 I get 

 ,
 |   headline 1
 |   ==
 | 
 | Author: 
 | Date: 2012-03-02 11:28:54 PST
 | 
 | 
 | 
 | 
 | Fri Mar  2 11:28:52 2012
 | 
 `

 showing that Ablock() actually was executed.

 If the :cache setting under 'headline 1' is omitted then no update of
 the time string is performed.

 I understand that this behavior might be considered a *feature*, not a
 *bug*. 

 Either way, having an easy way to copy results into other parts of a
 document would help me out.


Hi Chuck,

You have a simple syntax error at the top of the file.  Replace 

 | #+property: :cache yes

with

 | #+property:  cache yes
^
(delete a colon | right there)

and you will get the behavior you are seeking.

Best,


 Best,

 Chuck

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



Re: [O] Selectively export RESULTS

2012-03-02 Thread Nick Dokos
cbe...@tajo.ucsd.edu wrote:

 cbe...@tajo.ucsd.edu writes:
 
 inline correction below.
 
  Eric Schulte eric.schu...@gmx.com writes:
 
  Matthew Landis lan...@isciences.com writes:
 
   cberry at tajo.ucsd.edu writes:
 
  
  Eric Schulte eric.schulte at gmx.com writes:
  
   Does this do what you want?
 
  
   Have you looked at the :cache header argument [1], from my 
   understanding
   of your use case it should be exactly what you are after.
  
  
  Its a step in the right direction.
  
  It seems I have to set :cache yes on every block I use before I invoke
  it. My attempt to use a buffer-wide PROPERTY setting for cache did not
  pan out. 
  
 
  Were these technical problems with the implementation of :cache, or
  logistical problems specific to your organization of code blocks?
 
  [rest deleted]
 
  Eric,
 
  your response is threaded as a reply to Matthew, but here you have
  replied to my comment about buffer wide PROPERTY setting of :cache.
 
  Here is an example of the difficulty I face:
 
  ,
  | #+property: :cache yes
  | 
 
 Of course that should have been 
 
 
 #+property: cache yes
 
 but the result below is the same.
 

Did you C-c C-c on the #+property: line after changing it?
I think it works as expected.

Nick

 Chuck
 
  | 
  | #+name: Ablock
  | #+begin_src emacs-lisp :results value :exports both 
  |   (current-time-string)
  | #+end_src
  | 
  | #+results[2ca40f0dc0f23e5743133e229d9e8f31b31830c5]: Ablock
  | : Wed Feb 29 11:57:19 2012
  | 
  | 
  | * headline 1
  |   :PROPERTIES:
  |   :cache:   no
  |   :END:
  | 
  | #+CALL: Ablock() :exports results
  | 
  `
 
  When I place point under the headline and issue 
 
   C-c @ C-c C-e a
 
  I get 
 
  ,
  |   headline 1
  |   ==
  | 
  | Author: 
  | Date: 2012-03-02 11:28:54 PST
  | 
  | 
  | 
  | 
  | Fri Mar  2 11:28:52 2012
  | 
  `
 
  showing that Ablock() actually was executed.
 
  If the :cache setting under 'headline 1' is omitted then no update of
  the time string is performed.
 
  I understand that this behavior might be considered a *feature*, not a
  *bug*. 
 
  Either way, having an easy way to copy results into other parts of a
  document would help me out.
 
  Best,
 
  Chuck
 
 -- 
 Charles C. BerryDept of Family/Preventive Medicine
 cberry at ucsd eduUC San Diego
 http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901
 
 



Re: [O] Selectively export RESULTS

2012-03-02 Thread cberry
Nick Dokos nicholas.do...@hp.com writes:

 cbe...@tajo.ucsd.edu wrote:

 cbe...@tajo.ucsd.edu writes:
 
 inline correction below.
 
  Eric Schulte eric.schu...@gmx.com writes:
 
  Matthew Landis lan...@isciences.com writes:
 
   cberry at tajo.ucsd.edu writes:
 
  
  Eric Schulte eric.schulte at gmx.com writes:
  
   Does this do what you want?
 
  
   Have you looked at the :cache header argument [1], from my 
   understanding
   of your use case it should be exactly what you are after.
  
  
  Its a step in the right direction.
  
  It seems I have to set :cache yes on every block I use before I invoke
  it. My attempt to use a buffer-wide PROPERTY setting for cache did not
  pan out. 
  
 
  Were these technical problems with the implementation of :cache, or
  logistical problems specific to your organization of code blocks?
 
  [rest deleted]
 
  Eric,
 
  your response is threaded as a reply to Matthew, but here you have
  replied to my comment about buffer wide PROPERTY setting of :cache.
 
  Here is an example of the difficulty I face:
 
  ,
  | #+property: :cache yes
  | 
 
 Of course that should have been 
 
 
 #+property: cache yes
 
 but the result below is the same.
 

 Did you C-c C-c on the #+property: line after changing it?
 I think it works as expected.


You are right. It reports the cache'd value of the date.

I've been bitten by the 'no C-c C-c' after changing a #+property line so
many times, you would think I'd learn. :-(

Thanks.

Chuck

 Nick

 Chuck
 
  | 
  | #+name: Ablock
  | #+begin_src emacs-lisp :results value :exports both 
  |   (current-time-string)
  | #+end_src
  | 
  | #+results[2ca40f0dc0f23e5743133e229d9e8f31b31830c5]: Ablock
  | : Wed Feb 29 11:57:19 2012
  | 
  | 
  | * headline 1
  |   :PROPERTIES:
  |   :cache:   no
  |   :END:
  | 
  | #+CALL: Ablock() :exports results
  | 
  `
 
  When I place point under the headline and issue 
 
   C-c @ C-c C-e a
 
  I get 
 
  ,
  |   headline 1
  |   ==
  | 
  | Author: 
  | Date: 2012-03-02 11:28:54 PST
  | 
  | 
  | 
  | 
  | Fri Mar  2 11:28:52 2012
  | 
  `
 
  showing that Ablock() actually was executed.
 
  If the :cache setting under 'headline 1' is omitted then no update of
  the time string is performed.
 
  I understand that this behavior might be considered a *feature*, not a
  *bug*. 
 
  Either way, having an easy way to copy results into other parts of a
  document would help me out.
 
  Best,
 
  Chuck
 
 -- 
 Charles C. BerryDept of Family/Preventive 
 Medicine
 cberry at ucsd edu   UC San Diego
 http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901
 
 



-- 
Charles C. BerryDept of Family/Preventive Medicine
cberry at ucsd edu  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901




Re: [O] footnote doc not clear

2012-03-02 Thread Nicolas Goaziou
Hello,

Samuel Wales samolog...@gmail.com writes:

 Export of inline footnotes breaks if you do (setf org-footnote-section
 nil).  The footnote section goes in a single place but not at the end.

 *** test
 a
 * b
 b[fn::one]
 * c
 c[fn::two]
 * d
 d
 * e
 e

 The docstring says before export which implies that it will not
 affect export.  Or it seems to.

 Perhaps it should say before export and for export or something.  Or
 perhaps there should be two variables.

 And the behavior is a bug, although it isn't an important one.

 b032a6d51bbd0c8e1be4f20dd68abfe52b328e25 is the first bad commit

I have pushed a patch to fix that behaviour, although, I didn't fix the
variable doc-string. Can you confirm that it is working as expected?


Regards,

-- 
Nicolas Goaziou



Re: [O] Export anchor to latex

2012-03-02 Thread Markus Grebenstein

Dear Nick,

that is even more than enough ;-)

Thanks a lot! That solves quite a bit of preoblems for me.

I tried to put the anchor in the line of the headline itself and it 
worked in orgmode but was not exported as I expected.


Best,

Markus

Am 02.03.2012 21:23, schrieb Nick Dokos:

Markus Grebensteinp...@mgrebenstein.de  wrote:


Dear List,

I am regularly running into problems with internal links to headings,
since my document meanwhile is 200pp+ long and I tend to change
headings.

Since I loose the ability to jump to the heading, I do not like to use
the classic latex approach using \label.

I am wondering why anchors are not exported as a label. Alternatively
having an option for headings would be nice like:
* Heading [label:anchor]

Is there a possibility to tweak orgmode to export anchors?

Thanks in advance,


I may be misunderstanding what you mean, but when I try exporting to latex
the following org file:

--8---cut here---start-8---

* foo
#fooanchor

foo text

* bar
#baranchor

bar text
--8---cut here---end---8---

I get the following latex code:

,
| ...
| \section{foo}
| \label{sec-1}
| \label{fooanchor}
|
|
| foo text
| \section{bar}
| \label{sec-2}
| \label{baranchor}
|
|
| bar text
| ...
`

Isn't that enough?

Nick






[O] Include TOC in PDF export?

2012-03-02 Thread Michael Hannon
Greetings.  I'm exporting a document to both HTML and PDF.  In the HTML 
version, I get a table of contents.  In the PDF version, I do NOT get a table 
of contents.  The appended text illustrates the problem.  I'd like to get the 
TOC in both.


I'm running:

    Org-mode version 7.8.03 (release_7.8.03.324.gc4b233)

in Fedora 16, 64-bit.

What am I missing?

Thanks,

-- Mike



#+TITLE:
#+OPTIONS: num:nil ^:{} toc:t

* Tale of Two Cities

*It was the best of times, it was the worst of times*

It was the best of times, it was the worst of times, it was the age of
wisdom, it was the age of foolishness, it was the epoch of belief, it
was the epoch of incredulity, it was the season of Light, it was the
season of Darkness, it was the spring of hope, it was the winter of
despair, we had everything before us, we had nothing before us, we
were all going direct to heaven, we were all going direct the other
way - in short, the period was so far like the present period, that
some of its noisiest authorities insisted on its being received, for
good or for evil, in the superlative degree of comparison only.

* David Copperfield

*Barkis is willin*

As he repudiated this suggestion, however, with a jerk of his head,
and once more confirmed his previous request by saying, with profound
gravity, 'Barkis is willin'. That's the message,' I readily undertook
its transmission. While I was waiting for the coach in the hotel at
Yarmouth that very afternoon, I procured a sheet of paper and an
inkstand, and wrote a note to Peggotty, which ran thus: 'My dear
Peggotty. I have come here safe. Barkis is willing. My love to
mama. Yours affectionately. P.S. He says he particularly wants you to
know - BARKIS IS WILLING.'



Re: [O] Selectively export RESULTS

2012-03-02 Thread Nick Dokos
cbe...@tajo.ucsd.edu wrote:

 
 I've been bitten by the 'no C-c C-c' after changing a #+property line so
 many times, you would think I'd learn. :-(
 

Yup - I don't know why, but for some reason I can see it more easily
when others do it than when I do it: I sometimes spend *minutes*
bewildered (*how can that be?!?!*).  At some point, I get into
Terminator mode, go down the list for the appropriate response,
remember the C-c C-c problem, whack my head on my desk a few times, and
go on.  But when next time comes, it's as if it never happened before
(well, perhaps things are improving: I generally go into Terminator
mode much more quickly nowadays - a couple of times in the more distant
past, I gave up in disgust, went to bed and didn't think of C-c C-c
until the next day.)

It would be so nice if org did the org-mode-restart bit automatically
after a change to a #+KEYWORD line: in some cases (e.g. TBLFM lines) you
have direct feedback so it doesn't matter too much, but in other cases,
that feedback is just nowhere to be found. I don't know how difficult it
would be to implement such a facility[fn:1], but maybe it can be added
to the GSoC list if somebody has a bright idea on how to do it.

Nick

Footnotes:

[fn:1] ... without making it too expensive to run: I wonder how
expensive it would be running org-mode-restart from an idle timer -
probably prohibitive if the file is large enough. And I can imagine
situations where that would be even *more* confusing: changing behavior
apparently without any other change - can you say magic?



Re: [O] How to include pre-existing pdf files/pages into orgmode pdf or other export output

2012-03-02 Thread Martin Weigele
Hey Skip and Suvayu,

this is so cool. Thank you!
says Martin



Re: [O] Include TOC in PDF export?

2012-03-02 Thread Nick Dokos
Michael Hannon jm_han...@yahoo.com wrote:

 Greetings.  I'm exporting a document to both HTML and PDF.  In the
 HTML version, I get a table of contents.  In the PDF version, I do NOT
 get a table of contents.  The appended text illustrates the problem. 
 I'd like to get the TOC in both.
 

num:nil causes unnumbered sections in latex (\section*{...})  which are
not entered into the .toc file (that's a latex limitation, not an
org-mode one), so the latex exporter wants both num: and toc: to be
enabled before it produces a table of contents.

I think the only way to get a TOC is to set num:t. You can probably
rewrite a chunk of latex code so that unnumbered sections etc end up in
the .toc file, but I think it would be a fairly major undertaking.

Nick

 
 I'm running:
 
     Org-mode version 7.8.03 (release_7.8.03.324.gc4b233)
 
 in Fedora 16, 64-bit.
 
 What am I missing?
 
 Thanks,
 
 -- Mike
 
 
 
 #+TITLE:
 #+OPTIONS: num:nil ^:{} toc:t
 
 * Tale of Two Cities
 
 *It was the best of times, it was the worst of times*
 
 It was the best of times, it was the worst of times, it was the age of
 wisdom, it was the age of foolishness, it was the epoch of belief, it
 was the epoch of incredulity, it was the season of Light, it was the
 season of Darkness, it was the spring of hope, it was the winter of
 despair, we had everything before us, we had nothing before us, we
 were all going direct to heaven, we were all going direct the other
 way - in short, the period was so far like the present period, that
 some of its noisiest authorities insisted on its being received, for
 good or for evil, in the superlative degree of comparison only.
 
 * David Copperfield
 
 *Barkis is willin*
 
 As he repudiated this suggestion, however, with a jerk of his head,
 and once more confirmed his previous request by saying, with profound
 gravity, 'Barkis is willin'. That's the message,' I readily undertook
 its transmission. While I was waiting for the coach in the hotel at
 Yarmouth that very afternoon, I procured a sheet of paper and an
 inkstand, and wrote a note to Peggotty, which ran thus: 'My dear
 Peggotty. I have come here safe. Barkis is willing. My love to
 mama. Yours affectionately. P.S. He says he particularly wants you to
 know - BARKIS IS WILLING.'
 



Re: [O] Include TOC in PDF export?

2012-03-02 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 Michael Hannon jm_han...@yahoo.com wrote:
 
  Greetings.  I'm exporting a document to both HTML and PDF.  In the
  HTML version, I get a table of contents.  In the PDF version, I do NOT
  get a table of contents.  The appended text illustrates the problem. 
  I'd like to get the TOC in both.
  
 
 num:nil causes unnumbered sections in latex (\section*{...})  which are
 not entered into the .toc file (that's a latex limitation, not an
 org-mode one), so the latex exporter wants both num: and toc: to be
 enabled before it produces a table of contents.
 
 I think the only way to get a TOC is to set num:t. You can probably
 rewrite a chunk of latex code so that unnumbered sections etc end up in
 the .toc file, but I think it would be a fairly major undertaking.
 

There is a trick (I found it in the titlesec doc) that allows you
to get unnumbered sections without using the \section* forms:

--8---cut here---start-8---
#+TITLE:
#+OPTIONS: num:t ^:{} toc:5
#+LaTeX_HEADER: \setcounter{secnumdepth}{0}
--8---cut here---end---8---

Since num: is t, the latex exporter will produce a TOC and the \setcounter
will suppress section numbers. Unfortunately, that won't work with HTML
though: the sections will be numbered (unless some other trick can be found
there - maybe some CSS magic, although I wouldn't know where to start with 
that).

Nick



Re: [O] Include TOC in PDF export?

2012-03-02 Thread Michael Hannon
 From: Nick Dokos nicholas.do...@hp.com
 Greetings.  I'm exporting a document to both HTML and PDF.  In the
 HTML version, I get a table of contents.  In the PDF version, I do NOT
 get a table of contents.  The appended text illustrates the problem. 
 I'd like to get the TOC in both.


 num:nil causes unnumbered sections in latex (\section*{...})  which are
 not entered into the .toc file (that's a latex limitation, not an
 org-mode one), so the latex exporter wants both num: and toc: to be
 enabled before it produces a table of contents.

 I think the only way to get a TOC is to set num:t. You can probably
 rewrite a chunk of latex code so that unnumbered sections etc end up in
 the .toc file, but I think it would be a fairly major undertaking.

Thanks, Nick.  I think I'll learn to love the current arrangement.

-- Mike



[O] Size and placement of images in table in PDF export

2012-03-02 Thread Michael Hannon
Greetings.  I've got another export question.  If I put two small images into
an Org-mode table and export the containing document to HTML, I see the two
images displayed side-by-side in an area of the page that is at least roughly
the actual size of the concatenated images.

If I export the same document to PDF, the two images are again displayed
side-by-side, but image on the left is magnified to take up most of the
horizontal space on the page; the image on the right is also magnified and
runs off the page to the right.

I'm not sure how to provide a simple, self-contained example of this.  The
structure of the table is:

    | [[./x1.jpg]] | [[./x2.jpg]] |

The images themselves are small:

  $ identify x*.jpg
  x1.jpg JPEG 189x142 189x142+0+0 8-bit DirectClass 9.56KB 0.000u 0:00.000
  x2.jpg[1] JPEG 190x160 190x160+0+0 8-bit DirectClass 55.6KB 0.000u 0:00.000

If I just print the images from an image viewer, each of them comes out on
paper at about 2.5in (~64 mm) in width.

Is there some way to override the default size/placement of the images in PDF
export?

BTW, this is:

    Org-mode version 7.8.03 (release_7.8.03.324.gc4b233)

in Fedora 16, 64-bit.

Thanks,

-- Mike



Re: [O] Include TOC in PDF export?

2012-03-02 Thread suvayu ali
On Sat, Mar 3, 2012 at 00:44, Michael Hannon jm_han...@yahoo.com wrote:
 I think the only way to get a TOC is to set num:t. You can probably
 rewrite a chunk of latex code so that unnumbered sections etc end up in
 the .toc file, but I think it would be a fairly major undertaking.

 Thanks, Nick.  I think I'll learn to love the current arrangement.

There is a slightly hacky solution. With num:nil, you can put a line
like the following line after every heading you want to see in the
TOC.

\addcontentsline{toc}{subsection}{\nameref{subsection latex label}}

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.



[O] Agenda TODO sorting by date

2012-03-02 Thread James Harkins
Given this:

* Category 1
** TODO First todo in file 2012-03-30 Fri :Tag:
** TODO Second todo in file 2012-03-29 Thu:Tag:
* Category 2
** TODO Third todo in file 2012-03-28 Wed :Tag:
** TODO Fourth todo in file 2012-03-31 Sat:Tag:

I do C-c a  M Tag ret and get:

Headlines with TAGS match: Tag
Press `C-u r' to search again with new search string
  todo_sort:  TODO First todo in file 2012-03-30 Fri :Tag:
  todo_sort:  TODO Second todo in file 2012-03-29 Thu:Tag:
  todo_sort:  TODO Third todo in file 2012-03-28 Wed :Tag:
  todo_sort:  TODO Fourth todo in file 2012-03-31 Sat:Tag:

I want to configure a custom agenda command so that I get:

Headlines with TAGS match: Tag
Press `C-u r' to search again with new search string
  todo_sort:  TODO Third todo in file 2012-03-28 Wed :Tag:
  todo_sort:  TODO Second todo in file 2012-03-29 Thu:Tag:
  todo_sort:  TODO First todo in file 2012-03-30 Fri :Tag:
  todo_sort:  TODO Fourth todo in file 2012-03-31 Sat:Tag:

How do I do this?

James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal.  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



Re: [O] Agenda TODO sorting by date

2012-03-02 Thread Bernt Hansen
James Harkins jamshar...@gmail.com writes:

 Given this:

 * Category 1
 ** TODO First todo in file 2012-03-30 Fri   :Tag:
 ** TODO Second todo in file 2012-03-29 Thu  :Tag:
 * Category 2
 ** TODO Third todo in file 2012-03-28 Wed   :Tag:
 ** TODO Fourth todo in file 2012-03-31 Sat  :Tag:

 I do C-c a  M Tag ret and get:

 Headlines with TAGS match: Tag
 Press `C-u r' to search again with new search string
   todo_sort:  TODO First todo in file 2012-03-30 Fri 
 :Tag:
   todo_sort:  TODO Second todo in file 2012-03-29 Thu
 :Tag:
   todo_sort:  TODO Third todo in file 2012-03-28 Wed 
 :Tag:
   todo_sort:  TODO Fourth todo in file 2012-03-31 Sat
 :Tag:

 I want to configure a custom agenda command so that I get:

 Headlines with TAGS match: Tag
 Press `C-u r' to search again with new search string
   todo_sort:  TODO Third todo in file 2012-03-28 Wed 
 :Tag:
   todo_sort:  TODO Second todo in file 2012-03-29 Thu
 :Tag:
   todo_sort:  TODO First todo in file 2012-03-30 Fri 
 :Tag:
   todo_sort:  TODO Fourth todo in file 2012-03-31 Sat
 :Tag:

 How do I do this?

You could write a custom sorting function that parses out the date from
the heading and compares them.  There may be a better way to do this
that I'm not aware of for this.

Set this function up in org-agenda-cmp-user-defined and
org-agenda-sorting-strategy to get the results you want.

HTH,
Bernt




Re: [O] Size and placement of images in table in PDF export

2012-03-02 Thread Nick Dokos
Michael Hannon jm_han...@yahoo.com wrote:

 Greetings.  I've got another export question.  If I put two small images into
 an Org-mode table and export the containing document to HTML, I see the two
 images displayed side-by-side in an area of the page that is at least roughly
 the actual size of the concatenated images.
 
 If I export the same document to PDF, the two images are again displayed
 side-by-side, but image on the left is magnified to take up most of the
 horizontal space on the page; the image on the right is also magnified and
 runs off the page to the right.
 
 I'm not sure how to provide a simple, self-contained example of this.  The
 structure of the table is:
 
     | [[./x1.jpg]] | [[./x2.jpg]] |
 
 The images themselves are small:
 
   $ identify x*.jpg
   x1.jpg JPEG 189x142 189x142+0+0 8-bit DirectClass 9.56KB 0.000u 0:00.000
   x2.jpg[1] JPEG 190x160 190x160+0+0 8-bit DirectClass 55.6KB 0.000u 0:00.000
 
 If I just print the images from an image viewer, each of them comes out on
 paper at about 2.5in (~64 mm) in width.
 
 Is there some way to override the default size/placement of the images in PDF
 export?
 

The trouble is that the default option says width=.9\\linewidth so
if you try to put two of them on the same line, they end up overflowing
the page. For an image not inside a table, you could reset that with

#+ATTR_LaTeX: width=.4\\linewidth

but this is a rather blunt instrument: for images inside a table, it
applies not only to the images but also to the table (and it ends up
producing a syntactically incorrect latex program - that's probably
a bug in the latex exporter.)

The following variation does work however:

--8---cut here---start-8---
#+BIND: org-export-latex-image-default-option width=.4\\linewidth

* foo

| col1 | col2 |
|--+--|
| [[./x1.jpg]] | [[./x2.jpg]] |
|  |  |
--8---cut here---end---8---

Of course, if you try to put three images on the line, you'll have to
recalibrate the factor (you can also use absolute dimensions: width=3cm).

There is also this second variation, which uses height, rather than width: the
latex exporter thinks height is not relevant to tables, so it does not
try to give that attribute to the table, just to the images:

--8---cut here---start-8---
* foo

#+ATTR_LaTeX: height=2cm

| col1 | col2 |
|--+--|
| [[./x1.jpg]] | [[./x2.jpg]] |
|  |  |
--8---cut here---end---8---

but you can also use the BIND form too:

#+BIND: org-export-latex-image-default-option height=2cm


Note btw, that the width in the first case (and the height in the
second case) is the same for both images. AFAICT, there is no way
to give different dimensions to the two images - except for the
following variation.

The third variation allows the two images to have their natural
dimensions:

--8---cut here---start-8---
#+BIND: org-export-latex-image-default-option 

* foo

| col1 | col2 |
|--+--|
| [[./x1.jpg]] | [[./x2.jpg]] |
|  |  |
--8---cut here---end---8---

Nick




[O] Is it possible to run shell script src blocks as root or to export individual blocks?

2012-03-02 Thread Leo Alekseyev
I was wondering if there was an easy way to execute some shell
commands contained in a src block as root.  Alternatively, is there a
quick way to export _just_ that one source block to a temp file so
that I could run it as root manually?