[O] Babel evaluation of Calc block not working, bug in Calc?

2014-09-22 Thread H. Dieter Wilhelm
Hello Orgers,

please consider: Emacs -Q and evaluate the following

#+BEGIN_SRC emacs-lisp
(org-babel-do-load-languages
 'org-babel-load-languages
 '((calc . t)
   (emacs-lisp . t)
   ))
#+END_SRC

#+RESULTS:
| (calc . t) | (emacs-lisp . t) |

The following works as expected

#+BEGIN_SRC calc :var V=3
V + 4
#+END_SRC

But now we are getting: byte-code: Symbol's function definition is void:
v!

#+BEGIN_SRC calc :var v=3
v + 4
#+END_SRC

Calc thinks that the variable v contains a function even though nothing
should be undefined for v and when trying debug-on-entry for
calc-var-value the expression (boundp v) returns t!?  I'm stuck at this
point, could you please have a look, I've no idea how to debug this
further.

GNU Emacs 24.3.93.3 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.24) of
2014-09-17 on vsl28t2g With the latest org-mode from git 

Thanks
Dieter
-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany




Re: [O] Cooperating with oneself using the cloud?

2014-09-22 Thread Christoph Groth
If at least one of your computers can be reached from all the others via
ssh, or you can reach all the other computers from one (i.e. there’s a
star topology), you could use unison to synchronize all kinds of files.
This works very reliably and handles modifications in both directions.

I use git for my programming projects, but I find that version control
is not really ideal for simple file synchronization.  This is why I
think that DVCs (and specifically git) are not a good solution for sync
(In case that someone is interested in a discussion of these things):

Keeping everything in a single repo is not handy, and solutions (like
“myrepos”) are kludges.  Another serious problem with using git for
synchronization is that it’s not able to synchronize git repositories,
as AFAIK it’s not possible/reasonable to keep git repositories under git
themselves.  Just imagine the case where you are in the middle of some
work with a git repo (an interactive rebase, for example), and you’d
like to sync and continue on another machine.

With unison this works like a charm, you there’s no automatic resolution
of conflicts.  This is not a problem if you run unison at the beginning
and at the end of each session.




Re: [O] CV in orgmode for export to pdf (and html?

2014-09-22 Thread Rainer M Krug

First of all, thanks to everybody so far who responded to this
question. 

I reply to my question directly, as I am trying to sum up the replies
so far (the complete thread is theoretically below).

There are effectively two schools, 

- using LaTeX (Tory, Andreas, John and Brady), and
- using org (Dan, Myles(?) and Xavier)

The reasons for using LaTeX directly were mainly the simplicity of
using LaTeX directly instead of telling org how to export to the
format wanted, while the reasons for using org were simplicity of
editing in org and the export to different formats (apart from pdf
also html).

I will not go further into the LaTeX as there is a vast amount of info
available on the Internets. 

My reasoning why I want to use org instead of LaTeX is the same as
mentioned in the thread, which is the simplicity of editing in org.
In addition, I like the different backends, and that the actual
content is separated from the export. 

I like Dan's approach as it looks relatively simple, although I still
have to look into it in detail (and as Joseph notes, there must be a
problem in the code).

Xavier's approach looks *very* impressive. I like the pdf, and I am
seriously thinking of using it, but my problem is the complexity - if
it breaks, I have no idea where to fix it. But as the original CV is
in org, the data would be there and I simply have to change the
export / publishing.

So what am I going to do?  I think I will start entering the CV into
org and then use Xavier's or Dan's approach and then see if I can get
a layout I like.

I like the idea of Rasmus to re-define the description environment,
and I might also play with this.

I think that org could be a perfect environment for building CVs if
one could come up with an HOWTO and many examples how to do it - and I
think this is going into the right direction.

So thanks a lot everybody for their input so far and keep the comments
and ideas flowing.

Rainer

torys.ander...@gmail.com (Tory S. Anderson) writes:

 I do mine in LaTeX and haven't had a reason to change that. I keep a
 Master CV/resumé with all the gratuitous information in all
 categories, then make subdirs for each submission and the trimmed-down
 versions of my resume that I sent out. At this stage in my
 career–where I am still tailoring resumés to employers and not really
 keeping a no-holds-barred CV— this is the best workflow I've
 found. I'm not sure how I'd go about versioning, trimming, and
 tracking things as neatly in an all-org environment.

 I'm presuming you just want a full-disclosure CV, though? Org makes more 
 sense there. 

 Rainer M Krug rai...@krugs.de writes:

 Hi

 I am looking for examples / templates for CVs written using org, as I
 decided to ose org for my CV.

 I fund this oldish conversation

 http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00096.html

 and these two templates for using org to write a CV:

 https://github.com/punchagan/resume
 https://github.com/fasheng/fsh-orgmode-latex-cv

 as well this CV without .org file

 http://adamsonj.ninth.su/cv.html

 Also, there does not seem to be anything on worg.

 - Can somebody give any further info on org and CVs? 
 - How do you do it (I don't assume you write your CVs in Word?), or are
 you using LaTeX directly?
 - Any other examples and templates online?

 If I get enough, I will compile a summary for worg, but I need examples
 and information.

 Thanks,

 Rainer



Andreas Kiermeier andreas.kierme...@gmail.com writes:

 Hi Rainer,

 like Tory I prepare my CV using latex directly. I've been using
 moderncv for several years now and have been quite happy with it
 (though that was before I've started using org). But even now, I can't
 see how using org, would add to what I already have.

 Mind you, I tend to add to my CV (mainly publications and experience)
 and revise it when needed, rather than adapt it to different
 situations.

 Cheers,

 Andreas



 On 19 September 2014 19:40, Tory S. Anderson torys.ander...@gmail.com wrote:
 I do mine in LaTeX and haven't had a reason to change that. I keep a
 Master CV/resumé with all the gratuitous information in all
 categories, then make subdirs for each submission and the
 trimmed-down versions of my resume that I sent out. At this stage in
 my career–where I am still tailoring resumés to employers and not
 really keeping a no-holds-barred CV— this is the best workflow I've
 found. I'm not sure how I'd go about versioning, trimming, and
 tracking things as neatly in an all-org environment.

 I'm presuming you just want a full-disclosure CV, though? Org makes more 
 sense there.

 Rainer M Krug rai...@krugs.de writes:

 Hi

 I am looking for examples / templates for CVs written using org, as I
 decided to ose org for my CV.



John Hendy jw.he...@gmail.com writes:

 Like the rest, I picked straight LaTeX, as it just felt like forcing Org to
 do something unnatural, in my opinion. At least, if you get into any sort
 of formatting stuff, it just didn't feel 

Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Rainer M Krug
torys.ander...@gmail.com (Tory S. Anderson) writes:

 Very nice, John. Thanks for sharing the LaTeX! 

I agree - thanks.

I will take a closer look later and possibly use some ideas.

Rainer


 John Hendy jw.he...@gmail.com writes:

 Like the rest, I picked straight LaTeX, as it just felt like forcing Org to
 do something unnatural, in my opinion. At least, if you get into any sort
 of formatting stuff, it just didn't feel right. Here's some other mailing
 list discussions if you haven't run into them:
 - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg37000.html
 - http://web.archiveorange.com/archive/v/Fv8aAUnm6O4rHfVY6k0p

 And a github repo:
 - https://github.com/fasheng/fsh-orgmode-latex-cv

 I still have a bookmarks folder in Chromium from when I was hunting around.
 Here are the ones that, apparently, I found worth to make the Ctrl+D cut
 for future reference if you're interested
 -
 http://linux.dsplabs.com.au/resume-writing-example-latex-template-linux-curriculum-vitae-professional-cv-layout-format-text-p54/
 - http://www.latextemplates.com/templates/curriculum_vitaes/6/cv_6.tex
 - http://jblevins.org/projects/cv-template/
 - http://nitens.org/taraborelli/cvtex

 I haven't updated mine since 2011, when I updated it for my current job. I
 went with an internal CV so that I could list accomplishments that would be
 considered confidential (patent applications, internal reports, etc.). I
 did create a dummy version, which I've attached (tex/pdf). Re-looking at
 it, I can't decide if I still like it or not. At the time, I was really
 happy with it as my first LaTeX CV :) I'd also probably consider it a
 hybrid CV/resume -- I liked describe some of my previous job
 responsibilities, while including papers/presentations/etc.


 Good luck!
 John


 On Fri, Sep 19, 2014 at 5:29 AM, Andreas Kiermeier 
 andreas.kierme...@gmail.com wrote:

 Hi Rainer,

 like Tory I prepare my CV using latex directly. I've been using
 moderncv for several years now and have been quite happy with it
 (though that was before I've started using org). But even now, I can't
 see how using org, would add to what I already have.

 Mind you, I tend to add to my CV (mainly publications and experience)
 and revise it when needed, rather than adapt it to different
 situations.

 Cheers,

 Andreas



 On 19 September 2014 19:40, Tory S. Anderson torys.ander...@gmail.com
 wrote:
  I do mine in LaTeX and haven't had a reason to change that. I keep a
 Master CV/resumé with all the gratuitous information in all categories,
 then make subdirs for each submission and the trimmed-down versions of my
 resume that I sent out. At this stage in my career–where I am still
 tailoring resumés to employers and not really keeping a no-holds-barred CV—
 this is the best workflow I've found. I'm not sure how I'd go about
 versioning, trimming, and tracking things as neatly in an all-org
 environment.
 
  I'm presuming you just want a full-disclosure CV, though? Org makes more
 sense there.
 
  Rainer M Krug rai...@krugs.de writes:
 
  Hi
 
  I am looking for examples / templates for CVs written using org, as I
  decided to ose org for my CV.





-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpo140KyY1UJ.pgp
Description: PGP signature


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Rainer M Krug
Brady Trainor algeb...@uw.edu writes:

 On 9/19/2014 2:18 AM, Rainer M Krug wrote:
 Hi

 - How do you do it (I don't assume you write your CVs in Word?), or are
 you using LaTeX directly?

 Nice question, I will enjoy reading all the examples in this thread.

 For a bit, I tried to make org do everything, like export resumes to 
 Word, Writer, LaTeX and ASCII from one tree. Eventually, I couldn't 
 justify managing all the moving parts, but maybe one day...

I am only thinking about export to LaTeX / pdf and html, but ASCII might
be nice as well.


 So I abandoned the export to word processors, though I had succeeded in 
 applying template files. Too much going on behind the scenes for me, and 
 requests for Word resumes should be rare enough that I just have notes 
 on how to quickly format a resume there. After all, with so many OS and 
 fonts, sending a Word document across OS can have unpredictable results. 
 PDF or plain text is the way to go. (Interpretive dance is okay too.)

Completely agree - it would not be worth to keep that route up for a
CV.


 And I did have a decent export to LaTeX resume from org, but after 
 discovering moderncv, I've switched, though I will be curious to read 
 others' methods of org-to-moderncv export.

Yes - moderncv looks nice. Would be interested in suggestions as well.

Thanks,

Rainer


 But what I do still use is export to ASCII, as editing an ASCII resume 
 layout is a pain. Here is the crux of my template for that

 #+OPTIONS: toc:nil num:nil
 #+NAME: setup # I have no idea what this line is for, I found it on worg
 #+BEGIN_SRC emacs-lisp :results silent :exports none
 (setq org-ascii-headline-spacing '(0 . 1))
 (setq org-ascii-inner-margin 5)
 (setq org-ascii-underline '((ascii nil ?= nil)))
 #+END_SRC

 * resume :export:

 #+BEGIN_CENTER
 Brady Trainor\\
 algeb...@uw.edu -- (206) 898-4124
 #+END_CENTER

 ** Experience
 *** Jan -Present Position
 Location\\
 Job description.

 ... etc.

 This is nice for sites that seem to prefer plain text, or demand it. I'm 
 considering removing the centering, as some sites seem to remove the 
 whitespace up to first character (B).

 Brady




-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpnsv3iOgXsX.pgp
Description: PGP signature


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Rainer M Krug
Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Brady Trainor algeb...@uw.edu writes:

 And I did have a decent export to LaTeX resume from org, but after 
 discovering moderncv, I've switched, though I will be curious to read 
 others' methods of org-to-moderncv export.

 One option could be to define a specialized latex back-end dedicated to
 moderncv class, much like ox-koma-letter.el does for scrlttr2.

 You can even do it all on the LaTeX side, e.g. redefining description
 (or using ¤+ATTR_LATEX) to make use of the description form

 - year :: item

 Together with rebinding the title-command it should be pretty easy to
 make a CV.

I am not a LaTeX expert, so could you please elaborate a bit on this, as
it sounds like a reasonable approach, and also relatively easy to
implement?

Rainer


 I never worked the LaTeX CV classes as I did not care for their
 default looks, but it's very easy to use KOMA for CVs.

 —Rasmus

-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpqelCaoa3x_.pgp
Description: PGP signature


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Rainer M Krug
Myles English mylesengl...@gmail.com writes:

 Hello,

 Nicolas Goaziou writes:

 Brady Trainor algeb...@uw.edu writes:

 And I did have a decent export to LaTeX resume from org, but after 
 discovering moderncv, I've switched, though I will be curious to read 
 others' methods of org-to-moderncv export.

 One option could be to define a specialized latex back-end dedicated to
 moderncv class, much like ox-koma-letter.el does for scrlttr2.

 I did actually make a start on this, I'll dig it out and put it
 somewhere accessible, soon.

I guess that this would be the best approach, but definitely not for me
to complete due to my lack of deeper elisp and LaTeX knowledge.

Thanks,

Rainer


 Myles



-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpoL9qJeyI44.pgp
Description: PGP signature


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Rainer M Krug
Vikas Rawal vikasli...@agrarianresearch.org writes:

 I know I am being lazy in not trying it out, but if you could share a
 PDF, it would give us an idea of what this gives you.

Yes - an example pdf would be great.

Rainer


 Vikas
  
 On 20-Sep-2014, at 6:19 am, Dan Griswold kc5...@gmail.com wrote:

 Not sure anybody saw this the first time, so I'll try again, with some 
 expansion.
 
 Unlike the others who've commented, I moved my CV from LaTeX to
 org-mode and I'm happy with the results. Two things make it work
 well.
 
 First, a cv class added to org-latex-classes:
 
 (add-to-list '(cv
 \\documentclass[10pt]{article}\n\\usepackage[margin=.75in]{geometry}\n%\\usepackage{palatino}\n\\usepackage{sectsty}\n\\sectionfont{\\normalsize\\selectfont\\itshape}\n\\usepackage[T1]{fontenc}\n\\usepackage{libertine}\n\\renewcommand*\\oldstylenums[1]{{\\fontfamily{fxlj}\\selectfont
 #1}}
   (\\section{%s} . \\section*{%s})))
 
 Second, something like the following at the top of the org file (replace 
 with your particulars):
 
 #+OPTIONS: author:nil timestamp:nil
 #+TITLE:
 #+DATE:
 #+LaTeX_CLASS: cv
 
 #+BEGIN_LATEX
 \begin{flushleft}
   \bfseries\Large Curriculum Vitae\hfill Daniel M. Griswold\normalfont
 \end{flushleft}
 
 \vspace{-12pt}%
 \begin{flushright}
   69 Stratton Road\\
   Rochester, NY 14610\\
   (585) xxx-\\
   dgris...@x.com\\
   \hrulefill
 \end{flushright}
 #+END_LATEX
 
 Main headings are things like:
 
 * Education
 * Specialization
 * Employment
 * Publications
 * Awards and Honors
 
 and the details below each of these headings are simply unordered lists
 
 I really like the easy of editing in org-mode this gives me.
 
 Hope this helps,
 
 Dan
 


-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpKBjz4BzpGJ.pgp
Description: PGP signature


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Rainer M Krug
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 Le sam.  20 sept. 2014  à 02:49:03  , Dan Griswold  kc5...@gmail.com a
 envoyé ce message:
 Not sure anybody saw this the first time, so I'll try again, with some 
 expansion.

 Unlike the others who've commented, I moved my CV from LaTeX to
 org-mode and I'm happy with the results. Two things make it work
 well.

 First, a cv class added to org-latex-classes:

 (add-to-list '(cv
 \\documentclass[10pt]{article}\n\\usepackage[margin=.75in]{geometry}\n%\\usepackage{palatino}\n\\usepackage{sectsty}\n\\sectionfont{\\normalsize\\selectfont\\
 itshape}\n\\usepackage[T1]{fontenc}\n\\usepackage{libertine}\n\\renewcommand*\\oldstylenums[1]{{\\fontfamily{fxlj}\\selectfont
 #1}}
 (\\section{%s} . \\section*{%s})))
 Hello Dan, hello the list,

 I guess that there  is a code problem in this (add-to-list  ...) , in my
 init.el (or custom.el) , it produces this warning:

Same here - I guess it has to do with linebreaks?

Rainer

 Wrong number of arguments: #[(list-var element optional append compare-fn) 
 \204
 J\235\202\305=\203  
 J\202\306=\203\307
 J\202
 J\211\203   @\204A\211\204-)\203D
 J\207
 \203R\304
 J C\202V 
 JBL\207  [compare-fn  element  list-var  lst  append  eq  eql  memql]  5
 1615569], 1

 Now a suggestion:  there is moderncv class in texlive  and I wonder if
 it is difficult to make an add-to-list for this class in order to export
 a CV both in latex and in html. 

 I have no time at the moment to try this solution. 

 Best wishes,

 Jo. 



-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpWmAeslzPlZ.pgp
Description: PGP signature


Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Rainer M Krug
Xavier Garrido xavier.garr...@gmail.com writes:

 Hi Rainer,

 You can see mine https://github.com/xgarrido/org-resume that uses
 org-mode to produce a LaTeX-PDF (see attached file) file as well as
 an HTML version.

 Hope it gives you some ideas.

I can only say *wow*! This looks seriously impressive to me. 

I will have to take a closer look and see if I understand it and can
make it do what I want it to. But it looks nicely commented.

Thanks a lot,

Rainer


 Cheers,
 Xavier

 Le 19/09/2014 11:18, Rainer M Krug a écrit :
 Hi

 I am looking for examples / templates for CVs written using org, as I
 decided to ose org for my CV.

 I fund this oldish conversation

 http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00096.html

 and these two templates for using org to write a CV:

 https://github.com/punchagan/resume
 https://github.com/fasheng/fsh-orgmode-latex-cv

 as well this CV without .org file

 http://adamsonj.ninth.su/cv.html

 Also, there does not seem to be anything on worg.

 - Can somebody give any further info on org and CVs?
 - How do you do it (I don't assume you write your CVs in Word?), or are
 you using LaTeX directly?
 - Any other examples and templates online?

 If I get enough, I will compile a summary for worg, but I need examples
 and information.

 Thanks,

 Rainer



-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpDefL1oi7v1.pgp
Description: PGP signature


[O] [Bug] Errors when evaluating LaTeX source block with new SVG headers patch

2014-09-22 Thread Tobias Getzner
Evaluating LaTeX source blocks had an issue where header options would be 
ignored when exporting to SVG; this appears to have been addressed in 
246df88. I have patched this commit into my 8.2.7c installation. While 
the headers now seem to work, I’ve noticed that LaTeX still doesn’t like 
the generated temporary files when SVG-output is selected. Below is an 
example which fails to work when SVG output is chosen, but which will 
work when PNG is used.

#+HEADERS: :headers '(\\usepackage{tikz} \\usetikzlibrary
{shapes,arrows,positioning})
#+BEGIN_src latex :file test.svg :imagemagick
\begin{tikzpicture}
  \node {quux quux quux};
\end{tikzpicture}
#+END_SRC

The generated temporary LaTeX file is shown below.

\documentclass[preview]{standalone}
\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage[usenames]{color}
\usepackage{tikz}
\usepackage{color}
\usepackage{listings}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\begin{document}\begin{tikzpicture}
\node {quux};
\end{tikzpicture}\end{document}

By default, LaTeX will choke on this with a lot of undefined command 
errors. I have no clue about PGF, but I’ve noticed that if I insert 
«\usepackage{pgf}» before the «\def\pgfsysdriver» line, this will resolve 
those errors. Should this be done in ob-latex too?

After these errors are resolved, though, LaTeX will still complain about 
an option clash for the color package. At first I thought this might be 
because the colors package is imported twice. But apparently PGF will 
also import colors, so that both the «\usepackage{pgf}» and the «\def
\pgfsysdriver» had to come after «\usepackage[usenames]{color}».

Best regards,
T.




Re: [O] CV in orgmode for export to pdf (and html?

2014-09-22 Thread Nick Dokos
Rainer M Krug rai...@krugs.de writes:


 I like Dan's approach as it looks relatively simple, although I still
 have to look into it in detail (and as Joseph notes, there must be a
 problem in the code).

 ...
 Dan Griswold kc5...@gmail.com writes:
 ...

 First, a cv class added to org-latex-classes:

 (add-to-list '(cv

 \\documentclass[10pt]{article}\n\\usepackage[margin=.75in]{geometry}\n%\\usepackage{palatino}\n\\usepackage{sectsty}\n\\sectionfont{\\normalsize\\selectfont\\itshape}\n\\usepackage[T1]{fontenc}\n\\usepackage{libertine}\n\\renewcommand*\\oldstylenums[1]{{\\fontfamily{fxlj}\\selectfont
 #1}}
   (\\section{%s} . \\section*{%s})))

 ...

 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 Le sam.  20 sept. 2014  à 02:49:03  , Dan Griswold  kc5...@gmail.com a
 envoyé ce message:

 I guess that there  is a code problem in this (add-to-list  ...) , in my
 init.el (or custom.el) , it produces this warning:

 Wrong number of arguments: #[(list-var element optional append compare-fn) 
 \204   
 J\235\202\305=\203 
 J\202\306=\203\307   
 J\202
 J\211\203  @\204A\211\204-)\203D
 J\207
 \203R\304
 JC\202V 
 JBL\207  [compare-fn  element  list-var  lst  append  eq  eql  memql]  5
 1615569], 1


The problem is that the add-to-list needs a list to work on:

(add-to-list 'org-latex-classess '(cv \documentclass  (\\section{%s} 
. \\section*{%s})))

-- 
Nick






[O] [Bug?] Results of code block printed in wrong place

2014-09-22 Thread Tobias Getzner
Hello,

I have a strange problem when exporting the following file:

* heading 1
#+BEGIN_SRC sh :eval never
echo baz
#+END_SRC

* heading 2
#+BEGIN_SRC sh :exports results
echo quux
#+END_SRC

When I export this document, and point is on heading 1 when issuing the
«C-c C-e», the results of the code in heading 2 are added under the code
block in heading 1 (sic). o_O So I am seeing:

* heading 1
#+BEGIN_SRC sh :eval never
echo baz
#+END_SRC

#+RESULTS:
: quux

When point is at heading 2 when issuing «C-c C-e» (or when doing a manual
eval), the results are as expected.

When point is after #+END_SRC of heading 2 when issuing the export, I’m
also seeing that the results are now suddenly added inline:

* heading 2
#+BEGIN_SRC sh :exports results
echo quux
#+END_SRC=quux
=

Additionally, the results of the code are not actually exported until I
run the export a second time; I’m not sure whether this is the expected
behavior. Should the export already take into account any results produced
during the export run?

Any ideas where to look or what the problem might be?

Best,
T.

Org-mode version 8.2.7c (8.2.7c-71-g60418c-elpa @ /home/tzg/.emacs.d/elpa/
org-20140922/)





[O] [Feature Request] HEADLINE special property

2014-09-22 Thread Brett Witty
(Following Thorsten's helpful response:
http://article.gmane.org/gmane.emacs.orgmode/90768)

I'd like an extra special property of HEADLINE which is ITEM without all
the other metadata. Specifically the output of:

(org-get-heading t t)

I find the ITEM special property too noisy inside of a table, and I have
all the metadata without the actual headline by itself.

I'm unsure if the special properties HEADING and ITEM are confusing as
being slightly different concepts, so a better name might be good.

Brett Witty


Re: [O] [Feature Request] HEADLINE special property

2014-09-22 Thread Nicolas Goaziou
Hello,

Brett Witty brettwi...@brettwitty.net writes:

 (Following Thorsten's helpful response:
 http://article.gmane.org/gmane.emacs.orgmode/90768)

 I'd like an extra special property of HEADLINE which is ITEM without all
 the other metadata. Specifically the output of:

 (org-get-heading t t)

 I find the ITEM special property too noisy inside of a table, and I have
 all the metadata without the actual headline by itself.

 I'm unsure if the special properties HEADING and ITEM are confusing as
 being slightly different concepts, so a better name might be good.

I think ITEM is expected return the headline without all the meta
data. If no one objects, I'll change it so in master.


Regards,

-- 
Nicolas Goaziou



Re: [O] [Bug?] Results of code block printed in wrong place

2014-09-22 Thread Nicolas Goaziou
Hello,

Tobias Getzner tobias.getz...@gmx.de writes:

 I have a strange problem when exporting the following file:

 * heading 1
 #+BEGIN_SRC sh :eval never
 echo baz
 #+END_SRC

 * heading 2
 #+BEGIN_SRC sh :exports results
 echo quux
 #+END_SRC

 When I export this document, and point is on heading 1 when issuing the
 «C-c C-e», the results of the code in heading 2 are added under the code
 block in heading 1 (sic). o_O So I am seeing:

 * heading 1
 #+BEGIN_SRC sh :eval never
 echo baz
 #+END_SRC

 #+RESULTS:
 : quux

 When point is at heading 2 when issuing «C-c C-e» (or when doing a manual
 eval), the results are as expected.

FWIW, I cannot reproduce it.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch, ox] Unnumbered headlines

2014-09-22 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 With the last patch it gets weird when you have mixed trees, like this:

 * numbered
 ** unnumbered 
 :PROPERTIES:
 :UNNUMBERED: t
 :END:

 The LaTeX output is:

 \section{numbered}
 \label{sec-1}
 \subsection*{unnumbered}
 \label{unnumbered-sec-0-1}

 Perhaps it would be nicer to use a single counter rather than two?
 Right now, this

 * numbered1
 * unnumbered2 
 :PROPERTIES:
 :UNNUMBERED: t
 :END:
 * numbered2
 * unnumbered2
 :PROPERTIES:
 :UNNUMBERED: t
 :END:

 produces

 \section{numbered1}
 \label{sec-1}
 \section*{unnumbered2}
 \label{unnumbered-sec-1}
 \section{numbered2}
 \label{sec-2}
 \section*{unnumbered2}
 \label{unnumbered-sec-2}

 But perhaps this is nicer?

 \label{sec-1}
 \label{unnumbered-sec-2}
 \label{sec-3}
 \label{unnumbered-sec-4}

 In particular for mixed, nested trees. 

I think it would be nice to keep sec-NUM, with NUM matching current
numbering, for numbered headlines. I'm not against a simple global
counter for unnumbered headlines:

  \label{sec-1}
  \label{unnumbered-1}
  \label{sec-2}
  \label{unnumbered-2}

or in the following example

  * H1
  ** H2
 :PROPERTIES:
 :UNNUMBERED: t
 :END:
  *** H3
  *** H4
  * H5
  ** H6

the labelling scheme

 \label{sec-1}
 \label{unnumbered-1}
 \label{unnumbered-2}
 \label{unnumbered-3}
 \label{sec-2}
 \label{sec-2-1}

 This is incorrect.

   #+options: num:nil

   * Headline
 :PROPERTIES:
 :CUSTOM_ID: test
 :END:
 This is a link to [[#test]].

 will produce

   \section*{Headline}
   \label{sec-1}
   This is a link to \hyperref[sec-1]{Headline}.

 Is *my statement* incorrect or is the current *output* incorrect?

The former, but see below.

 On my PC, when I refer to an unnumbered headline I get
 \ref{UNNUMBERED}, but since it's after a \section* it will produce
 nothing or a subsequent element.  But I *did* forget to try the patch
 with emacs -q and maybe that's why I'm not seeing \hyperref's. . .

Actually, there was a small bug in the code, now fixed. `latex' back-end
is expected to use hyperref when headline in unnumbered.

 To be clear: you are happy if it uses the \hyperref[·]{·} in LaTeX,
 but not \ref{·} for unnumbered?

You are the LaTeX expert. Isn't it reasonable?


Regards,

-- 
Nicolas Goaziou



Re: [O] resize multiple image within a row or paragraph

2014-09-22 Thread Nicolas Goaziou
Hello,

Christian Moe m...@christianmoe.com writes:

 Here's a simple CSS workaround that might or might not work well for
 you, and won't work for non-HTML backends, but at least requires minimal
 hacking: 

[...]

Good to know.

Anyhow, does my proposal make sense?


Regards,

-- 
Nicolas Goaziou



Re: [O] Changed behaviours of LaTeX exporter in version 8.0+

2014-09-22 Thread Nicolas Goaziou
Hello,

Kyeong Soo (Joseph) Kim kyeongsoo@gmail.com writes:

 By the way, as said, [[*Foo][Section Foo]] does not produce the link in
 LaTeX export any longer; version 8.x generates just \texttt{Section Foo}
 unlike version 7.x.

An ECM illustrating the problem would be nice.

\textt{Section Foo} means that [[*Foo][Section Foo]] couldn't match
a headline. It can happen if there is no headline named exactly Foo in
the exported part of the buffer.


Regards,

-- 
Nicolas Goaziou



Re: [O] update on missing :parameters in code blocks

2014-09-22 Thread John Kitchin
Charles Berry ccbe...@ucsd.edu writes:

Thanks for the tips. I did not see a way to do the advice here. For what
I need, we need to save parameters for each code block. But it appears
they are all affected by one function org-babel-exp-process-buffer, and
advising this kind of function is tantamount to rewriting the function!

my solution is here:
http://kitchingroup.cheme.cmu.edu/blog/2014/09/22/Showing-what-data-went-into-a-code-block-on-export/

I agree it would be nice if that was unnecessary, but it is not too
terrible for now. 


 John Kitchin jkitchin at andrew.cmu.edu writes:

 
 I did some more digging on the missing :parameters during export, and it
 seems that the src block itself is different during export than in the
 buffer.  Below illustrates what I mean. In the buffer, if I look at the
 contents of the code block using output from org-element-at-point, it
 looks as I expect, with the complete header. But, using the same method
 in the export, it is clear that the header args are not there.
 
 I have not figured out where they disappear yet.
 
 [snip]

 Instrument org-export-as. Then step thru it.

 Before this line:
  
  (org-export-execute-babel-code)

 the buffer copy ( my-buffer2, say ) will show the parameters/headers.

 After that line is executed, they are gone.

 You can work around this by `advicing' various babel functions and inserting
 things you want to save as attributes, but it would be nice not to need
 to do that.

 HTH,

 Chuck






-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



Re: [O] update on missing :parameters in code blocks

2014-09-22 Thread Nicolas Goaziou
Hello,

John Kitchin jkitc...@andrew.cmu.edu writes:

 Thanks for the tips. I did not see a way to do the advice here. For what
 I need, we need to save parameters for each code block. But it appears
 they are all affected by one function org-babel-exp-process-buffer, and
 advising this kind of function is tantamount to rewriting the
 function!

Actually, this is not related to this function, which is but a big
dispatcher. Block transformation happens at a lower level (e.g.,
`org-babel-exp-src-block' and deeper).


Regards,

-- 
Nicolas Goaziou



[O] Struggling with new exporter

2014-09-22 Thread Phillip Lord


I'm rather struggling with the new exporter. I fear I have used a
combination of old and new configuration which cannot be helping.
I am trying to get publishing working mostly in batch, so that it will
work as part of my continuous integration framework. But having it work
interactively would be nice also.

I have installed the org-mode daily from the Org ELPA. I have a file
called book.org, which also includes several other files.

I want to publish to HTML and PDF. It would be nice to publish to
some kind of chunked HTML also, as the file will get quite long, but for
the moment I can live with out this.


The headers look like this:

#+LATEX_HEADER: \usepackage{tawny}
#+LATEX_HEADER: \lstnewenvironment{tawny}{\lstset{style=tawnystyle}}{}

#+BIND: org-publishing-directory ./exports
#+BIND: org-latex-custom-lang-environments ((clojure tawny))
#+BIND: org-latex-listings t

Tawny is my own package, and is present in the same location as the org
file. It provides the syntax highlighting support latex. 

Now, by original batch build commands looked like this...

(defun build/pdf ()
  (with-current-buffer
  (find-file-noselect build-source-file)
(org-export-as-pdf
 org-export-headline-levels)))

(defun build/html ()
  (init-faces)
  (setq htmlize-use-rgb-map 'force)
  (with-current-buffer
  (find-file-noselect build-source-file))
(org-export-as-html-batch org-export-headline-levels))

but these are using the old org-export functions.

My current version looks like this...

(defun build/html ()
  (init-faces)
  (setq htmlize-use-rgb-map 'force)
  (with-current-buffer
  (find-file-noselect build-source-file))
  (org-html-publish-to-html
   ;; publishing plist
   nil
   ;; output file name
   book.html
   ;; directory
   exports))

Which is crashing with:

Debugger entered--Lisp error: (error `org-publish-cache-get' called, but no 
cache present)
  signal(error (`org-publish-cache-get' called, but no cache present))
  error(`org-publish-cache-get' called, but no cache present)

Interactively, the publishing works BUT the bind forms appear to do
nothing. My source code is coming up verbatim and the publishing
directory is being ignored.

Any help gratefully recieved!

Phil



Re: [O] Struggling with new exporter

2014-09-22 Thread Nicolas Goaziou
Hello,

phillip.l...@newcastle.ac.uk (Phillip Lord) writes:

 I'm rather struggling with the new exporter. I fear I have used a
 combination of old and new configuration which cannot be helping.
 I am trying to get publishing working mostly in batch, so that it will
 work as part of my continuous integration framework. But having it work
 interactively would be nice also.

 I have installed the org-mode daily from the Org ELPA. I have a file
 called book.org, which also includes several other files.

 I want to publish to HTML and PDF. It would be nice to publish to
 some kind of chunked HTML also, as the file will get quite long, but for
 the moment I can live with out this.


 The headers look like this:

 #+LATEX_HEADER: \usepackage{tawny}
 #+LATEX_HEADER: \lstnewenvironment{tawny}{\lstset{style=tawnystyle}}{}

 #+BIND: org-publishing-directory ./exports
 #+BIND: org-latex-custom-lang-environments ((clojure tawny))
 #+BIND: org-latex-listings t

 Tawny is my own package, and is present in the same location as the org
 file. It provides the syntax highlighting support latex. 

 Now, by original batch build commands looked like this...

 (defun build/pdf ()
   (with-current-buffer
   (find-file-noselect build-source-file)
 (org-export-as-pdf
  org-export-headline-levels)))

 (defun build/html ()
   (init-faces)
   (setq htmlize-use-rgb-map 'force)
   (with-current-buffer
   (find-file-noselect build-source-file))
 (org-export-as-html-batch org-export-headline-levels))

 but these are using the old org-export functions.

 My current version looks like this...

 (defun build/html ()
   (init-faces)
   (setq htmlize-use-rgb-map 'force)
   (with-current-buffer
   (find-file-noselect build-source-file))
   (org-html-publish-to-html
;; publishing plist
nil
;; output file name
book.html
;; directory
exports))

 Which is crashing with:

[...]

`org-html-publish-to-html' is not meant to be called directly, but
rather used in a project definition as a :publishing-function value.

Speaking of which, why don't you simply create a proper project-alist
and call `org-publish' on it (interactively or not)?

If you simply want to export a single file, then the correct functions
are `org-latex-export-to-pdf' and `org-html-export-to-html'. Note that
the first (optional) argument isn't the maximum headline level anymore,
so don't call any of them with `org-export-headline-levels'. 


HTH,

-- 
Nicolas Goaziou



Re: [O] update on missing :parameters in code blocks

2014-09-22 Thread John Kitchin
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

Thanks for the clarification. Is there any chance you know why this
transformation is done? Does it avoid some problem?

 Hello,

 John Kitchin jkitc...@andrew.cmu.edu writes:

 Thanks for the tips. I did not see a way to do the advice here. For what
 I need, we need to save parameters for each code block. But it appears
 they are all affected by one function org-babel-exp-process-buffer, and
 advising this kind of function is tantamount to rewriting the
 function!

 Actually, this is not related to this function, which is but a big
 dispatcher. Block transformation happens at a lower level (e.g.,
 `org-babel-exp-src-block' and deeper).


 Regards,

-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



[O] [ Bug] tsia-{up, down} sorting strategy not working for tags search agendas

2014-09-22 Thread Subhan Michael Tindall
I have the following agendas (among others) defined:
(x Last worked ((alltodo  (   


 (org-agenda-sticky nil)
(org-agenda-sorting-strategy (quote (tsia-up 
todo-state-down)))
(y Last worked2 ((tags LastWorked={.+} (
(org-agenda-sticky nil)
(org-agenda-sorting-strategy (quote (tsia-up 
todo-state-down)))

I have a property defined in headlines that have been worked on:
:PROPERTIES:
:LastWorked: [2014-09-02 Tue 16:02]
:END:

TODOs etc that have not been worked yet don't have this property.

The top search (x) creates an agenda with items with a LastWorked property 
sorted with the least recent first, down to most recent, followed by any items 
with the LastWorked property unset sorted by todo-state.

The bottom search (y) creates an agenda with only items with LastWorked 
property set (which I want) but completely ignores the tsia-up sorting strategy 
and sorts only by todo-state.

I have confirmed that org-agenda-sorting-strategy-selected is correct in both 
cases.
The only difference is the agenda type (tags vs alltodo)

Any ideas where to look for this ?






Subhan Michael Tindall
Program Analyst - FamilyCare Health Plans
825 NE Multnomah St, Suite 1400; Portland OR 97232
Direct: 503-471-3127
Fax:  503-471-3177
Email:  subh...@familycareinc.orgmailto:subh...@familycareinc.org
[Email-Signature-Logos June 20143]


This message is intended for the sole use of the individual and entity to which 
it is addressed and may contain information that is privileged, confidential 
and exempt from disclosure under applicable law. If you are not the intended 
addressee, nor authorized to receive for the intended addressee, you are hereby 
notified that you may not use, copy, disclose or distribute to anyone the 
message or any information contained in the message. If you have received this 
message in error, please immediately advise the sender by reply email and 
delete the message.  Thank you.


Re: [O] update on missing :parameters in code blocks

2014-09-22 Thread Nicolas Goaziou
Hello,

John Kitchin jkitc...@andrew.cmu.edu writes:

 Thanks for the clarification. Is there any chance you know why this
 transformation is done? Does it avoid some problem?

No idea.


Regards,

-- 
Nicolas Goaziou



Re: [O] CV in orgmode for export to pdf (and html?)

2014-09-22 Thread Myles English


Myles English writes:

 Nicolas Goaziou writes:

 One option could be to define a specialized latex back-end dedicated to
 moderncv class, much like ox-koma-letter.el does for scrlttr2.

 I did actually make a start on this, I'll dig it out and put it
 somewhere accessible, soon.

..and here it is:

https://github.com/mylese/ox-cv

It kind of works, I haven't tried it with org more recent than about
July.  I'll be trying to develop it further myself but would welcome a
lot of input from others.  Alternatively, if someone wants to take it
over completely, that would be fine too.

Myles



Re: [O] [patch, ox] Unnumbered headlines

2014-09-22 Thread Rasmus
Hi,

Another couple of small changes.

Random observation: the patch is almost neutral due to the
headline-id function:

88 insertions(+), 72 deletions(-)

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 I think it would be nice to keep sec-NUM, with NUM matching current
 numbering, for numbered headlines. I'm not against a simple global
 counter for unnumbered headlines:

   \label{sec-1}
   \label{unnumbered-1}
   \label{sec-2}
   \label{unnumbered-2}

 or in the following example

   * H1
   ** H2
  :PROPERTIES:
  :UNNUMBERED: t
  :END:
   *** H3
   *** H4
   * H5
   ** H6

 the labelling scheme

  \label{sec-1}
  \label{unnumbered-1}
  \label{unnumbered-2}
  \label{unnumbered-3}
  \label{sec-2}
  \label{sec-2-1}

Using this file:

* h1
:PROPERTIES:
:CUSTOM_ID: h1
:END:
** h2
:PROPERTIES:
:unnumbered: t
:CUSTOM_ID: h2
:END:
*** h3
*** h4
* h5
:PROPERTIES:
:CUSTOM_ID: h5
:END:
[[*h1]] [[#h2]] [[*h4]] [[#h5]]
** h6

The output is now

\section{h1}
\label{sec-1}
\subsection*{h2}
\label{unnumbered-1}
\subsubsection*{h3}
\label{unnumbered-2}
\subsubsection*{h4}
\label{unnumbered-3}
\section{h5}
\label{sec-2}
\ref{sec-1} \hyperref[unnumbered-1]{h2} \hyperref[unnumbered-3]{h4} 
\ref{sec-2}
\subsection{h6}
\label{sec-2-1}


Which I think is quite good.

I don't know if the global unnumbered counter is made in the best way.
I add another plist to info with the number.  This approach is cleaner
than before since it's the numbering of unnumbered headlines is not in
`org-export--collect-headline-numbering' which is complicated enough
as it is.

An alternative approach could be to just count the unnumbered
headlines place in the tree every time.

 Actually, there was a small bug in the code, now fixed. `latex' back-end
 is expected to use hyperref when headline in unnumbered.

Right I see.  The attached patch should merge against master.

 To be clear: you are happy if it uses the \hyperref[·]{·} in LaTeX,
 but not \ref{·} for unnumbered?

 You are the LaTeX expert. Isn't it reasonable?

It seems to work well, yes.

So I guess we should let the patch hang for a while and see if someone
cares to test it.  

Of course I'd appreciate more comments/bug reports.

Should I write tests for the new behavior?  If so, tests for each
backend or only for vanilla-ox functions?

Cheers,
Rasmus

--
If you can mix business and politics wonderful things can happen!
From b6debf17314973b1feb5e7da0d7cc788d4920f50 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Sun, 21 Sep 2014 16:17:55 +0200
Subject: [PATCH] ox: Support unnumbered headlines via property.

* ox.el (org-export--collect-headline-numbering): Return nil
if unnumbered headline.
(org-export-get-headline-id): New defun that returns a unique
ID to a headline.
(org-export-numbered-headline-p): Also tests for unnumbered
headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support ununbered headlines.
---
 lisp/org.el  |  2 +-
 lisp/ox-ascii.el |  7 +--
 lisp/ox-html.el  | 22 -
 lisp/ox-latex.el | 20 +++
 lisp/ox-md.el| 25 
 lisp/ox-odt.el   | 25 
 lisp/ox.el   | 59 +++-
 7 files changed, 88 insertions(+), 72 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 4ffe1e8..7565b14 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15337,7 +15337,7 @@ but in some other way.)
 LOCATION LOGGING COLUMNS VISIBILITY
 TABLE_EXPORT_FORMAT TABLE_EXPORT_FILE
 EXPORT_OPTIONS EXPORT_TEXT EXPORT_FILE_NAME
-EXPORT_TITLE EXPORT_AUTHOR EXPORT_DATE
+EXPORT_TITLE EXPORT_AUTHOR EXPORT_DATE UNNUMBERED
 ORDERED NOBLOCKING COOKIE_DATA LOG_INTO_DRAWER REPEAT_TO_STATE
 CLOCK_MODELINE_TOTAL STYLE HTML_CONTAINER_CLASS)
   Some properties that are used by Org-mode for various purposes.
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 6f2b43a..5e8d479 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -1530,9 +1530,12 @@ INFO is a plist holding contextual information.
 	(let ((number
 		   (org-export-get-ordinal
 		destination info nil 'org-ascii--has-caption-p)))
-	  (when number
+	  (if number
 		(if (atom number) (number-to-string number)
-		  (mapconcat 'number-to-string number .
+		  (mapconcat 'number-to-string number .))
+		;; unnumbered headline
+		(when (eq 'headline (org-element-type destination))
+		  (format [%s] (org-export-data (org-element-property :title destination) info)
  (t
   (if (not (org-string-nw-p desc)) (format [%s] raw-link)
 	(concat (format [%s] desc)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 

Re: [O] [patch, ox] Unnumbered headlines

2014-09-22 Thread Thomas S. Dye
Aloha Rasmus,

Rasmus ras...@gmx.us writes:

 So I guess we should let the patch hang for a while and see if someone
 cares to test it.  

 Of course I'd appreciate more comments/bug reports.

I'm looking forward to this functionality and will test out the patch
now that you're happy with its performance.  

I have a busy week ahead and two looming deadlines, but I'll get to it
as soon as I find time.

Thanks for taking on this difficult project.

All the best,
Tom

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



Re: [O] Changed behaviours of LaTeX exporter in version 8.0+

2014-09-22 Thread Kyeong Soo (Joseph) Kim
On Tue, Sep 23, 2014 at 12:00 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Kyeong Soo (Joseph) Kim kyeongsoo@gmail.com writes:

  By the way, as said, [[*Foo][Section Foo]] does not produce the link in
  LaTeX export any longer; version 8.x generates just \texttt{Section
 Foo}
  unlike version 7.x.

 An ECM illustrating the problem would be nice.

 \textt{Section Foo} means that [[*Foo][Section Foo]] couldn't match
 a headline. It can happen if there is no headline named exactly Foo in
 the exported part of the buffer.


 Regards,

 --
 Nicolas Goaziou


Below I provide ECM for LaTeX cross-referencing you requested, which itself
summarizes the issues in the current export engine: We see that there are
mix of results for different cases of heading title (i.e., \texttt{},
\hyperref[]{},  \ref{}) and that only referring by custom_id results in a
correct cross-reference. Note that, as mentioned in the list several time
before, there is currently no way to customizing hyperref format using
'org-export-latex-hyperref-format' varible, which becomes obsolete now.


org-mode source


#+TITLE: \LARGE ECM for New Org-Mode \LaTeX Export Engine
#+DATE: Time-stamp: 2014-09-23 10:52:34 Kyeong Soo (Joseph) Kim
#+AUTHOR: Joseph
#+EMAIL:
#+DESCRIPTION: ECM for testing LaTeX engine compatibility issues
#+LANGUAGE: en
#+OPTIONS: toc:nil email:t
#+STARTUP: overview fnauto fnadjust hideblocks
#+LaTeX_CLASS: article

#+BEGIN_abstract
We test \LaTeX cross-referencing in emacs org-mode version 8.x.
#+END_abstract

* OneWord
  :PROPERTIES:
  :CUSTOM_ID: sec:one_word
  :END:
* Two Words
  :PROPERTIES:
  :CUSTOM_ID: sec:two_words
  :END:
* With  in the Title
  :PROPERTIES:
  :CUSTOM_ID: sec:with_ampersand
  :END:
* Cross-Referenceing
For Section title with one word:
- By custom ID: Sec. [[#sec:one_word]]
- By name (using C-c l  C-c C-l): Sec. [[*OneWord][OneWord]]

For Section title with multiple words:
- By custom ID: Sec. [[#sec:two_words]]
- By name (using C-c l  C-c C-l): Sec. [[*Two%20Words][Two Words]]

For Section title with :
- By custom ID: Sec. [[#sec:with_ampersand]]
- By name (using C-c l  C-c C-l): Sec.
[[*With%20%20in%20the%20Title][With  in the Title]]


===
Exported LaTeX file
===

% Created 2014-09-23 Tue 10:52
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\author{Joseph}
\date{Time-stamp: \textit{2014-09-23 10:52:34 Kyeong Soo (Joseph) Kim}}
\title{\LARGE ECM for New Org-Mode \LaTeX Export Engine}
\hypersetup{
  pdfkeywords={},
  pdfsubject={ECM for testing LaTeX engine compatibility issues},
  pdfcreator={Emacs 24.3.1 (Org mode 8.2.7c)}}
\begin{document}

\maketitle
\begin{abstract}
We test \LaTeX cross-referencing in emacs org-mode version 8.x.
\end{abstract}

\section{OneWord}
\label{sec-1}
\section{Two Words}
\label{sec-2}
\section{With \ in the Title}
\label{sec-3}
\section{Cross-Referenceing}
\label{sec-4}
For Section title with one word:
\begin{itemize}
\item By custom ID: Sec. \ref{sec-1}
\item By name (using C-c l \ C-c C-l): Sec. \hyperref[sec-1]{OneWord}
\end{itemize}

For Section title with multiple words:
\begin{itemize}
\item By custom ID: Sec. \ref{sec-2}
\item By name (using C-c l \ C-c C-l): Sec. \texttt{Two Words}
\end{itemize}

For Section title with \:
\begin{itemize}
\item By custom ID: Sec. \ref{sec-3}
\item By name (using C-c l \ C-c C-l): Sec. \texttt{With \ in the Title}
\end{itemize}
% Emacs 24.3.1 (Org mode 8.2.7c)
\end{document}


Re: [O] [RFC] [PATCH] ox-latex: support :float no with caption for minted listings

2014-09-22 Thread Aaron Ecay
Hi Nicolas,

2014ko irailak 19an, Nicolas Goaziou-ek idatzi zuen:

[...]

 
 In any case, I think you can apply the patch once the docstrings
 questions above have been sorted out.

Thanks for all your feedback.  The patch is now applied on master.

 This can do for now. Ultimately, however, I think we could merge
 `org-latex--wrap-label' into `org-latex--caption/label-string' (which
 should then produce \captionof command when appropriate). By then, the
 `replace-regexp-in-string' would not be needed anymore. WDYT?

I’m confused about how ‘org-latex--wrap-label’ works.  It tries to
put \label commands outside of floats.  That will yield links that
jump to the preceding section, not the specific point in the document
where the \label command occurs.  Probably this command should insert
\phantomsection before the \label, so that resultant links jump to
the right point.  (I’ll make this change if no one objects.)

Merging the functions might only be worth doing if there were any more
places where \captionof needed to be used.  As long as it’s just a
particular kind of source block that needs it, I think this can stay as
a little special case in the source block transcoder.  The docstrings
seem to spell out the criteria for using one function vs. the other
well, so there’s little danger of confusion.  Adding \phantomsection to
‘org-latex--wrap-label’ would also make them diverge further in their
internal workings.

Thanks,

-- 
Aaron Ecay



Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-22 Thread Aaron Ecay
Hi Nicolas,

2014ko irailak 19an, Nicolas Goaziou-ek idatzi zuen:
 
 Certainly not a message, due to asynchronous export.

Very good point.

 
 2. Since this is a feature that many backends will want to use, should
 we introduce a new “abstract” backend from which other backends can
 inherit, which incorporates this feature, and others like it in the
 future?  The idea would be similar to prog-mode in emacs, the major
 mode from which programming-language modes can derive.  The
 alternative is adding the (macro . org-export-macro-warn) entry
 manually to all the relevant backends, and relying on future backend
 authors to do the same.
 
 3. Should this even be implemented as part of the backend’s
 translate-alist, or at a lower level?
 
 Don't bother with export back-ends, they never get to see macros, which
 are expanded very early in the export process. This explains, for
 example, why there is no `macro' translator.

Um...but the patch I sent works precisely by defining a macro translator,
which does get called for any unexpanded (because undefined) macros.  I
guess you’re saying the code ought to block this at a lower/earlier level.

 
 You have two options. Either report an error, as you suggested, or
 insert an obnoxious message in the output, e.g., UNKNOWN MACRO, à la
 DEFINITION NOT FOUND. for footnote definitions. In any case, this
 should happen in org-macro.el, not in the export framework.

I think error is better than obnoxious message, because it’s possible
for the latter to slip through into a “production” document.  (We ought
to proofread our documents carefully, of course...but no one’s perfect).

One issue is that the exporter does two macro expansion passes – one
for garden-variety macros, and the second for author, date, email, and
title.  So, we can’t make the macro expansion unconditionally barf on
undefined macros (since for the first pass e.g. author is undefined).
I see three options:
1. explicitly whitelist the few “blessed” macros like author, and error
   on any other undefined macro
2. add an optional “final” arg to org-macro-replace-all, which will
   activate the undefined checking only if non-nil, and pass this flag
   in the exporter’s second (and last) call to org-macro-replace-all
3. in ‘org-export-as’, manually walk the parse tree after expanding
   macros, and make sure no 'macro type objects are left

WDYT?

-- 
Aaron Ecay



Re: [O] [RFC] [PATCH] [babel] read description lists as lists of lists

2014-09-22 Thread Aaron Ecay
Hi Nicolas,

Thanks for your feedback.

2014ko irailak 20an, Nicolas Goaziou-ek idatzi zuen:
 
 The problem I see here is that you're introducing yet another internal
 representation for lists (along with element's and
 org-list-parse-list's). Worse, it can only be discovered when reading
 the docstring of a Babel internal function and will only benefit to
 Babel.
 
 If this new internal representation is better than current one, by all
 means, improve `org-list-parse-list', and document it in
 
   (info (org) Radio lists)
 
 This is more work, but, IMO, it is also the only sane way to proceed.

Indeed.  The internals of org-list are not pretty.  org-list-parse-list
has few callers:
- org-list-make-subtree
- org-babel-read-list
- org-toggle-heading

org-list-to-subtree has only two callers:
- org-list-make-subtree
- org-toggle-heading

org-list-to-generic also has only two callers:
- org-babel-insert-result
- org-list-to-subtree

I think I can remove these three functions (-parse-list, -to-subtree,
and -to-generic), and rewrite their callers to use org-element.  Thus,
the org-list-parse-list format would be eradicated from the code base
incl. contrib (AFAICT).  Can I do that, or do I need to care about
preserving backwards compatibility with external callers of these
functions?  If backwards compatibility must be preserved, may I mark
these functions as deprecated and what is the minimum period (measured
in calendar time and/or org versions) that should pass before their
removal?

The babel feature is compelling to me (and I guess Chuck) on its
own.  It’s familiar (e.g. in the case of tables) that babel gets to
have its own data format for org elements.  I’m happy to undertake
the above-described demolition job on org-list-parse-list in order
to offset the added complexity from the babel change (we can call it
a cap-and-trade system).  But given that org-list-parse-list is a
marginal part of the code base – and perhaps moribund in the era of
org-element – I don’t really think it’s worth it (to me) to try and
engineer an improvement to it in order to enable the babel feature.

WDYT?

-- 
Aaron Ecay



[O] Is it possible to export Org properties as ODT user defined fields?

2014-09-22 Thread Kevin D. Robbins
I would like to export some Org document properties as ODT user defined
fields for use in ODT templates.  For example, it would be great if
something like

#+ODT_FIELD: FOO:17 BAR:Hello, world!

in the Org document exported the following user defined fields in the
content.xml.

text:user-field-decls
text:user-field-decl office:value-type=float office:value=17
text:name=FOO/
text:user-field-decl office:value-type=string
office:string-value=Hello, world! text:name=BAR/
/text:user-field-decls

Is this currently possible?

Best Regards,

Kevin