emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting #+lob
@ 2010-10-17  5:59 Thomas S. Dye
  2010-10-17 18:22 ` Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2010-10-17  5:59 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

Aloha all,

This bit of an Org-mode buffer:

#+begin_example
#+lob: elispgantt(table=gantttesttable) :results output latex
#+end_example

is exported to LaTeX like this:

\begin{lstlisting}
: elispgantt(table=gantttesttable)
\end{lstlisting}

How can I get the header arguments (:results output latex) into the  
LaTeX output?

All the best,
Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting #+lob
  2010-10-17  5:59 Exporting #+lob Thomas S. Dye
@ 2010-10-17 18:22 ` Eric Schulte
  2010-10-17 19:34   ` Thomas S. Dye
  2010-10-17 19:45   ` Thomas S. Dye
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Schulte @ 2010-10-17 18:22 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode Mailinglist

This looks like a bug, the export of lob lines needs to be better about
recognizing if it is inside of a protected environment.  Thanks for
pointing this out.

In the mean time the following syntax should work...
: #+lob: elispgantt(table=gantttesttable) :results output latex

Best -- Eric

BTW: Do you still intend to add the elispgantt code to the library of
     babel distributed with Org-mode?  If so I'm happy to handle the
     commit if you send me the code or a patch.

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Aloha all,
>
> This bit of an Org-mode buffer:
>
> #+begin_example
> #+lob: elispgantt(table=gantttesttable) :results output latex
> #+end_example
>
> is exported to LaTeX like this:
>
> \begin{lstlisting}
> : elispgantt(table=gantttesttable)
> \end{lstlisting}
>
> How can I get the header arguments (:results output latex) into the
> LaTeX output?
>
> All the best,
> Tom
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting #+lob
  2010-10-17 18:22 ` Eric Schulte
@ 2010-10-17 19:34   ` Thomas S. Dye
  2010-10-17 19:45   ` Thomas S. Dye
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2010-10-17 19:34 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode Mailinglist

Hi Eric,

I'm not sure it's a bug.  It works on Eric Fraga's installation.   
Perhaps I have something set up incorrectly.

The following approach works on my installation, so I haven't taken  
the time to chase down the problem I'm having with exporting # 
+begin_example ... #+end_example.

#+begin_src org :exports code
,#+lob: elispgantt(table=gantttesttable) :results output latex
#+end_src

Let me know if you want me to investigate further.

Thanks for your help,
Tom

On Oct 17, 2010, at 8:22 AM, Eric Schulte wrote:

> This looks like a bug, the export of lob lines needs to be better  
> about
> recognizing if it is inside of a protected environment.  Thanks for
> pointing this out.
>
> In the mean time the following syntax should work...
> : #+lob: elispgantt(table=gantttesttable) :results output latex
>
> Best -- Eric
>
> BTW: Do you still intend to add the elispgantt code to the library of
>     babel distributed with Org-mode?  If so I'm happy to handle the
>     commit if you send me the code or a patch.
>
> "Thomas S. Dye" <tsd@tsdye.com> writes:
>
>> Aloha all,
>>
>> This bit of an Org-mode buffer:
>>
>> #+begin_example
>> #+lob: elispgantt(table=gantttesttable) :results output latex
>> #+end_example
>>
>> is exported to LaTeX like this:
>>
>> \begin{lstlisting}
>> : elispgantt(table=gantttesttable)
>> \end{lstlisting}
>>
>> How can I get the header arguments (:results output latex) into the
>> LaTeX output?
>>
>> All the best,
>> Tom
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting #+lob
  2010-10-17 18:22 ` Eric Schulte
  2010-10-17 19:34   ` Thomas S. Dye
@ 2010-10-17 19:45   ` Thomas S. Dye
  2010-10-17 21:25     ` Eric Schulte
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2010-10-17 19:45 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode Mailinglist


[-- Attachment #1.1: Type: text/plain, Size: 1310 bytes --]

Hi Eric,

Thanks for asking about the Library of Babel.  I'm still figuring out  
the best way to use it and welcome your advice.

Here is the approach I've drafted.  Do you think this is a reasonable  
way to go?

> The GANTT Emacs lisp code can either be placed in the buffer with the
> GANTT chart table or it can be installed in the [[http://orgmode.org/manual/Library-of-Babel.html#Library-of-Babel 
> ][Library of Babel]].
> Installing local code in the Library of Babel is best accomplished by
> establishing one or more Org-mode files for this purpose and keeping
> them in a place that won't be overwritten when Org-mode is updated.
> For each of these local files, place a line like the following in
> =.emacs= to make the source code blocks accessible to the Library:
>
> #+source: load-local-lob
> #+begin_src emacs-lisp :exports code
>   (org-babel-lob-ingest "~/org/local-lob.org")
> #+end_src

If this is off the mark, and the code should go in the main Library,  
then I'd want to check with Eric F. first about the changes I made.

All the best,
Tom

On Oct 17, 2010, at 8:22 AM, Eric Schulte wrote:

> BTW: Do you still intend to add the elispgantt code to the library of
>     babel distributed with Org-mode?  If so I'm happy to handle the
>     commit if you send me the code or a patch.


[-- Attachment #1.2: Type: text/html, Size: 2652 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting #+lob
  2010-10-17 19:45   ` Thomas S. Dye
@ 2010-10-17 21:25     ` Eric Schulte
  2010-10-17 22:17       ` Thomas S. Dye
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2010-10-17 21:25 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode Mailinglist

Hi Tom,

I think this code should live in the main library-of-babel.org file.  I
don't see any reason why it would be overwritten in that file, and that
way it will be available by default for anyone who already loads the
library of babel.

Best -- Eric

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Hi Eric,
>
> Thanks for asking about the Library of Babel.  I'm still figuring out
> the best way to use it and welcome your advice.
>
> Here is the approach I've drafted.  Do you think this is a reasonable
> way to go?
>
>> The GANTT Emacs lisp code can either be placed in the buffer with the
>> GANTT chart table or it can be installed in the
>> [[http://orgmode.org/manual/Library-of-Babel.html#Library-of-Babel
>> ][Library of Babel]].
>> Installing local code in the Library of Babel is best accomplished by
>> establishing one or more Org-mode files for this purpose and keeping
>> them in a place that won't be overwritten when Org-mode is updated.
>> For each of these local files, place a line like the following in
>> =.emacs= to make the source code blocks accessible to the Library:
>>
>> #+source: load-local-lob
>> #+begin_src emacs-lisp :exports code
>>   (org-babel-lob-ingest "~/org/local-lob.org")
>> #+end_src
>
> If this is off the mark, and the code should go in the main Library,
> then I'd want to check with Eric F. first about the changes I made.
>
> All the best,
> Tom
>
> On Oct 17, 2010, at 8:22 AM, Eric Schulte wrote:
>
>> BTW: Do you still intend to add the elispgantt code to the library of
>>     babel distributed with Org-mode?  If so I'm happy to handle the
>>     commit if you send me the code or a patch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Exporting #+lob
  2010-10-17 21:25     ` Eric Schulte
@ 2010-10-17 22:17       ` Thomas S. Dye
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2010-10-17 22:17 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode Mailinglist


[-- Attachment #1.1: Type: text/plain, Size: 2962 bytes --]

Aloha Eric Fraga,

Is it OK with you to put a modified version of the emacs-lisp code for  
LaTeX GANTT charts in the Library of Babel?  I agree with Eric S. (see  
below) that this would be the best location for it in the context of  
org-article.cls.

You can see my version of your code here:

http://orgmode.org/worg/org-contrib/babel/examples/article-class.php#sec-3_4_5_1

My changes to your code were minor.

1) I've taken off the header arguments.   AFAICT, header arguments in  
the Library of Babel aren't used as the defaults when the function is  
called, so there is no reason to have them there in this context.

2) I've taken out the code that generates #+begin_latex and # 
+end_latex.  This makes it possible to use the function in the Org- 
mode buffer:

#+lob: elispgantt(table=gantttesttable) :results output latex

and also within a LaTeX source code block:

#+lob: elispgantt(table=gantttesttable) :results output raw

Thanks very much for the useful code, BTW.  We're writing an annotated  
bibliography of Hawaiian history at work and I'm pretty sure we can  
use a GANTT chart to show a timeline of historians over the last  
century and a half.

All the best,
Tom

On Oct 17, 2010, at 11:25 AM, Eric Schulte wrote:

> Hi Tom,
>
> I think this code should live in the main library-of-babel.org  
> file.  I
> don't see any reason why it would be overwritten in that file, and  
> that
> way it will be available by default for anyone who already loads the
> library of babel.
>
> Best -- Eric
>
> "Thomas S. Dye" <tsd@tsdye.com> writes:
>
>> Hi Eric,
>>
>> Thanks for asking about the Library of Babel.  I'm still figuring out
>> the best way to use it and welcome your advice.
>>
>> Here is the approach I've drafted.  Do you think this is a reasonable
>> way to go?
>>
>>> The GANTT Emacs lisp code can either be placed in the buffer with  
>>> the
>>> GANTT chart table or it can be installed in the
>>> [[http://orgmode.org/manual/Library-of-Babel.html#Library-of-Babel
>>> ][Library of Babel]].
>>> Installing local code in the Library of Babel is best accomplished  
>>> by
>>> establishing one or more Org-mode files for this purpose and keeping
>>> them in a place that won't be overwritten when Org-mode is updated.
>>> For each of these local files, place a line like the following in
>>> =.emacs= to make the source code blocks accessible to the Library:
>>>
>>> #+source: load-local-lob
>>> #+begin_src emacs-lisp :exports code
>>>  (org-babel-lob-ingest "~/org/local-lob.org")
>>> #+end_src
>>
>> If this is off the mark, and the code should go in the main Library,
>> then I'd want to check with Eric F. first about the changes I made.
>>
>> All the best,
>> Tom
>>
>> On Oct 17, 2010, at 8:22 AM, Eric Schulte wrote:
>>
>>> BTW: Do you still intend to add the elispgantt code to the library  
>>> of
>>>    babel distributed with Org-mode?  If so I'm happy to handle the
>>>    commit if you send me the code or a patch.


[-- Attachment #1.2: Type: text/html, Size: 5888 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-17 22:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17  5:59 Exporting #+lob Thomas S. Dye
2010-10-17 18:22 ` Eric Schulte
2010-10-17 19:34   ` Thomas S. Dye
2010-10-17 19:45   ` Thomas S. Dye
2010-10-17 21:25     ` Eric Schulte
2010-10-17 22:17       ` Thomas S. Dye

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).