Re: [O] Google Summer of Code -- 3 Org projects for our first participation!

2012-05-05 Thread Nicolas Goaziou
Hello,

Neil Smithline emacs-orgm...@neilsmithline.com writes:

 I've looked at org-element.el and don't really see how it will make writing
 other Org Mode to HTML converter easier. org-element.el is, well it's
 elisp. Very elispy. No surprise but I'm not sure that it can easily be
 converted to another language.

 Is Nicolas working from a grammar?

Since org-element can parse 98%[1] of Org syntax, there must be
a grammar defined somewhere. When I started org-element, there was no
structural definition of Org syntax (there wasn't even a full list of
syntactic objects). Now, org-element is the grammar embodied in elisp.

Alas, I have no plan to formalize it. Though, I agree that it would be
a great thing to have in order to implement equivalent parsers in other
languages.

If someone wants to study org-element and extract a formal grammar out
of it, I will gladly help him in the process.

Otherwise, you can use the intermediary representation of an Org
document. org-element can produce the representation and read the
representation to produce an Org document.

#+begin_src emacs-lisp
(org-element-interpret-data
 '(org-data
   nil
   (headline
(:level 1 :title (It works) :priority ?A :todo-keyword TODO :tags 
(test))
(section
 nil
 (center-block
  nil
  (paragraph nil Really))
#+end_src 

Thus, you may only need to write converters from that representation to
another syntax (like HTML). That's the purpose of org-export and its
back-ends.


Regards,

[1] I still don't know what to do with under\_line: there is no
`kludge' object type so far (!).

-- 
Nicolas Goaziou



Re: [O] Google Summer of Code -- 3 Org projects for our first participation!

2012-05-05 Thread Bernt Hansen
Bastien b...@gnu.org writes:

 1. There is already a new OrgHTML exporter, written by Jambunathan.
Try adding contrib/lisp/ to your load path, then

(require 'org-export)
(require 'org-e-html) 

then M-x org-export-dispatch RET h

See the result.

There are a bunch of org-e-html-* variables similar to org-export-html-*
variables that the new exporter uses.  You need to set the appropriate
org-e-html variables to get results similar to the old exporter.

-Bernt



Re: [O] Hiding the braces when org-pretty-entities is enabled

2012-05-05 Thread Bastien
Hi Mark,

Mark E. Shoulson m...@kli.org writes:

 It's a very tiny patch, but one that probably should have happened
 before.  

Yes.  Surprised nobody reported this already.

I applied the patch, but I had to add a ChangeLog myself.  Please
provide it next time.

Thanks!

-- 
 Bastien



Re: [O] Touching :noexport: regions

2012-05-05 Thread Bastien
Hi François,

François Pinard pin...@iro.umontreal.ca writes:

 There is some machinery on my side involved into publication, which I
 would rather avoid if not necessary.  My little problem is that Org
 checks the file time stamp, and Emacs does not distinguish, of course,
 if I modify a part which is within a :noexport: region.

Please don't hesitate to share it you think other people could find it
useful. 

 The only idea I got (but I did not really torture me into this yet!) is
 to maintain a kind of a cache of files before edit, and write a
 specialized file comparator that would re-establish previous time stamps
 when nothing publishable has been changed.  Any clever idea, someone?
 :-)

Currently the only way to exclude an *entire* file from the publication
process is to play with the :exclude parameter in `org-publish-project-alist'.

We could have a #+PUBLISH: option allowing to tell whether a file should
be published or not.

If we had this, we could then check whether a section without the
:noexport: tag has been modified...  and dynamically set the buffer
publication option based on this.

But this is rather a complicated way, and the gain is merely about
speed.

If someone comes up with something more clever, let's see.

Or if someone would find a new #+PUBLISH option useful outside of this
use-case, let's also see.

Thanks,

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Further, with orgstuct++-mode, trying to add a new line (i.e. my
 response), I get the following error message:

 ,
 | org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 
 times]
 `

 I confirm the problem with latest Org (Org-mode version 7.8.09
 (release_7.8.09-483-g01d83d)) and GNU Emacs 24.0.95.1.

I pushed a fix -- can you test and confirm?

Thanks,

-- 
 Bastien



Re: [O] Auto-fill-mode with code sections

2012-05-05 Thread Bastien
Hi Charles,

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

 It fills normal text, but leaves src blocks alone. 

 Maybe add something to one of the org-mode hooks ?

`org-auto-fill-function' already exists in the code, adding 
a new function with the same name would confuse things.

I patched the current `org-auto-fill-function' so that, when
̀org-src-prevent-auto-filling' is non-nil, no auto-fill happens
in src blocks.

The new option defaults to nil so that people are not surprised
when ̀auto-fill-mode' is enable and does not happen *everywhere* 
in Org buffers.

Thanks to Ken Williams for the request and to you for your 
suggestion!

-- 
 Bastien



Re: [O] fill-paragraph: wrong behaviour after latex-environments

2012-05-05 Thread Bastien
Hi Benjamin,

Benjamin Motz b.m...@uni-muenster.de writes:

 invoking fill-paragraph on the following org-code will delete the
 newline after \end{equation}:

 The relation
 \begin{equation}
 E=mc^2
 \end{equation}
 won't be further discussed here.

 This behaviour is undesirable because it makes the org-text less
 readable. Also, when adding '%' after \end{equation}, newline is still
 being deleted by fill-paragraph (and the text after '%' won't be
 exported e.g. by latex-export).

There is `org-element-paragraph-separate', which already uses a 
better `paragraph-separate' value than the one currently in Org.

Nicolas, do you think the default value for `paragraph-separate' 
in Org could use ̀org-element-paragraph-separate' in a way?

How does org-element.el handles inline LaTeX code like the one 
Benjamin showed?

Thanks,

-- 
 Bastien



Re: [O] Org Clock Timer in Frame Title bug

2012-05-05 Thread Bastien
Hi George,

George Kettleborough g.kettleboro...@uea.ac.uk writes:

 On Sun, Apr 29 2012, Bastien wrote:
 `global-mode-string' and ̀frame-title-format' are list by default
 and they cannot be customized.  They can be manually set to a string,
 but that's a mistake (okay, `global-mode-string' is a misleading name.)

 On my Fedora box, frame-title-format is by default:

 (multiple-frames %b
( invocation-name @ system-name))

 This is the value even if --no-init-file is used so I don't think this
 is distro-specific.

Okay, I added a new option `org-clock-frame-title-format' for the
`frame-title-format' string.

This format string will /replace/ `frame-title-format' instead of 
just amending it.  I don't find any way to safely set this var, as 
there is no equivalent of `global-mode-string' for the frame.  

Thanks,

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 I pushed a fix -- can you test and confirm?

I get the following error every time I try to indent:

  org-between-regexps-p: Variable binding depth exceeds max-specpdl-size


Regards,

-- 
Nicolas Goaziou



Re: [O] Touching :noexport: regions

2012-05-05 Thread François Pinard
Bastien b...@gnu.org writes:

 Hi François,

Bonjour chez vous! :-)

 François Pinard pin...@iro.umontreal.ca writes:

 There is some machinery on my side involved into publication, which I
 would rather avoid if not necessary.

 Please don't hesitate to share it you think other people could find it
 useful.

Probably not generic enough.  I intend, yet with low priority, to create
a page explaining my overall Org setup and tools, would it be as a
reference for myself...

 We could have a #+PUBLISH: option allowing to tell whether a file
 should be published or not.  If we had this, we could then check
 whether a section without the :noexport: tag has been modified...  and
 dynamically set the buffer publication option based on this.

I see.  When publication occurs, #+PUBLISH could be reset, and
publication stay inhibited until #+PUBLISH is set again.  Modifying an
exportable section could set #+PUBLISH automatically.  It might mean
quite an overhead just to check while editing, it might not be an
affordable avenue.

 But this is rather a complicated way, and the gain is merely about
 speed.

In my case, this goes a bit further.  How to explain...  OK, visit:

  http://pinard.progiciels-bpi.ca/recent-notes.html

This page is created by a program which, starting from the existing
HTML, has enough knowledge of my work habits to infer the real source
file behind it, usually a reST file or an Org file.  Then, it picks up
the modification time stamp of the source file.  The index is
complemented by XSLT-like code (in fact: Python using lxml and XPath)
which grabs explicit Org dates from within the published HTML pages.

If I modify text in a :noexport: section, the time stamp of the Org file
is modified, and so, the generated HTML page jumps near the top in the
index.  As there is no user-visible change corresponding at that time
stamp, they may uselessly visit the page, a mere annoyance to them.

One idea, but not an easy one for me as it would require a lot of work,
would be to generate change bars, with the reference date settable by
users (or worse, through tons of cookies).  It is /theoretically/
possible as all my Org files are kept under Git.  But I feel this would
be gross, absolute overkill, as what I publish is never important enough
for users to really trigger such toys.

François



Re: [O] fill-paragraph: wrong behaviour after latex-environments

2012-05-05 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Benjamin Motz b.m...@uni-muenster.de writes:

 invoking fill-paragraph on the following org-code will delete the
 newline after \end{equation}:

 The relation
 \begin{equation}
 E=mc^2
 \end{equation}
 won't be further discussed here.

 This behaviour is undesirable because it makes the org-text less
 readable. Also, when adding '%' after \end{equation}, newline is still
 being deleted by fill-paragraph (and the text after '%' won't be
 exported e.g. by latex-export).

 There is `org-element-paragraph-separate', which already uses a 
 better `paragraph-separate' value than the one currently in Org.

 Nicolas, do you think the default value for `paragraph-separate' 
 in Org could use ̀org-element-paragraph-separate' in a way?

 How does org-element.el handles inline LaTeX code like the one 
 Benjamin showed?

org-element now provides a filling function for elements
(org-element-fill-paragraph) which doesn't rely on `paragraph-separate'
value. It needs testing, but it should do the right thing in most, if
not all, cases.

You can still use `org-element-paragraph-separate' as a value for
`paragraph-separate' (provided all carets are removed first), but
I don't think that would be useful.


Regards,

-- 
Nicolas Goaziou



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 I pushed a fix -- can you test and confirm?

 I get the following error every time I try to indent:

In org-mode or in message-mode?

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size

Does (setq max-specpdl-size 1) help in any way?

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 Bastien b...@gnu.org writes:

 I pushed a fix -- can you test and confirm?

 I get the following error every time I try to indent:

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size

If you are in message-mode, please also provide the value of
`org-fb-vars' and try to debug `org-indent-line-function' to make sure
it stops at the first call of `org-between-regexps-p' (not at the ones
that may be called inside the `orgstruct++-with-major-mode-filling'
macro...)

Thanks!

-- 
 Bastien



Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 I get the following error every time I try to indent:

 In org-mode or in message-mode?

I meant in Message mode.

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size

 Does (setq max-specpdl-size 1) help in any way?

Not at all.

After increasing `max-specpdl-size', I have to increase
`max-lisp-eval-depth' and it still fails. I just have to wait longer.


Regards,

-- 
Nicolas Goaziou




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-05-05 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Bastien b...@gnu.org writes:

 I pushed a fix -- can you test and confirm?

 I get the following error every time I try to indent:

   org-between-regexps-p: Variable binding depth exceeds
   max-specpdl-size


 If you are in message-mode, please also provide the value of
 `org-fb-vars'

((adaptive-fill-function (quote nil)) (adaptive-fill-regexp (quote \(\([
]*[_.[:word:]]++\|[]*[]|]\)+\)[   ]*\|[   ]*\([-–!|#%;*·•‣⁃◦]+[  ]*\)*)) 
(fill-paragraph-function (quote message-fill-paragraph)) (paragraph-separate 
(quote --text follows this line--$\|[  ]*$\|-- $\|---+$\|^
$\|.*wrote:$\|\(\([ ]*[_.[:word:]]++\|[]*[]|]\)+\)[   
]*$\|#!*/?\(multipart\|part\|external\|mml\|secure\))) 
(auto-fill-inhibit-regexp (quote [  
]*\(|\|#\+\(tblfm\|orgtbl\|tblname\):\))) (paragraph-start (quote --text 
follows this line--$\|[]*$\|-- $\|---+$\|^$\|.*wrote:$\|\(\([ 
]*[_.[:word:]]++\|[]*[]|]\)+\)[   
]*$\|#!*/?\(multipart\|part\|external\|mml\|secure\))) (indent-line-function 
(quote indent-relative)) (auto-fill-function (quote message-do-auto-fill)))

 and try to debug `org-indent-line-function' to make sure
 it stops at the first call of `org-between-regexps-p' (not at the ones
 that may be called inside the `orgstruct++-with-major-mode-filling'
 macro...)

It's the same as the previous bug: when I try to debug
`org-indent-line-function', the problem disappears.


Regards,

-- 
Nicolas Goaziou



[O] [PATCH] Don't call org-footnote-unique label if using random labels

2012-05-05 Thread Matt Lundin
* lisp/org-footnote.el (org-footnote-new): Don't call
  org-footnote-unique-label if org-footnote-auto-label is set to
  random.

Calling org-footnote-unique-label calls org-footnote-all-labels, which
can dramatically slow down footnote creation in a buffer with many
footnotes.  This is unecessary if org-footnote-auto-label is set to
random.
---
 lisp/org-footnote.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index b0472f3..504f633 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -450,7 +450,8 @@ or new, let the user edit the definition of the footnote.
 (error Cannot insert a footnote here))
   (let* ((lbls (and (not (equal org-footnote-auto-label 'random))
(org-footnote-all-labels)))
-(propose (org-footnote-unique-label lbls))
+(propose (and (not (equal org-footnote-auto-label 'random))
+  (org-footnote-unique-label lbls)))
 (label
  (org-footnote-normalize-label
   (cond
-- 
1.7.10.1




[O] How to make ECM for new exporter?

2012-05-05 Thread Thomas S. Dye
Aloha all,

I've been tinkering with Karl Voit's ACM-SIG export project and have
almost met the project goal using the old exporter.  The old LaTeX
exporter is able to produce a file that is close to the example provided
by ACM and which LaTeX is able to compile without error.  (The main
problem is an emacs-lisp code block that returns an error if it is
called before the first headline).
 
I'm starting now to work out the port to the new exporter.  I first
tried the new LaTeX exporter, which stops with this error:
Symbol's value as variable is void: value

The new html exporter exports the file without error.

The new ascii exporter stops with this error:
concat: Wrong type argument: wholenump, -7

I used toggle-debug-on-error with the hope that I'd be able to find the
problem, but the voluminous output doesn't give me any clues I can
understand. 

Here's my question:

Is there a better way for me to find the error than bisecting with
:noexport:? 

All the best,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] How to make ECM for new exporter?

2012-05-05 Thread Nicolas Goaziou
Hello,

t...@tsdye.com (Thomas S. Dye) writes:

 I'm starting now to work out the port to the new exporter.  I first
 tried the new LaTeX exporter, which stops with this error:
 Symbol's value as variable is void: value

It should be fixed in master.

 The new html exporter exports the file without error.

 The new ascii exporter stops with this error:
 concat: Wrong type argument: wholenump, -7

Hmm, probably something related to tables.

 I used toggle-debug-on-error with the hope that I'd be able to find the
 problem, but the voluminous output doesn't give me any clues I can
 understand. 

 Here's my question:

 Is there a better way for me to find the error than bisecting with
 :noexport:? 

You can bisect buffer by narrowing it and exporting the narrowed part.
You don't even have to limit yourself to headings.

Don't hesitate to send me the backtrace or, even better, the faulty part
of the document.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to make ECM for new exporter?

2012-05-05 Thread Thomas S. Dye
Aloha Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 t...@tsdye.com (Thomas S. Dye) writes:

 I'm starting now to work out the port to the new exporter.  I first
 tried the new LaTeX exporter, which stops with this error:
 Symbol's value as variable is void: value

 It should be fixed in master.

Yes it is fixed, thanks.  It turns out that was the only problem, and the new
exporter now generates a .tex file.  It looks like I just need to tweak
the configuration a bit.


 The new html exporter exports the file without error.

 The new ascii exporter stops with this error:
 concat: Wrong type argument: wholenump, -7

 Hmm, probably something related to tables.

 I used toggle-debug-on-error with the hope that I'd be able to find the
 problem, but the voluminous output doesn't give me any clues I can
 understand. 

 Here's my question:

 Is there a better way for me to find the error than bisecting with
 :noexport:? 

 You can bisect buffer by narrowing it and exporting the narrowed part.
 You don't even have to limit yourself to headings.

 Don't hesitate to send me the backtrace or, even better, the faulty part
 of the document.


 Regards,

Thanks for your quick response and kind offer of more assistance.  I'll
take you up on it if I hit other roadblocks.

All the best,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



[O] org-agenda-custom-commands with org-agenda-clockreport-mode somewhat broken?

2012-05-05 Thread Gaizka
Hi there!

I have these custom agendas in my org-agenda-custom-commands variable:

  (w . Work Related)
  (w1 Test ok report
   ((agenda  (
(org-agenda-clockreport-mode t)


  (w2 Test broken report agenda 
   (
(org-agenda-clockreport-mode t)
))

Aren't these custom agendas supposed to work the same?

If I press C-a w 1, the agenda buffer displays the clock report.

If I press C-a w 2, the agenda buffer *does not* display the clock report.
But if i press 'r', the agenda gets rebuilt and *then it does display the clock
report*

I don't know if this is a bug in org-mode, or I was configuring it wrongly, I
just wanted to let you know.

Thanks a lot for org-mode, it has help me so much in getting my life ordered!!

-- Gaizka




Re: [O] [bug] Assigning 0:00 to cell gives an error

2012-05-05 Thread Bastien


Hi Sébastien,

Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:

 Let's come back to time values:

   @2$2=1:23;t

 means, for me, that:

 - the value 1:23 should be assigned to the cell
 - that value should be formatted as a fraction.

 Hence, I'd expect to see `1.38' (and not `0:00').

This works correctly now, thanks.

-- 
 Bastien




[O] New LaTeX exporter and source code blocks

2012-05-05 Thread Thomas S. Dye
Aloha,

The new LaTeX exporter doesn't properly handle source code blocks with
:exports results.  The following snippet exports correctly with the old
exporter. 

 Org-mode source 
#+name: ACM-categories
#+header: :var c=categories
#+header: :results latex 
#+header: :exports results
#+BEGIN_SRC emacs-lisp
  (defun category-record (r)
(format \\category{%s}{%s}{%s}[%s] 
(first r) (second r) (third r) (fourth r)))
  (let ( (i (mapcar (lambda (row)
(category-record row))
  (cdr (cdr c)
 (mapconcat 'identity i \n)
)
#+END_SRC

#+RESULTS: ACM-categories
#+BEGIN_LaTeX
\category{H.4}{Information Systems Applications}{Miscellaneous}[]
\category{D.2.8}{Software Engineering}{Metrics}[complexity measures, 
performance measures]
#+END_LaTeX
-

 LaTeX output 
\#+name: ACM-categories
\#+header: :var c=categories
\#+header: :results latex 
\#+header: :exports results
--

Also, the new exporter seems to skip over #+BEGIN_LaTeX ... #+END_LaTeX
blocks.

 Org-mode source 
#+BEGIN_LaTeX
\title{A Sample {\ttlit ACM} SIG Proceedings Paper in Org-mode 
Format\titlenote{(Does NOT produce the permission block, copyright information 
nor page numbering). For use with ACM\_PROC\_ARTICLE-SP.CLS. Supported by ACM.}}
\subtitle{[Extended Abstract]
\titlenote{A full version of this paper is available as
\textit{Author's Guide to Preparing ACM SIG Proceedings Using
\LaTeX$2_\epsilon$\ and BibTeX} at
\texttt{www.acm.org/eaddress.htm}}}
#+END_LaTeX
-

 LaTeX output 

--

This is with the master branch pulled earlier today running on Emacs
23.4.  My initialization file is at the bottom.

Let me know if I can provide more information.

All the best,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com

#+name: initialize-new-exporter
#+header: :tangle init-new.el
#+header: :results silent
#+header: :exports none
#+begin_src emacs-lisp 
  (add-to-list 'load-path ~/.emacs.d/src/org/contrib/lisp) ;; - adjust
  (add-to-list 'load-path ~/.emacs.d/src/org/lisp) ;; - adjust
  (add-to-list 'load-path ~/.emacs.d/src/org) ;; - adjust
  
  (require 'org-install)
  (require 'org-export)
  (require 'org-e-latex)
  
  ;; this line only required until the upcomming Org-mode/Emacs24 sync
  (load ~/.emacs.d/src/org/lisp/org-exp-blocks.el)
  
  
  ;; Configure Babel to support all languages included in the manuscript
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((emacs-lisp . t)
 (org. t)))
  (setq org-confirm-babel-evaluate nil)
  
  ;; Configure Org-mode
(setq org-export-latex-hyperref-format \\ref{%s})
(setq org-entities-user nil) 
(add-to-list 'org-entities-user '(space \\  nil))
(setq org-e-latex-pdf-process '(texi2dvi --clean --verbose --batch %f))
(setq org-export-latex-packages-alist nil)
(add-to-list 'org-export-latex-packages-alist '( hyperref))
(add-to-list 'org-export-latex-packages-alist '( graphicx))

(require 'org-special-blocks)
  
  (org-add-link-type 
 cite nil
 (lambda (path desc format)
   (cond
((eq format 'latex)
   (format \\cite{%s} path)
  
  (org-add-link-type 
 acm nil
 (lambda (path desc format)
   (cond
((eq format 'latex)
   (format {\\%s{%s}} path desc)
  
  (add-to-list 'org-e-latex-classes
 '(acm-proc-article-sp
   \\documentclass{acm_proc_article-sp}
[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]
   (\\section{%s} . \\section*{%s})
   (\\subsection{%s} . \\subsection*{%s})
   (\\subsubsection{%s} . \\subsubsection*{%s})
   (\\paragraph{%s} . \\paragraph*{%s})
   (\\subparagraph{%s} . \\subparagraph*{%s})))
#+end_src



Re: [O] New LaTeX exporter and source code blocks

2012-05-05 Thread Nicolas Goaziou
t...@tsdye.com (Thomas S. Dye) writes:

 The new LaTeX exporter doesn't properly handle source code blocks with
 :exports results.  The following snippet exports correctly with the old
 exporter. 

  Org-mode source 
 #+name: ACM-categories
 #+header: :var c=categories
 #+header: :results latex 
 #+header: :exports results
 #+BEGIN_SRC emacs-lisp
   (defun category-record (r)
 (format \\category{%s}{%s}{%s}[%s] 
 (first r) (second r) (third r) (fourth r)))
   (let ( (i (mapcar (lambda (row)
 (category-record row))
   (cdr (cdr c)
  (mapconcat 'identity i \n)
 )
 #+END_SRC
 #+RESULTS: ACM-categories
 #+BEGIN_LaTeX
 \category{H.4}{Information Systems Applications}{Miscellaneous}[]
 \category{D.2.8}{Software Engineering}{Metrics}[complexity measures, 
 performance measures]
 #+END_LaTeX
 -

  LaTeX output 
 \#+name: ACM-categories
 \#+header: :var c=categories
 \#+header: :results latex 
 \#+header: :exports results
 --

This is a known bug: affiliated keywords are left over if the block
disappears. It will be solved once org-element.el is merged into master
(see commit dec32064a72be7a20bbddcc1f8544a604619ad7b).

 Also, the new exporter seems to skip over #+BEGIN_LaTeX ... #+END_LaTeX
 blocks.

This is now fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] New LaTeX exporter and source code blocks

2012-05-05 Thread Thomas S. Dye
Nicolas Goaziou n.goaz...@gmail.com writes:

 t...@tsdye.com (Thomas S. Dye) writes:

 The new LaTeX exporter doesn't properly handle source code blocks with
 :exports results.  The following snippet exports correctly with the old
 exporter. 

  Org-mode source 
 #+name: ACM-categories
 #+header: :var c=categories
 #+header: :results latex 
 #+header: :exports results
 #+BEGIN_SRC emacs-lisp
   (defun category-record (r)
 (format \\category{%s}{%s}{%s}[%s] 
 (first r) (second r) (third r) (fourth r)))
   (let ( (i (mapcar (lambda (row)
 (category-record row))
   (cdr (cdr c)
  (mapconcat 'identity i \n)
 )
 #+END_SRC
 #+RESULTS: ACM-categories
 #+BEGIN_LaTeX
 \category{H.4}{Information Systems Applications}{Miscellaneous}[]
 \category{D.2.8}{Software Engineering}{Metrics}[complexity measures, 
 performance measures]
 #+END_LaTeX
 -

  LaTeX output 
 \#+name: ACM-categories
 \#+header: :var c=categories
 \#+header: :results latex 
 \#+header: :exports results
 --

 This is a known bug: affiliated keywords are left over if the block
 disappears. It will be solved once org-element.el is merged into master
 (see commit dec32064a72be7a20bbddcc1f8544a604619ad7b).

Great.  Looking forward to the merge.

 Also, the new exporter seems to skip over #+BEGIN_LaTeX ... #+END_LaTeX
 blocks.

 This is now fixed. Thank you.

Yes, LaTeX blocks are now exported.  Thanks.

Here is a problem with CAPTION and ATTR_LaTeX lines.  Note that the
\table{} environment wasn't established.

 Org-mode 
#+CAPTION: Frequency of Special Characters
#+ATTR_LaTeX: align=|c|c|l|

|-+-+---|
| Non-English or Math | Frequency   | Comments  |
|-+-+---|
| \O  | 1 in 1,000  | For Swedish names |
|-+-+---|
| $\pi$   | 1 in 5  | Common in math|
|-+-+---|
| \$  | 4 in 5  | Used in business  |
|-+-+---|
| $\Psi^2_1$  | 1 in 40,000 | Unexplained usage |
|-+-+---|
--

 LaTeX export 
\#+CAPTION: Some Typical Commands
\#+ATTR$_{\mathrm{\LaTeX{}}}$: table* align=|c|c|l|

\begin{center}
\begin{tabular}{}
\hline
Command  A Number  Comments\\
\hline
\texttt{\textbackslash{}alignauthor}  100  Author alignment\\
\hline
\texttt{\textbackslash{}numberofauthors}  200  Author enumeration\\
\hline
\texttt{\textbackslash{}table}  300  For tables\\
\hline
\texttt{\textbackslash{}table*}  400  For wider tables\\
\hline
\end{tabular}
\end{center}
--

When #+CAPTION: is used with figures the \figure{} environment isn't
established.

 Org-mode 
#+CAPTION: A sample black and white graphic (.eps format).

[[file:fly.eps]]
--

 LaTeX export 
\#+CAPTION: A sample black and white graphic (.eps format).

\includegraphics[width=.9\linewidth]{fly.eps}
--

All the best,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] New LaTeX exporter and source code blocks

2012-05-05 Thread Nicolas Goaziou
t...@tsdye.com (Thomas S. Dye) writes:

 Here is a problem with CAPTION and ATTR_LaTeX lines.  Note that the
 \table{} environment wasn't established.

  Org-mode 
 #+CAPTION: Frequency of Special Characters
 #+ATTR_LaTeX: align=|c|c|l|

 |-+-+---|
 | Non-English or Math | Frequency   | Comments  |
 |-+-+---|
 | \O  | 1 in 1,000  | For Swedish names |
 |-+-+---|
 | $\pi$   | 1 in 5  | Common in math|
 |-+-+---|
 | \$  | 4 in 5  | Used in business  |
 |-+-+---|
 | $\Psi^2_1$  | 1 in 40,000 | Unexplained usage |
 |-+-+---|
 --

Affiliated keywords (#+name:, #+caption:, #+attr_...) are expected to be
right before their corresponding element. The blank line you introduced
is wrong. Remove and it should export fine.

 When #+CAPTION: is used with figures the \figure{} environment isn't
 established.

  Org-mode 
 #+CAPTION: A sample black and white graphic (.eps format).

 [[file:fly.eps]]
 --

Ditto.


Regards,

-- 
Nicolas Goaziou



Re: [O] Display/print text only for export

2012-05-05 Thread François Pinard
Bastien b...@gnu.org writes:

 Does #+INCLUDE: suits your needs?

Oh!  I never used a colon after #+INCLUDE.  Checking the Org manual, the
colon is systematically there, except within the last paragraph of node
/Updating files/.  Maybe it could be added for consistency?

I did not notice my error as everything worked without the colon.
Adding it everywhere in my files, things still works.  Should Org be
more strict about this?  I would have corrected myself earlier...

François



Re: [O] Display/print text only for export

2012-05-05 Thread Bastien
Hi François,

François Pinard pin...@iro.umontreal.ca writes:

 Bastien b...@gnu.org writes:

 Does #+INCLUDE: suits your needs?

 Oh!  I never used a colon after #+INCLUDE.  Checking the Org manual, the
 colon is systematically there, except within the last paragraph of node
 /Updating files/.  Maybe it could be added for consistency?

Done, thanks.

 I did not notice my error as everything worked without the colon.
 Adding it everywhere in my files, things still works.  Should Org be
 more strict about this?  I would have corrected myself earlier...

The manual is as strict as possible now, but yes, there are places where
the code is still liberal about this.  If it is a problem in such places,  
thanks for taking the time to suggest a fix.

Best,

-- 
 Bastien



Re: [O] New LaTeX exporter and source code blocks

2012-05-05 Thread Thomas S. Dye
Nicolas Goaziou n.goaz...@gmail.com writes:

 t...@tsdye.com (Thomas S. Dye) writes:

 Here is a problem with CAPTION and ATTR_LaTeX lines.  Note that the
 \table{} environment wasn't established.

  Org-mode 
 #+CAPTION: Frequency of Special Characters
 #+ATTR_LaTeX: align=|c|c|l|

 |-+-+---|
 | Non-English or Math | Frequency   | Comments  |
 |-+-+---|
 | \O  | 1 in 1,000  | For Swedish names |
 |-+-+---|
 | $\pi$   | 1 in 5  | Common in math|
 |-+-+---|
 | \$  | 4 in 5  | Used in business  |
 |-+-+---|
 | $\Psi^2_1$  | 1 in 40,000 | Unexplained usage |
 |-+-+---|
 --

 Affiliated keywords (#+name:, #+caption:, #+attr_...) are expected to be
 right before their corresponding element. The blank line you introduced
 is wrong. Remove and it should export fine.
Yes, it does.  Thanks.

I can't get a \begin{figure*} environment with multicolumn.

 Org-mode 
#+CAPTION: A sample black and white graphic (.eps format) that needs to span 
two columns of text.
#+ATTR_LaTeX: multicolumn
[[file:flies.eps]]
--

 LaTeX export 
\includegraphics[width=.9\linewidth]{flies.eps}
--

All the best,
Tom


 When #+CAPTION: is used with figures the \figure{} environment isn't
 established.

  Org-mode 
 #+CAPTION: A sample black and white graphic (.eps format).

 [[file:fly.eps]]
 --

 Ditto.


 Regards,

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] Touching :noexport: regions

2012-05-05 Thread François Pinard
François Pinard pin...@iro.umontreal.ca writes:

 Our dear Bastien writes:

 We could have a #+PUBLISH: option allowing to tell whether a file
 should be published or not.  If we had this, we could then check
 whether a section without the :noexport: tag has been modified...
 and dynamically set the buffer publication option based on this.  But
 this is rather a complicated way, and the gain is merely about speed.

 If I modify text in a :noexport: section, the time stamp of the Org file
 is modified, and so, the generated HTML page jumps near the top in the
 index.  As there is no user-visible change corresponding at that time
 stamp, they may uselessly visit the page, a mere annoyance to them.

Here is how I decided to proceed for now, in case anyone is amused by my
little problems.  I just created a file *org-stamps* having three
columns for each publishable Org file: a time stamp, a md5sum over all
publishable parts, and the Org file name.

The very first time, or for any new Org file, the time stamp is the file
modification time.  For each Org file, the tool generating the index
pages recomputes the md5sum over all publishable parts and compares with
the md5sum from *org-stamps*; if they match, the *org-stamps* time stamp
is used instead of the actual file time stamp.  If they do not match,
the current file time stamp and md5sum are going to obliterate the
values saved in *org-stamps* once all Org files will have been
processed.

Simple enough for now, I guess.

François



[O] Commented internal links bad in new export

2012-05-05 Thread Rafael

The manual says, in section 4.2 Internal links:

Targets may be located anywhere; sometimes it is convenient to put
them into a comment line.  For example

# My Target

But if I use such commented targets, then the new exporter does not see
them, neither the one to LaTeX nor the HTML one. Thought you might want
to know.

I'm using Org-mode version 7.8.09 (release_7.8.09-519-geb48e4)

Best regards,

Rafael