Re: [O] [org-e-latex] Coding System

2012-11-22 Thread Thomas S. Dye
Achim Gratz  writes:

> Thomas S. Dye writes:
>> I don't follow the details of this discussion, but I wonder how
>> important AUTO really is?
>
> I'm afraid I can't follow you…
>
> AFAIK, specifying "AUTO" in the LaTeX header is supposed to be replaced
> by whatever the coding system of the LaTeX buffer happens to be when it
> gets saved.  (I've never used it, so it might work differently.)

Yes, I believe the encoding is picked up from the Org buffer, but I
might be wrong.

>
>> It seems to me that a sweet setup uses utf-8 in the buffer but exports
>> latin-1 to LaTeX through use of entities and filters (with the new
>> exporter).  This can yield a buffer display that isn't complicated by
>> all the LaTeX machinery, and export something that is maximally
>> compatible in the LaTeX world.  It is nice on the eyes and avoids
>> encoding incompatibilities on the back-end.
>
> That is not what I was talking about, however useful it might be.  I
> have already defined the input encoding "utf8" in my LaTeX header and
> want to ensure that the buffer gets saved in that format.  As an
> extension, if I specify any other encoding for LaTeX, the buffer should
> be saved in a matching encoding, independently of the encoding that the
> org buffer had.  If that's a "downgrade", i.e. not all characters are
> encodable in that new system, then what you describe above might become
> necessary.

Yes, that sounds useful.  Thanks for the clarification.

All the best,
Tom

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



Re: [O] [org-e-latex] Coding System

2012-11-22 Thread Achim Gratz
Thomas S. Dye writes:
> I don't follow the details of this discussion, but I wonder how
> important AUTO really is?

I'm afraid I can't follow you…

AFAIK, specifying "AUTO" in the LaTeX header is supposed to be replaced
by whatever the coding system of the LaTeX buffer happens to be when it
gets saved.  (I've never used it, so it might work differently.)

> It seems to me that a sweet setup uses utf-8 in the buffer but exports
> latin-1 to LaTeX through use of entities and filters (with the new
> exporter).  This can yield a buffer display that isn't complicated by
> all the LaTeX machinery, and export something that is maximally
> compatible in the LaTeX world.  It is nice on the eyes and avoids
> encoding incompatibilities on the back-end.

That is not what I was talking about, however useful it might be.  I
have already defined the input encoding "utf8" in my LaTeX header and
want to ensure that the buffer gets saved in that format.  As an
extension, if I specify any other encoding for LaTeX, the buffer should
be saved in a matching encoding, independently of the encoding that the
org buffer had.  If that's a "downgrade", i.e. not all characters are
encodable in that new system, then what you describe above might become
necessary.


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

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] Babel shell error

2012-11-22 Thread Eric Schulte
Russell Adams  writes:

> It appears that in ob-sh.el function org-babel-sh-evaluate fails to
> honor other result types like latex.
>
> Adding latex to the result params test allows proper exporting of
> shell which results in latex code, otherwise it is imported with
> spaces separated into |'s to make a table.
>
> Verified against 7.9.2 repo.
>

This works in the current git head.

#+begin_src sh :results latex
  echo "\tt{shell}"
#+end_src

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



Re: [O] "Generic" Source block language specification?

2012-11-22 Thread Eric Schulte
Rainer M Krug  writes:

> Hi
>
> I have in a document a definition of a projection, which is essentially a 
> text as follow:
>
> #+BEGIN_src
>   +proj=aea +lat_1=-28.25
>   +lat_2=-29.75
>   +lat_0=29
>   +lon_0=30.75
>   +x_0=0
>   +y_0=0
>   +datum=WGS84
>   +units=m
>   +no_defs
> #+END_src
>
> Now this does obviously not export, as the source block language is missing. 
> Is there a way that I
> can get the same formating of the source in the exportes output but without 
> the syntax highlighting?
>
> BEGIN_EXAMPLE
> END_EXAMPLE
>
> is similar, but I would like the block to be formated as the SRC blocks.
>

I bet "fundamental" would work, e.g.,

#+begin_src fundamental
  +proj=aea +lat_1=-28.25
  +lat_2=-29.75
  +lat_0=29
  +lon_0=30.75
  +x_0=0
  +y_0=0
  +datum=WGS84
  +units=m
  +no_defs
#+end_src

>
> Thanks,
>
> Rainer

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



Re: [O] [ANN] e-latex back-end: changes to attributes syntax

2012-11-22 Thread Thomas S. Dye
Aloha Nicolas,

Nicolas Goaziou  writes:

> Hello,
>
> I've changed the attribute syntax for tables, images and lists in
> e-latex back-end (new exporter). New this back-end conforms to the
> syntax used by Babel and every other back-end.
>
> I've also added support for matrix editing.
>
> Here's an excerpt from the documentation in org-e-latex.el:
>
> Table export can be controlled with a number of attributes (through
> ATTR_LATEX keyword).
> 
> - The main one is the `:mode' attribute, which can be set to
>   `table', `math', `inline-math' and `verbatim'.  In particular,
>   when in `math' or `inline-math' mode, every cell is exported
>   as-is and the table will be wrapped in a math environment.  Also,
>   horizontal rules are ignored.  These modes are particularly
>   useful to write matrices.  Default mode is stored in
>   `org-e-latex-default-table-mode'.
> 
> - The second most important attribute is `:environment'.  It is the
>   environment used for the table and defaults to
>   `org-e-latex-default-table-environment' value.  It can be set to
>   anything, including "tabularx", "longtable", "array",
>   "bmatrix"...
> 
> - `:float' attribute defines a float environment for the table.
>   Possible values are `sidewaystable', `multicolumn' and `table'.
> 
> - `:width' and `:align' attributes set, respectively, the width of
>   the table and its alignment string.
> 
> - `:booktabs', `:center' and `:rmlines' values are booleans.  They
>   toggle, respectively "booktabs" usage (assuming the package is
>   properly loaded), table centering and removal of every horizontal
>   rule but the first one (in a "table.el" table only).
> 
> - `:math-prefix', `:math-suffix' and `:math-arguments' are string
>   which will be inserted, respectively, before the table within the
>   math environment, after the table within the math environment,
>   and between the macro name and the contents of the table.  The
>   latter attribute is necessary to matrix macros that require more
>   than one argument (i.e. "qbordermatrix").
> 
> Plain lists accept two optional attributes: `:environment' and
> `:options'.  The first one allows to use a non-standard environment
> (i.e. "inparaenum").  The second one allows to specify optional
> arguments for that environment (square brackets are not mandatory).
> 
> Images accept `:float', `:placement' and `:options' as attributes.
> `:float' accepts a symbol among `wrap', `multicolumn', and
> `figure', which defines the float environment for the table (if
> unspecified, an image with a caption will be set in a "figure"
> environment).  `:placement' is a string that will be used as
> argument for the environment chosen.  `:options' is a string that
> will be used as the optional argument for "includegraphics" macro.
>
> Here are some example to illustrate the changes, in particular in the
> table area:
>
> #+begin_src org
> #+LATEX_HEADER: 
> \usepackage{amsmath}\usepackage{booktabs}\usepackage{mathtools}\usepackage{rotating}
>
> * Tables
>
>   #+NAME: my-matrix
>   #+attr_latex: :mode math :environment array
>   #+attr_latex: :math-prefix "\\left(" :math-suffix "\\right)"
>   |  |  |
>   | a   |   b |
>   |-+-|
>   | c   |   d |
>
>   This is a reference to matrix [[my-matrix]].
>
>   #+attr_latex: :mode math :environment matrix
>   #+attr_latex: :math-prefix "M = \\left(" :math-suffix "\\right)"
>   | a | b |
>   |---+---|
>   | c | d |
>
>   #+attr_latex: :mode verbatim
>   | a | b |
>   |---+---|
>   | c | d |
>
>
>   #+attr_latex: :booktabs nil :align |r|l| :float sidewaystable
>   | 123 | 123 |
>   |-+-|
>   |   1 |   1 |
>
>   Some inlined matrix
>   #+attr_latex: :mode inline-math :environment bsmallmatrix
>   | a | b |
>   |---+---|
>   | c | d |
>   . As you can see.
>
>
>   Eventually some bordered matrix:
>
>   #+attr_latex: :mode math :environment bordermatrix
>   | | C_1 | C_2 |
>   |-+-+-|
>   | L_1 | a   | b   |
>   | L_2 | c   | d   |
>
> * Images (from manual)
>
>   #+caption: The black-body emission of the disk around HR 4049
>   #+name: fig:SED-HR4049
>   #+attr_latex: :options "5cm,angle=90"
>   [[./img/sed-hr4049.pdf]]
>
>   #+attr_latex: :float wrap :placement "{r}{0.4\\textwidth}" :options 
> "width=0.38\\textwidth"
>   [[./img/hst.png]]
> #+end_src

I think this is an improvement.  Thanks!

Would it be possible to add a :font attribute for tables? I'd like to be
able to say, e.g., :font "\\footnotesize" and have \footnotesize appear
between the float and table environments, near \centering in the LaTeX
output.

All the best,
Tom

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



Re: [O] latex include file

2012-11-22 Thread Suvayu Ali
On Thu, Nov 22, 2012 at 03:30:54PM -0500, Marvin Doyley wrote:
> I haven't tried this, I will upgrade to the latest version of org and
> try. How do I tell org only to export the body ?

When you use the new exporter, this is an option in the export dispatch
menu.  To try it out, install the latest Org release and do:

 (require org-e-latex)

Then you can access the new dispatch menu do:

  M-x org-export-dispatch RET

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] latex include file

2012-11-22 Thread Marvin Doyley
I haven't tried this, I will upgrade to the latest version of org and
try. How do I tell org only to export the body ?

Sent from my iPhone

On Nov 22, 2012, at 2:06 PM, Marvin Doyley  wrote:

> Hi there,
>
> I am trying to figure out how to export a latex file while suppressing the 
> \begin{document} \end{document} and all the other frontmatter stuff.
>
> In essence, I would like to create a .tex file that will be included in 
> another latex file. More specifically, I want the exported file to look 
> something like
>
> \section{}
>
> BLAH BLAH
>
> \begin{equation}
>
> E=MC^2
> \end{equation}
>
> I have created a costume org-export-latex-classes to suppress packages, but I 
> am stuck with the other front matter stuff.
>
> Best Wishes
> M
>
>
>



Re: [O] [org-e-latex] Coding System

2012-11-22 Thread Thomas S. Dye
Aloha Achim,

Achim Gratz  writes:

> Nicolas Goaziou writes:
>> Anyway, if you think it's useful to provide a patch, I suggest to
>> dynamically bind `org-export-coding-system' in
>> `org-e-latex-export-to-latex' before `org-export-to-file' is called.
>> You'll have to open "outfile" in order to apply
>> `latexenc-find-file-coding-system'.
>
> Thanks for the pointers.
>
>> Do you want to provide such patch?
>
> I'll keep it on my watchlist.  Can't make any promises right now, sorry.

I don't follow the details of this discussion, but I wonder how
important AUTO really is?  It seems to me that a sweet setup uses
utf-8 in the buffer but exports latin-1 to LaTeX through use of entities
and filters (with the new exporter).  This can yield a buffer display
that isn't complicated by all the LaTeX machinery, and export something
that is maximally compatible in the LaTeX world.  It is nice on the eyes
and avoids encoding incompatibilities on the back-end.

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



Re: [O] latex include file

2012-11-22 Thread Suvayu Ali
On Thu, Nov 22, 2012 at 02:06:03PM -0500, Marvin Doyley wrote:
> Hi there,
> 
> I am trying to figure out how to export a latex file while suppressing the
> \begin{document} \end{document} and all the other frontmatter stuff.
> 
> In essence, I would like to create a .tex file that will be included in
> another latex file. More specifically, I want the exported file to look
> something like
> 
> \section{}
> 
> BLAH BLAH
> 
> \begin{equation}
> 
> E=MC^2
> \end{equation}
> 
> I have created a costume org-export-latex-classes to suppress packages, but
> I am stuck with the other front matter stuff.
> 

Have you tried the "Body only" option in the new exporter?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] moving subtree breaks line space

2012-11-22 Thread philippe roudot
It did the trick. Thank you Jason !

One could add in the FAQ entry  "Why is a blank line inserted after
headlines and list items?" that the same variable control subtree motion.

Regards,
Philippe


[O] latex include file

2012-11-22 Thread Marvin Doyley
Hi there,

I am trying to figure out how to export a latex file while suppressing the
\begin{document} \end{document} and all the other frontmatter stuff.

In essence, I would like to create a .tex file that will be included in
another latex file. More specifically, I want the exported file to look
something like

\section{}

BLAH BLAH

\begin{equation}

E=MC^2
\end{equation}

I have created a costume org-export-latex-classes to suppress packages, but
I am stuck with the other front matter stuff.

Best Wishes
M


Re: [O] [ANN] e-latex back-end: changes to attributes syntax

2012-11-22 Thread Alan Schmitt
Nicolas Goaziou  writes:

> Alan Schmitt  writes:
>
>> I think this has broken beamer export (new exporter). When I get back to
>> commit 359b10b3070588e8b751935b3fbcc2c9d8885a6a everything works, but
>> with this commit I have some error messages about the wrong number of
>> arguments for (item contents info) or (headline contents info) (for a
>> minimal test file).
>
> Actually, this is due to a more recent commit. It should be fixed now.

Yes, it now works. Thanks a lot.

Alan



Re: [O] moving subtree breaks line space

2012-11-22 Thread Jason Dunsmore
Try configuring org-blank-before-new-entry.  The FAQ has some
information about it:
http://orgmode.org/worg/org-faq.html

Here's what I use:

(setq org-blank-before-new-entry '((heading . nil)
   (plain-list-item . nil)))

Regards,
Jason

On Wed, Nov 21, 2012 at 4:39 PM, philippe roudot
 wrote:
> Dear list,
>
> I orgnanize my headers with space in-between
>
> * header...
>
> ** sub header ...
>
> ** an other ...
>
> * header...
>
> * you get it...
>
>
> though when I try to move my header using M-up it mess the line doing
>
>
>
> * you get it...
> * header...
>
> ** sub header ...
>
>
> ** an other ...
>
>
> * header...
>
> Is this a normal behavior ?



Re: [O] [org-e-latex] Coding System

2012-11-22 Thread Achim Gratz
Nicolas Goaziou writes:
> Anyway, if you think it's useful to provide a patch, I suggest to
> dynamically bind `org-export-coding-system' in
> `org-e-latex-export-to-latex' before `org-export-to-file' is called.
> You'll have to open "outfile" in order to apply
> `latexenc-find-file-coding-system'.

Thanks for the pointers.

> Do you want to provide such patch?

I'll keep it on my watchlist.  Can't make any promises right now, sorry.


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] Time clocked is displayed in fractional form [0.95/1.00]

2012-11-22 Thread Nicolas Goaziou


Hello,

"Sebastien Vauban"
 writes:

>> Over the last couple of days, a change made has the effect of displaying
>> something like:
>>
>>   [0.33/1.00] (Read email and news)
>>
>> in the modeline, instead of:
>>
>>   [0:33/1:00] (Read email and news)
>
> To add comments, it's not a "colon" vs "dot" problem: the displayed time is
> shown as a fraction, like [0.965/1.00].

With a recent pull, I cannot reproduce it.  Does it still happen? If so,
could you provide the values of:

  - `org-time-clocksum-use-fractional'
  - `org-time-clocksum-format'
  - `org-time-clocksum-fractional-format'

Thanks.


Regards,

-- 
Nicolas Goaziou




Re: [O] [ANN] e-latex back-end: changes to attributes syntax

2012-11-22 Thread Nicolas Goaziou
Alan Schmitt  writes:

> I think this has broken beamer export (new exporter). When I get back to
> commit 359b10b3070588e8b751935b3fbcc2c9d8885a6a everything works, but
> with this commit I have some error messages about the wrong number of
> arguments for (item contents info) or (headline contents info) (for a
> minimal test file).

Actually, this is due to a more recent commit. It should be fixed now.

Thanks for the report.


Regards,

-- 
Nicolas Goaziou



Re: [O] Extending org-koma-letter.el

2012-11-22 Thread Nicolas Goaziou
Alan Schmitt  writes:

> I had to write yet another letter, so I digged into this and it's now
> working well enough for me. I made a few changes to the file (which I
> attach):
>
> - fixed bugs to the menu (export to pdf, open pdf), added "export to tex
>   file"
> - put a default address "no address" instead of a blank line, otherwise
>   compilation fails
> - moved the lco file input before the preamble, so that one can specify
>   some additional information (like packages). (This may be
>   questionable, don't hesitate to let me know.)

I think that's fine.

> I now have two questions: a technical one and a non-technical one.
>
> The technical one: I see that org-e-koma extends the latex exporter with
> some options:
>
> (org-export-define-derived-backend koma-letter e-latex
>   :options-alist
>   ((:closing "CLOSING" nil org-koma-letter-closing)
>(:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline)
> ...
>
> These options have 3 arguments instead of 4 in the definition of options
> in org-e-latex:
>
>   :options-alist ((:date "DATE" nil org-e-latex-date-format t)
> (:latex-class "LATEX_CLASS" nil org-e-latex-default-class t)
> ...
>
> Is the missing argument the one that lets EXPORT_OPTIONS specify if some
> parts can be omitted for subtree export? Or is it something different?

It's something different: the last argument defines the behaviour when
more than one keyword is found in the buffer. When unspecified, it
defaults to nil. The syntax is the same as `org-export-options-alist',
which defines back-end agnostic export options. You should have a look
at its docstring.

> The non-technical question: I understand this exporter is just a proof
> of concept, but it is working quite well for me, and I'm ready to help
> tweaking this. If I do further modifications, should I send them to the
> list?

I classified it as "proof of concept" because I was too lazy to dig into
Scrlttr2 documentation and provide a complete enough letter back-end.
I would be glad that someone maintains it.

I think the simplest solution is to:

  1. Ask for push access to Org.
  2. Commit file in contrib/ directory.
  3. Add yourself as Maintainer in it (or Author, for that matter).
  4. Commit additional changes when you see fit, without sending the
 file over and over to the ML.

For point 1, see http://orgmode.org/worg/org-contribute.html (For Org
Developers)

Also, it would be nice if you signed FSF papers.

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Extending org-koma-letter.el

2012-11-22 Thread Rasmus
Alan Schmitt  writes:


> The non-technical question: I understand this exporter is just a proof
> of concept, but it is working quite well for me, and I'm ready to help
> tweaking this. If I do further modifications, should I send them to the
> list?

YES!!  I want to use Org for my (KOMA) letters (which are all of my
letters).  Unfortunately, I ran into some limitations the last time I
used it ¹.  Indeed, improving/working with more with KOMA letter
exporter is on my TODO list; but at the moment I'm terribly occupied.

–Rasmus


Footnotes: 
 ¹   https://lists.gnu.org/archive/html/emacs-orgmode/2012-07/msg00703.htlm

-- 
When the facts change, I change my mind. What do you do, sir?



Re: [O] [ANN] e-latex back-end: changes to attributes syntax

2012-11-22 Thread Alan Schmitt
Nicolas Goaziou  writes:

> Hello,
>
> I've changed the attribute syntax for tables, images and lists in
> e-latex back-end (new exporter). New this back-end conforms to the
> syntax used by Babel and every other back-end.

Hello,

I think this has broken beamer export (new exporter). When I get back to
commit 359b10b3070588e8b751935b3fbcc2c9d8885a6a everything works, but
with this commit I have some error messages about the wrong number of
arguments for (item contents info) or (headline contents info) (for a
minimal test file).

Alan



Re: [O] Extending org-koma-letter.el

2012-11-22 Thread Alan Schmitt
Hello,

Nicolas Goaziou  writes:

> Anyway, for the record, I'm posting an updated version[1] of the file,
> compatible with latest Org (master branch). It may solve your problem.
>
>
> Regards,
>
> [1] I do not seriously maintain this file. It was a proof of concept.

I had to write yet another letter, so I digged into this and it's now
working well enough for me. I made a few changes to the file (which I
attach):

- fixed bugs to the menu (export to pdf, open pdf), added "export to tex
  file"
- put a default address "no address" instead of a blank line, otherwise
  compilation fails
- moved the lco file input before the preamble, so that one can specify
  some additional information (like packages). (This may be
  questionable, don't hesitate to let me know.)

I now have two questions: a technical one and a non-technical one.

The technical one: I see that org-e-koma extends the latex exporter with
some options:

(org-export-define-derived-backend koma-letter e-latex
  :options-alist
  ((:closing "CLOSING" nil org-koma-letter-closing)
   (:from-address "FROM_ADDRESS" nil org-koma-letter-from-address newline)
...

These options have 3 arguments instead of 4 in the definition of options
in org-e-latex:

  :options-alist ((:date "DATE" nil org-e-latex-date-format t)
  (:latex-class "LATEX_CLASS" nil org-e-latex-default-class t)
...

Is the missing argument the one that lets EXPORT_OPTIONS specify if some
parts can be omitted for subtree export? Or is it something different?

The non-technical question: I understand this exporter is just a proof
of concept, but it is working quite well for me, and I'm ready to help
tweaking this. If I do further modifications, should I send them to the
list?

Thanks,

Alan



org-koma-letter.el
Description: application/emacs-lisp


Re: [O] require blank line in TeX output of org (and/or how to use the LaTeX package linguex via org-mode)

2012-11-22 Thread Andreas Leha
Benjamin Slade  writes:

> I want to be able to use the LaTeX package "linguex" in org-based beamer
> presentations. But this package requires a special syntax where after
> the environment there must be a blank line in the LaTeX source (!=a blank line
> in the LaTeX output). How do I do this in org-mode?
Hi Benjamin,

I don't know about linguex and your environments.  But I had a similar
problem recently and was advised to use sth like #+LATEX: \par.

Give that a try to see if a \par is also working for you.

Regards,
Andreas




Re: [O] [org-e-latex] Coding System

2012-11-22 Thread Nicolas Goaziou
Hello,

Achim Gratz  writes:

> I looked at the code/documentation and it seems the intention is to do
> the reverse lookup, that is look at the buffer encoding and decide what
> to give inputenc as argument (when it is specified as "AUTO" in the
> header template).  I maintain that the other way around (looking at the
> header template and deciding the coding system) is probably easier to
> understand and it is also what's already been used by Emacs: see
> latexenc-find-file-coding-system and latex-inputenc-coding-alist.

Emacs also provides `latexenc-coding-system-to-inputenc', so it doesn't
look like one way is more legitimate than the other.

Note that we can have both ways: with AUTO, let coding-system decide and
without AUTO, let inputenc decide. Also, it isn't necessary to change
the global coding system to change the coding system used to write the
file: see `org-export-coding-system'.

Anyway, if you think it's useful to provide a patch, I suggest to
dynamically bind `org-export-coding-system' in
`org-e-latex-export-to-latex' before `org-export-to-file' is called.
You'll have to open "outfile" in order to apply
`latexenc-find-file-coding-system'.

Do you want to provide such patch?


Regards,

-- 
Nicolas Goaziou



Re: [O] new exporter: remove postamble in html of export subtree

2012-11-22 Thread Alan Schmitt
Nicolas Goaziou  writes:

> You can't specify this option at the subtree level, because you can't
> specify it with neither a keyword nor an options item.
>
> The property :html-postamble is defined with the following line:
>
>  (:html-postamble nil nil org-e-html-postamble)
>
> Its default value is `org-e-html-postamble'. The third element (nil) is
> the place to define an option item. For example, with:
>
> (:html-postamble nil "html-postamble" org-e-html-postamble)
>
> your syntax should be valid, along with the global:
>
> #+OPTIONS: html-postamble:nil
>
> This is now the case in master (along with #+OPTIONS: html-preamble:nil).

Ah, I understand better how properties are defined now. Thanks a lot.

Alan



Re: [O] require blank line in TeX output of org (and/or how to use the LaTeX package linguex via org-mode)

2012-11-22 Thread Nicolas Goaziou
Hello,

Benjamin Slade  writes:

> I want to be able to use the LaTeX package "linguex" in org-based beamer
> presentations. But this package requires a special syntax where after
> the environment there must be a blank line in the LaTeX source (!=a blank line
> in the LaTeX output). How do I do this in org-mode?

Which exporter are you using? After which kind of environment? Do you
want to set it manually or automatically with well-defined rules?


Regards,

-- 
Nicolas Goaziou



Re: [O] new exporter: remove postamble in html of export subtree

2012-11-22 Thread Nicolas Goaziou
Hello,

Jambunathan K  writes:

> Alan Schmitt  writes:

>> I'm trying to remove the postamble in the html-export of a subtree, and
>> I don't know how to do it. This is what I tried:
>
> C-h v org-e-html-postamble RET
>
>
>>
>>
>> #+BEGIN_SRC org
>> :PROPERTIES:
>> :EXPORT_OPTIONS: html-postamble:nil
>> :END:
>> #+END_SRC
>>
>>
>> (I found the name of the option in the org-e-html.el file.)
>>
>> How can I specify this option so that it only applies to a subtree?
>
> Nicolas can advise you in this regard.  Why would you want to do it on
> per-subtree basis?

You can't specify this option at the subtree level, because you can't
specify it with neither a keyword nor an options item.

The property :html-postamble is defined with the following line:

 (:html-postamble nil nil org-e-html-postamble)

Its default value is `org-e-html-postamble'. The third element (nil) is
the place to define an option item. For example, with:

(:html-postamble nil "html-postamble" org-e-html-postamble)

your syntax should be valid, along with the global:

#+OPTIONS: html-postamble:nil

This is now the case in master (along with #+OPTIONS: html-preamble:nil).


Regards,

-- 
Nicolas Goaziou



Re: [O] Anyone using or working on ob-scheme?

2012-11-22 Thread Thorsten Jolitz
Michael Gauland  writes:


Hi Mike, 

> I've recently started playing with guile source blocks, and haven't
> gotten the results I expect.

> I'd like to hear from anyone who's had more success than I have, or
> who is working on ob-scheme.el, before I wade into the code.

just as a side remark: I remember that, when trying to write
ob-picolisp, I tried to base it on ob-scheme, since it seemed the next
logical thing to do (its about two lisp dialects). And I was surprised
how much had to be changed and how different the final results were.

-- 
cheers,
Thorsten




Re: [O] [BUG] org-export-with-current-buffer-copy drops local variable WAS:Re: new exporter - noweb substitution issues

2012-11-22 Thread Nicolas Goaziou
Hello,

cbe...@tajo.ucsd.edu writes:

Thank you for all the debugging.

> org-export-with-current-buffer-copy calls org-clone-local-variables
> which uses a regexp to detect buffer-local variables, but
> *org-babel-use-quick-and-dirty-noweb-expansion* is not detected, so it
> gets dropped.
>
> Solution add "\\*org-babel-use-.*dirty.*\\*\\|" or something like that
> to the regexp.

Before doing that, I'd like to know if there's a particular reason for
this variable to not belong to the regular namespace.

I think this is confusing and error-prone. Thus, I'd rather have the
variable renamed instead.

Eric, is that ok with you?


Regards,

-- 
Nicolas Goaziou



Re: [O] sum up variables from different org-mode tables

2012-11-22 Thread Martin Gross
Dear Eric,

I was sure something like that could be done.  Thank for the example.
Being a layman (not a programmer) I will need a time study it.

Sincerely,

Martin



[O] [PATCH] Fix uncaught error when trying to open a link at point

2012-11-22 Thread Samuel Loury
From 0e31213fa486f7fcfe1c2b7037689df077a39fce Mon Sep 17 00:00:00 2001
From: Samuel Loury 
Date: Thu, 22 Nov 2012 09:31:15 +0100
Subject: [PATCH] Fix the uncaught exception when doing opening a link from
 nowhere

* lisp/org.el (org-open-at-point): Make sure point is on a
org-plain-link-re before trying to go to its beginning

In cases the custor at point did not match anything, the piece of
code (goto-char (car (org-in-regexp org-plain-link-re))) threw an
error.

The inital intention of avoiding matching a org-plain-link-re when
just after a org-bracket-link-regexp, from the commit originating
the error (ad35e2ac6c6decae55dd987be738e07e7c87bd7d) was conserved.

TINYCHANGE
---
 lisp/org.el |   25 +++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 080b527..d036c2a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9745,8 +9745,29 @@ application the system uses for this file type."
 
 	  (save-excursion
 	(when (or (org-in-regexp org-angle-link-re)
-		  (and (goto-char (car (org-in-regexp org-plain-link-re)))
-			   (save-match-data (not (looking-back "\\[\\[")
+		  (let (
+			(match (org-in-regexp org-plain-link-re))
+			)
+			(and
+			 ;; link at point is a plain link
+			 match
+			 ;; check that it is not of the form
+			 ;; [[http://orgmode.org][Org]]Mode. in that
+			 ;; case, if the cursor is on "Mode", then the
+			 ;; string "http://orgmode.org][Org]]Mode"; is
+			 ;; recognized as a plain link while it should
+			 ;; not be
+			 (progn
+			   ;; go to the begining of the match, If we
+			   ;; were in the special case, we should now
+			   ;; be in a org-bracket-link-regexp
+			   (goto-char (car match))
+			   (not
+			(org-in-regexp org-bracket-link-regexp)
+			)
+			   )
+			 )
+			))
 	  (setq type (match-string 1)
 		path (org-link-unescape (match-string 2)))
 	  (throw 'match t)))
-- 
1.7.10.4

Hi,

When trying to open a link at point when no link is present, an
error is thrown. Test for instance to call org-open-at-point (C-c C-o)
while in an empty line.

It is in fact a regression coming from
ad35e2ac6c6decae55dd987be738e07e7c87bd7d that tries to go to the result
of a org-in-regexp call without checking whether the result is empty.

Here is a patch that keeps the idea from
ad35e2ac6c6decae55dd987be738e07e7c87bd7d (avoiding matching an
org-plain-link-re while it is in fact a org-bracket-link-regexp) and
fixing the problem.
-- 
Samuel


pgp5xIJAtqI9Y.pgp
Description: PGP signature