Re: [O] exporter for latex g-brief - #+INCLUDE: escapes curlies \{

2014-03-11 Thread LanX
Thanks for the help so far! :) Unfortunately I'm stuck at this system with
the old emacs/org-mode version but I'm going to migrate in April anyway.

One more question, I'm trying to put latex code for Adress of recipient and
so on in external files to be included

unfortunately does
#+INCLUDE: "filename.tex"

automatically escape the curlies, such that I get

\Postvermerk \{E I N S C H R E I B E N\}

Whats the best way to avoid this? I couldn't find any documentation
regarding this...

cheers
  Rolf



2014-03-10 14:29 GMT+01:00 Rasmus :

> LanX,
>
> LanX  writes:
>
> > Have you tried ox-koma-letter.el?
> >>
> >>
> > not yet, I just started recently switching back to latex and g-brief did
> > what I needed for a formal german letter and I just need it once per
> month
> > so far.
>
> KOMA-Script has build in support for DIM.
>
> >> #+TITLE: title
> >>
> >> #+BEGIN_g-brief
> >> ... here comes text
> >> #+END_g-brief
> >>
> >
> > OK thanks, I take it as indication that the exporter can't be configured
> to
> > do this implicitely...
>
> Sure, you can make a derived class, use a filter or something else.
> Ox-koma-letter is an example of a derived class for letters.  There is
> also a letter exporter using groff as backend.  Note that the special
> heading keywords (see the wiki) are not compatible across the two
> exporters.
>
> > could you please be more specific?
>
> It's a new and in all dimension superior export engine.  On this list
> we'll generally assume you're using a recent version of Org.
> Currently, this implies a version ≥ 8.
>
> Hope it helps,
> Rasmus
>
> --
> This space is left intentionally blank
>
>
>


Re: [O] exporter for latex g-brief - extending \begin{document}

2014-03-05 Thread LanX
Hi Rasmus

Have you tried ox-koma-letter.el?
>
>
not yet, I just started recently switching back to latex and g-brief did
what I needed for a formal german letter and I just need it once per month
so far.


> #+TITLE: title
>
> #+BEGIN_g-brief
> ... here comes text
> #+END_g-brief
>

OK thanks, I take it as indication that the exporter can't be configured to
do this implicitely...


Yes.
>
>
could you please be more specific?

...

Oh I see...

 http://orgmode.org/worg/exporters/koma-letter-export.html
   "depends on the following org-mode version 8.0 or greater"


cheers
  Rolf


[O] exporter for latex g-brief - extending \begin{document}

2014-03-04 Thread LanX
Hi

Im using a latex class called g-brief to create formal german letters (see
e.g. http://vimpy.org/wp/archives/47) and I'm trying to add an exporter to
org-mode.

my problem is that I need to enclose the text within

\begin{document}
\begin{g-brief}

... here comes text

\end{g-brief}
\end{document}

so any customization possibilities to nest the document within
begin/end{g-brief} (before I try patching the org-mode.el)

Does it help to upgrade, my org-version is 7.7

Thanks
 Rolf


Re: [O] problem with code blocks

2011-08-07 Thread LanX
Aloha Thomas,

Thanks for the suggestion, but the problem persists!

Only replacing the "0" with an "a" helps.



--
#+LaTeX_CLASS: beamer
#+startup: beamer

* Lanx
** title

#+BEGIN_Example perl
 grep { $_ ->[a] }  # <- 0 fails
 X{1,2,3} X{1,2,3} X{1,2,3};
#+END_Example

--

type C-c C-e d  (or C-c C-e L)


Re: [O] problem with code blocks

2011-08-07 Thread LanX
Sorry forgot to mention that I tried to export it to pdf or latex!

2011/8/8 LanX 

> Hi
>
> hier a ECM which fails
>
> ---
> #+LaTeX_CLASS: beamer
> #+startup: beamer
>
> * title
>
> #+BEGIN_Example: perl
>  grep { $_ ->[0] }
>   X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example:
> ---
>
> originally I tried Begin_src but I wanted to be sure that it has not to do
> with highlighting.
>
> I get the message "if: Wrong type argument: stringp, nil"
>
> But deleting the [0] solves the problem
>
> -
> #+BEGIN_Example: perl
>  grep { $_ -> }
>   X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example:
> ---
>
> Does org try to find footnotes in code blocks?
>
> Any help appreciated!!!
>
> Cheers
>  Rolf
>


Re: [O] Beamer latex export of included partial files

2011-08-07 Thread LanX
Thanks I will try it out.

2011/8/7 Rasmus 

> LanX  writes:
>
> > Is there a recommended way to do this?
>
> From the beamer manual:
>
> ┏━━━┫ 4.3.3 Ways of Improving Compilation Speed ┃
> ┃ While working on your presentation, it may sometimes be useful to TeX
> ┃ your .tex file quickly and have the presentation contain only the most
> ┃ important information. This is especially true if you have a slow
> ┃ machine.  In this case, you can do several things to speed up the
> ┃ compilation. First, you can use the draft class option.
> ┃
> ┃ #+begin_src latex
> ┃ \documentclass[draft]{beamer}
> ┃ #+end_src
> ┃
> ┃ Causes the headlines, footlines, and sidebars to be replaced by gray
> ┃ rectangles (their sizes are still computed, though). Many other
> ┃ packages, including pgf and hyperref, also “speed up” when this option
> ┃ is given.
> ┃
> ┃ Second, you can use the following command:
> ┃ #+begin_src latex
> ┃ \includeonlyframes{⟨frame label list⟩}
> ┃ #+end_src
> ┃
> ┃ This command behaves a little bit like the \includeonly command: Only
> ┃ the frames mentioned in the list are included. All other frames are
> ┃ suppressed. Nevertheless, the section and subsection commands are still
> ┃ executed, so that you still have the correct navigation bars. By
> ┃ labeling the current frame as, say, current and then saying
> ┃ \includeonlyframes{current}, you can work on a single frame quickly.
> ┃
> ┃ The ⟨frame label list⟩ is a comma-separated list (without spaces) of the
> ┃ names of frames that have been labeled. To label a frame, you must pass
> ┃ the option label=⟨name⟩ to the \frame command or frame environment.
> ┃
> ┃ Example:
> ┃ #+begin_src latex
> ┃ \includeonlyframes{example1,example3}
> ┃ \frame[label=example1]
> ┃ {This frame will be included. }
> ┃ \frame[label=example2]
> ┃ {This frame will not be included. }
> ┃ \frame{This frame will not be included.}
> ┃ \againframe{example1} % Will be included
> ┃ #+end_latex
> ┗━━━
>
> --
> Sent from my Emacs
>
>
>


[O] problem with code blocks

2011-08-07 Thread LanX
Hi

hier a ECM which fails

---
#+LaTeX_CLASS: beamer
#+startup: beamer

* title

#+BEGIN_Example: perl
 grep { $_ ->[0] }
  X{1,2,3} X{1,2,3} X{1,2,3};
#+END_Example:
---

originally I tried Begin_src but I wanted to be sure that it has not to do
with highlighting.

I get the message "if: Wrong type argument: stringp, nil"

But deleting the [0] solves the problem

-
#+BEGIN_Example: perl
 grep { $_ -> }
  X{1,2,3} X{1,2,3} X{1,2,3};
#+END_Example:
---

Does org try to find footnotes in code blocks?

Any help appreciated!!!

Cheers
 Rolf


[O] Beamer latex export of included partial files

2011-08-07 Thread LanX
Hi

I'm working on a fairly large beamer presentation and the turn-around times
from edit till pdf-view are fairly long.

Are there any recommended ways to shorten that?

I tried to split my org-file at the top level into a master and several
others which are inserted at export-time via "#+include"

The idea is that I can work on single chapters and speed up processing time.

Unfortunately all beamer settings of the master get lost when I export one
of the lower level files.

Including the settings for each chapter from an individual file doesn't
work.

Is there a recommended way to do this?

Cheers
 Rolf


Re: [O] Tutorial for Beamer export seems to lack settings

2011-08-06 Thread LanX
seems like I found the solution, see

* Org Export Latex Listings:
...
   If you want to use this, you also need to make LaTeX use the
   listings package, and if you want to have color, the color
   package.  Just add these to `org-export-latex-packages-alist',
   for example using customize, or with something like

 (require 'org-latex)
 (add-to-list 'org-export-latex-packages-alist '("" "listings"))
 (add-to-list 'org-export-latex-packages-alist '("" "color"))

maybe this should be mentioned in the tutorial.

Actually I don't understand why this flag doesn't automatically include the
latex-package listings.

Nevermind the other problem with BEAMER_FRAME_LEVEL, it was a consequence of
trying to solve the former one.

Cheers
  Rolf

2011/8/6 LanX 

> ECM?
>
> The worg tutorial has an example using #+begin_src which should be
> translated into \begin{lstlisting} environments in latex.
>
> namely:
>
> #+begin_src octave
> A = [1 2 ; 3 4]
> b = [1; 1];
>
> x = A\b
> #+end_src
>
> But when I check the corresponding latexcode (C-c C-e L) the  necessary
> package is not imported, namely   "\usepackage{listings}"
>
> I was able to solve the other problem with BEAMER_FRAME_LEVEL  adding
> "\subsection{%s}" to Org-Export-Latex-Classes.
>
> I'm using  gnu-emacs 23.1.50.1.
>
> It seems like some auto-configurations of the latex-classes are not
> initialized.
>
> If I'm the only one experiencing this problem I will try to set up a new
> emacs instance to test it.
>
> Cheers
>   Rolf
>
> 2011/8/6 Sebastien Vauban 
>
>> Hi LanX,
>>
>> LanX wrote:
>> > maybe I'm missing something but the examples in
>> >
>> > http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html
>> >
>> > don't seem to work with a normal org-mode 7.7 installation.
>> >
>> > For instance  needed to add   \usepackage{hyperref} in
>> > Org-Export-Latex-Classes to make #+begin_src work.
>> >
>> > Are the settings of
>> >
>> http://emacs-fu.blogspot.com/2009/10/writing-presentations-with-org-mode-and.htmlnecessary
>> > to use this tutorial?
>> >
>> > Also
>> > #+BEAMER_FRAME_LEVEL: 3
>> > doesn't seem to work for me... no subsections are generated.
>>
>> Could you send us an ECM (complete, but... minimal example) that allows us
>> to
>> reproduce the above problems?
>>
>> Best regards,
>>  Seb
>>
>> --
>> Sebastien Vauban
>>
>>
>>
>


Re: [O] Tutorial for Beamer export seems to lack settings

2011-08-06 Thread LanX
ECM?

The worg tutorial has an example using #+begin_src which should be
translated into \begin{lstlisting} environments in latex.

namely:

#+begin_src octave
A = [1 2 ; 3 4]
b = [1; 1];
x = A\b
#+end_src

But when I check the corresponding latexcode (C-c C-e L) the  necessary
package is not imported, namely   "\usepackage{listings}"

I was able to solve the other problem with BEAMER_FRAME_LEVEL  adding
"\subsection{%s}" to Org-Export-Latex-Classes.

I'm using  gnu-emacs 23.1.50.1.

It seems like some auto-configurations of the latex-classes are not
initialized.

If I'm the only one experiencing this problem I will try to set up a new
emacs instance to test it.

Cheers
  Rolf
2011/8/6 Sebastien Vauban 

> Hi LanX,
>
> LanX wrote:
> > maybe I'm missing something but the examples in
> >
> > http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html
> >
> > don't seem to work with a normal org-mode 7.7 installation.
> >
> > For instance  needed to add   \usepackage{hyperref} in
> > Org-Export-Latex-Classes to make #+begin_src work.
> >
> > Are the settings of
> >
> http://emacs-fu.blogspot.com/2009/10/writing-presentations-with-org-mode-and.htmlnecessary
> > to use this tutorial?
> >
> > Also
> > #+BEAMER_FRAME_LEVEL: 3
> > doesn't seem to work for me... no subsections are generated.
>
> Could you send us an ECM (complete, but... minimal example) that allows us
> to
> reproduce the above problems?
>
> Best regards,
>  Seb
>
> --
> Sebastien Vauban
>
>
>


[O] Tutorial for Beamer export seems to lack settings

2011-08-06 Thread LanX
Hi Guys,

maybe I'm missing something but the examples in

http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html

don't seem to work with a normal org-mode 7.7 installation.

For instance  needed to add   \usepackage{hyperref} in
Org-Export-Latex-Classes to make #+begin_src work.

Are the settings of
http://emacs-fu.blogspot.com/2009/10/writing-presentations-with-org-mode-and.htmlnecessary
to use this tutorial?

Also
#+BEAMER_FRAME_LEVEL: 3
doesn't seem to work for me... no subsections are generated.

Cheers
  Rolf


Re: [Orgmode] hyperlinks executing multiline code snippets?

2010-12-10 Thread LanX
>
>
> Before I start trying it, is it theoretically possible to write an on
> ob-multiline.el which parses the following lines?
>
> I.e. is the current "point" known at execution time?
>
>
it works.


I managed to create a new lisp defun which parses the following text,
extracts the code and executes it!

perfect! =)
___
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


Re: [Orgmode] hyperlinks executing multiline code snippets?

2010-12-10 Thread LanX
Hi Eric

thanks, after some fiddling I was able to make it work...

But do I get it right?

The snippet has to be explicitely named, I can't tell the hyperlink just to
take the next block?

Before I start trying it, is it theoretically possible to write an on
ob-multiline.el which parses the following lines?

I.e. is the current "point" known at execution time?

Out of curiosity, the manual says

> The org-babel-load-languages controls which languages are enabled for
evaluation (by default only emacs-lisp is enabled).

Is it done out of security reasons? Cause it wouldn't be a problem to start
a  process via elisp and (shell-command ...)

Next question:

shell-command normally prints the stdout into the minibuffer, but
org-hyperlink executions overwrite it with the return code.

Is this behaviour configurable?

Thanks for the help
  Rolf

PS: ob-perl.el says
-
(defun org-babel-perl-initiate-session (&optional session params)
  "Return nil because sessions are not supported by perl"
nil)
--
What is meant with supporting sessions? IIRC do packages like sepia.el fork
a perl process allowing bidirectional communication with emacs.

Or what kind of extra support is neccessary here?
___
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


[Orgmode] hyperlinks executing multiline code snippets?

2010-12-10 Thread LanX
Hi

Don't know if this is trivially answered...

I'm thinking about using org-mode for a collection of code-snippets which
are executed by a click on a link

My first idea was to use orgs hyperlink syntax but there I have two problems
1. something like [[shell:code][NAME]] can't be multiline
2. for  perl  code I'll need to escape certain characters when using
[[shell:...] or [[elisp:...]

my second idea was org-babel, but AFAI see
1. it seems to execute code-snippets only when exporting
2. the code can't be hidden behind a NAME in a link text

Is there a way to combine both ways?

A hyperlink which executes a codesnippet (which is per default folded away)?

something like?

* [[exec:following snippet][name]
#+begin_src perl
for $i (1..9){
   print $i;
}
#+end_src


or


* Title
#+begin_src perl :hyperlink name
for $i (1..9){
   print $i;
}
#+end_src



Thanks for any help

-- rolf
___
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


[Orgmode] hyperlinks executing multiline code snippets?

2010-12-10 Thread LanX
(hope this will not produce a duplicate post)

Hi
>
> Don't know if this is trivially answered...
>
> I'm thinking about using org-mode for a collection of code-snippets which
> are executed by a click on a link
>
> My first idea was to use orgs hyperlink syntax but there I have two
> problems
> 1. something like [[shell:code][NAME]] can't be multiline
> 2. for  perl  code I'll need to escape certain characters when using
> [[shell:...] or [[elisp:...]
>
> my second idea was org-babel, but AFAI see
> 1. it seems to execute code-snippets only when exporting
> 2. the code can't be hidden behind a NAME in a link text
>
> Is there a way to combine both ways?
>
> A hyperlink which executes a codesnippet (which is per default folded
> away)?
>
> something like?
>
> * [[exec:following snippet][name]
> #+begin_src perl
> for $i (1..9){
>
>print $i;
> }
> #+end_src
>
>
> or
>
>
> * Title
> #+begin_src perl :hyperlink name
> for $i (1..9){
>
>print $i;
> }
> #+end_src
>
>
>
> Thanks for any help
>
> -- rolf
>
___
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


Re: [Orgmode] hyperlinks executing multiline code snippets?

2010-12-10 Thread LanX
ARGH ..


... just realised that I still need to run the makefile for installation.

Sorry! :)

2010/12/10 LanX 

> Hi Eric
>
> Thanks looks promising but I'm having problems to use it.
>
> I noticed that babel is not a part of 6.30trans and did an upgrade to the
> latest current version 7.4.
>
___
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


Re: [Orgmode] hyperlinks executing multiline code snippets?

2010-12-10 Thread LanX
Hi Eric

Thanks looks promising but I'm having problems to use it.

I noticed that babel is not a part of 6.30trans and did an upgrade to the
latest current version 7.4.

Unfortunately it's causing problems (all I did was updating a sym-link to
the new package)

Am I supposed to set additional PATHs?

bye
--Rolf

emacs-23.1.50 --no-site-file --debug-init emacs/tst.org


Debugger entered--Lisp error: (file-error "Cannot open load file"
"org-entities")
  require(org-entities)
  eval-buffer(#> nil
"/home/lanx/.emacs.d/elisp/org/org-mode/lisp/org.el" nil t)  ; Reading at
buffer position 3964

load-with-code-conversion("/home/lanx/.emacs.d/elisp/org/org-mode/lisp/org.el"
"/home/lanx/.emacs.d/elisp/org/org-mode/lisp/org.el" nil nil)
  load("/home/lanx/.emacs.d/elisp/org/org-mode/lisp/org.el")
...
---


emacs22 --no-site-file --debug-init emacs/tst.org


Debugger entered--Lisp error: (file-error "Cannot open load file"
"org-macs")
  require(org-macs)
  eval-buffer(#> nil
"/home/lanx/.emacs.d/elisp/org/org-mode/lisp/org.el" nil t)  ; Reading at
buffer position 3940
...






2010/12/10 Eric Schulte 

> Hi LanX,
>
> The following two options come to mind, although I'm not sure if any are
> exactly what you're after.
>
> * named code block and a #+call: line
> #+source: counter
> #+begin_src perl :results output :var to=5
> for $i (1..$to){
>   print $i;
> }
> #+end_src
>
> #+results: counter
> : 12345
>
> #+call: counter(to=3)
>
> #+results: counter(to=3)
> : 123
>
> C-c C-c on the call line to execute the counter block, the block does
> not need to be located near the call line, and using the Library of
> Babel could even be located in another file.
>
> * using an elisp link
> [[elisp:(sbe counter (to "8"))][count to 8]]
>
> Clicking on the link above will also call the code block.
>
> Best -- Eric
>
> LanX  writes:
>
> >>
> >> Hi
> >>
> >> Don't know if this is trivially answered...
> >>
> >> I'm thinking about using org-mode for a collection of code-snippets
> which
> >> are executed by a click on a link
> >>
> >> My first idea was to use orgs hyperlink syntax but there I have two
> >> problems
> >> 1. something like [[shell:code][NAME]] can't be multiline
> >> 2. for  perl  code I'll need to escape certain characters when using
> >> [[shell:...] or [[elisp:...]
> >>
> >> my second idea was org-babel, but AFAI see
> >> 1. it seems to execute code-snippets only when exporting
> >> 2. the code can't be hidden behind a NAME in a link text
> >>
> >> Is there a way to combine both ways?
> >>
> >> A hyperlink which executes a codesnippet (which is per default folded
> >> away)?
> >>
> >> something like?
> >>
> >> * [[exec:following snippet][name]
> >> #+begin_src perl
> >> for $i (1..9){
> >>
> >>print $i;
> >> }
> >> #+end_src
> >>
> >>
> >> or
> >>
> >>
> >> * Title
> >> #+begin_src perl :hyperlink name
> >> for $i (1..9){
> >>
> >>print $i;
> >> }
> >> #+end_src
> >>
> >>
> >>
> >> Thanks for any help
> >>
> >> -- rolf
> >>
> >
> > PS hope this will not produce a duplicate post, "gmail" != "googlemail"
> > confusion
> > ___
> > 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
>
___
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


[Orgmode] hyperlinks executing multiline code snippets?

2010-12-10 Thread LanX
>
> Hi
>
> Don't know if this is trivially answered...
>
> I'm thinking about using org-mode for a collection of code-snippets which
> are executed by a click on a link
>
> My first idea was to use orgs hyperlink syntax but there I have two
> problems
> 1. something like [[shell:code][NAME]] can't be multiline
> 2. for  perl  code I'll need to escape certain characters when using
> [[shell:...] or [[elisp:...]
>
> my second idea was org-babel, but AFAI see
> 1. it seems to execute code-snippets only when exporting
> 2. the code can't be hidden behind a NAME in a link text
>
> Is there a way to combine both ways?
>
> A hyperlink which executes a codesnippet (which is per default folded
> away)?
>
> something like?
>
> * [[exec:following snippet][name]
> #+begin_src perl
> for $i (1..9){
>
>print $i;
> }
> #+end_src
>
>
> or
>
>
> * Title
> #+begin_src perl :hyperlink name
> for $i (1..9){
>
>print $i;
> }
> #+end_src
>
>
>
> Thanks for any help
>
> -- rolf
>

PS hope this will not produce a duplicate post, "gmail" != "googlemail"
confusion
___
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


[Orgmode] Re: SOLVED False footnotes in Perlcode for Beamerslides

2010-09-03 Thread LanX
> Especially, is there a simple way to setup begin_src

Found it myself by grepping thru the el files:

Just needed to customize org-export-latex-listings to non-nil!

Thx 8)

PS: Awesome peace of software! :)

2010/9/3 LanX 

> Hi Folks
>
> I'm trying to produce a beamer presentation including perl source code.
>
> I'm using the patter from
>
> http://emacs-fu.blogspot.com/2009/10/writing-presentations-with-org-mode-and.html
> to get some Syntax highlighting.
>
> My problem is that org-mode parses $_[0] as footnotes!
>
> Switching to
> #+begin_src perl
> solves the problem but without syntax highlighting.
>
> Any help appreciated! (my talk is tomorrow :)
>
> Especially, is there a simple way to setup begin_src such that it uses
> \begin{lstlisting}[language=Perl]
> instead of
> \begin{verbatim}
> ?
>
> Bye
>  rolf
>
> #+LaTeX_CLASS: beamer
> #+MACRO:  beamermode presentation
> #+MACRO:  beamertheme Singapore
> #+MACRO:  beamercolortheme lily
> #+MACRO:  beamersubject RMRF
>
>
> * test2
> #+begin_src perl
> sub swap {
>   ($_[0],$_[1]) = ($_[1],$_[0])
> };
> ($a,$b)=(1,2);
> swap($a,$b);
> print $a,$b; # 21
>
> sub swap { @_[0,1] = @_[1,0] }; #elegantere Alternative
> #+end_src perl
>
> * Test1
> #+begin_LaTeX
> \begin{lstlisting}[language=Perl]
> sub swap {
>   ($_[0],$_[1]) = ($_[1],$_[0])
> };
> ($a,$b)=(1,2);
> swap($a,$b);
> print $a,$b; # 21
>
> sub swap { @_[0,1] = @_[1,0] }; #elegantere Alternative
> \end{lstlisting}
>
___
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


[Orgmode] False footnotes in Perlcode for Beamerslides

2010-09-03 Thread LanX
Hi Folks

I'm trying to produce a beamer presentation including perl source code.

I'm using the patter from
http://emacs-fu.blogspot.com/2009/10/writing-presentations-with-org-mode-and.html
to get some Syntax highlighting.

My problem is that org-mode parses $_[0] as footnotes!

Switching to
#+begin_src perl
solves the problem but without syntax highlighting.

Any help appreciated! (my talk is tomorrow :)

Especially, is there a simple way to setup begin_src such that it uses
\begin{lstlisting}[language=Perl]
instead of
\begin{verbatim}
?

Bye
 rolf

#+LaTeX_CLASS: beamer
#+MACRO:  beamermode presentation
#+MACRO:  beamertheme Singapore
#+MACRO:  beamercolortheme lily
#+MACRO:  beamersubject RMRF


* test2
#+begin_src perl
sub swap {
  ($_[0],$_[1]) = ($_[1],$_[0])
};
($a,$b)=(1,2);
swap($a,$b);
print $a,$b; # 21

sub swap { @_[0,1] = @_[1,0] }; #elegantere Alternative
#+end_src perl

* Test1
#+begin_LaTeX
\begin{lstlisting}[language=Perl]
sub swap {
  ($_[0],$_[1]) = ($_[1],$_[0])
};
($a,$b)=(1,2);
swap($a,$b);
print $a,$b; # 21

sub swap { @_[0,1] = @_[1,0] }; #elegantere Alternative
\end{lstlisting}
___
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


Re: [Orgmode] linking to emacs info nodes? Multiline comments?

2010-04-20 Thread LanX
Thanx, linking works! :)

Anyway this Link-To-Info syntax doesn't seem to be documented on the web
page...

http://orgmode.org/manual/External-links.html#External-links


> I don't understand the context (why do you have to define a variable
exactly?),
> but you can include double quotes in a lisp string by escaping it with a
backslash:

I was trying to embed org-mode (and other) syntax in lisp-code.

cheers
  Rolf
___
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


[Orgmode] linking to emacs info nodes? Multiline comments?

2010-04-19 Thread LanX
Hi

is there an easy way to insert links to the emacs info manuals?

the following works for commands only

[[elisp:(Info-goto-emacs-command-node "Info-goto-emacs-command-node")][Info
goto emacs command node]]

BTW: whats the recommended way to insert multi-line comments in elisp code?

ATM I'm assigning a string to a dummy variable, with the drawback that
doublequotes are forbidden:

(setq org "
  yadda yadda
")

Thanks for any help :)
  Rolf
___
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


Re: [Orgmode] Embedding org-syntax in program source

2010-04-14 Thread LanX
Hi Dan


>
> Right. Given the present forum I presume you are using emacs, so that
> shouldn't be a problem per se?
>

Well, don't you think that telling other people that changing the
_source_-code requires emacs might be a problem?


>
> I think you may have formed an inaccurate idea of how people are working
> with source code in org-mode.
>
> maybe... and I have to admit my knowledge of LP is theoretical (but at
least I investigated  the sources of TeX long ago! :)

my idea for the beginning was to extend my codes with org-modes folding,
linking and some TODO features in perl comments. Maybe automatically
switching the mode when the cursor is entering/leaving comments.

Multiline wouldn't be a problem since I can include them in POD (perl's
simplified approach to LP)

or I could embrace them in heredocs, for instance the following is legal
perlcode as long as the last line is empty (no whitespaces allowed).

<<;
* block1
** [test] bla


> And relying on an extra step for code generation is dangerous...
>
> You would have to explain that assertion.


Sorry, no offence intended, this is the common sense of perlmonks when
talking about run time code generation and adding extra dependencies. (Maybe
not the appropriate slang here...)

I wouldn't find many to join my projects when relying on extra make files
and I suppose running emacs in batch mode to tangle the code is not that
stable.

> This is for sure acceptable with elisp or multilanguage projects.

I didn't understand this.
>

emacs is a natural habitat of elisp , like unix is one for C.

And multilanguage projects would naturally rely on some make mechanisms.




> > PS: I forgot to mention that when switching to other modes the
> highlighting
> > will also get confused and fly-make will report plenty of syntax
> problems.
>
> I'm not sure what you mean here. When working with code in org-mode, one
> uses C-c ' to switch to a language major-mode buffer containing the body
> of the source code block. Is that working OK for you?
>

hm, yes ...but if I do this I could equally embrace all org-mode-stuff in
between "=pod"-lines or prepend a # to each line when switching to
cperl-mode.

Hooking this to save would guaranty to always have legal perlcode...

bye
  Rolf
___
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


[Orgmode] Embedding org-syntax in program source

2010-04-13 Thread LanX
Oops, forgot to reply to the list... 8-| ..

-- Forwarded message --

Thanks Eric,


see this thread http://thread.gmane.org/gmane.emacs.orgmode/7957, as I
> recall basically it's possible to get most org-like behavior using
> orgstruct-mode, but many are continually frustrated by the remaining
> missing 20% of behavior.
>

Hmm, for what I read it's NOT easily possible, Tassilo switched back to
outline-minor-mode.



>
> > I know of org-babel, but the code produced is no legal Lisp/Perl code
> > anymore...
>
> could you please elaborate,
> ...
>
> I'm currently using Org-babel to write code in a variety of programming
> languages, and I've had no problems running the tangled code.
>

Thats the point you have to tangle the code and furthermore you have to run
emacs to tangle it.

The file as such is not a legal Perl code anymore because of lines starting
with a "*".
(never actually worked with babel, but thats what I read from the docs)

And relying on an extra step for code generation is dangerous...

This is for sure acceptable with elisp or multilanguage projects.

Anyway I think, I will do some experiments with using a Code Filter in Perl
which eliminates the org-code. (thats a filter run at execution-time
changing the source before it's fed into the compiler)

Cheers
  Rolf

PS: I forgot to mention that when switching to other modes the highlighting
will also get confused and fly-make will report plenty of syntax problems.
___
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


[Orgmode] Embedding org-syntax in program source

2010-04-13 Thread LanX
Hi

is there a way to make org-mode ignore "comment" characters at the beginning
of a line?

Such that
;* Head

or
#** Subhead

work in elisp or perl?

I know of org-babel, but the code produced is no legal Lisp/Perl code
anymore...

Thanks
  Rolf
___
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