[Orgmode] library of babel, bootabs question

2010-10-08 Thread Robert Klein
I'm trying to export a document to LaTeX, using a lob-call to booktabs for  
a table.


Unfortunately I seem to get two tables, the original one and the one from  
the lob call.


The table looks like this:


#+tblname: ma
|---+---+-|
| row 1 cell 1 header   | row 1 cell 2 header   | r1c3 header |
| row 2 cell 1 header   | row 2 cell 2 header   | r2c3 header |
|---+---+-|
| some text inside tabl | some text, some text  | more text   |
| more text | more text | more text   |
| more text | more text | more text   |
|---+---+-|
#+call: booktabs(table=ma, align="lll") :results latex :exports results


Did I forget some option?  I didn't find any in the manuals.


Thanks a lot for any help.
Robert

___
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] library of babel, bootabs question

2010-10-18 Thread Robert Klein

Hi Eric,

thank you very much for your help.

Your solution works like a charm.

Best regards
Robert



Am 08.10.2010, 17:41 Uhr, schrieb Eric Schulte :


Hi Robert,

Currently the only way I know of inhibiting the export of the original
table, is to move it to an un-exporting subtree.  This can be done using
the COMMENT header keyword by moving the table to a new subtree and
pressing C-c ; which runs org-toggle-comment in that subtree.

Best -- Eric

"Robert Klein"  writes:


I'm trying to export a document to LaTeX, using a lob-call to booktabs
for a table.

Unfortunately I seem to get two tables, the original one and the one
from the lob call.

The table looks like this:


#+tblname: ma
|---+---+-|
| row 1 cell 1 header   | row 1 cell 2 header   | r1c3 header |
| row 2 cell 1 header   | row 2 cell 2 header   | r2c3 header |
|---+---+-|
| some text inside tabl | some text, some text  | more text   |
| more text | more text | more text   |
| more text | more text | more text   |
|---+---+-|
#+call: booktabs(table=ma, align="lll") :results latex :exports results


Did I forget some option?  I didn't find any in the manuals.


Thanks a lot for any help.
Robert

___
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



--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/

___
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] gnuplot version in org-mode

2010-10-26 Thread Robert Klein

Hi John,

when you look into gnuplot-ob.el, there are some commentary about
requirements:

#+begin_example
;;; Requirements:

;; - gnuplot :: http://www.gnuplot.info/
;;
;; - gnuplot-mode ::  
http://cars9.uchicago.edu/~ravel/software/gnuplot-mode.html

#+end_example

The 3.7 most probably is from the gnuplot-mode.  The file gnuplot-mode.el  
tries

to determine the version number, and I guess this doesn't work for version
numbers with more than one dot (e.g. 4.4.2).

Best regards
Robert


Am 26.10.2010, 23:18 Uhr, schrieb John Hendy :


Hi,


A recent question made me recall something I'd been meaning to ask. I  
have
gnuplot 4.4.2 installed but whenever I generate gnuplot from  
org-mode/babel,

the minibuffer flashes:

gnuplot-mode- 0.6.0 (gnuplot 3.7)

or soemthing similar. Where is the 3.7 coming from? I checked  
gnuplot-ob.el

for any references to a version and only see 7.01 trans referenced, not
anything like 3.7. I just wonder what gnuplot version org-mode is looking
at.


Thanks,
John



--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/

___
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] LaTeX package dependencies

2010-03-26 Thread Robert Klein

Hi Carsten,

I tested several systems:

* teTeX 3.0 (FreeBSD 7.0, 7.2, and 7.3, openSuSE 10.2)
  misses MnSymbol
* texlive 2007 (openSuSE 10.3 and 11.1):
  misses MnSymbol
* texlive 2008 (openSuSE 11.2):
  doesn't work when using both wasysym and MnSymbol together
  (duplicate symbols \iint and \iiint)
* texlive 2009 (Windows 7):
  doesn't work when using both wasysym and MnSymbol together
  (duplicate symbols \iint and \iiint)


My "minimal" latex test file is:

\documentclass{article}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{MnSymbol}
\begin{document}
test
\end{document}


Best regards
Robert






Am 26.03.2010, 05:52 Uhr, schrieb Carsten Dominik  
:



Hi everyone,

I am working on better entity (special symbol) support for
export, based on a list Ulf Stegemann has compiled.
The list Ulf has sent me requires the following LaTeX
packages to be available:

* t1enc
* textcomp
* marvosym
* wasysym
* MnSymbol

Before I introduce new dependencies on these packages, I would like
to ask that many of you check if these packages are available
in the LaTeX distribution you are using.  Please check,
and let me know which package you do not have.

Thanks!

- Carsten





___
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



--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/


___
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] Re: IMPORTANT: (possibly) incompatible Change

2010-04-06 Thread Robert Klein
On Tue, 06 Apr 2010 18:50:36 +0200, Karsten Heymann  
 wrote:



Thanks a lot for all this, I will follow your advice.

One final question: Will any of these packages spoil the fun for
people who want to process through .dvi instead of directly to pdf?


Not as far as I know. hyperref and microtype will run with reduced
features, but apart from that, there should be no problem. Regarding
microtype, I do not know what happens when it is used with the old TeX
or eTeX compiler that was used to created dvi's before pdftex was used
for this too, but that should largely be an academic problem as pdftex
is now used anywhere.




In a minimal document it runs Ok with pdfeTeX, for both creating dvi and  
pdf.

(The one in teTeX 3.0.)


Best regards
Robert


___
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] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Robert Klein

Am 07.04.2010, 09:17 Uhr, schrieb Austin Frank :


On Wed, Apr 07 2010, Austin Frank wrote:


I then document some unexpected behavior when exporting to latex.
Options specified with #+LATEX_HEADER are not exported, and if
`org-export-latex-packages-alist' is customized then only those packages
are exported.


Upgrading to Org-mode version 6.35b (release_6.35b.27.g35f5) allows my
packages from `org-export-latex-packages-alist' packages to be exported
correctly, but following the steps in my previous mail still does not
result in the inclusion of packages specified in #+LATEX_HEADER lines.



I can confirm this for 6.35b: #+LaTeX_HEADER lines are getting ignored.


Also, when I put

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

into my .emacs-file it is put twice into the resulting tex file.

Best regards
Robert


___
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] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Robert Klein

Am 07.04.2010, 09:43 Uhr, schrieb Austin Frank :


On Wed, Apr 07 2010, Robert Klein wrote:


Also, when I put

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


What's the value of `org-export-latex-listings'?  Carsten, how should
listings be addressed in the new setup?



It happens (-ed) with both t and nil.

However Carstens newest fix seems to have fixed this, too.

Best regards
Robert


___
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] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Robert Klein
Am 07.04.2010, 09:35 Uhr, schrieb Carsten Dominik  
:




Looks I am having a bad day.

Can you please pull and try again?  As soon as possible?

- Carsten


It works for me now.

Also, the double inclusion of packages as described in my other mail  
doesn't

happen anymore.

PS: I've currently got two \usepackage{textcomp}, this is from lisp/org.el

Thanks a lot
Robert



___
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] begin_src "generic source code"

2010-04-30 Thread Robert Klein

Hi all,

is there a way to include generic source code in an org document?

I'm trying to put excerpts from configuration files into an org document.

However, if I leave the programming language out of the #+begin_src and
export to LaTeX or HTML, the text is rendered just like any other  
paragraph;

it is neither a  block in HTML nor an lstlisting in LaTeX.

Currently I'm setting the programming language to sh. This gives some
funny colors in the HTML export, however.

Is there another way to get generic source excerpts into HTML -blocks
and LaTeX lstlistings?

Thanks a lot
Robert


___
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] begin_src "generic source code"

2010-04-30 Thread Robert Klein
On Fri, 30 Apr 2010 20:39:55 +0200, Jason McBrayer   
wrote:



On Fri, Apr 30, 2010 at 2:18 PM, Robert Klein  wrote:

is there a way to include generic source code in an org document?

I'm trying to put excerpts from configuration files into an org  
document.


Have you tried #+begin_src conf ?

Conf-mode seems to reasonably support quite a few configuration file
modes, and I suppose it ought to handle your highlighting (etc) needs
in org-mode fairly well.


Thank you very much.  I forgot there's emacs around org-mode...

Best regards
Robert


___
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] begin_src "generic source code"

2010-04-30 Thread Robert Klein

On Fri, 30 Apr 2010 21:24:16 +0200, Stephan Schmitt
 wrote:


Maybe one of these fits your needs:

#+begin_example
#+begin_quote

hth,
Stephan



Thanks, #+begin_example works and even uses lstlistings in LaTeX. (I
remember different from a couple of weeks ago.  Probably something
in my .emacs.)

Using both "#+begin_src conf" for real configuration files and
"#+begin_example" e.g. for a pxelinux message file will do the
job as I want.

Thank you very much
Robert



Also sprach Jason McBrayer:
On Fri, Apr 30, 2010 at 2:18 PM, Robert Klein   
wrote:

is there a way to include generic source code in an org document?

I'm trying to put excerpts from configuration files into an org  
document.

 Have you tried #+begin_src conf ?
 Conf-mode seems to reasonably support quite a few configuration file
modes, and I suppose it ought to handle your highlighting (etc) needs
in org-mode fairly well.



___
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] strange behavior for export

2010-05-01 Thread Robert Klein

Eric,

where in your .emacs is the (require 'org-install) command?

In one of my setups I had it before the load-paths.

I didn't notice, because of an older version of org-mode
bundled with emacs; org-version reports the new version
but that is not what my emacs used in exporting.


Carsten,

is there a reason why the manual says I should do the 'make'
after it talks about load-path but before it tells me to put
(require 'org-install) into the .emacs-file?

I should know better, but I still managed to confuse one of
my .emacs-files when I started using org-mode.

Best regards
Robert





On Sat, 01 May 2010 13:57:17 +0200, Carsten Dominik  
 wrote:



Hi Eric,

I think this could mean two things.  Most likely org is loading
some other version of org-latex.el.  One way to find out is to run M-x  
list-load-path-shadows.


Another possibility is that you have somewhere a configuration setting  
of org-export-latex-classes that is old and does not contain the beamer  
class definition, and somehow that setting is loaded before org-latex.el  
is loaded.


HTH

- Carsten

On Apr 30, 2010, at 7:01 PM, Erik Butz wrote:


Hi all,

I have the following problem:

I have set up my emacs so as to use org-mode uncompiled from a local  
directory


# from .emacs
(setq load-path (cons "~/elisp/org-mode/lisp" load-path))
(setq load-path (cons "~/elisp/org-mode/contrib/lisp" load-path))


starting emacs22 or 23 and displaying M-x org-version I get:

Org-mode version 6.35trans (release_6.35g.207.g7f085)

so indeed the version from the local directory.

when I take a document with the following preamble:

#+LaTeX_CLASS: beamer
#+TITLE: present.org
#+AUTHOR:Erik
#+EMAIL: e...@eddie
#+DATE:  2010-04-08 Thu
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not- 
in-toc

#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:

and export this to latex I get the following:


\documentclass[11pt,a4paper]{article}


[ something deleted ]



\end{document}

so despite the #+LaTeX_CLASS: beamer, the document gets exported as
'article'. Even worse, when I try to export the same document again
afterwards, I get a:
No definition for class `beamer' in `org-export-latex-classes'

error.

When I issue a 'reload-org-uncompiled' directly after starting emacs,
this behavior does not occur.

In this case I get, as expected:

\documentclass{beamer}


[ something deleted ]


\end{document}


any hints appreciated on how this behavior comes about.

Cheers,

Erik


___
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


- Carsten




___
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] Documentation typo

2010-07-01 Thread Robert Klein

Hi,

in the Org manual, in Chapter eleven, there is a heading "Index enries"  
(missing the 't' in entries).


Best regards
Robert

___
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] CSS and Publishing to HTML Tutorial

2010-07-09 Thread Robert Klein

Hi Adam,

On Thu, 08 Jul 2010 09:48:11 +0200, Adam  wrote:


#+STYLE: 

or even

# STYLE: 

doing a view source of the HTML published page, shows that it includes
the java stuff of org-export-html-style-export, shown below. I feel my
defined CSS is being somehow compromised.




I also use a style of my own (and parts of the org-mode standard
style copied into my style sheet). To avoid the inclusion of the
org-mode style and javascript I put two additional settings into
the project lists /notes/ component:

   :style-include-default nil ; don't include org-modes style sheet
   :style-include-scripts nil ; don't include org-modes javascript

Additionally I put my style right behind those lines, but I don't
think it matters if it is there or in the org file:
   :style "type=\"text/css\">"



For example, I put those tho lines into your quoted configuration:


org-publish-project-alist

(("org-notes" :base-directory "C:\\Adamstuff\\webp\\org\\"


   :style-include-default nil ; don't include org-modes style sheet
   :style-include-scripts nil ; don't include org-modes javascript


:base-extension
"org" :publishing-directory "C:\\Adamstuff\\webp\\public_html\\"  
:recursive

t :publishing-function org-publish-org-to-html :headline-levels ...)
("org-static" :base-directory "C:\\Adamstuff\\webp\\org\\"  
:base-extension
"css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"  
:publishing-directory

"C:\\Adamstuff\\webp\\public_html\\" :recursive t :publishing-function
org-publish-attachment) ("org" :components ("org-notes" "org-static")))



Best regards
Robert

___
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] org-export-section-number-format, doc typo and question

2010-07-11 Thread Robert Klein

Hi,

theres a type in org-exp.el: in the documentation to  
org-export-section-number-format, there's twice the counter type "a"; the  
second time it should be an "i", I think:


From org-exp.el:

1. A list of lists, each indicating a counter type and a separator.
   The counter type can be any of \"1\", \"A\", \"a\", \"I\", or \"a\".
   It causes causes numeric, alphabetic, or roman counters, respectively.


To my question, I can't seem to get this option to work I've got the
following line in the file header:


#+OPTIONS: section-number-format:(quote ((("I" ".")) . "."))


Despite this I get sections numbered 1, 2, 3 etc.

I'd be very grateful for a working example.

Thank you very much
Robert

___
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] Re: org-export-section-number-format, doc typo and question

2010-07-12 Thread Robert Klein

On Sun, 11 Jul 2010 15:14:58 +0200, Bernt Hansen  wrote:


Bernt Hansen  writes:


"Robert Klein"  writes:


To my question, I can't seem to get this option to work I've got the
following line in the file header:


#+OPTIONS: section-number-format:(quote ((("I" ".")) . "."))


Despite this I get sections numbered 1, 2, 3 etc.

I'd be very grateful for a working example.


Hi Robert,

I think you need to set the variable instead

(setq org-export-section-number-format '((("I" ".")) . "."))

or via the customize interface.



This also seems to work

#+BIND: org-export-section-number-format ((("I" ".")) . ".")



Hi Bernt,

thank you very much!

I´ll got with the #+BIND: at the moment.  I suspect the setq
will cause all my files to be in roman...

btw, a great many thanks, too, for the documentation at norang.ca.

It was a great help and I suspect it will continue to be of help
for quite a while to come.

Best wishes
Robert


___
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] web site bug

2010-07-20 Thread Robert Klein

Hi,

on the web site, the link to the HTML version of the compact guide
actually links to the full manual.

(http://orgmode.org/index.html#sec-4_1 first link)

Best regards
Robert

___
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] Captions for source code

2010-07-22 Thread Robert Klein

Hi list,

I'm trying to get source code exported to HTML with captions, e.g. like:


#+caption: Examples of variable declaration.
#+begin_src sql
SELECT 6*9;
#+end_src

There seems to be code in org-exp.el, see lines 2128 and
following in version 7.01f of org-mode.

However, I'm unable to find out what I'm doing wrong, atm.

Do you know how I can get this working?

Thank you very much!

Best regards
Robert

___
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] text color + highlight

2010-08-09 Thread Robert Klein
Am 09.08.2010, 08:28 Uhr, schrieb Carsten Dominik  
:



Nope, I am against this syntax.  If we introduce a more general syntax,
then it should be done in the way Samuel proposed.  WHich means
we firs get a keyword indtroducing the piece, and then properties.

Like

$[style :color red the red text]

or

$[face :color :italic t red the red text]

Something like the $ before "[" also would seem critical to disambiguate
from other uses of "[".



I'd prefer this kind of syntax, too.  Btw, shouldn't the syntax be:
   $[face :color red :italic t the red italic text]

?? (i.e. the red following the :color keyword, not the ':italic t')

I didn't find a canonical way to make a paragraph or a longer text passage  
italic






However, I am not too excited about extra syntax to get this kind of  
thing.

Would not oppose it, but probably never use it.

- Carsten



___
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] text color + highlight

2010-08-09 Thread Robert Klein

Am 09.08.2010, 09:37 Uhr, schrieb Robert Klein :

Sorry dropped something on the keyboard and sent the message early :(

Am 09.08.2010, 08:28 Uhr, schrieb Carsten Dominik
:

Nope, I am against this syntax.  If we introduce a more general syntax,
then it should be done in the way Samuel proposed.  WHich means
we firs get a keyword indtroducing the piece, and then properties.

Like

$[style :color red the red text]

or

$[face :color :italic t red the red text]

Something like the $ before "[" also would seem critical to disambiguate
from other uses of "[".



I'd prefer this kind of syntax, too.  Btw, shouldn't the syntax be:

$[face :color red :italic t the red italic text]

?? (i.e. the red following the :color keyword, not the ':italic t')


I didn't find a canonical way to make a paragraph or a longer text
passage italic, so I'd love an easy way to get it.


BTW, if simply '$[' is free, why not use this for style, e.g.:

  $[:italic t :bold nil :color teal My italic and teal text]


(sorry for the double mail)
Best regards
Robert







However, I am not too excited about extra syntax to get this kind of  
thing.

Would not oppose it, but probably never use it.

- Carsten




___
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


[O] foot note / enumeration question

2011-07-01 Thread Robert Klein

Hi group,

A file of

#+begin_example
* Title

This is a text [fn:: the
1. footnote] with a footnote.
#+end_example

begins an enumeration inside the footenote and then
forgets to close the footnote (which in LaTeX export
gets closed at the next \section or so).

I'm not sure what the expected behavior should be -- I'd
obviously prefer no enumerations in footnotes :)  Is there
a way to specify this in the header, e.g.
enum-in-footnotes: nil or similar?   Just thinking when
someone pute literary references in footnotes this could
be useful (e.g.: [fn:: My fun. pp. 3-5, 12. edition, O'Really,
1996. London, New York...] )

Best regards and thanks for any comments
Robert




Re: [O] foot note / enumeration question

2011-07-03 Thread Robert Klein

Hi,

On 07/02/2011 10:10 AM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


A file of

#+begin_example
* Title

This is a text [fn:: the
1. footnote] with a footnote.
#+end_example

begins an enumeration inside the footenote and then
forgets to close the footnote (which in LaTeX export
gets closed at the next \section or so).

I'm not sure what the expected behavior should be -- I'd
obviously prefer no enumerations in footnotes :)  Is there
a way to specify this in the header, e.g.
enum-in-footnotes: nil or similar?   Just thinking when
someone pute literary references in footnotes this could
be useful (e.g.: [fn:: My fun. pp. 3-5, 12. edition, O'Really,
1996. London, New York...] )

This confusing case shouldn't happen, unless the user somehow does it on
purpose. Indeed, Org prevents auto-filling to break a line where it
would create a new list item.

This looks to me as a false problem ; I don't think we should write some
workaround for it.

Regards,



Thanks for your help.  I figured out now,  there's a special case I 
triggered:


It is due to the closing square bracket right after "29."


My minimal .emacs file only loads org-mode:

#+begin_example
(setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
#+end_example

and my test file is:
#+begin_example
* Title

Alpha gamma, phi beta epsilon phi gamma, psi iota omega, phi mu beta
lambda kappa sigma zeta theta eta, phi psi iota chi gamma[fn:: Eta. 1,
29.]. Alpha gamma
#+end_example

When I press Alt-q to reformat the paragraph nothing happens.

When I delete the last line and continue after the "[fn::Eta 1," with
" 29.]. Alpha" Emacs breaks the line after I type the blank before "Alpha",
so the new line begins with:

#+begin_example
.29].
#end_example

Now, when I put a blank after the "29" and before the closing
square bracket it works.

So, that's it. I'm going to put spaces between the dots and
closing brackets now.

Again, thanks for your help and pointing me to the right place.

Best regards
Robert




Re: [O] [ANN] Org Export in contrib

2011-11-28 Thread Robert Klein

On 11/25/2011 06:32 PM, Nicolas Goaziou wrote:

Hello,

I've pushed org-export.el to contrib. It's a general export engine,
built on top of org-elements aiming at simplifying life of both
developers and maintainers (and, therefore, of end-users).



Hi Nicolas,

I'd like to make same remarks regarding the Wikipedia exporter included in
the generic exporter:

Is the exporter supposed to export a whole wiki or a sub-wiki from a
org-file or a single wiki page?

If it is to be only a single wiki page, could you change the
variables :body-section-header-prefix and :body-section-header-suffix to
begin with "==" instead of "="?  The level 1 headings are supposed to be
only used for the page title
(cf. http://www.mediawiki.org/wiki/Help:Formatting and the note on the
talks page http://www.mediawiki.org/wiki/Help_talk:Formatting#Level_1).


Second, when I format my org file like this:

* heading
  some text. some text. some text.

the text currently gets exported with the leading blanks.  This causes the
Mediawiki to render the text as preformatted.  Is there a way around this?

Thanks you very much.

Best regards
Robert



Re: [O] [ANN] Org Export in contrib

2011-11-28 Thread Robert Klein

Umm, sorry,

I just found out, I was talking about the other generic exporter :(

Robert

On 11/29/2011 07:15 AM, Robert Klein wrote:

On 11/25/2011 06:32 PM, Nicolas Goaziou wrote:

Hello,

I've pushed org-export.el to contrib. It's a general export engine,
built on top of org-elements aiming at simplifying life of both
developers and maintainers (and, therefore, of end-users).



Hi Nicolas,

I'd like to make same remarks regarding the Wikipedia exporter 
included in

the generic exporter:

Is the exporter supposed to export a whole wiki or a sub-wiki from a
org-file or a single wiki page?

If it is to be only a single wiki page, could you change the
variables :body-section-header-prefix and :body-section-header-suffix to
begin with "==" instead of "="?  The level 1 headings are supposed to be
only used for the page title
(cf. http://www.mediawiki.org/wiki/Help:Formatting and the note on the
talks page http://www.mediawiki.org/wiki/Help_talk:Formatting#Level_1).


Second, when I format my org file like this:

* heading
  some text. some text. some text.

the text currently gets exported with the leading blanks.  This causes 
the
Mediawiki to render the text as preformatted.  Is there a way around 
this?


Thanks you very much.

Best regards
Robert






Re: [Orgmode] Problems with source code listings in PDF

2011-02-09 Thread Robert Klein

Am 08.02.2011, 16:47 Uhr, schrieb Thomas S. Dye :



On Feb 8, 2011, at 4:59 AM, Avdi Grimm wrote:


I'm working on creating a PDF eBook with Org-Mode, and I'm running
into some difficulty getting them to come out looking decent.


[s.d.]


I'm seeing a few problems with the output:

1. There is no color; only bolded keywords
2. Listings are formatted in a not-very-well-rendered font with serifs
that just doesn't look good at all.


Instructions for setting up different fonts can be found here:

http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-14



I think a better answer for point 2. might be a header line of


#+LaTeX_HEADER: \lstset{ basicstyle=\small\ttfamily }

Best regards
Robert




All the best,
Tom



3. In begin_example sections, spaces are replaced with odd little
curved underscores.

I've attached some examples to show what I mean.

I'm running Org-Mode 7.4 on Ubuntu 10.10 with Emacs 23.1.50.1.

Has anyone had any luck formatting source code and example listings in
PDF output? What I'd really like to get is output identical to the
listings exported to HTML.

Thanks!

--
Avdi Grimm
<
example
.png>___
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] Clock summary doesn't work in some cases

2011-02-22 Thread Robert Klein

Hi,

in the git version as of this morning 
(1e35a5ea37194d686f432d384f4e264498ca6294) the clock  summary doesn't 
work right.  Below is a clock summary with a version from February 11 
and below that a clock summary with the git version I downloaded just a 
couple of hours ago.


Somewhere in between all the headline information got lost.  I guess 
this is caused by the introduction of 
org-clock-clocktable-language-setup on February 13.


Is there a chance of defaulting the language to en if no language or a 
language without translation is set?


Thanks a lot,
Robert


#+BEGIN: clocktable :maxlevel 2 :scope file-with-archives :emphasize nil 
:tstart "<2011-02-09 Mi 00:00>" :tend "<2011-02-15 Di 23:59>"

Clock summary at [2011-02-21 Mo 14:23]

| Headline   |Time |  |
|+-+--|
| ALL *Total time*   | *17:30* |  |
|+-+--|
| *File time*| *17:30* |  |
| task 1.1   |2:30 |  |
| task 1.2 misc  |3:00 |  |
| TODO task 1.3  |   10:00 |  |
| task 1.4   |2:00 |  |
| \__ subtask 1.4.1  | | 2:00 |
|+-+--|
| *File time*|  *0:00* |  |
#+END

** 21.2.2010 - 22.2.2010
#+BEGIN: clocktable :maxlevel 2 :scope file-with-archives :emphasize nil 
:tstart "<2011-02-16 Mi 00:00>" :tend "<2011-02-22 Di 23:59>"

Clock summary at [2011-02-22 Di 11:23]

|  | |
|--+-|
| **   | *19:40* |
|--+-|
| **   | *19:40* |
| task 2.1 | 5:25|
| TODO task 2.2| 14:15   |
|--+-|
| **   | *0:00*  |
#+END

___
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] org-contacts.el

2011-02-22 Thread Robert Klein

Hi Martin,


Martin Butz wrote:

Hi to all,

I'm using org-mode since a year or so. Its a great peace of software 
and I could not imagine using another organizer and notes tool 
anymore! Thanks a lot for all this work!


I tried to use org-contacts.el using the current version from 
git://git.naquadah.org/org-contacts.git


My org-mode version is 7.4.

I keep getting the initialization warning:

Symbol's value as variable is void: org-property-set-functions-alist

on emacs startup. Can anybody give a hint, what I'm doing wrong?

Martin



you'll have to use the git version of org-mode.  org-contacts.el needs 
some patches integrated only after the 7.4 release.


Best regards
Robert

___
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


[O] new org-export-html-preamble

2011-02-28 Thread Robert Klein

Hi everyone,

does anyone have by chance a working example of the 
org-export-html-preamble, introduced on February, 10?


Up to now I used

   :preamble "my preamble"

Now I'm lost in not knowing lisp enough.

Thank you very much for your help!

Robert

___
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: [O] new org-export-html-preamble

2011-02-28 Thread Robert Klein

On 28.02.2011 17:35, Nick Dokos wrote:

Robert Klein  wrote:


Hi everyone,

does anyone have by chance a working example of the
org-export-html-preamble, introduced on February, 10?

Up to now I used

:preamble "my preamble"

Now I'm lost in not knowing lisp enough.

Thank you very much for your help!



I think you just need to change

   :preamble "my preamble"

to

   :html-preamble "my preamble"

and similarly for postamble, so no elisp necessary.

Nick

PS. ...but I have not tried it.


Hi Nick,

thanks for the help.  Actually I probably had a typo at first and 
descended into lisp then.


Your suggestion works, but I had to polish my escapes in the format 
string, e.g.

width=\"20\%\"
now has to be
width=\"20\%%\"

because of the format-spec function used instead of org-replace-escapes.

Probably will have to be careful with the sitemap also; there was a 
patch on Feb. 11, which also uses format-spec.


Thanks again and best regards
Robert


___
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


[O] html publish - typo in contrib/lisp/org-e-publish.el

2012-09-18 Thread Robert Klein
Hi, there is a typo in org-e-publish.el.  Publishing xxx.org results in 
a file xxxhtml instead of xxx.html.


Fix below.

(My published files still have zero length, but this may be a result of 
a buggy setup.)


Best regards
Robert


--- org-e-publish.el.old2012-09-18 19:27:27.502988132 +0200
+++ org-e-publish.el2012-09-18 19:27:54.009888013 +0200
@@ -600,7 +600,7 @@
 publishing directory.

 Return output file name."
-  (org-e-publish-org-to 'e-html filename "html" plist pub-dir))
+  (org-e-publish-org-to 'e-html filename ".html" plist pub-dir))

 ;; TODO: Not implemented yet.
 ;; (defun org-e-publish-org-to-org (plist filename pub-dir)



Re: [O] org-e-groff-export-to-groff produces empty output file

2012-09-21 Thread Robert Klein

On 09/21/2012 04:34 PM, Ian Barton wrote:

On 20/09/12 20:38, Eric Schulte wrote:

Hi,

Maybe I'm missing something obvious here, but I can't get org-e-groff to
generate anything but an empty output file.  I've boiled this down to
the following minimal example.  First save the attached example.org file
to /tmp/example.org.  Then run the following in your shell,

 # -*- shell-script -*-
 emacs --batch --eval '(let ((org-path "~/.emacs.d/src/org-mode/"))
 (add-to-list (quote load-path) (expand-file-name "lisp" org-path))
 (add-to-list (quote load-path) (expand-file-name "contrib/lisp"
org-path))
 (require (quote org))
 (require (quote org-e-groff)))' /tmp/example.org -f
org-e-groff-export-to-groff

The above generates an empty file in /tmp/example.groff.

What am I missing?


I don't think you are missing anything. I tried the grof exporter out a
couple of weeks ago and it worked fine for me. I just tried it on the
file I used before and I also get blank output. I have also tried your
minimal example and get no output.

I am on org-mode fa15516a16df6c9ca060c56e85

Ian.






I got the same results w/ the HTML exporter, version 7.9.1-RELEASE and a 
maint snapshot from yesterday or the day before.


Best regards
Robert




Re: [O] org-e-groff-export-to-groff produces empty output file

2012-09-21 Thread Robert Klein

On 09/21/2012 04:44 PM, Robert Klein wrote:

On 09/21/2012 04:34 PM, Ian Barton wrote:

On 20/09/12 20:38, Eric Schulte wrote:

Hi,

Maybe I'm missing something obvious here, but I can't get org-e-groff to
generate anything but an empty output file.  I've boiled this down to
the following minimal example.  First save the attached example.org file
to /tmp/example.org.  Then run the following in your shell,

 # -*- shell-script -*-
 emacs --batch --eval '(let ((org-path "~/.emacs.d/src/org-mode/"))
 (add-to-list (quote load-path) (expand-file-name "lisp" org-path))
 (add-to-list (quote load-path) (expand-file-name "contrib/lisp"
org-path))
 (require (quote org))
 (require (quote org-e-groff)))' /tmp/example.org -f
org-e-groff-export-to-groff

The above generates an empty file in /tmp/example.groff.

What am I missing?


I don't think you are missing anything. I tried the grof exporter out a
couple of weeks ago and it worked fine for me. I just tried it on the
file I used before and I also get blank output. I have also tried your
minimal example and get no output.

I am on org-mode fa15516a16df6c9ca060c56e85

Ian.






I got the same results w/ the HTML exporter, version 7.9.1-RELEASE and a
maint snapshot from yesterday or the day before.

Best regards
Robert



Umm, sorry, I get this when /publishing/ (org-e-publish). 
org-e-html-export-to-html works.


Best regards
Robert





[O] Publishing using the new exporter

2012-09-24 Thread Robert Klein

Hi,

I'm trying to use the new exporter for publishing a project.

For some reason all .org files get exported to zero length .html files.

The org-e-publishh-project-alist is currently shortened to:

#+begin_example
(setq org-e-publish-project-alist
  '(("s2-org"
 :base-directory "~/Documents/org/s2"
 :base-extension "org"
 :publishing-directory "~/public_html/s2"
 :publishing-function  org-e-publish-org-to-html
 )
("s2-extra"
 :base-directory "~/Documents/org/s2"
 :base-extension "css\\|pdf\\|png\\|jpg\\|gif\\|ksh\\|sh\\|py"
 :publishing-directory "~/public_html/s2"
 :publishing-function org-e-publish-attachment
 :include (".htaccess")
 :recursive t)
("s2"
 :components ("s2-org" "s2-extra"))
))
#+end_example

The files in s2-extra all get published without a hitch.  Just the .org 
files turn up wrong.


I'd be very thankful for any advice or pointers in the right direction.

Thanks an best regards
Robert



Re: [O] Publishing using the new exporter

2012-09-24 Thread Robert Klein

On 09/24/2012 12:25 PM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


I'm trying to use the new exporter for publishing a project.

For some reason all .org files get exported to zero length .html
files.


Did you (require 'org-e-html) first?


Regards,



Thanks, this helps.

This is a bit curious for me.  I compiled org-mode with
   ORG_ADD_CONTRIB = org-e-* org-md org-export
in local.mk and simple eporting (instead of publishing) using org-e-
export-html-to-html worked with only
(require 'org-install)
in my .emacs.

Anyway, I can export now, though the new exporter doesn't seem to honor 
the :html-preamble and :html-postamble variables in the project alist 
yet.  (I set them both to a function name, e.g.

:html-preamble s2-preamble
with s2-preamble defined as:

#+begin_src elisp
(defun s2-preamble ()
  (org-get-file-contents "~/Documents/org/s2/html/preamble.html"))
#+end_src


So, org-get-file-contents is a function from the old exporter, but I 
didn't see any reason why it shouldn't.



Another issue I encountered, when publishing(!) to pdf, the resulting 
pdfs didn't have any images.  This is probably caused by the images 
beind created in :base-directory and the pdf being created in 
:publishing-directory (there may be more to this; I think at one time I 
already hat images in :publishing-directory). Note, images are created 
using plantuml source in the .org-files.  Works Ok with the HTML 
exporter, images are created by the PDF exporter also bbut not included 
in the resulting PDF.


Best regards
Robert




Re: [O] Publishing using the new exporter

2012-09-25 Thread Robert Klein

On 09/24/2012 07:27 PM, Robert Klein wrote:

On 09/24/2012 12:25 PM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


I'm trying to use the new exporter for publishing a project.

For some reason all .org files get exported to zero length .html
files.


Did you (require 'org-e-html) first?


Regards,



Thanks, this helps.

This is a bit curious for me.  I compiled org-mode with
ORG_ADD_CONTRIB = org-e-* org-md org-export
in local.mk and simple eporting (instead of publishing) using org-e-
export-html-to-html worked with only
 (require 'org-install)
in my .emacs.

Anyway, I can export now, though the new exporter doesn't seem to honor
the :html-preamble and :html-postamble variables in the project alist
yet.  (I set them both to a function name, e.g.
 :html-preamble s2-preamble
with s2-preamble defined as:

#+begin_src elisp
(defun s2-preamble ()
   (org-get-file-contents "~/Documents/org/s2/html/preamble.html"))
#+end_src


So, org-get-file-contents is a function from the old exporter, but I
didn't see any reason why it shouldn't.


Another issue I encountered, when publishing(!) to pdf, the resulting
pdfs didn't have any images.  This is probably caused by the images
beind created in :base-directory and the pdf being created in
:publishing-directory (there may be more to this; I think at one time I
already hat images in :publishing-directory). Note, images are created
using plantuml source in the .org-files.  Works Ok with the HTML
exporter, images are created by the PDF exporter also but not included
in the resulting PDF.

Best regards
Robert




Hi,

when the :html-preamble function is just:
#+begin_src elisp
(defun s2-preamble ()
  "alpha-mark")
#+end_src

the text "alpha-mark" also doesn't get inserted, though simply setting
#+begin_src elisp
:html-preamble "alpha-mark"
#+end_src
works.


If i set :html-preable to either s2-preamble or 's2-preamble nothing 
gets inserted.


I studied the code in org-e-html (excerpt below), but i don't see what I 
did wrong.


#+begin_src elisp :file contrib/lisp/org-e-html.el :firstline 1329
(defun org-e-html-preamble (info)
  (when (plist-get info :html-preamble)
(let* ((title (org-export-data (plist-get info :title) info))
   (date (org-e-html-format-date info))
   (author (org-export-data (plist-get info :author) info))
   (email (plist-get info :email))
   (html-pre-real-contents
(cond
 ((functionp (plist-get info :html-preamble))
  (with-temp-buffer
(funcall (plist-get info :html-preamble))
(buffer-string)))
#+end_src


Thanks for any help

Robert




Re: [O] new html exporter

2012-09-29 Thread Robert Klein

On 09/29/2012 01:36 PM, henry atting wrote:

Hi,

I gave the new html exporter a try (org-e-html-to-file). The export
obviously ignores my setup file, and so the path to my css and js files.

Maybe with the new exporter everything has changed and I only miss a
good tutorial?

henry




Do you want to export a single file or do you want to publish a complete 
project?


As for projects, the setup is very similar to the old exporter.  I 
noticed however, I used some deprecated options or options not in the 
right way, so I did have my own problems getting  publishing to work.


Until recently you had to require org-e-html in your .emacs for 
publishing to work.  Thanks to Nicolas great help this and some other 
obstacles are removed in recent git versions (master branch, not maint).


I attached a description of an example project using the new exporter. 
The example isn't comprehensive, but it should get you started.


Best regards
Robert

#+ -*- fill-column:75; coding: utf-8-unix; -*-
#+TITLE: Using the new org exporter

* Setting up org-mode

/Note:/ You'll need a rather current version of the Org mode git master for
everything to work.

See
[[http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development]]
on how to get a current version.

See [[http://orgmode.org/worg/dev/org-build-system.html]] for more information
about installing Org mode.

To use the new exporter the autoloads for it have to be created.  If
you install Org mode with, e.g. =make= ensure you have something like
the following line in your local.mk:

#+begin_example
ORG_ADD_CONTRIB = org-e-* org-md org-export
#+end_example

* helper function to save this files code as new-exporter.emacs

This is simply a helper function for tangling this file.  The helper
function is included in the tangled file, so I don't have to C-x C-e
it before use.

Adjust file names and path for your own use.
#+begin_src emacs-lisp
  (defun roklein/save-dotemacs ()
"Save my emacs configuration as new-exporter.emacs"
(interactive)
(let* ((source-directory "~/Documents/org/emacs")
   (source-filename "newexporter.org")
   (destination-dir "~/Documents/org/emacs")
   (destination-filename "new-exporter.emacs"))
  (org-babel-tangle-file (expand-file-name source-filename source-directory)
 (expand-file-name destination-filename 
destination-dir)
 "emacs-lisp")))
#+end_src

* load org specific settings

First I'm setting the load-path for org-mode including contrib.
Depending on your Org mode setup you don't need to load-path the contrib
directory.

#+begin_src emacs-lisp
  ;;;
  ;;; org-mode and contrib
  ;;;
  (setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
  (setq load-path (cons "~/.emacs.d/org-mode/contrib/lisp" load-path))
  (require 'org-install)
#+end_src

* Initializing the new exporter
First I initialize the alist.  Note, the alist has a different name
than the alist for the old exporter.  
#+begin_src emacs-lisp
  (setq org-e-publish-project-alist nil)
#+end_src


* Configuring a  project

** alist entry for the complete project

The project is made up from two components, the part publishing the
org files (example-html) and the part copying the static files.

#+begin_src emacs-lisp
  (add-to-list 'org-e-publish-project-alist
   '("example"
 :components ("example-html" "example-extra")))
#+end_src


** alist-entry for .org-files

First I'm configuring setting up the alist entry for html publishing.

#+begin_src emacs-lisp
  (add-to-list 'org-e-publish-project-alist
   '("example-html"
#+end_src

The first for items are necessary for any publishing project.  They
are pretty much the same as for the old exporter.  The publishing
functions name has changed to =org-e-publish-org-to-html=.

The =:base-directory= is where the file to be published are located;
=:base-extension= tells the publishing function which files are to be
published, =:publishing-directory= is the directory where the exported
files are written to, and =:publishing-function= is the function used
be the publisher to export the files as determined by the
=:base-directory= and =:base-extension=.

#+begin_src emacs-lisp
 :base-directory "~/Documents/org/example"
 :base-extension "org"
 :publishing-directory "~/public_html/example.com"
 :publishing-function org-e-publish-org-to-html
#+end_src


The publisher can invoke a function each before starting the
publishing process and after finishing it.  E.g. you can disable the
confirmation prompt when evaluating babel code and enable it again
after publishing is complete.
#+begin_src emacs-lisp
 :preparation-function example-prepare
 :completion-function example-complete
#+end_src


Some information I don't want to have in every .org files header...
#+begin_src emacs-lisp
 :author

Re: [O] Publishing using the new exporter

2012-10-06 Thread Robert Klein

On 10/06/2012 01:17 PM, Nicolas Goaziou wrote:

Hello,


Another issue I encountered, when publishing(!) to pdf, the resulting
pdfs didn't have any images.  This is probably caused by the images
beind created in :base-directory and the pdf being created in
:publishing-directory


Indeed.

Eric: Is there any mechanism to force (automatically) Babel code to
generate files in a given publishing directory instead of the current
directory (notwithstanding :dir argument)?

Ideally, I would like to provide publishing-directory as an optional
argument to `org-export-blocks-preprocess', since it is the only
interface between the export engine and Babel.

Any opinion on this?


Regards,



Hello,

for pdf publishing I'd rather prefer the tex file also to be created in 
the base directory and only the pdf appearing in the 
publishing-directory, if there is a way.


My publishing-directories are often publicly accessible, where I'd 
rather not accumulate intermediate files.


As a workaround I currently use the base-directory as 
publishing-directory plus a second project using 
org-e-publish-attachment to copy the pdfs to their intended location. 
(I'm using org-e-publish-attachment for images of html files, so why 
shouldn't I use it for pdfs...


Best regards
Robert











Re: [O] Publishing using the new exporter

2012-10-07 Thread Robert Klein

On 10/06/2012 07:48 PM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


for pdf publishing I'd rather prefer the tex file also to be created
in the base directory and only the pdf appearing in the
publishing-directory, if there is a way.


You're right: I'm over-engineering it.


As a workaround I currently use the base-directory as
publishing-directory plus a second project using
org-e-publish-attachment to copy the pdfs to their intended location.
(I'm using org-e-publish-attachment for images of html files, so why
shouldn't I use it for pdfs...


This is now the default for PDF publishing. Thanks.


Regards,



Hello,

thanks for the patch.

There is still a small issue, though.  I tried org-e-publish to pdf with 
one small difference:


1. I'm in a buffer, the visited file is in the base-directory.  M-x 
org-e-publish... Publishing works Ok.


2. I'm in a buffer, visiting a buffer /not/ in the base-directory.  M-x 
org-e-publish... The pdf's don't have their images included.


I suspect, pdflatex is called using a working directory which is not the 
base-directory but the default-directory of the buffer from which I M-x 
org-e-publish.


Best regards
Robert




Re: [O] Publishing using the new exporter

2012-10-08 Thread Robert Klein

On 10/08/2012 02:55 PM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


There is still a small issue, though.  I tried org-e-publish to pdf
with one small difference:

1. I'm in a buffer, the visited file is in the base-directory.  M-x
org-e-publish... Publishing works Ok.

2. I'm in a buffer, visiting a buffer /not/ in the base-directory.
M-x
org-e-publish... The pdf's don't have their images included.

I suspect, pdflatex is called using a working directory which is not
the base-directory but the default-directory of the buffer from which
I M-x
org-e-publish.


I pushed a patch to solve this. May you confirm it is fine now?

Important note : I moved publishing functions to their respective
back-end, renaming them in the process. For example
`org-e-publish-org-to-pdf' becomes `org-e-latex-publish-to-pdf'.


Regards,



Hello,

umm, no, it doesn't work. I even have more issues now.

1. At first, when calling org-e-publish I got an error message "void 
function org-e-html-publish-to-html"


I go rid of the message by this patch (which most probably is the wrong 
thing to do):

diff -ur org-mode/lisp/org-e-html.el org-mode-b/lisp/org-e-html.el
--- org-mode/lisp/org-e-html.el 2012-10-08 15:43:34.723502697 +0200
+++ org-mode-b/lisp/org-e-html.el   2012-10-08 17:24:26.147115603 +0200
@@ -36,7 +36,6 @@
 ;;; Dependencies

 (require 'org-export)
-(require 'org-e-publish)
 (require 'format-spec)
 (eval-when-compile (require 'cl) (require 'table))

diff -ur org-mode/lisp/org-e-publish.el org-mode-b/lisp/org-e-publish.el
--- org-mode/lisp/org-e-publish.el  2012-10-08 15:43:34.727502681 +0200
+++ org-mode-b/lisp/org-e-publish.el2012-10-08 17:24:48.848019275 +0200
@@ -41,6 +41,7 @@
 (eval-when-compile (require 'cl))
 (require 'format-spec)
 (require 'org-export)
+(require 'org-e-html)

 (declare-function org-e-latex-compile "org-e-latex" (texfile))


2. When calling org-e-publish from a buffer visiting a file outside of 
the base-directory i still get empty images.


3. When calling org-e-pblish from a buffer visiting a file in the 
base-directory the intermediate tex file doesn't even have the 
"includegraphics" commands.  (I checked this twice, as I didn't believe 
it at first).  Do the my changes in 1. above bork the exporter totally?


Best regards
Robert




Re: [O] Publishing using the new exporter

2012-10-08 Thread Robert Klein

Hallo,

On 10/08/2012 06:49 PM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


umm, no, it doesn't work. I even have more issues now.

1. At first, when calling org-e-publish I got an error message "void
function org-e-html-publish-to-html"

I go rid of the message by this patch (which most probably is the
wrong thing to do):


Just (require 'org-e-html) instead.


2. When calling org-e-publish from a buffer visiting a file outside of
the base-directory i still get empty images.

3. When calling org-e-pblish from a buffer visiting a file in the
base-directory the intermediate tex file doesn't even have the
"includegraphics" commands.  (I checked this twice, as I didn't
believe it at first).  Do the my changes in 1. above bork the exporter
totally?


I don't think so, but I cannot reproduce your problem. Could you try
again in a fresh emacs, once back-ends you need have been required?



I re-installed the git-version of org-mode, required 'org-e-html and 
'org-e-latex and exported from a fresh emacs.  Issue 1 and 3 above are 
gone, but I still get empty images when calling org-e-publish from a 
buffer visiting a file outside the base-directory.


I appended both a minimal .emacs and org file I used for the tests.

Best regards
Robert

(setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
(require 'org)
(require 'org-e-html)
(require 'org-e-latex)

;; org-babel
(setq org-plantuml-jar-path "~/.emacs.d/plantuml.jar")
(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (python . t)
   (sql . t)
   (sh . t)
   (dot . t)
   (plantuml . t)
   (latex . t)
   (ditaa . t)))

(setq org-e-publish-project-alist nil)
(add-to-list 'org-e-publish-project-alist
 '("example-org"
   :base-directory "~/Documents/org/example"
   :base-extension "org"
   :publishing-directory "~/public_html/example.com"
   :publishing-function  org-e-html-publish-to-html
   ))
(add-to-list 'org-e-publish-project-alist
 '("example-pdf"
   :base-directory "~/Documents/org/example"
   :base-extension "org"
   :publishing-directory "~/puglic_html/example.com"
   :publishing-function  org-e-latex-publish-to-pdf
   ))
(add-to-list 'org-e-publish-project-alist
 '("example-extra"
   :base-directory "~/Documents/org/example"
   :base-extension "css\\|pdf\\|png\\|jpg\\|gif\\|ksh\\|sh\\|py"
   :publishing-directory "~/public_html/example.com"
   :publishing-function org-e-publish-attachment
   :recursive t
   ))
(add-to-list 'org-e-publish-project-alist
 '("example"
   :components ("example-org" "example-pdf" "example-extra")
   ))
# -*- fill-column:75; coding: utf-8-unix; -*-
#+TITLE: example.com

* Introduction
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi
consequat. Quis aute iure reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

* plantuml diagram
#+begin_src plantuml :file example.png :exports results
@startuml
title Todo for something

(*) --> "Count slowly to ten"
--> "Count slowly backwards to zero"
--> "Relax"
--> (*)
#+end_src


Re: [O] Publishing using the new exporter

2012-10-08 Thread Robert Klein

On 10/08/2012 07:46 PM, Suvayu Ali wrote:

On Mon, Oct 08, 2012 at 07:36:43PM +0200, Robert Klein wrote:

[...]



I appended both a minimal .emacs and org file I used for the tests.



[...]


(add-to-list 'org-e-publish-project-alist
 '("example-pdf"
   :base-directory "~/Documents/org/example"
   :base-extension "org"
   :publishing-directory "~/puglic_html/example.com"
   :publishing-function  org-e-latex-publish-to-pdf
   ))


Is the typo above (puglic -> public) present in the original test file?



Currently this /is/ my original test file. Yes, the typpo is present, 
but it doesn't change the results.  I just get two sets of pdfs, one 
from the example-latex project in puplic_html and one from the 
example-extra project via org-e-publish-attachment in public_html...


I know about it and used it to watch both directories during publishing 
yesterday.  Just forgot to change it :(


Thanks for catching it.

Best regards
Robert







Re: [O] Publishing using the new exporter

2012-10-09 Thread Robert Klein

Hello,

On 10/08/2012 07:36 PM, Robert Klein wrote:

Hallo,

On 10/08/2012 06:49 PM, Nicolas Goaziou wrote:

Hello,





I don't think so, but I cannot reproduce your problem. Could you try
again in a fresh emacs, once back-ends you need have been required?



I re-installed the git-version of org-mode, required 'org-e-html and
'org-e-latex and exported from a fresh emacs.  Issue 1 and 3 above are
gone, but I still get empty images when calling org-e-publish from a
buffer visiting a file outside the base-directory.

I appended both a minimal .emacs and org file I used for the tests.

Best regards
Robert



I got i working with this patch:

diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 80b8ddb..2d4ad35 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -2670,6 +2670,7 @@ Return PDF file name or an error if it couldn't be 
produced."

   (let* ((wconfig (current-window-configuration))
 (texfile (file-truename texfile))
 (base (file-name-sans-extension texfile))
+(default-directory base)
 errors)
 (message (format "Processing LaTeX file %s ..." texfile))
 (unwind-protect


After reading a bit in the emacs lisp reference manual I knew the issue 
is something with default-directory.  Then I examined the code of the 
old exporter and looked for a "similar" place in the new exporter, 
happily finding a 'let*( ...'.   Not sure, this is Ok or even the right 
place.  Just happy at the moment it does work.


Both cases (buffer visited in base-directory and not in base-directory) 
work with the change.


Best regards
Robert






Re: [O] Publishing using the new exporter

2012-10-10 Thread Robert Klein

Hello,

On 10/10/2012 06:59 PM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


I got i working with this patch:

diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index 80b8ddb..2d4ad35 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -2670,6 +2670,7 @@ Return PDF file name or an error if it couldn't
be produced."
(let* ((wconfig (current-window-configuration))
  (texfile (file-truename texfile))
  (base (file-name-sans-extension texfile))
+(default-directory base)
  errors)
  (message (format "Processing LaTeX file %s ..." texfile))
  (unwind-protect


After reading a bit in the emacs lisp reference manual I knew the
issue is something with default-directory.  Then I examined the code
of the old exporter and looked for a "similar" place in the new
exporter, happily finding a 'let*( ...'.   Not sure, this is Ok or
even the right place.  Just happy at the moment it does work.

Both cases (buffer visited in base-directory and not in
base-directory) work with the change.


I still cannot reproduce the problem, even with your recipe. Could you
double-check it?

Also, there's nothing in `org-e-latex-compile' that should depend on
default-directory anyway.


Regards,



I did some more tests and it seems the issue happens when Emacs is just 
started and nothing (much) done in it.


Test description below.

Best regards
Robert



* Setting up emacs and org-mode

** cleaning up emacs configuration
#+begin_src sh
# clean out .emacs.d
rm -rf ~/.emacs.d
# re-create and copy plantuml.jar
mkdir ~/.emacs.d
cp ~roklein/.emacs.d/plantuml.jar ~/.emacs.d/
#+end_src

** fetching org-mode git master
#+begin_src sh
mkdir $HOME/elisp && cd $HOME/elisp
git clone git://orgmode.org/org-mode.git
#+end_src

** local org configuration (local.mk)
#+begin_example :file ~/org-mode/local.mk
# Installation prefix
prefix  = /home/roklein/.emacs.d

# Where local lisp files go.
lispdir = $(prefix)/org-mode/lisp

# Where local data files go.
datadir = $(prefix)/org-mode/etc

# Where info files go.
infodir = $(prefix)/org-mode/info

# include files from contrib/lisp
ORG_ADD_CONTRIB = org-e-* org-md org-export org-contacts
#+end_example

** compile and install org-mode
#+begin_src sh
cd org-mode
vi local.mk  # see above
make
make install
#+end_src

This results in "Org-mode version 7.9.2 (release_7.9.2-432-g545166 @
  /home/emacs/.emacs.d/org-mode/lisp/)" from emacs M-x org-version.

* preparing the tests

Here I create ~/.emacs and ~/Documents/org/example/index.org as in the
former mail.

Further I create an image ~/example.png, simply containing the text
"FAIL!".

Touch  ~/Documents/org/other.org  (not ...txt)

* Test  preparation for each test

** cleaning up
   - closing emacs if open
   - executing the following commands
#+begin_src sh
cd
rm -rf public_html
rm Documents/org/example/index.tex*
rm Documents/org/example/index.pdf
rm Documents/org/example/example.png
rm .org-timestamps/*
#+end_src

* Test 1
  - Do test preparation as above
  - Start emacs from the command line.
  - M-x org-e-publish example
  - Have to type "yes" twice for executing plantuml.

* Result of Test 1
  - html export is Ok
  - pdf export has the "FAIL!" image I created in the home directory.

* Test 2
  - Do test preparation as above
  - Start emacs from the command line.
  - C-x C-f ~/Documents/org/example/index.org
  - M-x org-e-publish example
  - Have to type "yes" twice for executing plantuml.

* Result of Test 2
  - html export is Ok
  - pdf export is Ok

* Test 3
  - Do test preparation as above
  - Start emacs from the command line.
  - C-x C-f ~/Documents/org/example/index.org
  - C-x b *Gnu Emacs*
  - M-x org-e-publish example
  - Have to type "yes" twice for executing plantuml.

* Result of Test 3
  - html export is Ok
  - pdf export is Ok

* Test 4
  - Do test preparation as above
  - Start emacs from the command line.
  - C-x C-f ~/Documents/org/example/index.org
  - C-x C-f ~/Documents/org/other.txt
  - M-x org-e-publish example
  - Have to type "yes" twice for executing plantuml.

* Result of Test 4
  - html export is Ok
  - pdf export is Ok

* Test 5
  - Do test preparation as above
  - Start emacs from the command line.
  - C-x C-f ~/Documents/org/example/index.org
  - C-x C-f ~/Documents/org/other.txt
  - C-x C-s
  - M-x org-e-publish example
  - Have to type "yes" twice for executing plantuml.

* Result of Test 5
  - html export is Ok
  - pdf export is Ok

* Test 6
  - Change ~/.emacs to autoload a file ~/Documents/org/other.org
  - Start emacs from the command line.
  - (It has *Gnu Emacs* as front buffer)
  - M-x org-e-publish example
  - Have to type "yes" twice for executing plantuml.

* Result of Test 6
  - html export is Ok
  - pdf export has the "FAIL!" image I created in the home d

Re: [O] Publishing using the new exporter

2012-10-15 Thread Robert Klein
Hallo,

On 10/11/2012 11:55 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Robert Klein  writes:
> 
>> I did some more tests and it seems the issue happens when Emacs is just 
>> started and nothing (much) done in it.
>>
>> Test description below.
> 
> Thank you for the thorough testing. I was able to reproduce the bug and
> you're right: setting default-directory is the only way out. I've
> committed a patch doing this.
> 
> If you confirm that the problem is solved, I'll also apply the same
> changes to e-texinfo, e-man and e-groff back-ends.
> 

sorry for the late answer.

I run all tests again plus a couple additional ones using a bigger
project: The image exports work as expected.

(I ran into another "no image" issue and had to verify it isn't related
to this issue.  It isn't.)

Thanks a lot for the help.

Best regards
Robert






[O] new exporter: too many blank lines in .org results in missing images from src blocks

2012-10-15 Thread Robert Klein
Hello,

I found another issue with the new exporter.

The export of the file below doesn't always include the image in the
export (that is, no image, not even a missing image).

When there is only one blank line after #+end_src, the image in
included.  Two or more blank lines, and there is no image.  in tex files
there is no \includegraphics, in html exports " "Count slowly to ten"
--> "Count slowly backwards to zero"
--> "Relax"
--> (*)
#+end_src



* next section

Lorem ipsum dolor sit amet...
--- snip --- snip ---



Re: [O] new exporter: too many blank lines in .org results in missing images from src blocks

2012-10-16 Thread Robert Klein
Hello,

On 10/15/2012 10:35 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Robert Klein  writes:
> 
>> The export of the file below doesn't always include the image in the
>> export (that is, no image, not even a missing image).
>>
>> When there is only one blank line after #+end_src, the image in
>> included.  Two or more blank lines, and there is no image.  in tex files
>> there is no \includegraphics, in html exports ">
>> Same happens when the org file ends after #+end_src and there are more
>> than two blank lines.  (That happened with the file I encountered the
>> issue first.  And, of course, didn't "see" any difference to a org file
>> where exporting worked... :-)
> 
> It should be fixed now. Thanks again for the report.
> 
> 
> Regards,
> 

yes, it works.

Thank you very much!

Best regards
Robert




[O] Patch: HTML body onload/onunload attribute support for new exporter

2012-10-17 Thread Robert Klein

Hallo,

I created a patch for the new exporter, so I can adding onload and 
onunload attributes to the body tag in HTML export.



I'm rather new to emacs lisp, please check if this is to be included in 
org-mode.


Best regards
Robert

--
Robert Klein - Max Planck-Institut für Polymerforschung
Ackermannweg 10
55128 Mainz
diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
index fcdf006..78582a5 100644
--- a/contrib/lisp/org-e-html.el
+++ b/contrib/lisp/org-e-html.el
@@ -132,7 +132,9 @@
(:html-table-tag nil nil org-e-html-table-tag)
(:xml-declaration nil nil org-e-html-xml-declaration)
(:LaTeX-fragments nil "LaTeX" org-export-with-LaTeX-fragments)
-   (:mathjax "MATHJAX" nil "" space)))
+   (:mathjax "MATHJAX" nil "" space)
+   (:html-body-onload nil nil org-e-html-body-onload)
+   (:html-body-onunload nil nil org-e-html-body-onunload)))
 
 
 
@@ -996,6 +998,33 @@ CSS classes, then this prefix can be very useful."
   :type 'string)
 
 
+ Template :: body-onload
+
+(defcustom org-e-html-body-onload nil
+  "Additional onload attribute for HTML body tags.
+The value of this variable is inserted in a onload attribute of
+the body tag in the HTML buffer.  Use this variable to include
+script code to be executed after loading the HTML page."
+  :group 'org-export-e-html
+  :type '(choice 
+  (const :tag "No preamble" nil)
+	  ((string  ) :tag "Custom string")))
+
+
+ Template :: body-onunload
+
+(defcustom org-e-html-body-onunload nil
+  "Additional onunload attribute for HTML body tags.
+The value of this variable is inserted in a onunload attribute of
+the body tag in the HTML buffer.  Use this variable to include
+script code to be executed when leaving the HTML page."
+  :group 'org-export-e-html
+  :type '(choice 
+  (const :tag "No preamble" nil)
+	  ((string  ) :tag "Custom string")))
+
+
+
 
 ;;; Internal Functions
 
@@ -1422,7 +1451,16 @@ holding export options."
(org-e-html--build-style info)
(org-e-html--build-mathjax-config info)
"\n"
-   "\n"
+   "\n"
(let ((link-up (org-trim (plist-get info :link-up)))
 	 (link-home (org-trim (plist-get info :link-home
  (unless (and (string= link-up "") (string= link-up ""))


Re: [O] Patch: HTML body onload/onunload attribute support for new exporter

2012-10-18 Thread Robert Klein

Hallo,

On 10/17/2012 03:50 PM, Nicolas Goaziou wrote:

Hello,

Robert Klein  writes:


I created a patch for the new exporter, so I can adding onload and
onunload attributes to the body tag in HTML export.


I'm rather new to emacs lisp, please check if this is to be included
in org-mode.


Before reviewing the patch, I'd like to know if the onload and onunload
attributes are common enough to justify the creation of a variable.
Indeed, it's already quite easy to achieve the same using personal
filters. I.e.:

#+begin_src emacs-lisp
(defun my-html-body-onload-filter (output backend info)
   "Add my onload attribute to  tag, if any."
   (when (and (eq backend 'e-html)
  (string-match "\n" output))
 (replace-match "\n" nil nil output)))

(add-to-list 'org-export-filter-final-output-functions
  'my-html-body-onload-filter)
#+end_src

If you think it's still worth adding variables in order to make it a tad
bit easier, I'll review the patch.

Thanks for your work.




The onload/onunload attributes probably aren't that much used.  If 
you're doing a lot of javascript on a web page they are useful.


Better not to include this in org-mode.  I'll investigate the use of a 
filter for myself.


Thanks and best regards
Robert






Re: [O] Org 8 Bug in interactive formula editing mode?

2014-07-21 Thread Robert Klein
Hi,

I confirm at least some variant of this.

I start emacs using the command line "emacs -Q -l .e2"  with .e2 being:

#+begin_src elisp
  (setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
  (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" .
org-mode))
#+end_src

org-mode version is git maint as of this morning.

For my test file (attached) when I open the "first headline" and type
C-c ' in one of the first table rows, I get shown the lines up to and
including "Dan".  Now, as long, as I navigate in formulas concerning the
visible rows, the table is visible in the org files buffer window and
the fields used by the formula are highlighted.

Now, when I go down to the first formula whose referenced field(s) are
not visible, the cursor in the org file jumps to the end of the file
which is then displayed at the upper end of the tabletest.org buffer window.



In "sufficient" long org files the visible cursor jumps to the end of
the org file buffer as soon as you navigate to a line with a formula in
the *Edit Formulae* buffer window.

PS: I've seen this for at least two weeks ago, but forgot about it again.

Best regards
Robert




On 07/21/2014 09:36 PM, Thorsten Grothe wrote:
> New test: 
> 
> I set up a minimal .emcas only for orgmode like this:
> 
> 
> (package-initialize)
> (add-to-list 'load-path "~/.emacs.d/src/org-mode/lisp")
> (require 'org)
> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
> (add-hook 'LaTeX-mode-hook 'orgtbl-mode)
> (add-hook 'message-mode-hook 'turn-on-orgtbl)
> 
> 
> My .emacs.d folder contains only the downloaded org files from git, same 
> error :-) 
> 
> 
> Regards
> Th. Grothe
> 



tabletest.org
Description: Lotus Organizer


Re: [O] Org 8 Bug in interactive formula editing mode?

2014-07-22 Thread Robert Klein
I made some quick tests with different org versions; the first one I see
this issue is git commit 30220ffcdcef45c0237f80a2347d4da19877f64a
(release_8.2.6-77-g30220f).

I don't see the patch causing this, yet; have to look further.

Best regards
Robert


On 07/22/2014 09:01 PM, Nick Dokos wrote:
> Nick Dokos  writes:
> 
>> Thorsten Grothe  writes:
>>
 If the frame is bigger than about 50 lines (so that after C-c ', it's
 big enough to show the whole table, including the formula and the empty
 line underneath it) then I don't see the problem.
>>>
>>> Thank you very much for your instructions!
>>>
>>> yes you are right for the org file. I tested Roberts example with your
>>> instructions and after resizing the formula frame a bit it works but
>>> unfortunately this does not work with my attached tex file. For the
>>> first table it works but for the two other tables it does not work
>>> even not if I try to resize the formula window, so that I can see the
>>> whole table and the formula line, sorry about that :-) I throws me to
>>> the end of the buffer again, funny thing :-)
>>>
> 
> BTW, I played with your file[fn:1] a bit and I can get around the
> problem by resizing the windows so that the file window is more than 100
> lines and the formula editing window is about a dozen lines (I can get
> about 132 lines on a monitor rotated into portrait mode - even more by
> reducing the font size, but my eyes start complaining at around that
> point).
> 
> So I'm pretty sure that the characerization stands: if the frame
> (and the file window) is big enough then the problem is not visible.
> 
> Nick
> 
> 
> 



Re: [O] Always use utf-8 for HTML export (No support for other coding systems)

2013-03-04 Thread Robert Klein
On 03/03/2013 06:47 PM, Jambunathan K wrote:
> 
> Always use utf-8 for HTML export (No support for other coding systems).
> 
> For or against.  Please register your views.
> 

Against.

Character set of a web document is determined by the /outermost/
"entity".  The outermost entity available is the web server.  If a web
server says, "This document is in iso-8859-1"  (instead of "I don't
care, which is pretty much the norm, today) the document better *is* in
iso-8859-1, or all the beautiful utf-8 characters are looking like Æ-{r
 or so.

Personally I prefer to use utf-8, too.  However, I've had a number of
uncooperative web servers (and operators), where I had to deliver
documents in 8859-1.

Best regards
Robert




[O] multiline emphasis, was: Re: latex italics in list, with quotation marks

2013-03-14 Thread Robert Klein
On 03/08/2013 11:58 AM, Myles English wrote:
> 
> Hi,
> 
> Just wondering if there is a better way to italicise across more than two 
> lines
> for a list item, currently this is the only way that works for me:
> 
> - on the assumption of equilibrium: /``even if there is equilibrium at
>   the pore sale, the upscaling, in this/ /if there is equilibrium at
>   blah the equilibrium/''
> 
> Thanks,
> 
> Myles
> 
> 

The same happens outside of lists.  I set

(setq org-emphasis-regexp-components
  '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 10))

which ought to increase the number of lines I can span an emphasis (only
change is the original 1 at the end to 10).  Doesn't work though, atm.
My org-version is release_8.0-pre-67-gd3361c.


Best regards
Robert



[O] exporting, too, was: Re: multiline emphasis, was: Re: latex italics in list, with quotation marks

2013-03-15 Thread Robert Klein
On 03/14/2013 09:56 AM, Robert Klein wrote:
> On 03/08/2013 11:58 AM, Myles English wrote:
>>
>> Hi,
>>
>> Just wondering if there is a better way to italicise across more than two 
>> lines
>> for a list item, currently this is the only way that works for me:
>>
>> - on the assumption of equilibrium: /``even if there is equilibrium at
>>   the pore sale, the upscaling, in this/ /if there is equilibrium at
>>   blah the equilibrium/''
>>
>> Thanks,
>>
>> Myles
>>
>>
> 
> The same happens outside of lists.  I set
> 
> (setq org-emphasis-regexp-components
>   '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 10))
> 
> which ought to increase the number of lines I can span an emphasis (only
> change is the original 1 at the end to 10).  Doesn't work though, atm.
> My org-version is release_8.0-pre-67-gd3361c.
> 

Hi,

when exporting multiline emphasis doesn't work, too (org-version:
release_8.0-pre-79-g791ebc).  I tried a little example file:

#+begin_src org
# -*- fill-column:75; coding: utf-8; -*-
#+TITLE: test file

This is a small /little text to get
some text spanning over more than
three lines, so i can try to emphasize
more than two lines/ in my example.
#+end_src


When I export this to LaTeX buffer (C-c C-e l L) or HTML buffer (C-c C-e
h H) org simply exports the slashes verbatim:


#+begin_example  ;; excerpt of LaTeX export
\begin{document}

\maketitle
\tableofcontents

This is a small /little text to get
some text spanning over more than
three lines, so i can try to emphasize
morethan two lines/ in my example.
% Generated by Org mode 8.0-pre in Emacs 24.2.1.

\end{document}
#+end_example


or, respectively:


#+begin_example  ;; excerpt of html export

This is a small /little text to get
some text spanning over more than
three lines, so i can try to emphasize
morethan two lines/ in my example.

#+end_example



My .emacs for the minimal example is as follows:

#+begin_src elisp
; no startup message
(setq inhibit-startup-message t)

;; I'm feeling religious about this:
(setq-default indent-tabs-mode nil)

;;  ask y or n instead of yes or no
(fset 'yes-or-no-p 'y-or-n-p)

;; indent after enter; I want this most of the time.
(global-set-key (kbd "RET") 'newline-and-indent)

;; use emacs with IME (avoid 'no dead-acute' error messages)
(load-library "iso-transl")

(setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" .
org-mode))
(require 'org)

;; change number of newlines for emphasized blocks
(setq org-emphasis-regexp-components
  '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 10))

#+end_src


Mebbe I just forgot some setting to get it working, though I'd like the
exporter to recognize the org-emphasis-regexp-components settings...


Best regards
Robert






Re: [O] exporting, too, was: Re: multiline emphasis, was: Re: latex italics in list, with quotation marks

2013-03-17 Thread Robert Klein
Hello,



> Robert Klein  writes:
> 
>> (require 'org)
>>
>> ;; change number of newlines for emphasized blocks
>> (setq org-emphasis-regexp-components
>>   '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 10))
>>
> 
> This should probably happen before org is loaded, according to the
> docstring.
> 

Thanks a lot, this works.  I didn't find (or understand) this in the
docstring, though. :(

>> Mebbe I just forgot some setting to get it working, though I'd like the
>> exporter to recognize the org-emphasis-regexp-components settings...
> 
> The exporter relies on the parser, which relies on `org-emph-re', which
> is built from `org-emphasis-regexp-components'.
> 

Best regards
Robert




Re: [O] New maintainer

2013-04-18 Thread Robert Klein
Hi Bastien,

thank you very very much for maintaining org-mode
for the last two years.

You did a great job maintaining org-mode and keeping
its community together.

I agree with everything Carsten says in his mail
"Changing the maintainer".

While I am happy it is Carsten of all people who
takes up the maintainership, at the same time I'm
very sorry you are stepping down.


Best regards
Robert



On 04/18/2013 06:53 PM, Bastien wrote:
> Dear all,
> 
> I'm stepping down as the Org maintainer.
> 
> Carsten accepted to step up, if the community agrees.
> Please raise your thumbs up or your concerns, if any.
> 
> I'm glad I had this opportunity to work as "Robin" and
> I'm even more glad "Batman" may strike back!
> 
> :)
> 


-- 
Robert Klein - Max Planck-Institut für Polymerforschung
Ackermannweg 10
55128 Mainz



Re: [O] [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults (was Re: [patch] ox-koma-letter.el: clean-up/semantic bug [4/4])

2013-05-24 Thread Robert Klein
Hi,

FWIW, from a users view it would be nice if:

- Use Author/Email information from org file
- If not present use information from LCO file
- if neither org file nor LCO file has any information use
  user-full-name and user-email-address

Could this be solved by having several e.g. `setkomavar{fromname}'
and so on in the tex file, so is created as follows:


if no #+AUTHOR in org-file and user-full-name is set:
add user-full-name
if #+LCO(s) in org-file:
add LCO file(s)
if #+AUTHOR in org-file:
add \setkomavar{fromname}{#+AUTHOR}
  same for email
add \setkomavar{signature}{\usekomavar{fromname}}


so the result tex file may have:


\setkomavar{fromname}{Hans Wurst}
\setkomavar{fromemail}{hans_wu...@example.com}
...
\setkomavar{fromname}{Reiner Zufall}
\setkomavar{fromemail}{reiner_zuf...@example.com}
\setkomavar{signature}{\usekomavar{fromname}}


This probably isn't a `clean' solution, but should work without a need
to grep LCO files.

Best regards
Robert


On 05/23/2013 12:06 AM, Viktor Rosenfeld wrote:
> Hi Rasmus,
> 
> Viktor Rosenfeld wrote:
> 
>> Hi Rasmus,
>>
>> Rasmus wrote:
>>
>>> Viktor Rosenfeld  writes:
>>>
 Or 5, keep the change from SENDER to AUTHOR but revert the default
 values to `org-koma-letter-*' variables. (Right now the AUTHOR and EMAIL
 lines could be removed because they duplicate the derived latex
 backend.)
>>>
>>> I once had a teacher who talked about the optimal degree of
>>> conservatism (as well speaking positively about being in the infamoues
>>> ivory tower).  5. is fine with me.  So I guess the deal is
>>>   1. default value is the same as in ox-latex.
>>>   2. . . . but it's kept in a seperete variable ox-kl variable.
>>>
 I think that switching from SENDER to AUTHOR, keeping the
 `org-koma-letter-{author,email}' variables in the KOMA backend, but
 setting them per default to `user-full-name' and `user-mail-address',
 would solve both your problems and let me keep LCO files. I would then
 simply set these `org-koma-letter-*' variables to `nil' and document
 this setup in the docstring. I'll see tomorrow if this is feasable.
>>>
>>> Does the attached patch work for you (also with ps tags?)
>>
>> It works, but I noticed the following problem: According to the Emacs
>> documentation `user-mail-address' is only set by Emacs after the
>> initialization process has completed and if it is not explicitly set
>> during initialization [1]. So, the defcustom of org-koma-letter-email
>> does not work as expected if the user has not set `user-mail-address'
>> before. Instead it is set to the empty string, which according to the
>> code setting `user-mail-address' means "not set yet."
>>
>> This can be taking care of by using `after-init-hook' as in the example
>> below. It has the added advantage that the value of `user-mail-address'
>> will be picked up regardless of whether it is set before or after
>> require'ing ox-koma-letter. 
>>
>> Note that this creates a slight inconsistency with regard to
>> `user-full-name' which is only picked up correctly if it is set before
>> require'ing ox-koma-letter. I've fixed this by a slightly complicated
>> defcustom definition of `org-koma-letter-author' and another
>> after-init-hook.
>>
>> I've also changed the docstring to indicate what are the default values
>> and added the :group and :type flags again.
> 
> I've put my changes into a patch against the current master (commit
> 06cdb2d2). Could you check it with your setup?
> 
> Cheers,
> Viktor
> 




Re: [O] [PATCH] ox-koma-letter.el: Reintroduce variables removed in commit 832c6fd with proper defaults (was Re: [patch] ox-koma-letter.el: clean-up/semantic bug [4/4])

2013-05-25 Thread Robert Klein
Hello,
On 05/25/2013 03:57 PM, Rasmus wrote:
> Alan Schmitt  writes:
> 
>> Hello,
>>
>> Viktor Rosenfeld writes:
>>
>>> Hi Robert,
>>>
>>> Robert Klein wrote:
>>>
>>>> Hi,
>>>>
>>>> FWIW, from a users view it would be nice if:
>>>>
>>>> - Use Author/Email information from org file
>>>> - If not present use information from LCO file
>>>> - if neither org file nor LCO file has any information use
>>>>   user-full-name and user-email-address
>>>>
>>>> Could this be solved by having several e.g. `setkomavar{fromname}'
>>>> and so on in the tex file, so is created as follows:
> 
> I'd go with 'no'.  It's not aesthetically pleasing and I don't want my
> output to look like LyX.  When feasible we should go for beautiful
> output.  This isn't always the case at the moment, but still.
>  
>>>> if no #+AUTHOR in org-file and user-full-name is set:
>>>> add user-full-name
>>>> if #+LCO(s) in org-file:
>>>> add LCO file(s)
>>>> if #+AUTHOR in org-file:
>>>> add \setkomavar{fromname}{#+AUTHOR}
>>>>   same for email
> 
> Currently the ordering is: #+AUTHOR > #+LCO and AUTHOR default to
> (user-full-name).

hmm, sorry, I did not express myself in a good way.

what I meant is, if #+AUTHOR defaults to (user-full-name), could the
\setkomavar commands be placed /before/ \LoadLetterOption in the TeX
file,  and after \LoadLetterOptions if #+AUTHOR is set in the .org file?

So you'd still get only one set of \setkomavar in the TeX file, but get
a (for me) more useful order of #+AUTHOR != (user-full-name) > #+LCO >
#+AUTHOR == (user-full-name)


Best regards
Robert




Re: [O] [Exporter] How to save 'info' plist for later use?

2013-07-10 Thread Robert Klein
Hi Thorsten,


I'm currently playing around with retrieving options, e.g. functions like:

#+begin_src elisp
(defun org-find-export-option (file option-name &optional backend)
  "Find the OPTION of FILE."
   (let* ((org-inhibit-startup t)
 (visiting (find-buffer-visiting file))
 (buffer (or visiting (find-file-noselect file)))
 option)
(with-current-buffer buffer
  (org-mode)
  (setq option
(plist-get (org-export-get-environment backend) option-name)))
(unless visiting (kill-buffer buffer))
option))



(defun org-get-comma-separated-options-as-list (file option)
  "Fetch OPTION from FILE as a list."

  (split-string
   (replace-regexp-in-string ", *" ","
 (org-find-export-option file option 'blog))
   "[,\n]"
   t))
#+end_src



org-get-comma-separated-options-as-list description:

If you got options in MYFILE inthe form of
#+OPTION_NAME: a, b, two words, something else
#+OPTION_NAME: and, comma, at end,
#+OPTION_NAME: for, example

call
(org-get-comma-separated-options-as-list MYFILE :option-name)

(:option-name is the KEYWORD in the options alist, cf. ox.el)

you will get them now as
'( "a" "b" "two words" "something else" "and" "comma" "at end" "for"
"example").
"





The code is some copy and pasting of a current project, but should give
you some ideas.


org-find-export-option is also a slightly changed copy of
ox-publish.el's org-publish-find-title.



Best regards
Robert



On 07/10/2013 12:56 PM, Thorsten Jolitz wrote:
> 
> Hi List, 
> 
> how do I get my hands on the 'info' plist (i.e. the communication-channel)
> when I try to export data that is (only an isolated) part of a parse-tree? 
> 
> Say that originally a whole buffer was parsed, thus the full tree and
> options info was available at that point. But then parts of the
> resulting parse-tree are extracted with org-element-map and are exported
> separately as data later on.
> 
> In that case, I don't know how to pass the original 'info' plist to the
> export function, so export results are not complete due to the missing
> context information.
> 
> Here is a minimal example:
> 
> With file minimal.org
> 
> #+begin_src org
> * A
> B
> #+end_src
> 
> I call
> 
> #+begin_src emacs-lisp
> (setq parse-tree
> (with-current-buffer
> (find-file-noselect
>  "/path/to/minimal.org")
>   (org-element-parse-buffer)))
> 
> (let ((elem (org-element-map parse-tree 'headline 'identity nil t)))
>   (insert (format "\n\n%s\n\n" elem))
>   ;; nil instead of info as 3rd parameter
>   (insert (org-export-data-with-backend  elem 'html nil))) 
> #+end_src
> 
> and get (note the incomplete IDs in the html)
> 
> #+begin_quote
> (headline (:raw-value A :begin 1 :end 7 :pre-blank 0 :hiddenp
> nil :contents-begin 5 :contents-end 7 :level 1 :priority
> nil :tags nil :todo-keyword nil :todo-type nil :post-blank
> 0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp
> nil :CATEGORY nil :title (A) :parent (org-data nil
> #0)) (section (:begin 5 :end 7 :contents-begin 5 :contents-end
> 7 :post-blank 0 :parent #0) (paragraph (:begin 5 :end
> 7 :contents-begin 5 :contents-end 7 :post-blank
> 0 :post-affiliated 5 :parent #1) B )))
> 
> 
> A
> 
> 
> B
> 
> 
> 
> #+end_quote
> 
> How could I get my hands on the 'info' plist during the buffer parsing
> and save it for later use in calls like
> 
> #+begin_src emacs-lisp
> (org-export-data-with-backend  elem 'html info)
> #+end_src
> 
> ?
> 


-- 
Robert Klein - Max Planck-Institut für Polymerforschung
Ackermannweg 10
55128 Mainz



Re: [O] Help with new exporter

2013-07-10 Thread Robert Klein
Hi John,

would you mind posting an example of the org file, too?  It would be
easier for me to wrap my thoughts about this..  (The gurus probably
don't it...)

Thanks a lot
Robert


On 07/10/2013 06:32 PM, John Rakestraw wrote:
> Greetings, list --
> 
> I've been using Philip Hirschhorn's exam documentclass
> (http://www-math.mit.edu/~psh/#ExamCls) for several years to produce my
> exams. I've been writing the exams in org-mode and using the exporter to
> produce the pdf.
> 
> I've recently moved to org 8.0. (I like it!) I've successfully converted
> all of my other export class definitions, but I can't figure out how to
> define the exam class so that I can export my exams. I've pasted below
> the class definition that worked with the previous exporter (I know it's
> clumsy, but it worked) and also a sample version of what I need in the
> tex file.
> 
> (I know I could just write the tex file directly, but it's nice to have
> all of the course materials included in human-readable form in the
> course org file.)
> 
> My problem is that I can't get the exporter to produce chunks like this:
> 
> \begin{questions}
> \question
> A paragraph describing how the students should answer the following
> questions.
> \begin{parts}
> \part
> A multi-line question
> \part
> Another multi-line question
> \end{parts}
> \end{questions}
> 
> Thanks for whatever advice anyone can offer.
> 
> --John
> 
> 
> Old template:
> --8<---cut here---start->8---
>   (setq org-export-latex-classes (cons '("exam"
> ### I know that in the new exporter I need to change this variable to
> "org-latex-classes" ###
>   "% BEGIN exam Defaults
>   [NO-DEFAULT-PACKAGES]
>   [PACKAGES]
>   \\documentclass[12pt]{exam}
>   \\usepackage{palatino}
>   \\extrawidth{.5in}
>   \\extraheadheight{-.75in}
>   \\extrafootheight[-3in]{-.75in}
>   \\pagestyle{headandfoot}
>   \\NoKey
>   \\NumberOfVersions{1}
>   \\renewcommand\\thequestion{\\Roman{question}}
>   \\renewcommand\\thepartno{\\arabic{partno}}
>   \\renewcommand\\partlabel{\\thepartno.}
> 
> 
>   % END exam Defaults
> 
>   "
>  ("\\begin{questions}" "\\end{questions}"
> "\\begin{questions}" "\\end{questions}")
>  ("\\question" . "\\question*")
>  ("\\begin{parts}" "\\end{parts}" "\\begin{parts}"
> "\\end{parts}")
>  ("\\part" . "\\part*"))
> 
>   org-export-latex-classes))
> 
> --8<---cut here---end--->8---
> 
> An example of what I need the exporter to produce:
> 
> --8<---cut here---start->8---
> \documentclass[letterpaper]{exam}
> \extrawidth{.5in}
> \extraheadheight[.3in]{-.75in}
> \extrafootheight{-.25in}
> \raggedright
> \renewcommand\thequestion{\Roman{question}}
> \renewcommand\thepartno{\arabic{partno}}
> \renewcommand\partlabel{\thepartno.}
> \firstpageheader{Name: \enspace\makebox[3in]{\hrulefill}\\Exam
> 1\\}{}{Introductory Class \\May 7, 2013\\}
> \begin{document}
> 
> \begin{coverpages}
> text describing how the exam should be printed and prepared for
> distribution.
> \end{coverpages}
> 
> 
> 
> \begin{questions}
> \question
> A paragraph here describes this section and tells students how many
> terms to
> identify.
> \begin{parts}
> \part
> term 1
> \vspace*{\fill}
> \part
> term 2
> \vspace*{\fill}
> \part
> term 3
> \vspace*{\fill}
> \part
> term 4
> \vspace*{\fill}
> \part
> term 5
> \vspace*{\fill}
> \part
> term 6
> \vspace*{\fill}
> \part
> term 7
> \vspace*{\fill}
> \part
> term 7
> \vspace*{\fill}
> \part
> term 8
> \end{parts}
> \end{questions}
> \newpage
> \fillwithdottedlines{\fill}
> \newpage
> \begin{questions}
> \question
> Short Answer. A paragraph describing how I want students to respond to the
> following questions. I want to leave vertical space filled with dotted
> lines
> between the questions, and I want two questions on each page.
> \begin{parts}
> \part
> This is the first question. It will be several lines long, so I'm
> writing enough
> filler here to add at least a second line.
> \fillwithdottedlines{\fill}
> \part
> This is the second question. It will also be several lines long, so I need
> filler enough to get to the second line for this example.
> \fillwithdottedlines{\fill}
> 
> \newpage
> \fillwithdottedlines{\fill}
> \newpage
> \part
> This is the 3d question.
> \fillwithdottedlines{\fill}
> \end{parts}
> \end{questions}
> \newpage
> \fillwithdottedlines{\fill}
> \newpage
> \begin{questions}
> \question
> Essay Question. This is a section of essay questions. Students will
> answer only
> one of these questions, so I don't need to leave space between the two
> questions.
> \begin{parts}
> \part
> The first of the essay questions goes here. It will be several lines
> long, so I
> want enough text in the example to provide a line break.
> \part
> The second essay question. It is also several lines long, so I'll add so

Re: [O] Help with new exporter

2013-07-10 Thread Robert Klein
Hi John.

thank you for the example org file.

I made two kinds of changes, one in the org-latex-classes definition and
one in the .org-file itself:


I changed the class definition for org-latex-classes to

#+begin_src emacs-lisp
("exam"
 "\\documentclass[12pt]{exam}
% BEGIN exam Defaults
[NO-DEFAULT-PACKAGES]
[PACKAGES]

\\usepackage{palatino}
\\extrawidth{.5in}
\\extraheadheight{-.75in}
\\extrafootheight[-3in]{-.75in}
\\pagestyle{headandfoot}
\\NoKey
\\NumberOfVersions{1}
\\renewcommand\\thequestion{\\Roman{question}}
\\renewcommand\\thepartno{\\arabic{partno}}
\\renewcommand\\partlabel{\\thepartno.}

% END exam Defaults
"
 ("\\begin{questions}{%s}" "\\end{questions}")
 ("\\question{%s}" . "\\question*{%s}")
 ("\\begin{parts}{%s}" "\\end{parts}")
 ("\\part{%s}" . "\\part*{%s}"))
#+end_src


Note the {%s} after the each opening clause.  I left the unnumbered part
of questions and parts out in my version, as I didn't see a difference
(no "unnumbered" \begin{questions} / \begin{parts} in the exam class?).

The documentation of org-latex-classes in ox-latex.el seems to be
confusing; at one place it says "A %s formatter is mandatory in each
section string and will be replaced by the title of the section." an at
another "The opening clause should have a %s to represent the section
title.".  Probably the "should have" in the second place ought to be a
"must have".


Anyway, in the .org file I added a space character to all empty
headings, e.g.



Without the space I first for a log of "\textbf{**}" in the output.


After both changes the resulting document looks like something you might
have wanted in the first place.


I got some weird numberings throughout the document, but this may be a
result of my setup.  Could you please check this, and describe anything
weird in your results?

Best regards
Robert





On 07/10/2013 06:32 PM, John Rakestraw wrote:
> Greetings, list --
> 
> I've been using Philip Hirschhorn's exam documentclass
> (http://www-math.mit.edu/~psh/#ExamCls) for several years to produce my
> exams. I've been writing the exams in org-mode and using the exporter to
> produce the pdf.
> 
> I've recently moved to org 8.0. (I like it!) I've successfully converted
> all of my other export class definitions, but I can't figure out how to
> define the exam class so that I can export my exams. I've pasted below
> the class definition that worked with the previous exporter (I know it's
> clumsy, but it worked) and also a sample version of what I need in the
> tex file.
> 
> (I know I could just write the tex file directly, but it's nice to have
> all of the course materials included in human-readable form in the
> course org file.)
> 
> My problem is that I can't get the exporter to produce chunks like this:
> 
> \begin{questions}
> \question
> A paragraph describing how the students should answer the following
> questions.
> \begin{parts}
> \part
> A multi-line question
> \part
> Another multi-line question
> \end{parts}
> \end{questions}
> 
> Thanks for whatever advice anyone can offer.
> 
> --John
> 
> 
> Old template:
> --8<---cut here---start->8---
>   (setq org-export-latex-classes (cons '("exam"
> ### I know that in the new exporter I need to change this variable to
> "org-latex-classes" ###
>   "% BEGIN exam Defaults
>   [NO-DEFAULT-PACKAGES]
>   [PACKAGES]
>   \\documentclass[12pt]{exam}
>   \\usepackage{palatino}
>   \\extrawidth{.5in}
>   \\extraheadheight{-.75in}
>   \\extrafootheight[-3in]{-.75in}
>   \\pagestyle{headandfoot}
>   \\NoKey
>   \\NumberOfVersions{1}
>   \\renewcommand\\thequestion{\\Roman{question}}
>   \\renewcommand\\thepartno{\\arabic{partno}}
>   \\renewcommand\\partlabel{\\thepartno.}
> 
> 
>   % END exam Defaults
> 
>   "
>  ("\\begin{questions}" "\\end{questions}"
> "\\begin{questions}" "\\end{questions}")
>  ("\\question" . "\\question*")
>  ("\\begin{parts}" "\\end{parts}" "\\begin{parts}"
> "\\end{parts}")
>  ("\\part" . "\\part*"))
> 
>   org-export-latex-classes))
> 
> --8<---cut here---end--->8---
> 
> An example of what I need the exporter to produce:
> 
> --8<---cut here---start->8---
> \documentclass[letterpaper]{exam}
> \extrawidth{.5in}
> \extraheadheight[.3in]{-.75in}
> \extrafootheight{-.25in}
> \raggedright
> \renewcommand\thequestion{\Roman{question}}
> \renewcommand\thepartno{\arabic{partno}}
> \renewcommand\partlabel{\thepartno.}
> \firstpageheader{Name: \enspace\makebox[3in]{\hrulefill}\\Exam
> 1\\}{}{Introductory Class \\May 7, 2013\\}
> \begin{document}
> 
> \begin{coverpages}
> text describing how the exam should be printed and prepared for
> distribution.
> \end{coverpages}
> 
> 
> 
> \begin{questions}
> \question
> A paragraph here describes this section and tells s

Re: [O] Help with new exporter

2013-07-10 Thread Robert Klein
Hi John,

I don't think I had those square brackets, yesterday, but see at the end
about them.


Anyway, I thought of something which gives me a result I'd say is Ok for me:

1. Change the .org files as follows
   - add a space to empty headings (as written yesterday)
   - add "texht:nil" to the #+OPTIONS: line (without the quotes)

2. Use the following class definition:

#+begin_src emacs-lisp
(setq org-latex-classes
  '(("exam"
 "\\documentclass[12pt]{exam}
% BEGIN exam Defaults
[NO-DEFAULT-PACKAGES]
[PACKAGES]

\\usepackage{palatino}
\\extrawidth{.5in}
\\extraheadheight{-.75in}
\\extrafootheight[-3in]{-.75in}
\\pagestyle{headandfoot}
\\NoKey
\\NumberOfVersions{1}
\\renewcommand\\thequestion{\\Roman{question}}
\\renewcommand\\thepartno{\\arabic{partno}}
\\renewcommand\\partlabel{\\thepartno.}

% END exam Defaults
"
 ("\\begin{questions} %% %s" "\\end{questions}")
 ("\\question %% %s" . "\\question* %% %s")
 ("\\begin{parts} %% %s" "\\end{parts}")
 ("\\part %% %s" . "\\part* %% %s"
#+end_src

As you can see, I still have the %s (now without the curly braces) but
as a LaTeX comment after %...

About the labels, well, I'd just leave them; as long as you don't
reference them they shouldn't disturb anything.


If you still get those square brackets; I use org-mode from the git
repository, as of yesterday or the day before.  Are you using org-mode
8.0.2 or earlier?  I think this gets fixed by Aaron Ecay's patch from
May 02/03.  If you don't want to use the git version, download version
8.0.5 from orgmode.org.


Does this work for you?


Best regards
Robert




On 07/10/2013 10:46 PM, John Rakestraw wrote:
> Hi, Robert --
> 
> Thanks very much for your work on this. I'm now *much* closer than I
> was. However, I'm not there yet.
> 
> Here's a snippet of the tex file that I need:
> 
> --8<---cut here---start->8---
> \begin{questions}
> \question
> A paragraph here describes this section and tells students how many
> terms to
> identify.
> \begin{parts}
> \part
> term 1
> \vspace*{\fill}
> \part
> term 2
> \vspace*{\fill}
> \part
> term 3
> \vspace*{\fill}
> \part
> term 4
> \vspace*{\fill}
> \part
> term 5
> \vspace*{\fill}
> \part
> term 6
> \vspace*{\fill}
> \part
> term 7
> \vspace*{\fill}
> \part
> term 7
> \vspace*{\fill}
> \part
> term 8
> \end{parts}
> \end{questions}
> --8<---cut here---end--->8---
> 
> However, if I use the org-latex-class definition that you suggested,
> this is what I get:
> 
> --8<---cut here---start->8---
> \begin[]{questions}{}
> \label{sec-1}
> \question[]{}
> \label{sec-1-1}
> A paragraph here describes this section and tells students how many
> terms to
> identify.
> \begin[]{parts}{}
> \label{sec-1-1-1}
> \part[]{}
> \label{sec-1-1-1-1}
> term 1
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-2}
> term 2
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-3}
> term 3
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-4}
> term 4
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-5}
> term 5
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-6}
> term 6
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-7}
> term 7
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-8}
> term 8
> \vspace*{\fill}
> 
> \part[]{}
> \label{sec-1-1-1-9}
> term 9
> \newpage
> \fillwithdottedlines{\fill}
> \newpage
> \end{parts}
> 
> --8<---cut here---end--->8---
> 
> 
> The additional lines in the tex file add numbers and oddly formatted
> text to the pdf. The numbering scheme is also off -- these lines in the
> class definition:
> 
> \renewcommand\thequestion{\Roman{question}}
> \renewcommand\thepartno{\arabic{partno}}
> \renewcommand\partlabel{\thepartno.}
> 
> are supposed to have to have the question-level headings numbered with
> Roman numerals and the part-level headings numbered with Arabic numbers.
> But for some reason that numbering scheme isn't imposed.
> 
> Perhaps I need either just to write in latex or to work with what Rasmus
> is suggesting; I've not had time yet to digest his suggestions. I'm
> floating on the edge of my knowledge here
> 
> Thanks again.
> 
> --John
> 


-- 
Robert Klein - Max Planck-Institut für Polymerforschung
Ackermannweg 10
55128 Mainz



Re: [O] Help with new exporter

2013-07-12 Thread Robert Klein
(sorry, this should've gone to the list the first time)

Hi John,

sorry, I can't help you with the filters.

On the other hand, I don't see any reason why you gt whose square brackets.

I tried different versions of org-mode, and never got *empty* square
brackets.

E.g. I tried with org-mode 8.0.5 release installed in ~/org-8.0.5  (I
did a "make" and "make autoloads" in this directory) and used the
exam.org file as attached and the attached exam.el for configuration.

I started emacs with from the directory exam.org and exam.el are, using
the following command:

emacs -Q -l exam.el exam.org

Exporting to LaTeX file results in the attached exam.tex.

I tried emacs version 23.1 and 24.2.

(For sure, my latex installation doesn't like the \NoKey and
\NumberOfVersions ...)


You could try, if you get can get the same results I do and then work
through your emacs configuration.

I've got no other idea at the moment.

Best regards
Robert



On 07/12/2013 01:05 AM, John Rakestraw wrote:
> Hi, list --
> 
> I understand the value of working on this myself -- what better way to
> learn? -- but after a few hours of reading the docs and scouring the
> list, I've reached the point of seeking at least a hint for where to go.
> (There's much more information higher in this thread, but I'm trying to
> focus rather narrowly on the problem here to keep the email relatively
> short.)
> 
> I'm trying to export to a pdf, using Phil Hirschhorn's exam.cls. The
> document class definition I have (thanks, Robert!) gets me almost to
> where I need to be. However, it leaves me with square brackets at
> several points in the tex file. I need to delete those brackets.
> 
> That is, I need to change "\begin[]{questions}" to "{\begin{questions}".
> 
> Following Charles's advice, I'm trying to define and use a filter.
> However, I know little enough about LaTeX and lisp that I can't figure
> out why what I have isn't working. At the risk of making it very clear I
> know even less than nothing, here's what I've worked up:
> 
> --8<---cut here---start->8---
>   (defun jr-org-delete-brackets-from-tex-file
>  (text backend info)
>  (while (re-search-forward "\\[]" nil t)
>  (replace-match ""))
>  text)
> 
>(add-to-list 'org-export-filter-final-output-functions
>      'jr-org-delete-brackets-from-tex-file)
> --8<---cut here---end--->8---
> 
> This doesn't work.
> 
> Can someone at least give me a hint on what I need to do differently?
> 
> Thanks very much.
> 


-- 
Robert Klein - Max Planck-Institut für Polymerforschung
Ackermannweg 10
55128 Mainz



(setq load-path (cons "~/org-8.0.5/lisp" load-path))
(require 'org)
(require 'ox)

(setq org-latex-classes
  '(("exam"
 "\\documentclass[12pt]{exam}
% BEGIN exam Defaults
[NO-DEFAULT-PACKAGES]
[PACKAGES]

\\usepackage{palatino}
\\extrawidth{.5in}
\\extraheadheight{-.75in}
\\extrafootheight[-3in]{-.75in}
\\pagestyle{headandfoot}
\\NoKey
\\NumberOfVersions{1}
\\renewcommand\\thequestion{\\Roman{question}}
\\renewcommand\\thepartno{\\arabic{partno}}
\\renewcommand\\partlabel{\\thepartno.}

% END exam Defaults
"
 ("\\begin{questions} %% %s" "\\end{questions}")
 ("\\question %% %s" . "\\question* %% %s")
 ("\\begin{parts} %% %s" "\\end{parts}")
 ("\\part %% %s" . "\\part* %% %s"




exam.org
Description: Lotus Organizer
\documentclass[10pt]{exam}
% BEGIN exam Defaults

\usepackage{palatino}
\extrawidth{.5in}
\extraheadheight{-.75in}
\extrafootheight[-3in]{-.75in}
\pagestyle{headandfoot}
\NoKey
\NumberOfVersions{1}
\renewcommand\thequestion{\Roman{question}}
\renewcommand\thepartno{\arabic{partno}}
\renewcommand\partlabel{\thepartno.}

% END exam Defaults


\extrawidth{.5in}
\extraheadheight[.3in]{-.75in}
\extrafootheight{-.25in}
\raggedright
\author{Robert Klein}
\date{\today}
\title{}
\begin{document}

\renewcommand\thequestion{\Roman{question}}
\renewcommand\thepartno{\arabic{partno}}
\renewcommand\partlabel{\thepartno.}
\firstpageheader{Name:\enspace\makebox[3in]{\hrulefill}\\Exam 1\\}{}{Theo 001 -- Rakestraw\\February 14, 2013\\}
\begin{coverpages}
this is just some text
\end{coverpages}

\begin{questions} % Meaningless header
\label{sec-1}
\question % 
\label{sec-1-1}
\textbf{Identification of Terms}. Identify/define and give the significance
of \textbf{six} of the following. If you identify/define more than six
without indicating clearly which six you want me to grade, I will
grade your first six answers (18 points).
\begin{parts} % Terms
\label{sec

Re: [O] Bug: koma-letter-export does not work [8.0.6(8.0.6-5-gb4a8ec-elpa @ /home/stefan/.emacs.d/elpa/org-20130722/)]]

2013-07-26 Thread Robert Klein
On 07/26/2013 12:12 PM, Stefan Reichör wrote:
> Hello Alan!
> 
>> ste...@xsteve.at writes:
>>
>>> Yes, I get the error message after hitting C-c C-e.
>>>
>>> I installed org via M-x list-packages yesterday.
>>
>> Are you able to export an org file to a different format (like html)?
>> I'm trying to see whether this is koma-specific.
> 
> No. In my installation exporting seems completly broken.
> I get the same error with a minimal org file.
> 
> Stefan.
> 


Hi Stefan,

probably your org installation is borked, for example files from
different org versions mixed together.  I'd delete the org installation
and make install it again.

Best regards
Robert




Re: [O] How to convert a string to Org parsed tree

2013-07-28 Thread Robert Klein
On 07/28/2013 12:18 PM, Yujie Wen wrote:
> Hi,
> 
>   I am working on the org-reveal exporter and I need to convert a string
> get from org-element-property into HTML format. The property string have
> some Org-mode markups that need to be converted to relevant HTML labels.
> For example, a string of "/italic/" to "italic"
> 
>   Is there any existing Org-mode functions can help me to achieve this
> kind of functionality?
> 
> Regards,
> Yujie
> 

Hi Yujie,

how about applying the exporter to the string, e.g. something like

(with-temp-buffer
  (insert (plist-get plist yout-property-string))
  (org-html-export-as-html nil nil nil t new-plist)
  (buffer-string))

(didn't test, just typed this into the mail)


Best regards
Robert




Re: [O] help me get started with org-publish?

2013-11-07 Thread Robert Klein
Hi,

I don't put parentheses around org-heml-publish-to-html.


The rest of the configuration looks Ok to me.


Can you show us a (minimal) example file you want to publish?

Thanks and best regards
Robert


On 11/07/2013 11:48 PM, Jay Dixit wrote:
> Hi Bastien,
> 
> Good to hear from you. Thanks for the response.
> 
> Exporting to HTML works fine. I get errors only with org-publish.
> 
> Here's my latest attempt:
> https://gist.github.com/jaydixit/7363158
> 
>  I'm running on OSX running Aquamacs 2.5 (Emacs 23.4.1) and org-mode 8.2.1.
> 
> Here's my org-publish configuration. I believe it comes from a tutorial you
> put up somewhere.
> 
> (setq org-publish-project-alist
>   '(("blog"
>  :base-directory "~/blog-test/"
>  :html-extension "html"
>  :base-extension "org"
>  :publishing-directory "~/public_html/"
>  :publishing-function (org-html-publish-to-html)
>  :html-preamble nil
>  :html-postamble nil)))
> 
> 
> Thanks,
> Jay
> 
> 
> 
> 
> Jay Dixit
> jaydixit.com
> newyorkwritersintensive.com
> (646) 355-8001
> fol­low @jaydixit 
> Jay Dixit
> 
> 
> On Mon, Nov 4, 2013 at 6:50 AM, Bastien  wrote:
> 
>> Hi Jay,
>>
>> Jay Dixit  writes:
>>
>>> I'm trying to set up org-publish for HTML export and I keep getting
>>> strange errors related to org-footnote-normalize.
>>> https://gist.github.com/7131173
>>
>> Do you also get errors when *exporting*, not publishing?
>>
>> If so, can you send a minimal example of the file you can't
>> export, along with your Org version and configuration?
>>
>> Thanks,
>>
>> --
>>  Bastien
>>
> 






[O] derived exporter EXPORT_... options

2013-11-26 Thread Robert Klein
Hi,

I'm trying to user EXPORT_... options in subtree export in a derived
exporter.

Using attached ox-hans exporter and the org file hans.org,
I only get "Wurst" as :hans-option, never "Bratwurst", as given under
the heading "Two", using both options with subtree export (C-c C-e C-d j
h  and C-c C-e C-d j H.

Do I misunderstand subtree export?

Thanks for any help.

Best regards
Robert



-- 
Robert Klein
UNIX Operations, Max Planck-Institut für Polymerforschung
Ackermannweg 10
55218 Mainz


hans.org
Description: Lotus Organizer
;; hans example derived exporter
(require 'ox-html)

(org-export-define-derived-backend
 'hans 'html
 :menu-entry
 '(?j "Export w/ HTML-derived hans exporter"
  ((?h "To temporary buffer (wurst)" org-hans-export-as-wurst)
   (?H "To temporary buffer (bratwurst)" org-hans-export-as-bratwurst)))
 :options-alist
 '((:hans-option "HANS_OPTION" nil nil t)))


(defun org-hans-export-as-wurst (&optional a subtreep v b ext-plist)
  (interactive)
  (let* ((doc-env (org-export-get-environment 'hans subtreep ext-plist)))
(message "HANS-OPTION: %s"
 (org-element-interpret-data
  (plist-get doc-env :hans-option)))
(message "EXPORT-HANS-OPTION: %s"
 (org-element-interpret-data
  (plist-get doc-env :export-hans-option)


(defun org-hans-export-as-bratwurst (&optional a subtreep v b ext-plist)
  (interactive)
  (save-excursion
(save-restriction
  (when subtreep
(org-narrow-to-subtree)
(goto-char (point-min))
(forward-line)
(narrow-to-region (point) (point-max)))
(let* ((doc-env (org-export-get-environment 'hans subtreep ext-plist)))
  (message "HANS-OPTION: %s"
   (org-element-interpret-data
(plist-get doc-env :hans-option)))
  (message "EXPORT-HANS-OPTION: %s"
   (org-element-interpret-data
(plist-get doc-env :export-hans-option)))



(provide 'ox-hans)


Re: [O] useing :PROPERTIES: to set export options for pdflatex

2013-11-27 Thread Robert Klein
Hello,

On 11/27/2013 06:15 PM, Christopher W. Ryan wrote:
> Below is what I have in a subtree that I export to pdf.  It does what I
> want. But isn't there a way to do it entirely with setting tree
> PROPERTIES? (without use of #+LATEX_HEADER or #+OPTIONS)  I seem to
> recall there is, but for the life of me I can't find the link to the
> documentation I thought I had saved.
> 
> Thanks.
> 
> 
> ** Changes adopted at CSE committee meeting [2013-11-25 Mon]
> :PROPERTIES:
> :EXPORT_FILE_NAME: ThomasWileyCloseOf-11-25-2013
> :EXPORT_TITLE: Thomas Wiley as Adopted by CSE Committee 25 November 2013
> :END:
> #+LATEX_HEADER: \usepackage[margin=1in]{geometry}
> #+OPTIONS: toc:nil

The answer is the same Nicolas sent me yesterday on a different question
("derived exporter EXPORT_... options"):

You can use

** Changes adopted at CSE committee meeting [2013-11-25 Mon]
:PROPERTIES:
:EXPORT_FILE_NAME: ThomasWileyCloseOf-11-25-2013
:EXPORT_TITLE: Thomas Wiley as Adopted by CSE Committee 25 November 2013
:EXPORT_LATEX_HEADER: \usepackage[margin=1in]{geometry}
:EXPORT_OPTIONS: toc:nil
:END:

Best regards,
Robert



-- 
Robert Klein
UNIX Operations, Max Planck-Institut für Polymerforschung
Ackermannweg 10
55218 Mainz



Re: [O] derived exporter EXPORT_... options

2013-11-27 Thread Robert Klein
Thanks a lot, I was still thinking in old exporter terms.

Best regards
Robert


On 11/26/2013 08:49 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Robert Klein  writes:
> 
>> I'm trying to user EXPORT_... options in subtree export in a derived
>> exporter.
>>
>> Using attached ox-hans exporter and the org file hans.org,
>> I only get "Wurst" as :hans-option, never "Bratwurst", as given under
>> the heading "Two", using both options with subtree export (C-c C-e C-d j
>> h  and C-c C-e C-d j H.
>>
>> Do I misunderstand subtree export?
> 
> Keyword are global. Subtree export options are expected to be properties
> attached to the root headline:
> 
>   * Two
> :PROPERTIES:
> :EXPORT_HANS_OPTION: Bratwurst
> :END:
> 
> Also, the property name will still be :hans-option (i.e. no "export-"
> appended). During a subtree export the property has precedence over the
> keyword.
> 
> 
> Regards,
> 


-- 
Robert Klein
UNIX Operations, Max Planck-Institut für Polymerforschung
Ackermannweg 10
55218 Mainz



Re: [O] http address for cloning org-mode git

2015-09-23 Thread Robert Klein
Hi,

Kaushal Modi  wrote:

> Just to clarify,
> 
> git clone http://orgmode.org/org-mode.git org-mode
> 
> gets stuck at "Cloning into 'org-mode' ..."


That's the point where it typically take a couple of minutes to
complete for me.

Best regards
Robert

> 
> But git cloning the mirror http repo works fine.
> 
> 
> 
> --
> Kaushal Modi
> 
> On Wed, Sep 23, 2015 at 3:29 PM, Achim Gratz 
> wrote:
> 
> > Suvayu Ali writes:
> > > On Wed, Sep 23, 2015 at 03:03:42PM -0400, Kaushal Modi wrote:
> > >> I cannot access the git: repo address and so had been using the
> > >> http: version till now ( http://repo.or.cz/r/org-mode.git/ ).
> > >
> > > That is a mirror, a relic from the old days when that used to be
> > > the official repo.  Maybe try:  http://orgmode.org/org-mode.git
> >
> > No, that never was the official repo.  I've set up that mirror.
> >
> >
> > Regards,
> > Achim.
> > --
> > +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
> >
> > Samples for the Waldorf Blofeld:
> > http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
> >
> >
> >




Re: [O] org export outcomes differ from one attempt to the next

2015-09-29 Thread Robert Klein
Hi,

Nicolas Goaziou  wrote:

> Hello,
> 
> Eric S Fraga  writes:
> 
> > Actually, my settings are at the end of the whole 4000+ line file
> > so I am not sure what you are suggesting I try.  If I delete the
> > whole settings subtree, the exports all result in the same LaTeX.
> > However, that is of no use to me, obviously.  I guess I can try to
> > add one line at a time to see when the export breaks.  I may try
> > that tomorrow.
> 
> Providing a shorter test file would be helpful, no matter how much
> settings you have.
> 
> > I guess I would like some insight into how the latex_header lines
> > are parsed by org, maybe in org-element?
> 
> They are collected in `org-export--get-inbuffer-options' which is
> called by `org-export-get-environment'.
> 
> IIRC, Robert Klein's problem was due to an explicit call to
> `org-export-get-environment' at Babel evaluation time, before the
> buffer was correctly prepared for export. If you call
> `org-export-get-environment' within your settings, it may be related.

is there another way to get property values during export (i use them
in #+LaTeX_Header: lines).

Thanks and best regards
Robert




Re: [O] small caps

2015-10-29 Thread Robert Klein
Hi,

Matt Price wrote:
> do we have a syntax for the "small caps" text attribute in Org? If not,
> should we? It is available in odt, html, and latex, and is used in some
> bibliographic styles. 


You can add a link type, e.g.:

#+begin_src emacs-lisp
  (org-add-link-type
   "fm" nil
   (lambda (path desc format)
 (cond
  ((eq format 'html)
   (cond
((equal path "sc")
 (format "%s"
 desc))
((equal path "it")
 (format "%s" desc))
((equal path "bf")
 (format "%s" desc))
((equal path "tt")
 (format "%s" desc))
(t (format "%s" desc
  ;; "" )))
  ((eq format 'latex)
   (format "\\text%s{%s}" path desc))
  ((eq format 'odt)
   (cond
((equal path "sc")
 (format "hello" desc))
;; more code for it, bf, tt etc.
))
  (t Y
#+end_src

The odt stuff I typed right into this mail, so it probably doesn't
word out of the box. (don't ask me about the "(t Y)" at the end; don't
know...)

Anyway, now you can use small capitals as [[fm:sc][ad]] and you get
"ad" in small caps.

For my documents I set the following macros for small capitals and
teletype:

#+Macro: sc [[fm:sc][$1]]
#+Macro: tt [[fm:tt][$1]]

Now you can use the macros like {{{sc(ad)}}} or {{{sc(Text in Small
Caps)}}}. Note, the uppercase letters will remain uppercase.

Best regards
Robert



Re: [O] orgmode.org is down?

2015-11-29 Thread Robert Klein
Hi,

Bastien apparently already restarted it.

Thanks a lot, Bastien!

Best regards
Robert


On 11/29/2015 01:40 AM, Ishikawa Takaaki wrote:
> Dear Bastien and all,
> 
> @rafiks  reported me the official website is
> down now.
> Port 22 is open, but 80 is filtered.
> Please restart httpd :-)
> 
> 
> Best,
> Takaaki
> 
> --
> tak...@ieee.org 



Re: [O] Bug: html-preamble doesn't work with a function [8.3.2 (8.3.2-39-gd537a3-elpa @ /home/pillow/.emacs.d/elpa/org-20151123/)]

2015-12-15 Thread Robert Klein
Hi,

I only use a function name, e.g.

(defun my-html-preamble (options)
"my preamble")

and

(setq org-publish-project-alist
  '(
("org-notes"
 :base-directory "~/org/"
 :base-extension "org"
 :publishing-directory "~/public_html/"
 :recursive t
 :publishing-function org-html-publish-to-html
 :html-preamble my-html-preamble)))

Does this work for you?

Best regards
Robert


On 12/12/2015 08:26 PM, Pillow Kuda Sai wrote:
> My setup:
> ;;; Minimal setup to load latest 'org-mode'
> ;; activate debugging
> (setq debug-on-error t
>   debug-on-signal nil
>   debug-on-quit nil)
> 
> ;; add latest org-mode to load path
> (add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa/org-20151123/"))
> (add-to-list 'load-path (expand-file-name
> "~/.emacs.d/elpa/org-20151123/" t))
> 
> What I did:
> (require 'ox-publish)
> (setq org-publish-project-alist
>   '(
>   ("org-notes"
>:base-directory "~/org/"
>:base-extension "org"
>:publishing-directory "~/public_html/"
>:recursive t
>:publishing-function org-html-publish-to-html
>:headline-levels 4 ; Just the default for this project.
>:auto-preamble t
>;; :html-preamble "Howdy" ; does work
>:html-preamble (concat "Howdy")
>)
>   ("org-static"
>:base-directory "~/org/"
>:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
>:publishing-directory "~/public_html/"
>:recursive t
>:publishing-function org-publish-attachment
>)
>   ("org" :components ("org-notes" "org-static"
> 
> What I expected: All off the above code is from
> http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html
> except for the :html-preamble part. I want to add my own preamble by
> using a function. :html-preamble sets org-html-preamble (the options
> are: nil, t, string, function that must return a string). When using a
> string (:html-preamble "Howdy") it works. When using a function that
> returns a string (:html-preamble (concat "Howdy")) it doesn't work.
> 
> I'm not entirely sure if this is a bug or if I'm missing something but
> hopefully the mailing-list can help me out :)
> 
> Thanks in advance, Pillow
> 
> 
> 
> 
> Emacs  : GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
>  of 2015-10-09
> Package: Org-mode version 8.3.2 (8.3.2-39-gd537a3-elpa @
> /home/pillow/.emacs.d/elpa/org-20151123/)
> 
> current state:
> ==
> (setq
>  org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa"
> . artist) ("asymptote" . asy)
> ("dot" . fundamental) ("sqlite" . sql) ("calc" . 
> fundamental)
> ("C" . c) ("cpp" . c++)
> ("C++" . c++) ("screen" . shell-script))
>  org-tab-first-hook '(org-hide-block-toggle-maybe
> org-src-native-tab-command-maybe
> org-babel-hide-result-toggle-maybe 
> org-babel-header-arg-expand)
>  org-sparse-tree-default-date-type 'scheduled-or-deadline
>  org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1"
> "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t)
>   ("" "longtable" nil) ("" "float" nil) ("" 
> "wrapfig" nil) (""
> "rotating" nil)
>   ("normalem" "ulem" t) ("" "amsmath" t) ("" 
> "textcomp" t) (""
> "marvosym" t)
>   ("" "wasysym" t) ("" "amssymb" t) ("" 
> "hyperref" nil)
> "\\tolerance=1000")
>  org-speed-command-hook '(org-speed-command-default-hook
> org-babel-speed-command-hook)
>  org-occur-hook '(org-first-headline-recenter)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-html-format-drawer-function '(lambda (name contents) contents)
>  org-clock-into-drawer nil
>  org-latex-format-inlinetask-function 'ignore
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>  org-latex-text-markup-alist '((bold . "\\textbf{%s}") (code . verb)
> (italic . "\\emph{%s}")
>  (strike-through . "\\sout{%s}") (underline . 
> "\\uline{%s}")
>  (verbatim . protectedtexttt))
>  org-latex-format-headline-function
> 'org-latex-format-headline-default-function
>  org-after-todo-state-change-hook '(org-clock-out-if-current)
>  org-latex-format-drawer-function '(lambda (name contents) contents)
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
> org-src-mode-configure-edit-buffer)
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-html-allow-name-attribute-in-anchors t
>  org-latex-logfiles-extensions '("aux" "idx" "log" "out" "toc" "nav"
> "snm" "vrb")
>  org-export-copy-to-kill-ring 'if-interactive
>  org-mode-hook '(#[nil "\300\301\302\303\304$\20

Re: [O] Wrapping section within LaTeX environment

2015-12-15 Thread Robert Klein
Hi

On 12/13/2015 03:00 PM, Xavier Garrido wrote:
> Dear orgers,
> 
> I would like to wrap a given org section between =\begin,\end= LaTeX
> environment. These sections are identified by a special tag :correction:
> and to initiate the =\begin= flag I have basically no problem by using
> the  org-export-filter-headline-function filter. The problem comes when
> I want to close the environment i.e. when another section starts. I have
> try this piece of code
> 
> #+BEGIN_SRC emacs-lisp
>   (setq correction-flag nil)
>   (defun cpp-correction-headline (contents backend info)
> (if (and (org-export-derived-backend-p backend 'latex) 
>(string-match "\\`.*correction.*\n" (downcase contents)))
> (progn
>   (setq correction-flag t)
>   (replace-match "begin{correction}" nil nil contents)
>   )
>   (when correction-flag
> (setq correction-flag nil)
> (concat "\\end{correction}" contents))
>   )
> )
>   (add-to-list 'org-export-filter-headline-functions
> 'cpp-correction-headline)
> #+END_SRC

If I read this right, you are writing the \end{correction} when the
headline function is called for the /following/ headline.

Then the (when...) should be outside the (if..) (because the
string-match condition isn't valid anymore).

Of course you still get issues when two consecutive sections are tagged
for correction -- and there has to be a follow-up heading to the one
tagged for correction.

Your code from your second mail does the job perfectly, but I've been
intrigued in figuring this one out :)

Best regards
Robert


> 
> but I get several =\end{correction}= in the produced LaTeX file.
> Actually this is much more a emacs-lisp related question since the
> boolean =correction-flag= seems not to work and I don't know why (of
> course I have very little knowledge in lisp). Can some emacs-lisp
> experts helps me understand why the above code just does not work.
> 
> Thanks a lot,
> Xavier
> 



Re: [O] Bug: html-preamble doesn't work with a function [8.3.2 (8.3.2-39-gd537a3-elpa /home/pillow/.emacs.d/elpa/org-20151123/)]

2015-12-20 Thread Robert Klein
Hi,

On 12/20/2015 11:06 AM, Pillow Kuda Sai wrote:
> Nicolas Goaziou  nicolasgoaziou.fr> writes:
> 
>> You may try
>>
>>   (org-file-contents "~/Blog/html/preamble.html")
> 
> That worked! Should have figured out that insert-file-contents does not 
> return a string. Thanks for the help Nicolas!
> 
> Happy holidays,
> 
> pillow.
> 


ah, I'll try that, too.

My current solution is a function like


(defun my-html-preamble (options)
  (with-temp-buffer
(insert-file-contents "~/Documents/myproject/html/preamble.html")
(buffer-string)))


Best regards
Robert




[O] Unable to resolve info links during publishing

2015-12-22 Thread Robert Klein
Hi,

when publishing a org document (to HTML), info links, e.g.
"info:org#Formula syntax for Lisp" throw errors, e.g.:

  Unable to resolve link "info:org#Formula syntax for Lisp"


The link exists and can be followed in the org document by pressing
the keys C-c C-o.

Org version is 8.3.2 maint.  I did a little bisection and ended up
with this commit:

dc08e98885015c27196843aeb62bde287da84873 is the first bad commit
commit dc08e98885015c27196843aeb62bde287da84873
Author: Jacob Gerlach 
Date:   Wed Mar 11 22:39:11 2015 -0400

ox.el: Issue error for unresolved fuzzy link

* lisp/ox.el (org-export-resolve-fuzzy-link): Throw an error instead
  of returning nil when link can't be resolved.

* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Change
  last test from should-not to should-error

In addition to throwing an error, don't store the failed match in the
link cache.

TINYCHANGE

:04 04 3151cb8e3a5da171e93278c7fa5fd7aa82012e81 
7ff2fffd50ed0587acf5ddb498493a7a16f6b549 M  lisp
:04 04 e362c6fb9e260a6d9b0212daac3c89cf12393642 
b08d87de16cabd3416d8eefae2033e3081159218 M  testing


In fact I agree with the commit, but I don't understand why org can't
resolve the link...

Any help is very much appreciated.

Thanks and best regards
Robert



Re: [O] Bug in org-lob: Function call adds space to argument string with parenthesis

2015-12-22 Thread Robert Klein

Hi,

Nicolas Goaziou  wrote:

> Hello,
> 
> Tobias Zawada  writes:
> 
>> I cannot clone the git-repository as non-developer (permission
>> denied). So, trying out the development version is a bit difficult for
>> me.
> 
>   git clone git://orgmode.org/org-mode.git
> 
> gives access to non-developers, doesn't it?

Yes, it does.  If you're behind a firewall blocking git, you can also use

git clone http://orgmode.org/org-mode.git

Best regards
Robert



Re: [O] Unable to resolve info links during publishing

2015-12-23 Thread Robert Klein
Hi,

On 12/22/2015 01:49 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Robert Klein  writes:
> 
>> when publishing a org document (to HTML), info links, e.g.
>> "info:org#Formula syntax for Lisp" throw errors, e.g.:
>>
>>   Unable to resolve link "info:org#Formula syntax for Lisp"
>>
>>
>> The link exists and can be followed in the org document by pressing
>> the keys C-c C-o.
> 
> FWIW, I cannot reproduce it on development version.

Thank you very much.  In trying to make an ECM I encountered a
custom-set-variable

   '(org-modules (quote (org-jsinfo)))

left over from pre-8.0 times.

I now commented it out in worg's .emacs-custom.el

Best regards
Robert




Re: [O] Org-mode on Github

2016-01-28 Thread Robert Klein
Hi,

gongzhitaao  wrote:

> Hi Awesome Orgmode,
> 
> I got a quick question: why not put org-mode on github?

because we have all those, too

> 
> 1. Everyone can see the development process clearly.  While currently
>we can still do it but github makes it much more easier.

git repository on orgmode.org

> 2. We can choose whichever version we want to use (most of the time,
>the latest of course, but just in case of an wierd bugs).

same as 1.  Just check out a commit or release you like and use it.

> 3. Github makes collaboration easier, e.g., everyone may submit a PR
>for a quick fix.

Org development happens on this mailing list, not i some bug tracker.
Send your git-diff to the list.

Best regards
Robert




Re: [O] "atomic knowledge" modeling tool

2016-02-01 Thread Robert Klein
Hi,

luke call  wrote:

> There's a program that org-mode users (as I have been) specifically 
> might be interested in, a personal "knowledge manager"/list 
> manager/organizer/etc called OneModel (Free/AGPL).  Instead of
> storing data as text, it puts *everything* in a single object model
> backed by postgresql, but text import/export are available.
> Everything one needs to know at any given time is always on the
> screen, and it is *highly* efficient to navigate (so far
> keyboard-only).  Current strengths, limitations, and future plans are
> at: http://onemodel.org
> 
> Pls forgive & spare the flames, I'll probably go quiet unless to
> answer good-faith questions.  Details & discussion at
> http://onemodel.org site/lists if desired.


So I have to actually pay for export (C-c C-e in org-mode and more
formats to export to), searching (C-s and C-r in emacs,
probably more in org-mode) and /maybe/ recent bugfixes? And probably no
Emacs shortcut keys.

You've been told not to advertise on openbsd-misc.  As your 'product' is
not relevant to org-mode, I suggest the same applies to the org-mode
list, too.

If you have to offer a exporter for org-mode exporting stuff to your
product you're very welcome to present it here.


Best regards
Robert



Re: [O] Bug: ox-html.el does not indicate enough languages [8.2.10 (release_8.2.10 @ c:/Users/txiong/emacs-24.5/share/emacs/24.5/lisp/org/)]

2016-03-12 Thread Robert Klein
Hi,


thanks for the report.

I already began looking into this after my answer on stackexchange.
I'll try to make a patch in the next couple of days.  I want to run
some tests before submitting a patch.  You can expect a patch around
Tuesday/Wednesday.

Best regards
Robert



Tianxiang Xiong  wrote:

> Remember to cover the basics, that is, what you expected to happen and
> 
> what in fact did happen.  You don't know how to make a good report?
> See
> 
> 
> 
>  http://orgmode.org/manual/Feedback.html#Feedback
> 
> 
> 
> Your bug report will be posted to the Org-mode mailing list.
> 
> 
> 
> 
> 
> In the file "ox-html.el", the following bit of CSS displays the source
> 
> code block language's name on hover:
> 
> 
> 
>   pre.src:hover:before { display: inline;}
> 
>   pre.src-sh:before{ content: 'sh'; }
> 
>   pre.src-bash:before  { content: 'sh'; }
> 
>   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
> 
>   pre.src-R:before { content: 'R'; }
> 
>   pre.src-perl:before  { content: 'Perl'; }
> 
>   pre.src-java:before  { content: 'Java'; }
> 
>   pre.src-sql:before   { content: 'SQL'; }
> 
> 
> 
> Org supports far more languages than this. In Section 14.7 of the Org
> 
> manual, the following languages are listed (formatting is screwed up):
> 
> 
> 
>   Language Identifier Language
> Identifier
> 
>   Asymptote  asymptote  Awk  awk
> 
>   Emacs Calc   calc   CC
> 
>   C++  C++Clojure  clojure
> 
>   CSS  cssditaaditaa
> 
>   Graphviz dotEmacs Lisp
> emacs-lisp
> 
>   gnuplot  gnuplotHaskell  haskell
> 
>   Java java
> 
>   Javascript   js LaTeXlatex
> 
>   Ledger   ledger Lisp lisp
> 
>   Lilypond lilypond   MATLAB   matlab
> 
>   Mscgen   mscgen Objective Caml   ocaml
> 
>   Octave   octave Org mode org
> 
>   Oz   oz Perl perl
> 
>   Plantuml plantuml   Python   python
> 
>   RR  Ruby ruby
> 
>   Sass sass   Scheme   scheme
> 
>   GNU Screen   screen shellsh
> 
>   SQL  sqlSQLite   sqlite
> 
> 
> 
> "ox-html.el" should support at least all the languages that Org mode
> supports by default.
> 
> 
> 
> Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
> 
>  of 2015-04-11 on LEG570
> 
> Package: Org-mode version 8.2.10 (release_8.2.10 @
> c:/Users/txiong/emacs-24=
> 
> .5/share/emacs/24.5/lisp/org/)




[O] PATCH: programming language indicators in HTML export

2016-03-14 Thread Robert Klein
Hi,

any thoughts about this?

Best regards
Robert


Author: Robert Klein   2016-03-14 14:43:46
Committer: Robert Klein   2016-03-14 14:43:46
Parent: dd9be3a6ea4ff561248b1f6658194fd153b5821c (Fix docstring typo)
Branch: maint
Follows: release_8.3.4
Precedes:

support more programming languages in CSS

The standard CSS for HTML export only supported a couple of
programming languages to have a language name "hover" on src
blocks.  This patch adds all languages supported per Org
manual, those from org.el's org-babel-load-languages-alist,
additional language identifiers in ob-*.el and languages
which have a) an emacs mode and b) are supported by the LaTeX
listings package.  Additional a language "conf" is supported
for generic configuraiton files; an emacs mode exists for
this, but for LaTeX listings a language " " has to be faked.
As this patch is for HTML, this is no impediment.

Thanks for reporting the missing support to Tianxian XIONG.

--- lisp/ox-html.el
--- index de2e5d9..e4a4c38 100644
@@ -314,13 +314,96 @@ for the JavaScript code in this tag.
 border: 1px solid black;
   }
   pre.src:hover:before { display: inline;}
-  pre.src-sh:before{ content: 'sh'; }
-  pre.src-bash:before  { content: 'sh'; }
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
-  pre.src-R:before { content: 'R'; }
-  pre.src-perl:before  { content: 'Perl'; }
-  pre.src-java:before  { content: 'Java'; }
-  pre.src-sql:before   { content: 'SQL'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per \"defun org-babel-execute\"
+   in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+ ob-shell.el: ob-shell is the only babel language using a lambda
to put
+ the execution function name together. */
+  pre.src-bash:before  { content: 

Re: [O] PATCH: programming language indicators in HTML export

2016-03-14 Thread Robert Klein
Hi Rasmus,

Rasmus  wrote:

> Hi Robert,
> 
> Thanks for the patch.
> 
> Robert Klein  writes:
> 
> > any thoughts about this?
> 
> Remind me, would this only show up when hovering above the block with
> the mouse when using this setup?

Yes.

> 
> The patch would make the default html header a bit longer, which may
> or may not be an issue.  Perhaps more importantly, it also does not
> deal with new languages.  Maybe it would be possible to add a bit of
> JS that would look up the language based on the class of the block in
> question?
> 
> E.g. the block
> 
>  #+BEGIN_SRC rsgrs
> 
>  #+END_SRC
> 
> would have class "src-rsgrs".

This happens already, but the JS would also have to create the
corresponding CSS code (that's what I hardcoded in the patch).

However you'd still need a mapping from src block identifier to
pleasantly readable text, e.g. js -> "Javascript", sql -> "SQL",
emacs-lisp -> "Emacs Lisp", ps -> "PostScript" etc.  When you have all
those it's not that much different from static CSS anymore...

There's no perfect solution, unfortunately, but src blocks have a lot
of limits for each language:
- is there an Emacs mode for editing?
- is there org-babel code for executing?
- is the language supported by the LaTeX listings package?
- or by the pygments library (for the LaTeX minted package)?


Anyway, my patch is basically for those who don't roll their own CSS to
have things mostly working out of the box. 


Best regards
Robert


> 
> Thanks,
> Rasmus
> 




Re: [O] PATCH: programming language indicators in HTML export

2016-03-15 Thread Robert Klein
Hi Rasmus,


On Tue, 15 Mar 2016 15:24:00 +0100
Rasmus  wrote:

[rest deleted]

> Robert, do you have a copyright assignment of changes to Emacs?  I
> think the change is too long (in line count) for a TINYCHANGE.

I signed the FSF papers in April 2015. On top of the sheet there is the
number "RT: 1006989".

Do you need a copy of the PDF?

Thanks and best regards,
Robert



Re: [O] scheme SRC blocks

2016-03-21 Thread Robert Klein
Hi,
Arun Isaac  wrote:

> 
> I have an org file with scheme SRC blocks like so.
> 
> #+BEGIN_SRC scheme
>   (some-code-here)
> #+END_SRC
> 
> Every time, I open the org file, I get prompted for the "Scheme
> implementation" and I need to choose an implementation (guile, in my
> case) before continuing. Similarly, I am also prompted for the same
> when publishing the org file, or opening up the SRC block using
> org-edit-special (C-c ') for editing. This happens because of the
> behaviour of the command "scheme-mode" which prompts for the required
> scheme implementation.
> 
> Manually choosing the scheme implementation every time is tedious and
> annoying. Is there some way to circumvent this issue?

In addition to requiring 'geiser-install you have to set the
geiser-active-implementations variable, e.g.:

#+begin_src emacs-lisp
  (require 'geiser-install)
  (setq geiser-active-implementations '(guile))
#+end_src

See also http://www.nongnu.org/geiser/geiser_3.html#choosing_002dimpl
in the Geiser manual.

Best regards
Robert




Re: [O] dotfile managment with #+BEGIN_SRC conf code blocks?

2016-04-22 Thread Robert Klein
Hi,

Xebar Saram  wrote:

> hi all
> 
> im looking at this link
> https://expoundite.net/guides/dotfile-management
> 
> this sound very nice. yet it says there to put your conf in org
> blocks with :  #+BEGIN_SRC conf
> 
> yet i cant see this in the org-babel-load-languages or in any contrib
> files.
> how does one enable the conf code blocks, any clue?

Afaik you need babel only for stuff you want to be executed.

I use ``#+begin_src conf'' all the time and the only thing I do is to
assign a language name for LaTeX export (using the listings package)
-- also for ``text'' and ``org'':

;; add "text" and "conf" to latex-listings-langs with empty (space as
;; trick) language name to be used in the LaTeX listings package.
(add-to-list 'org-latex-listings-langs
 '(text " "))
(add-to-list 'org-latex-listings-langs
 '(conf " "))
(add-to-list 'org-latex-listings-langs
 '(nxml "XML"))
(add-to-list 'org-latex-listings-langs
 '(org " "))


Best regards
Robert



Re: [O] PATCH: programming language indicators in HTML export

2016-05-09 Thread Robert Klein
Hi,

anyone willing to commit this patch I sent back in march?

Best regards
Robert


On Mon, 14 Mar 2016 15:16:05 +0100
Robert Klein  wrote:

> 
> Author: Robert Klein   2016-03-14 14:43:46
> Committer: Robert Klein   2016-03-14 14:43:46
> Parent: dd9be3a6ea4ff561248b1f6658194fd153b5821c (Fix docstring typo)
> Branch: maint
> Follows: release_8.3.4
> Precedes:
> 
> support more programming languages in CSS
> 
> The standard CSS for HTML export only supported a couple of
> programming languages to have a language name "hover" on src
> blocks.  This patch adds all languages supported per Org
> manual, those from org.el's org-babel-load-languages-alist,
> additional language identifiers in ob-*.el and languages
> which have a) an emacs mode and b) are supported by the LaTeX
> listings package.  Additional a language "conf" is supported
> for generic configuraiton files; an emacs mode exists for
> this, but for LaTeX listings a language " " has to be faked.
> As this patch is for HTML, this is no impediment.
> 
> Thanks for reporting the missing support to Tianxian XIONG.
> 
> --- lisp/ox-html.el
> --- index de2e5d9..e4a4c38 100644
> @@ -314,13 +314,96 @@ for the JavaScript code in this tag.
>  border: 1px solid black;
>}
>pre.src:hover:before { display: inline;}
> -  pre.src-sh:before{ content: 'sh'; }
> -  pre.src-bash:before  { content: 'sh'; }
> +  /* Languages per Org manual */
> +  pre.src-asymptote:before { content: 'Asymptote'; }
> +  pre.src-awk:before { content: 'Awk'; }
> +  pre.src-C:before { content: 'C'; }
> +  /* pre.src-C++ doesn't work in CSS */
> +  pre.src-clojure:before { content: 'Clojure'; }
> +  pre.src-css:before { content: 'CSS'; }
> +  pre.src-D:before { content: 'D'; }
> +  pre.src-ditaa:before { content: 'ditaa'; }
> +  pre.src-dot:before { content: 'Graphviz'; }
> +  pre.src-calc:before { content: 'Emacs Calc'; }
>pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
> -  pre.src-R:before { content: 'R'; }
> -  pre.src-perl:before  { content: 'Perl'; }
> -  pre.src-java:before  { content: 'Java'; }
> -  pre.src-sql:before   { content: 'SQL'; }
> +  pre.src-fortran:before { content: 'Fortran'; }
> +  pre.src-gnuplot:before { content: 'gnuplot'; }
> +  pre.src-haskell:before { content: 'Haskell'; }
> +  pre.src-java:before { content: 'Java'; }
> +  pre.src-js:before { content: 'Javascript'; }
> +  pre.src-latex:before { content: 'LaTeX'; }
> +  pre.src-ledger:before { content: 'Ledger'; }
> +  pre.src-lisp:before { content: 'Lisp'; }
> +  pre.src-lilypond:before { content: 'Lilypond'; }
> +  pre.src-matlab:before { content: 'MATLAB'; }
> +  pre.src-mscgen:before { content: 'Mscgen'; }
> +  pre.src-ocaml:before { content: 'Objective Caml'; }
> +  pre.src-octave:before { content: 'Octave'; }
> +  pre.src-org:before { content: 'Org mode'; }
> +  pre.src-oz:before { content: 'OZ'; }
> +  pre.src-plantuml:before { content: 'Plantuml'; }
> +  pre.src-processing:before { content: 'Processing.js'; }
> +  pre.src-python:before { content: 'Python'; }
> +  pre.src-R:before { content: 'R'; }
> +  pre.src-ruby:before { content: 'Ruby'; }
> +  pre.src-sass:before { content: 'Sass'; }
> +  pre.src-scheme:before { content: 'Scheme'; }
> +  pre.src-screen:before { content: 'Gnu Screen'; }
> +  pre.src-sed:before { content: 'Sed'; }
> +  pre.src-sh:before { content: 'shell'; }
> +  pre.src-sql:before { content: 'SQL'; }
> +  pre.src-sqlite:before { content: 'SQLite'; }
> +  /* additional languages in org.el's org-babel-load-languages alist
> */
> +  pre.src-forth:before { content: 'Forth'; }
> +  pre.src-io:before { content: 'IO'; }
> +  pre.src-J:before { content: 'J'; }
> +  pre.src-makefile:before { content: 'Makefile'; }
> +  pre.src-maxima:before { content: 'Maxima'; }
> +  pre.src-perl:before { content: 'Perl'; }
> +  pre.src-picolisp:before { content: 'Pico Lisp'; }
> +  pre.src-scala:before { content: 'Scala'; }
> +  pre.src-shell:before { content: 'Shell Script'; }
> +  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
> +  /* additional language

Re: [O] PATCH: programming language indicators in HTML export

2016-05-09 Thread Robert Klein
Hi,

Nicolas Goaziou  wrote:

> Hello,
> 
> Robert Klein  writes:
> 
> > anyone willing to commit this patch I sent back in march?
> 
> This patch actually felt through the cracks. Sorry about that. Would
> you mind sending it again, using git format-patch so I can apply it?
> 

Please find the patch attached.

Thank you very much.

Best regards
Robert


>From ccedae3c29077c56b9c7325a3911a841c11add2d Mon Sep 17 00:00:00 2001
From: Robert Klein 
Date: Mon, 14 Mar 2016 14:43:46 +0100
Subject: [PATCH] support more programming languages in CSS

The standard CSS for HTML export only supported a couple of
programming languages to have a language name "hover" on src
blocks.  This patch adds all languages supported per Org
manual, those from org.el's org-babel-load-languages-alist,
additional language identifiers in ob-*.el and languages
which have a) an emacs mode and b) are supported by the LaTeX
listings package.  Additional a language "conf" is supported
for generic configuraiton files; an emacs mode exists for
this, but for LaTeX listings a language " " has to be faked.
As this patch is for HTML, this is no impediment.

Thanks for reporting the missing support to Tianxian XIONG.
---
 lisp/ox-html.el | 95 +
 1 file changed, 89 insertions(+), 6 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index a05fa2d..7653c43 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -314,13 +314,96 @@ for the JavaScript code in this tag.
 border: 1px solid black;
   }
   pre.src:hover:before { display: inline;}
-  pre.src-sh:before{ content: 'sh'; }
-  pre.src-bash:before  { content: 'sh'; }
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
-  pre.src-R:before { content: 'R'; }
-  pre.src-perl:before  { content: 'Perl'; }
-  pre.src-java:before  { content: 'Java'; }
-  pre.src-sql:before   { content: 'SQL'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per \"defun org-babel-execute\"
+   in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  {

Re: [O] PATCH: programming language indicators in HTML export

2016-05-10 Thread Robert Klein
Hi,

Rasmus  wrote:

> Robert Klein  writes:
> 
> > Hi,
> >
> > Nicolas Goaziou  wrote:
> >
> >> Hello,
> >> 
> >> Robert Klein  writes:
> >> 
> >> > anyone willing to commit this patch I sent back in march?
> >> 
> >> This patch actually felt through the cracks. Sorry about that.
> >> Would you mind sending it again, using git format-patch so I can
> >> apply it?
> >> 
> >
> > Please find the patch attached.
> 
> I wonder if it would be possible (or even desirable) to build this
> part of the css header automatically?  It may be too prone to
> unexpected bugs.
> 

basically same answer I gave last time;  when you want JS to create the
CSS you still have to map the source block identifier to ``readable''
text elsewhere.  You'd just move the static from org-modes basic CSS
into org-mode.

I think the patch is a bonus for those, that don't roll their own CSS
(e.g. Tianxian Xiong, who first gave me the idea).

Any automated solution would be error-prone, too, and depend on:
- what's the Emacs mode for editing (or is there one at all)?
- is there an ob- module for running the code?
- for LaTeX export: is the language supported by
  - the LaTeX listings package (and what is its name there?)?
  - or the pygments library (for those using the LaTeX minted package)?

One example I use for documentation is `conf' source blocks for
`generic' configuration files.  For LaTeX export I have to add 
   (add-to-list 'org-latex-listings-langs '(conf " "))
to my .emacs, as the listings package doesn't support a `configuration'
language.

It's a hack, but it works.  I don't see a general solution (even if
restricted to the CSS header).

I see my patch as a `best effort' for getting things working out of the
box.  Anyone rolling his own CSS will probably pick his 2 to 5
languages and be happy with them.


Best regards
Robert




Re: [O] org-mode command in a bash script?

2016-06-02 Thread Robert Klein
Hi,

On Fri, 03 Jun 2016 06:36:12 +0100
Sharon Kimble  wrote:

> 
> How can I run an org-mode command in a bash script please?
> 
> Specifically 'org-latex-export-to-latex'?
> 
> I'm developing my own modular script to choose between, at present, 3
> tex files which have been pre-exported from org-mode. I'm now
> wondering if its possible to export from the org-mode file as part of
> another module in the script.
> 
> Can it be done, and if so, how please?


I'm using this shell function for exporting certain documents to pdf:


orgexp()
{
emacs  --batch -l ~/.emacs --eval \
   "(progn
 (setq org-latex-image-default-width \".4cm\"
   org-export-allow-bind-keywords t
   org-confirm-babel-evaluate nil)
 (find-file \"$1\")
 (org-latex-export-to-pdf))"
}


You probably don't want to set the variables, so for export to latex
this might work (i.e. I didn't test it):


org2latex()
{
emacs  --batch -l ~/.emacs --eval \
   "(progn
 (find-file \"$1\")
 (org-latex-export-to-latex))"
}


If you put this in your .bashrc you can just use
org2latex myfile.org
to export myfile.org to latex.

Best regards
Robert



Re: [O] How to setup a development for org-mode?

2016-06-08 Thread Robert Klein
Hi,

On Wed, 08 Jun 2016 06:55:08 +
Xi Shen  wrote:

> Tried that at first, but got:
> 
> Symbol's function definition is void: org-babel--get-vars
> 
> Maybe it is because I am in cygwin environment, so Emacs eval buffers
> differently?

You are using org-mode 8.3.4 from then maint branch (or earlier) which
hasn't org-babel--get-vars.  The version of ob-sql.el you are editing
is from the master branch.

Best regards
Robert


> 
> 
> Thanks,
> David
> 
> 
> On Wed, Jun 8, 2016 at 2:42 PM Rasmus  wrote:
> 
> > Xi Shen  writes:
> >
> > > Hi,
> > >
> > > I want to make some change to the ob-sql.el file. But I don't
> > > want to
> > "make
> > > install" every time I change something. I tried to use
> > > “load-file" to reload the file I changed, but I got symbol not
> > > found error.
> >
> > Open the file you've edited and do,
> >
> > M-x eval-buffer RET
> >
> > Hope it helps,
> > Rasmus
> >
> >
> > --
> > Hvor meget poesi tror De kommer ud af et glas isvand?
> >
> >
> > --
> 
> Thanks,
> David S.




Re: [O] Why no secure code retrieval

2016-07-03 Thread Robert Klein
Hi,

I haven't been as active as I'd have liked in this matter...

Bastien Guerry  wrote:

> Hi Ian,
> 
> Ian Barton  writes:
> 
> > Not heard of Gogs before, although it looks nice. Another possiblity
> > would be gitolite with cgit. Gitolite is very flexible and as a
> > consequence can be hard to set up initially. The documentation is
> > very comprehensive. It supports mirroring of repos.
> 
> I have no experience with gitolite.

gitolite is easy.  Configuration is one directory with a configuration
file, one directory with ssh keys;

Configuration looks like this:

#+begin_src conf
repo orgmode
RW+ = kleinrob
R = @all
config gitweb.url = g...@example.org:orgmode
config gitweb.description = "orgmode test"
config receive.denyNonFastforwards = true
config receive.denyDeletes = true

repo testing
RW+ =   @all
R = daemon
config gitweb.url = g...@example.org:testing
config receive.denyNonFastforwards = true
config receive.denyDeletes = true
#+end_src

I have ~35 lines of script, another 35 lines of instructions plus the
apache configuration to get gitolite running on a SLES server.  Doesn't
need cgit.

> 
> I encourage you to try gogs, it is very easy to install and maintain,
> and its interface is very engaging.  The more gogs users and potential
> admins out there, the more comfortable I'll feel making the switch.


For Gogs installation on Debian Jessie I have a ~20 line
script (plus ~10 lines for postgresql; some more for MySQL). I'm using
only the gogs web server (no apache and/or nginx front-end). Have to be
careful copy- and pasting the script though, as I have to enter
passwords.

Current git versions now also supports http-urls, so this shouldn'nt be
an issue for both gits vs gitolite.


Gogs requires users to be created for current contributors...

No preference from my side, though I have some emotional distance to
gogs...


Best
Robert





Re: [O] [ox-publish, patch] More flexible sitemaps

2016-07-05 Thread Robert Klein
Hi,

are those Patches still being worked on?

Thanks and best regards
Robert



On Wed, 01 Jun 2016 17:34:56 +0200
Nicolas Goaziou  wrote:

> Hello,
> 
> Rasmus  writes:
> 
> > This was by far the hardest part...  
> 
> Thank you. Some comments follow.
> 
> > +(defun org-publish-find-property (file property &optional reset)
> > +  "Find the PROPERTY of FILE in project.
> > +PROPERTY can be a string or a symbol-property."  
> 
> Could you also document RESET argument?
> 

[rest deleted from reply]



[O] Bug: src block asterisk escaping doesn't work anymore

2016-07-13 Thread Robert Klein
Hi,

When exporting a source block, e.g. 

--- snip (example org file) ---
#+begin_src conf
  Test

  ,* asterisk in src block
#+end_src
--- snip ---


the escaping of the asterisk does not work.  Instead a headline
“asterisk in src block” is created.

Adding a second comma works but that doesn't work well with C-' source
editing (I didn't test tangling).


Git bisect leads me to this commit:

0279d84cd7f857535342b4ec3c2e70ac76c1ee27 is the first bad commit
commit 0279d84cd7f857535342b4ec3c2e70ac76c1ee27
Author: Nicolas Goaziou 
Date:   Fri Jun 17 14:16:39 2016 +0200

ob-exp: Remove spurious comma un-escaping

* lisp/ob-exp.el (org-babel-exp-code): Remove spurious comma
  un-escaping.

:04 04 d9b76ef4148894bc257394a3fe2bb3c970194f14
a8c9ca31e9ebed5b4d5e634193e8e1e1755faea8 M  lisp


PS: I'm using maint, but I also saw this on a recent master

Best regards
Robert



Re: [O] comment section with latex_header

2015-03-24 Thread Robert Klein
On 03/24/2015 12:36 AM, Nicolas Goaziou wrote:
> Hello,
> 
> Andreas Leha  writes:
> 
>> If there are `#+latex_header:' entries in a section and that section is
>> `COMMENT'ed out, I'd expect the #+latex_header entries to be
>> uneffective.  As they are when I comment them out one by one as in
>> `# #+latex_header:'.
>>
>> Is this a bug? (I'd say, yes)
> 
> This is fixed in c9a52787c14c3a7429bcd3c8975350525e0baa04. Thank you.
> 
> Regards,
> 


Hello,

this patch also breaks this kind of construct where not the table is
exported, but the one created from the booktabs() call:


---> begin example <---
  * Grundlagen
  *** COMMENT unexported subtree with table source
  #+tblname: masse
  | 1 gestr. Teelöffel  | 1 gestr. Eßlöffel | 1 Tasse |
  | ca. 5 ccm   | ca 15 ccm | ca 120 ccm  |
  |-+---+-|
  | Zimt 2 g| Haferflocken 8 g  | Mehl 80 g   |
  | Paprika 2 g | Speisestärke 9 g  | Grieß 96 g  |
  | Speisestärke 2--3 g | Mehl, Semmelmehl 10 g | Zucker 90 g |
  | Zucker 4 g  | Salz, Zucker, Öl 15 g | |
  | Salz 5 g| Reis, Butter 15 g | |

  ** Maße und Gewichte

  #+call: booktabs(table=masse, align="lll") :results latex :exports results
---> end example <---


booktabs() code is from library-of-babel.org (currently residing in the
doc directory).  Also cf.
http://orgmode.org/tmp/worg/org-contrib/babel/languages/ob-doc-LaTeX.html.



However, in this org version (8.3 beta+) you get the same / similar
results using

---> begin example <---
  ** Maße und Gewichte
  #+tblname: masse
  #+attr_latex: :align lll :booktabs t
  | 1 gestr. Teelöffel  | 1 gestr. Eßlöffel | 1 Tasse |
  | ca. 5 ccm   | ca 15 ccm | ca 120 ccm  |
  |-+---+-|
  | Zimt 2 g| Haferflocken 8 g  | Mehl 80 g   |
  | Paprika 2 g | Speisestärke 9 g  | Grieß 96 g  |
  | Speisestärke 2--3 g | Mehl, Semmelmehl 10 g | Zucker 90 g |
  | Zucker 4 g  | Salz, Zucker, Öl 15 g | |
  | Salz 5 g| Reis, Butter 15 g | |
---> end example <---


This change probably ought to be mentioned in the Changes for a 8.3 release.

Best regards,
Robert




Re: [O] comment section with latex_header

2015-03-25 Thread Robert Klein
Hi,

On 03/24/2015 10:04 AM, Sebastien Vauban wrote:

> Can't we say that a COMMENT'ed subtree is like having all of its
> contents commented, line by line?  IOW, nothing "accessible"?

This would probably break a lot of babel stuff.

If there was an option to disable exports for #+NAME:-ed stuff (i.e.
data sources for babel), e.g. somtehing like

#+NAME: xyzzy :exports none
| munich  | 13 |
| cologne | 12 |

you could deprecate and eventually disable data sources in COMMENT-ed
section.


Best regards
Robert



Re: [O] comment section with latex_header

2015-03-27 Thread Robert Klein
Hi,

On 03/27/2015 12:02 PM, Nicolas Goaziou wrote:
> Andreas Leha  writes:

>> I completely agree.  My question was, what a use case would be that
>> requires a COMMENT that behaves different from #'ing the individual
>> lines (and is not covered by :noexport: already).
> 
> I don't think there is any. This is basically what my first patch did
> (i.e., removing any COMMENT subtree at the very beginning of export
> process), but it nevertheless surprised some users.
> 


Just a note: I didn't know of :noexport: before Andreas brought it up in
this thread.

If you revert the second patch, please put a note in the release notes
for the next org release, so the other babel users know a migration path.

Best regards
Robert




[O] accessing source block header arguments from exporters

2015-04-10 Thread Robert Klein
Hi,

is there a way, to read header arguments to source blocks in the
exporters org--src-block funktions?

E.g. is there a way to access :firstline in the example below?

#+begin_src c++ -n :firstline 23
   static struct
  {
  char*entity;
  unsigned char   equiv;
  } entities[] =
{
  { "lt",   '<' } ,
  { "gt",   '>' } ,
  { "amp",  '&' } ,
  { "quot", '"' } ,
  { "trade",153 } , /* trade mark */
#+end_src

I didn't find it in the `element' structure.

However, if I use

#+begin_src c++ firstline=23
  // random C++
#+end_src

I could access :parameters from `element' and parse the string.
However I'm not sure if I'd break some babel stuff or not.

If I'm trying to implement a firstline feature -- source blocks with
new line numbering (-n) beginning at a given line number -- I'd prefer
to use :firstline, but I didn't find anything to suggest `:XXX ZZ'
header arguments to source blocks are available to the exporters.

Any advice?

Thank you very much
Robert



Re: [O] Help needed on delegating some maintainance tasks (was: Org maintainance)

2015-05-23 Thread Robert Klein
On Sat, 23 May 2015 10:47:49 +0200
Bastien  wrote:

> Hi all,
> 
> I need help on these maintainance tasks :
> 
> 1. Watching the emacs-diffs mailing list and backport changes on Org
>in the local Org repository (2 hours per month).
> 
> 2. Adding public keys on the orgmode.org server for org-mode and worg
>contributers (1 hour per month).
> 
> 3. Maintaining the orgmode.org server and taking care of errors when
>updating Worg (1 hour per month).
> 
> 4. Merging the last stable release into Emacs repository.  (1 hour
>every release).
> 
> 5. Releasing Org (.5 hour every release).
> 

I'd like to help with 3 but would need an introduction.

Best regards
Robert



Re: [O] org-preview-latex-fragment ignores \includes in the LATEX_HEADER

2015-05-27 Thread Robert Klein
Hi,

On Wed, 27 May 2015 15:02:02 +0200
Stefan Otte  wrote:

> Hey,
> 
> I'm using orgmode with lots of LaTeX for equations. A typical document
> start with
> 
>   #+TITLE: Some Title
>   #+LaTeX_HEADER: \include{commands}
> 
> commands.tex contains commands like:
>   \newcommand{\RRR}{{\mathbb{R}}}
> 
> The pdf export works flawlessly, however `org-preview-latex-fragment`
> seems to ignore "\include{commands}", i.e., equations that use
> commands that are defined in commands.tex are rendered as blank/empty
> image.
> 
> Is it the intended behavior that `org-preview-latex-fragment` ignores
> "\include", is it a bug, or is there a better way to do it?
> 

afaik \include doesn't work in LaTeX headers; you'll have to use \input
there.

Could you try to use \input?

Best regards
Robert



  1   2   3   >