Re: [O] two latex bugs

2013-07-10 Thread Eric S Fraga
renato renn...@gmail.com writes:

 2) this:

 \begin{align}\label{mylabel}
 \left\{
 \begin{array}{ll}
 2+2 = 4 \\
 2+2 \neq  4
 \end{array}
 \right.
 \end{align}

You can either enclose the above in #+begin_LaTeX ... #+end_LaTeX or do
as you noted and make sure the \begin{align} is alone on a line.  This
is a known feature of the org parser for LaTeX snippets.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org 
release_8.0.5-322-gd5c11e.dirty




Re: [O] fill-paragraph broken

2013-07-10 Thread Samuel Wales
You said to compare text modes with text modes.  So let's talk about
text-mode itself?  It works as I expect.

On 7/9/13, Nicolas Goaziou n.goaz...@gmail.com wrote:
 Hello,

 Samuel Wales samolog...@gmail.com writes:

 I think Org should support this variable and not fill two commented
 paragraphs with a commented empty line as if they were one.

 I do not.

 When you fill in, for example, Emacs Lisp mode, each paragraph is
 filled as a paragraph, without combining them.

 You're comparing apples and oranges. Emacs Lisp is a programming
 language, i.e., derived from `prog-mode', whereas Org is about text,
 i.e., ultimately derived from `text-mode'. Let's compare text modes with
 text modes.

 The only mode derived from `text-mode' with comments I can think of is
 `rst-mode'. And it doesn't fill comments at all. We might do the same
 for the sake of consistency...

 I think there is benefit for the user in keeping things consistent
 with other modes and supporting this  Emacs variable.

 Org doesn't support this variable. It doesn't even use newcomment.el.
 There is a simple reason for that: many functions in newcomment.el
 assume comments may start anywhere on a line. This is not possible in
 Org. newcomment.el is not meant for the `text-mode' family.


 Regards,

 --
 Nicolas Goaziou



-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] Hyperlinked Images with ox-html

2013-07-10 Thread Nicolas Goaziou
Hello,

Robert Eckl eck...@gmx.de writes:

 exporting this fragment

 #+ATTR_HTML:  :width 220px :align right 
 [[http://orgmode.org/worg/][http://example.org/picture.jpg]]

 gives

 div class=figure
  p
a href=http://orgmode.org/worgwidth=220px; align=right 
  img src=http://example.org/picture.jpg;  /
/a
  /p
 /div


 instead of 

 div class=figure
  p
a href=http://orgmode.org/worg;
  img src=http://example.org/picture.jpg; width=220px align=right/
/a
  /p
 /div

 So the attributes for img are linked to a instead of img and
 ignored.

This should now be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] Feature Request: Let Org-mode tasks (subtasks) complete percent state more *accurate*.

2013-07-10 Thread Eric S Fraga
chris numbch...@gmail.com writes:

[...] on how org counts completed tasks

 I hope Org-mode can improve this.

Well, this is a matter of interpretation.  Org is counting how many of
the main tasks are complete.  Sub-tasks are not at the same level.  I
prefer how org does it now.

In any case, check out

,[ C-h v org-hierarchical-todo-statistics RET ]
| org-hierarchical-todo-statistics is a variable defined in `org.el'.
| Its value is nil
| Original value was t
| 
| Documentation:
| Non-nil means TODO statistics covers just direct children.
| When nil, all entries in the subtree are considered.
| This has only an effect if `org-provide-todo-statistics' is set.
| To set this to nil for only a single subtree, use a COOKIE_DATA
| property and include the word recursive into the value.
| 
| You can customize this variable.
`

which will probably cover what you want.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org 
release_8.0.5-322-gd5c11e.dirty




Re: [O] ox-bibtex works well with \cite{} entries but not with cite: links

2013-07-10 Thread Nicolas Goaziou
Hello,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 Sure.  This one works perfectly with my limit:t case!

I applied the patch.  Thank you for the feedback.


Regards,

-- 
Nicolas Goaziou



Re: [O] ox-bibtex works well with \cite{} entries but not with cite: links

2013-07-10 Thread Eric S Fraga
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 Sure.  This one works perfectly with my limit:t case!

 I applied the patch.  Thank you for the feedback.

Thanks Nicolas for this!  Very helpful.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org 
release_8.0.5-322-gd5c11e.dirty




Re: [O] tikz for multiple targets

2013-07-10 Thread Rasmus
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Hello again,

 I am trying to get an example that worked with the old exporter to work
 with the new exporter.  The aim is to have a tikzpicture exported to
 both LaTeX and HTML.  The example is in the following message from over
 a year ago now:

 http://article.gmane.org/gmane.emacs.orgmode/53900

 This example no longer works for either LaTeX or HTML.  For LaTeX, I
 would expect the actual tikz code to be inserted into the LaTeX file and
 then processed.  Instead, I get the file name in a verbatim
 environment.

Tikz/pgf works for the latex exporter.  Just insert it as a file link
(with extension tikz or pgf) or as latex verbatim code.

 For HTML, I would expect the image referred to from an
 img tag but I get a link to the test.png file instead.

It should be an svg since tikz is a lossless format IMO.

Here's a very rough and ugly function to translate tikz to svg.  I
don't know if there's a more direct approach. . .

#+BEGIN_SRC emacs-lisp
(defun tikz-to-svg (file optional headers standalone-ops)
  Convert a tikz picture to a svg picture ready for html
output.

Headers is a string like
 '(pgfplots '(calc tikzlibrary) (kpfonts usepackage oldstylenums). 
Do not include tikz in headers.

Set standalone-ops to t if you want to use the standalone packages conversion.

  (let* ((name (file-name-sans-extension (file-name-nondirectory file)))
 (fname (concat /tmp/ name))
 (fnamet (concat fname .tex))
 (final (concat (file-name-directory file) name .svg))
 )
(with-temp-file fnamet
  (insert (format \\documentclass[tikz,%s]{standalone}\n
  (if (not standalone-ops) 
(if (eq t standalone-ops) 
convert={outfile=\jobname.svg} standalone-ops
  (when headers
(insert
 (mapconcat (lambda (x)
  (cond ((stringp x) (format \\usepackage{%s} x))
((and (listp x) (= 2 (length x)))
 (apply 'format \\%s{%s} (reverse x))
 )
((and (listp x) (= 3 (length x)))
 (funcall 'format \\%s[%s]{%s}
  (second x) (third x) (first x))
 (t )
 ))) \n)))
  (insert \n\\begin{document}\n)
  (progn (insert-file file) (goto-char (point-max)))
  (insert \n\\end{document}))
(call-process pdflatex nil *tmp* nil -shell-escape -output-directory 
/tmp/ fnamet)
(call-process pdf2svg nil *tmp* nil (concat fname .pdf) (concat fname 
.svg))
(rename-file (concat fname .svg) final t)
(if (file-exists-p final)
(format [[file:%s]] final)
  
  (error conversion failed)
  )))
#+END_SRC

 Is what I want possible with the new exporter?  If so, I imagine the
 test for the backend must be different now.  Any pointers very welcome!

It needs to be added to `org-html-inline-image-rules' and some
potential translation should be added to org-html-inline-image-p,
e.g. substitute pgf or tikz with whatever is the output format.
Perhaps the dvipng code in ox-html can utilized to obtain a png
seemingly.

–Rasmus

-- 
The Kids call him Billy the Saint



Re: [O] RSS back-end: blogging with Org-mode is now easy

2013-07-10 Thread Bastien
flammable project flammable.proj...@gmail.com writes:

 I'm trying to use ox-rss to generate a rss feed but I'm facing an
 error : 

 let*: Symbol's function definition is void: url-encode-url

Mh, yes, `url-encode-url' is not available in Emacs 24.1.

I just mentioned this in the comment section, thanks for reporting
this problem.

2012-05-09  Chong Yidong  c...@gnu.org

* url-util.el (url-encode-url): New function for URL quoting.

-- 
 Bastien



Re: [O] tikz for multiple targets

2013-07-10 Thread Rasmus
Rasmus ras...@gmx.us writes:

 Is what I want possible with the new exporter?  If so, I imagine the
 test for the backend must be different now.  Any pointers very welcome!

 It needs to be added to `org-html-inline-image-rules' and some
 potential translation should be added to org-html-inline-image-p,
 e.g. substitute pgf or tikz with whatever is the output format.
 Perhaps the dvipng code in ox-html can utilized to obtain a png
 seemingly.

Actually, dvisvgm might be way to go as it may be possible to leverage
upon all of the dvipng code without much loss of generality.  It would
also be useful for equations where one does not want to use mathjax.
It's only packed for Texlive, though.

 http://www.ctan.org/pkg/dvisvgm

–Rasmus

-- 
May contains speling mistake




[O] Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)]

2013-07-10 Thread Vincent Liard
When I export an org document with formulas to an ODT document (with
#+OPTIONS: tex:dvipng), the formulas look big and blurry.

In ox-odt.el, I found out that org-odt-pixels-per-inch (which is used to
set image sizes in ODT exports) takes its value from
display-pixels-per-inch (which is emacs-related if I get it right).

On my computer, org-odt-pixels-per-inch was set to 72 while
libreoffice considers images to be 96 dpi. A simple workaround is to
(setq org-odt-pixels-per-inch 96)

But I don't know if 96 is the correct value for everyone and should be
hardcoded or if the value should be taken from some configuration
file. Anyway, rude patch:
--- ox-odt.el   2013-07-10 08:56:08.0 +
+++ ox-odt.el   2013-07-10 08:56:28.0 +
@@ -768,7 +768,7 @@
   :type '(alist :key-type (string :tag Type)
:value-type (regexp :tag Path)))
 
-(defcustom org-odt-pixels-per-inch display-pixels-per-inch
+(defcustom org-odt-pixels-per-inch 96.00
   Scaling factor for converting images pixels to inches.
 Use this for sizing of embedded images.  See Info node `(org)
 Images in ODT export' for more information.

Thank you for org-mode which is great,

Vincent

Emacs  : GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on komainu, modified by Debian
Package: Org-mode version 8.0.5 (8.0.5-6-g426917-elpa @ 
/home/vincent/.emacs.d/elpa/org-20130708/)

current state:
==
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-export-with-drawers '(not LOGBOOK)
 org-export-copy-to-kill-ring 'if-interactive
 org-export-date-timestamp-format nil
 org-export-with-tags t
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-export-preprocess-hook '(org-lparse-strip-experimental-blocks-maybe-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-latex-to-mathml-jar-file /home/vincent/mathtoweb.jar
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-odt-pixels-per-inch 96.0
 org-export-preprocess-after-blockquote-hook 
'(org-export-odt-preprocess-latex-fragments 
org-lparse-preprocess-after-blockquote-hook)
 org-export-backends '(odt ascii html icalendar latex)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all 
append
local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook 
org-babel-show-result-all
append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-latex-to-mathml-convert-command java -jar %j -unicode -force -df %o %I
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-file-apps '((\\.odc\\' . system) (\\.odf\\' . system) (\\.odi\\' . 
system)
 (\\.otp\\' . system) (\\.odp\\' . system) (\\.otg\\' . 
system)
 (\\.odg\\' . system) (\\.ots\\' . system) (\\.ods\\' . 
system)
 (\\.odm\\' . system) (\\.ott\\' . system) (\\.odt\\' . 
system)
 (auto-mode . emacs) (\\.mm\\' . default)
 (\\.x?html?\\' . default) (\\.pdf\\' . default))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-confirm-shell-link-function 'yes-or-no-p
 )



Re: [O] Bug: ODT export formulas scale [8.0.5 (8.0.5-6-g426917-elpa @ /home/vincent/.emacs.d/elpa/org-20130708/)]

2013-07-10 Thread Bastien
Hi Vincent,

Vincent Liard vincent.li...@free.fr writes:

 On my computer, org-odt-pixels-per-inch was set to 72 while
 libreoffice considers images to be 96 dpi. A simple workaround is to
 (setq org-odt-pixels-per-inch 96)

 But I don't know if 96 is the correct value for everyone and should be
 hardcoded or if the value should be taken from some configuration
 file.

You're right -- patch applied (with minor modifications), thanks!

-- 
 Bastien



Re: [O] tikz for multiple targets

2013-07-10 Thread Fabrice Popineau
And did anybody tried the svg backend available from tikz, rather than
relying
on pdf conversion?

Fabrice



2013/7/10 Rasmus ras...@gmx.us

 Rasmus ras...@gmx.us writes:

  Is what I want possible with the new exporter?  If so, I imagine the
  test for the backend must be different now.  Any pointers very welcome!
 
  It needs to be added to `org-html-inline-image-rules' and some
  potential translation should be added to org-html-inline-image-p,
  e.g. substitute pgf or tikz with whatever is the output format.
  Perhaps the dvipng code in ox-html can utilized to obtain a png
  seemingly.

 Actually, dvisvgm might be way to go as it may be possible to leverage
 upon all of the dvipng code without much loss of generality.  It would
 also be useful for equations where one does not want to use mathjax.
 It's only packed for Texlive, though.

  http://www.ctan.org/pkg/dvisvgm

 –Rasmus

 --
 May contains speling mistake





-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


Re: [O] tikz for multiple targets

2013-07-10 Thread Eric S Fraga
Rasmus ras...@gmx.us writes:

[...]

 Tikz/pgf works for the latex exporter.  Just insert it as a file link
 (with extension tikz or pgf) or as latex verbatim code.

Yes, thanks.  However, I guess I didn't explain very well what I was
looking for.  

I use tikz all the time and typically enclose it in a #+begin_LaTeX
... #+end_LaTeX block.  That is fine for most of my documents where I
only wish to export to PDF via LaTeX.

However, what I would like is to be able to use the same code, inline
within the org file and not as a separate .tikz file, in some cases to
export to both LaTeX and HTML (or ODT for that matter).  The code in the
link I posted used to do this by dynamically setting the :exports and/or
:results options using org babel headers with emacs lisp code.  A
variation of this worked with the old exporter but doesn't with the new
one.

Thanks again,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.5-326-g325e40




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

2013-07-10 Thread Thorsten Jolitz

Hi List, 

how do I get my hands on the 'info' plist (i.e. the communication-channel)
when I try to export data that is (only an isolated) part of a parse-tree? 

Say that originally a whole buffer was parsed, thus the full tree and
options info was available at that point. But then parts of the
resulting parse-tree are extracted with org-element-map and are exported
separately as data later on.

In that case, I don't know how to pass the original 'info' plist to the
export function, so export results are not complete due to the missing
context information.

Here is a minimal example:

With file minimal.org

#+begin_src org
* A
B
#+end_src

I call

#+begin_src emacs-lisp
(setq parse-tree
(with-current-buffer
(find-file-noselect
 /path/to/minimal.org)
  (org-element-parse-buffer)))

(let ((elem (org-element-map parse-tree 'headline 'identity nil t)))
  (insert (format \n\n%s\n\n elem))
  ;; nil instead of info as 3rd parameter
  (insert (org-export-data-with-backend  elem 'html nil))) 
#+end_src

and get (note the incomplete IDs in the html)

#+begin_quote
(headline (:raw-value A :begin 1 :end 7 :pre-blank 0 :hiddenp
nil :contents-begin 5 :contents-end 7 :level 1 :priority
nil :tags nil :todo-keyword nil :todo-type nil :post-blank
0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp
nil :CATEGORY nil :title (A) :parent (org-data nil
#0)) (section (:begin 5 :end 7 :contents-begin 5 :contents-end
7 :post-blank 0 :parent #0) (paragraph (:begin 5 :end
7 :contents-begin 5 :contents-end 7 :post-blank
0 :post-affiliated 5 :parent #1) B )))

nil id=outline-container-sec- class=outline-2
h2 id=sec-A/h2
div class=outline-text-2 id=text-
p
B
/p
/div
/nil
#+end_quote

How could I get my hands on the 'info' plist during the buffer parsing
and save it for later use in calls like

#+begin_src emacs-lisp
(org-export-data-with-backend  elem 'html info)
#+end_src

?

-- 
cheers,
Thorsten




Re: [O] turn of org-pretty-entities in tables

2013-07-10 Thread Carsten Dominik

On Jul 9, 2013, at 5:23 PM, Mirko Vukovic mirko.vuko...@gmail.com wrote:

 Hello,
 
 Is it possible to turn of org-pretty-entities in a table, but leaving it
 enabled in the buffer?

No, currently this is not possible.

- Carsten


 
 Thank you,
 
 Mirko
 
 




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

2013-07-10 Thread Robert Klein
Hi Thorsten,


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

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



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

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



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

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

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

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

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






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


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



Best regards
Robert



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


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



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

2013-07-10 Thread Thorsten Jolitz
Thorsten Jolitz tjol...@gmail.com writes:

PS

 How could I get my hands on the 'info' plist during the buffer parsing
 and save it for later use in calls like

As far as I understand it, the 'info' plist is actually dynamically
created and modified in various stages of the export process. 

So what I really mean is probably: 

How could I get my hands on an 'info-like' plist that contains all the
tree and options information available at the moment a buffer is parsed
with `org-element-parse-buffer' - and save it for later use?

-- 
cheers,
Thorsten




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

2013-07-10 Thread Nick Dokos
Thorsten Jolitz tjol...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 PS

 How could I get my hands on the 'info' plist during the buffer parsing
 and save it for later use in calls like

 As far as I understand it, the 'info' plist is actually dynamically
 created and modified in various stages of the export process. 

 So what I really mean is probably: 

 How could I get my hands on an 'info-like' plist that contains all the
 tree and options information available at the moment a buffer is parsed
 with `org-element-parse-buffer' - and save it for later use?

edebug-defun org-element-parse-buffer, do whatever is necessary for it
to get called, and when it stops, evaluate it with ``e'' or switch to *scratch*
and save it in your own variable:

(setq thorsten-info info)

-- 
Nick




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

2013-07-10 Thread Thorsten Jolitz
Robert Klein klein...@mpip-mainz.mpg.de writes:

Hi Robert,

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

 #+begin_src elisp
 (defun org-find-export-option (file option-name optional backend) ...

thanks, that brought me on the right track, I was searching for
functions containing '-info-', but '-options-' would have been the
better search term:

,
| org-export--get-global-options org-export--get-inbuffer-options
| org-export--get-subtree-optionsorg-export-backend-options
| org-export-get-all-options
`

So during the buffer parsing I can collect relevant options and build an
'info-like' plist with them and the complete parse-tree for later use.

-- 
cheers,
Thorsten




Re: [O] fill-paragraph broken

2013-07-10 Thread Nicolas Goaziou
Hello,

Samuel Wales samolog...@gmail.com writes:

 You said to compare text modes with text modes.  So let's talk about
 text-mode itself?  It works as I expect.

OK. I understand what you mean. I have pushed a patch that should mimic
usual comment behaviour in Org. Thanks.


Regards,

-- 
Nicolas Goaziou



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

2013-07-10 Thread Thorsten Jolitz
Nick Dokos ndo...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 PS

 How could I get my hands on the 'info' plist during the buffer parsing
 and save it for later use in calls like

 As far as I understand it, the 'info' plist is actually dynamically
 created and modified in various stages of the export process. 

 So what I really mean is probably: 

 How could I get my hands on an 'info-like' plist that contains all the
 tree and options information available at the moment a buffer is parsed
 with `org-element-parse-buffer' - and save it for later use?

 edebug-defun org-element-parse-buffer, do whatever is necessary for it
to get called, and when it stops, evaluate it with ``e'' or switch to
*scratch* and save it in your own variable:

 (setq thorsten-info info)

Thats a nice trick, but I'm afraid that the 'info' plist is not created
during the parsing but rather during the export. When I want something
similar after just parsing, I might have to create it myself. 

PS
and how would you use this trick in a program?

-- 
cheers,
Thorsten




Re: [O] Orgmode fails to export specific web-links as latex/pdf

2013-07-10 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:
 According to hyperref documentation # and ~ need not be escaped. Though,
 %, { and } do. I'm not sure about \, ^ and _.

 Also, I don't think \url command has the same problem, so escaping can
 happen later in the function, not at the `raw-path' level.

 Please feel free to go ahead with whatever fix is better, I was just
 trying to quickly reproduce the bug.

I will have a look at it, but this is not clear to me either. I still
have to understand what should be escaped, and when.


Regards,

-- 
Nicolas Goaziou



Re: [O] Orgmode fails to export specific web-links as latex/pdf

2013-07-10 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 I will have a look at it, but this is not clear to me either. I still
 have to understand what should be escaped, and when.

All right, no hurry!  And thanks a lot in advance,

-- 
 Bastien



[O] [SOLVED] Re: Feature Request: Let Org-mode tasks (subtasks) complete percent state more *accurate*.

2013-07-10 Thread chris
Excerpts from [ Eric S Fraga ]  On [2013-07-10 09:51:59 +0100]:

 chris numbch...@gmail.com writes:
 
 [...] on how org counts completed tasks
 
  I hope Org-mode can improve this.
 
 Well, this is a matter of interpretation.  Org is counting how many of
 the main tasks are complete.  Sub-tasks are not at the same level.  I
 prefer how org does it now.
 
 In any case, check out
 
 ,[ C-h v org-hierarchical-todo-statistics RET ]
 | org-hierarchical-todo-statistics is a variable defined in `org.el'.
 | Its value is nil
 | Original value was t
 | 
 | Documentation:
 | Non-nil means TODO statistics covers just direct children.
 | When nil, all entries in the subtree are considered.
 | This has only an effect if `org-provide-todo-statistics' is set.
 | To set this to nil for only a single subtree, use a COOKIE_DATA
 | property and include the word recursive into the value.
 | 
 | You can customize this variable.
 `

This is really great. Thanks.
 
 which will probably cover what you want.
 -- 
 : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org 
 release_8.0.5-322-gd5c11e.dirty
 

-- 
E M A C S
s e l o h
c t t n i
p a   t f
a r t
e o
  l

[ stardiviner ]  {I hate all of you !  Leave me alone}
IRC(freenode): stardiviner \\ Twitter:  @numbchild \\
GnuPG Key fingerprint
 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433


signature.asc
Description: Digital signature


[O] Loading several latex classes for ox-latex

2013-07-10 Thread Julien Cubizolles
How can I run several add-to-list after a given package is loaded ? I
could of course do multiples:

(eval-after-load 'package_name '(add-to-list 'element 'list))

but I'm sure there's a more elegant way.

I tried the following:
--8---cut here---start-8---
(eval-after-load 'ox-latex
  (progn '(add-to-list 'org-latex-classes
   '(mpsi_beamer \\documentclass{mpsi_beamer}\n 
[NO-DEFAULT-PACKAGES]
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 ))
 '(add-to-list 'org-latex-classes 
   '(mpsi \\documentclass[cours,Version,colonne]{mpsi}
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 ))
 ))
--8---cut here---end---8---

but only the second one (mpsi) is loaded.

Julien.




Re: [O] Loading several latex classes for ox-latex

2013-07-10 Thread Nicolas Richard
Julien Cubizolles j.cubizol...@free.fr writes:
 I tried the following:
 --8---cut here---start-8---
 (eval-after-load 'ox-latex
   (progn '(add-to-list 'org-latex-classes
  '(mpsi_beamer \\documentclass{mpsi_beamer}\n 
 [NO-DEFAULT-PACKAGES]
(\\section{%s} . \\section*{%s})
(\\subsection{%s} . \\subsection*{%s})
(\\subsubsection{%s} . \\subsubsection*{%s})
))
'(add-to-list 'org-latex-classes 
  '(mpsi \\documentclass[cours,Version,colonne]{mpsi}
(\\section{%s} . \\section*{%s})
(\\subsection{%s} . \\subsection*{%s})
))
))
 --8---cut here---end---8---

 but only the second one (mpsi) is loaded.

that's because your (progn) is unquoted and thus evaluated at the same
time as eval-after-load, i.e. it returns its last value (which is the
second add-to-list form) and that is what is being added to the
eval-after-load list. What you want is the whole (progn) added there, so
an easy fix probably is to say '(progn ...) *and* remove the quotes
around the calls to add-to-list.

-- 
Nico.



[O] Make background export a little louder

2013-07-10 Thread Rasmus
Hi,

I finally got org-export-in-background working in a nice way reducing
the async-init file load to a third of my normal init file. It's very
nice not to have my Emacs blocked.

However, I would now like to have a bit of feedback from
`org-export-stack' if possible.

I know that `org-export-in-background' says that [r]esults from an
asynchronous export are never displayed automatically, but like to be
notified if something unexpected happened.  E.g. I would like to get a
message if there's a match to the regexp PDF file .*? wasn't
produced is in a log file, a message when a job is ready (for
instance some lualatex files can run for a while if one uses large
fonts).

Is there a hook or something similar allowing me to parse the log
files in org-export-stack?

Thanks,
Rasmus

-- 
Vote for proprietary math!




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

2013-07-10 Thread Jambunathan K

Add a filter or a translator.  One of the arguments to that filter is
the plist you are looking for.  Work back from there and you will get
the right APIs to use.

The snippet below from ox-odt.el should be a good starting point for
further exploration.  The translators do fairly *non-trivial*
transformation on the lispy parse-tree before triggering off the
actual export.  There you will see the APIs for element translation.

  :filters-alist '((:filter-parse-tree
. (org-odt--translate-latex-fragments
   org-odt--translate-description-lists ; Dummy symbol
   org-odt--translate-list-tables)))



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

2013-07-10 Thread Thorsten Jolitz
Jambunathan K kjambunat...@gmail.com writes:

 Add a filter or a translator.  One of the arguments to that filter is
 the plist you are looking for.  Work back from there and you will get
 the right APIs to use.

 The snippet below from ox-odt.el should be a good starting point for
 further exploration.  The translators do fairly *non-trivial*
 transformation on the lispy parse-tree before triggering off the
 actual export.  There you will see the APIs for element translation.

   :filters-alist '((:filter-parse-tree
   . (org-odt--translate-latex-fragments
  org-odt--translate-description-lists ; Dummy symbol
  org-odt--translate-list-tables)))

Thats indeed close to what I need and a useful example, thanks. 

-- 
cheers,
Thorsten




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

2013-07-10 Thread Eric Abrahamsen
Thorsten Jolitz tjol...@gmail.com writes:

 Nick Dokos ndo...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 PS

 How could I get my hands on the 'info' plist during the buffer parsing
 and save it for later use in calls like

 As far as I understand it, the 'info' plist is actually dynamically
 created and modified in various stages of the export process. 

 So what I really mean is probably: 

 How could I get my hands on an 'info-like' plist that contains all the
 tree and options information available at the moment a buffer is parsed
 with `org-element-parse-buffer' - and save it for later use?

 edebug-defun org-element-parse-buffer, do whatever is necessary for it
to get called, and when it stops, evaluate it with ``e'' or switch to
*scratch* and save it in your own variable:

 (setq thorsten-info info)

 Thats a nice trick, but I'm afraid that the 'info' plist is not created
 during the parsing but rather during the export. When I want something
 similar after just parsing, I might have to create it myself. 

 PS
 and how would you use this trick in a program?

If you look in the `org-export-as' function, you can see the part where
the info plist is built, looks like most of it is done by
org-export--get-buffer-attributes.




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

2013-07-10 Thread Eric Abrahamsen
Thorsten Jolitz tjol...@gmail.com writes:

 Robert Klein klein...@mpip-mainz.mpg.de writes:

 Hi Robert,

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

 #+begin_src elisp
 (defun org-find-export-option (file option-name optional backend) ...

 thanks, that brought me on the right track, I was searching for
 functions containing '-info-', but '-options-' would have been the
 better search term:

 ,
 | org-export--get-global-options org-export--get-inbuffer-options
 | org-export--get-subtree-optionsorg-export-backend-options
 | org-export-get-all-options
 `

 So during the buffer parsing I can collect relevant options and build an
 'info-like' plist with them and the complete parse-tree for later use.

Oops, I answered before I saw this...




Re: [O] agenda problem or my set up is a problem?

2013-07-10 Thread Charles

Noorul, Nick and others,

On 7/8/2013 8:00 AM, Charles wrote:

I just did a clean org mode install (twice)

* Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @
c:/cygwin/home/Charlie/elisp/Org-Mode/lisp/)
* emacs GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-28 on MARVIN

emacs on windows 7, home premium

org on cywin 1.7.20

I call the agenda dispatcher; however when I attempt to call an agenda
command the following error is returned

Wrong type argument: sequencep, newline:



Thank you for your replies and guidance.

I suddenly realized that the :newline was part of my tag set-up in my 
init.el. I removed all references to newline and the agenda commands now 
work.


I now have to figure out why (:newline . nil) no longer works, at least 
for me. For the past two or three years I had my tag groups as

(setq org-tag-alist '(
	(:startgroup . nil) ( . ?a) ( . ?b) (:endgroup . nil) 
(:newline . nil)

(:startgroup . nil) ( . ?c) ( . ?d) (:endgroup . nil)))

I'll check the mailing list etc. to see if I missed some discussion 
concerning this.


Charlie



[O] Help with new exporter

2013-07-10 Thread John Rakestraw

Greetings, list --

I've been using Philip Hirschhorn's exam documentclass 
(http://www-math.mit.edu/~psh/#ExamCls) for several years to produce my 
exams. I've been writing the exams in org-mode and using the exporter to

produce the pdf.

I've recently moved to org 8.0. (I like it!) I've successfully 
converted all of my other export class definitions, but I can't figure 
out how to define the exam class so that I can export my exams. I've 
pasted below the class definition that worked with the previous exporter 
(I know it's clumsy, but it worked) and also a sample version of what I 
need in the tex file.


(I know I could just write the tex file directly, but it's nice to have 
all of the course materials included in human-readable form in the 
course org file.)


My problem is that I can't get the exporter to produce chunks like 
this:


\begin{questions}
\question
A paragraph describing how the students should answer the following 
questions.

\begin{parts}
\part
A multi-line question
\part
Another multi-line question
\end{parts}
\end{questions}

Thanks for whatever advice anyone can offer.

--John


Old template:
--8---cut here---start-8---
  (setq org-export-latex-classes (cons '(exam
### I know that in the new exporter I need to change this variable 
to

org-latex-classes ###
  % BEGIN exam Defaults
  [NO-DEFAULT-PACKAGES]
  [PACKAGES]
  \\documentclass[12pt]{exam}
  \\usepackage{palatino}
  \\extrawidth{.5in}
  \\extraheadheight{-.75in}
  \\extrafootheight[-3in]{-.75in}
  \\pagestyle{headandfoot}
  \\NoKey
  \\NumberOfVersions{1}
  \\renewcommand\\thequestion{\\Roman{question}}
  \\renewcommand\\thepartno{\\arabic{partno}}
  \\renewcommand\\partlabel{\\thepartno.}


  % END exam Defaults

  
 (\\begin{questions} \\end{questions} 
\\begin{questions} \\end{questions})

 (\\question . \\question*)
 (\\begin{parts} \\end{parts} \\begin{parts} 
\\end{parts})

 (\\part . \\part*))

  org-export-latex-classes))

--8---cut here---end---8---

An example of what I need the exporter to produce:

--8---cut here---start-8---
\documentclass[letterpaper]{exam}
\extrawidth{.5in}
\extraheadheight[.3in]{-.75in}
\extrafootheight{-.25in}
\raggedright
\renewcommand\thequestion{\Roman{question}}
\renewcommand\thepartno{\arabic{partno}}
\renewcommand\partlabel{\thepartno.}
\firstpageheader{Name: \enspace\makebox[3in]{\hrulefill}\\Exam 
1\\}{}{Introductory Class \\May 7, 2013\\}

\begin{document}

\begin{coverpages}
text describing how the exam should be printed and prepared for 
distribution.

\end{coverpages}



\begin{questions}
\question
A paragraph here describes this section and tells students how many 
terms to

identify.
\begin{parts}
\part
term 1
\vspace*{\fill}
\part
term 2
\vspace*{\fill}
\part
term 3
\vspace*{\fill}
\part
term 4
\vspace*{\fill}
\part
term 5
\vspace*{\fill}
\part
term 6
\vspace*{\fill}
\part
term 7
\vspace*{\fill}
\part
term 7
\vspace*{\fill}
\part
term 8
\end{parts}
\end{questions}
\newpage
\fillwithdottedlines{\fill}
\newpage
\begin{questions}
\question
Short Answer. A paragraph describing how I want students to respond to 
the
following questions. I want to leave vertical space filled with dotted 
lines

between the questions, and I want two questions on each page.
\begin{parts}
\part
This is the first question. It will be several lines long, so I'm 
writing enough

filler here to add at least a second line.
\fillwithdottedlines{\fill}
\part
This is the second question. It will also be several lines long, so I 
need

filler enough to get to the second line for this example.
\fillwithdottedlines{\fill}

\newpage
\fillwithdottedlines{\fill}
\newpage
\part
This is the 3d question.
\fillwithdottedlines{\fill}
\end{parts}
\end{questions}
\newpage
\fillwithdottedlines{\fill}
\newpage
\begin{questions}
\question
Essay Question. This is a section of essay questions. Students will 
answer only
one of these questions, so I don't need to leave space between the two 
questions.

\begin{parts}
\part
The first of the essay questions goes here. It will be several lines 
long, so I

want enough text in the example to provide a line break.
\part
The second essay question. It is also several lines long, so I'll add 
some

rambling text here for the second line.
\end{parts}
\end{questions}
\fillwithdottedlines{\fill}
\newpage
\fillwithdottedlines{\fill}
\end{document}

--8---cut here---end---8---


--
John Rakestraw



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

2013-07-10 Thread Thorsten Jolitz
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 Nick Dokos ndo...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 PS

 How could I get my hands on the 'info' plist during the buffer parsing
 and save it for later use in calls like

 As far as I understand it, the 'info' plist is actually dynamically
 created and modified in various stages of the export process. 

 So what I really mean is probably: 

 How could I get my hands on an 'info-like' plist that contains all the
 tree and options information available at the moment a buffer is parsed
 with `org-element-parse-buffer' - and save it for later use?

 edebug-defun org-element-parse-buffer, do whatever is necessary for it
to get called, and when it stops, evaluate it with ``e'' or switch to
*scratch* and save it in your own variable:

 (setq thorsten-info info)

 Thats a nice trick, but I'm afraid that the 'info' plist is not created
 during the parsing but rather during the export. When I want something
 similar after just parsing, I might have to create it myself. 

 PS
 and how would you use this trick in a program?

 If you look in the `org-export-as' function, you can see the part where
 the info plist is built, looks like most of it is done by
 org-export--get-buffer-attributes.

Thanks for the tip, sometimes its obvious that some functionality is
already implemented, but not so obvious whats the name attached to it.

Looking in the source-code is of course the best way to find out, but I
thought I would have access to all function-names anyway with 

,--
| C-h f org-export- TAB
`--

until I figured out that defining some autoloads and actually loading
the whole library are two different things, and that I will find all
functions that way only after doing an explicit 'M-x load-library' or
after actually using it ... ;)

-- 
cheers,
Thorsten




Re: [O] Help with new exporter

2013-07-10 Thread Robert Klein
Hi John,

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

Thanks a lot
Robert


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

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

2013-07-10 Thread Jambunathan K
Thorsten Jolitz tjol...@gmail.com writes:

 Looking in the source-code is of course the best way to find out, but I
 thought I would have access to all function-names anyway with 

 ,--
 | C-h f org-export- TAB
 `--

 until I figured out that defining some autoloads and actually loading
 the whole library are two different things, and that I will find all
 functions that way only after doing an explicit 'M-x load-library' or
 after actually using it ... ;)


There is an outline struture to the way source code is organized.

(add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)

(add-hook 'outline-minor-mode-hook
  (lambda ()
(define-key outline-minor-mode-map [(control tab)] 'org-cycle)
;; (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)
(define-key outline-minor-mode-map [backtab] 'org-global-cycle)
))

Now doing

M-x find-library RET ox.el RET

S-TAB (one or more times)

will give you a give quick overview of all the function names.



Also there is always this:

   C-1 C-x $

which can be expected to give a quick overview any source file.

Just snap out with:

  C-x $



Or you can build a TAGS file (ctags/etags) and you can find all commands
that match a regexp.





Re: [O] Help with new exporter

2013-07-10 Thread John Rakestraw

Hi, Robert --


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


Sure. (I should have included it earlier; I was worried that my message 
was already too long.) Here's one that worked with the old exporter. 
(Note that I had to leave many of the actual header lines blank -- or, 
rather, with only an empty space.)


--John

--8---cut here---start-8---
#+LaTeX_CLASS: exam
#+LaTeX_CLASS_OPTIONS: [10pt]
#+LATEX_HEADER: \extrawidth{.5in}
#+LATEX_HEADER: \extraheadheight[.3in]{-.75in}
#+LATEX_HEADER: \extrafootheight{-.25in}
#+LATEX_HEADER: \raggedright
#+LaTeX: \renewcommand\thequestion{\Roman{question}}
#+LaTeX: \renewcommand\thepartno{\arabic{partno}}
#+LaTeX: \renewcommand\partlabel{\thepartno.}
#+OPTIONS: toc:nil num:y timestamp:nil creator:nil H:4
#+TITLE:
#+LaTeX: \firstpageheader{Name:\enspace\makebox[3in]{\hrulefill}\\Exam 
1\\}{}{Theo 001 -- Rakestraw\\February 14, 2013\\}

#+LaTeX: \begin{coverpages}
this is just some text
#+LaTeX: \end{coverpages}

* Meaningless header
**
*Identification of Terms*. Identify/define and give the significance
of *six* of the following. If you identify/define more than six
without indicating clearly which six you want me to grade, I will
grade your first six answers (18 points).
*** Terms

term 1
#+LaTeX: \vspace*{\fill}

term 2
#+LaTeX: \vspace*{\fill}

term 3
#+LaTeX: \vspace*{\fill}

term 4
#+LaTeX: \vspace*{\fill}

term 5
#+LaTeX: \vspace*{\fill}

term 6
#+LaTeX: \vspace*{\fill}

term 7
#+LaTeX: \vspace*{\fill}

term 8
#+LaTeX: \vspace*{\fill}

term 9
#+LaTeX: \newpage
#+LaTeX: \fillwithdottedlines{\fill}
#+LaTeX: \newpage

**
*Short Answer*. Answer *two* of the following in a paragraph. If you
attempt to answer more than two without indicating clearly which two 
you

intend me to grade I will grade your first two answers (36 points).
*** Questions

Question one goes on for more than one line. (I mention that because I 
want to

be clear that I can't put a question in a heading.)

#+LaTeX: \fillwithdottedlines{\fill}


Question 2 goes here.
#+LaTeX: \fillwithdottedlines{\fill}

#+LaTeX: \newpage
#+LaTeX: \fillwithdottedlines{\fill}
#+LaTeX: \newpage


Question 3 goes here.
#+LaTeX: \fillwithdottedlines{\fill}


Question 4 goes here.
#+LaTeX: \fillwithdottedlines{\fill}

#+LaTeX: \newpage
#+LaTeX: \fillwithdottedlines{\fill}
#+LaTeX: \newpage

**
*Essay Question*. Answer *one* of the following as fully as you are 
able.
If you attempt to answer more than one without indicating clearly which 
one

you intend me to grade I will grade your first answer (40 points).
*** Questions


here's the first essay question.

here's the second essay question.
#+LaTeX: \fillwithdottedlines{\fill}

#+LaTeX: \newpage
#+LaTeX: \fillwithdottedlines{\fill}
--8---cut here---end---8---


--
John Rakestraw



[O] Cannot convert to Odt

2013-07-10 Thread Tim Hawes
I am running Emacs 24.2 (installed from a bootstrapped pkgsrc) on Ubuntu
Linux 12.04

When I try to convert my org doc to odt format, it fails. I have tried
two different versions of org-mode. Version 7.8.11 that comes with Emacs
24.2 and the latest from GNU Emacs Elpa 8.0.5

This is the *Messages* buffer from org-version 7.8.11:
http://pastebin.com/pFv8xZEk

and from 8.0.5:
http://pastebin.com/cYGRi2qM

I have tried both from completely stripped .emacs files, and getting the
same errors. I have an Ubuntu laptop at home with the same setup and no
issues in converting org docs to odt.

I caught the No OpenOffice schema files are installed message, and
could not find these schema files in the git repository, nor were they
installed from Elpa. Any ideas?



Re: [O] RSS back-end: blogging with Org-mode is now easy

2013-07-10 Thread flammable project
OK so let's move on Emacs 24...

Thanks for the rapid answer!

Basile


2013/7/10 Bastien b...@gnu.org

 flammable project flammable.proj...@gmail.com writes:

  I'm trying to use ox-rss to generate a rss feed but I'm facing an
  error :
 
  let*: Symbol's function definition is void: url-encode-url

 Mh, yes, `url-encode-url' is not available in Emacs 24.1.

 I just mentioned this in the comment section, thanks for reporting
 this problem.

 2012-05-09  Chong Yidong  c...@gnu.org

 * url-util.el (url-encode-url): New function for URL quoting.

 --
  Bastien



Re: [O] possible bug: clocking in and out with STARTUP: logdrawer

2013-07-10 Thread Matthew Steffen
In case anybody else finds this thread: the problem is that the logdrawer
startup option was added in org-mode 8, but I was using 7.8, so of course
it didn't do anything. If you want this feature, you should use the right
version :-D.


On Fri, Jun 7, 2013 at 4:08 PM, Matthew Steffen
matthew.stef...@gmail.comwrote:

 Hello emacs-orgmode!

 I think I may have encountered a bug (org-mode 7.8.02, emacs 23.3.1,
 ubuntu 12.04.2). It seems that if I have a file with #+STARTUP: logdrawer
 at the top, but the LOG_INTO_DRAWER property unset on an item, clocking in
 and out doesn't get logged into LOGBOOK. To illustrate:

 #+STARTUP: logdrawer
 * TODO Finish important task
 :PROPERTIES:
 :Effort: 1:00
 :END:

 (clock in and out)

 #+STARTUP: logdrawer
 * TODO Finish important task
 CLOCK: [2013-06-07 Fri 15:52]--[2013-06-07 Fri 15:52] =  0:00
 :PROPERTIES:
 :Effort: 1:00
 :END:

 But if I add the LOG_INTO_DRAWER property, now my CLOCK entry goes into
 LOGBOOK:

 #+STARTUP: logdrawer
 * TODO Finish important task
 :PROPERTIES:
 :Effort: 1:00
 :LOG_INTO_DRAWER: t
 :END:

 (clock in and out)

 #+STARTUP: logdrawer
 * TODO Finish important task
 :LOGBOOK:
 CLOCK: [2013-06-07 Fri 15:52]--[2013-06-07 Fri 15:52] =  0:00
 :END:
 :PROPERTIES:
 :Effort: 1:00
 :LOG_INTO_DRAWER: t
 :END:

 I didn't see anything in the manual on this, but I apologize for spamming
 the list if this is intended behavior.

 Thanks!
-Matthew



Re: [O] Cannot convert to Odt

2013-07-10 Thread Eric S Fraga
Tim Hawes haw...@anx.com writes:

 I am running Emacs 24.2 (installed from a bootstrapped pkgsrc) on Ubuntu
 Linux 12.04

 When I try to convert my org doc to odt format, it fails. I have tried
 two different versions of org-mode. Version 7.8.11 that comes with Emacs
 24.2 and the latest from GNU Emacs Elpa 8.0.5

 This is the *Messages* buffer from org-version 7.8.11:
 http://pastebin.com/pFv8xZEk

 and from 8.0.5:
 http://pastebin.com/cYGRi2qM

 I have tried both from completely stripped .emacs files, and getting the
 same errors. I have an Ubuntu laptop at home with the same setup and no
 issues in converting org docs to odt.

First, try with emacs -Q.
Second, can you post a minimal example org file that has this problem?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.5-326-g325e40




Re: [O] Cannot convert to Odt

2013-07-10 Thread Jambunathan K
Tim Hawes haw...@anx.com writes:

 I am running Emacs 24.2 (installed from a bootstrapped pkgsrc) on Ubuntu
 Linux 12.04

 When I try to convert my org doc to odt format, it fails. I have tried
 two different versions of org-mode. Version 7.8.11 that comes with Emacs
 24.2 and the latest from GNU Emacs Elpa 8.0.5

 This is the *Messages* buffer from org-version 7.8.11:
 http://pastebin.com/pFv8xZEk

 and from 8.0.5:
 http://pastebin.com/cYGRi2qM

 I have tried both from completely stripped .emacs files, and getting the
 same errors. I have an Ubuntu laptop at home with the same setup and no
 issues in converting org docs to odt.

Both the 7.8 and 8.0 exporter has the following messages.


sh-syntax-propertize-function: Beginning of buffer

bash
   
OpenDocument export failed: Beginning of buffer 

(New file)


It may have something to do with what you have in your Org file.  Try
minimizing your Org file one by one until you find where the problem
is.


 I caught the No OpenOffice schema files are installed message, and
 could not find these schema files in the git repository, nor were they
 installed from Elpa. Any ideas?

Schema files are important only if you were to debug the XML emitted by
the exporter.  See Info manual for more information.



Re: [O] Help with new exporter

2013-07-10 Thread Robert Klein
Hi John.

thank you for the example org file.

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


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

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

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

% END exam Defaults

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


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

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


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



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


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


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

Best regards
Robert





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

Re: [O] fill-paragraph broken

2013-07-10 Thread Samuel Wales
Thank you.  I confirm that it works.

C-M-j in a comment also seems to work now.  However, there is just one
small bug: at the end of a line, it inserts a # on the next line, in
the comment or outside of it depending on whether it is the last line.

On 7/10/13, Nicolas Goaziou n.goaz...@gmail.com wrote:
 Hello,

 Samuel Wales samolog...@gmail.com writes:

 You said to compare text modes with text modes.  So let's talk about
 text-mode itself?  It works as I expect.

 OK. I understand what you mean. I have pushed a patch that should mimic
 usual comment behaviour in Org. Thanks.


 Regards,

 --
 Nicolas Goaziou


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] RSS back-end: blogging with Org-mode is now easy

2013-07-10 Thread flammable project
Ok so mow I tried GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 3.6.4)
of 2013-04-09 on komainu, modified by Debian but with the same issue.

here is my .emacs config:

;;
;; ORG Mode
;;
(setq load-path (cons ~/.emacs.d/org-mode/lisp load-path))
(setq load-path (cons ~/.emacs.d/org-mode/contrib/lisp load-path))
(require 'org-install)
(require 'ox-rss)
;; Auto load OrgMode with *.org files
(add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))
;;
;; EXPORT
;;
;; Don't use postamble to exported HTML
(setq org-export-html-postamble nil)

;; re-export everything regardless of whether or not it's been modified
(setq org-publish-use-timestamps-flag nil)
;;
;; ORG publish function
;;
(setq org-publish-project-alist
   '(
 (orgfiles
   :base-directory /home/x/Dropbox/website/src/
   :base-extension org
   :publishing-directory /home/x/Dropbox/website
/public_html/
   :recursive t
   :html-postamble nil
   :publishing-function org-html-publish-to-html)



  (images
   :base-directory /home/x/Dropbox/website/src/
   :recursive t
   :base-extension jpg\\|gif\\|png\\|ico
   :publishing-directory /home/x/Dropbox/website
/public_html/
   :publishing-function org-publish-attachment)

  (style
   :base-directory /home/x/Dropbox/website/src/
   :recursive t
   :base-extension js\\|css\\|otf\\|eot\\|svg\\|ttf\\|woff
   :publishing-directory /home/x/Dropbox/website
/public_html/
   :publishing-function org-publish-attachment)

   (sessions
   :base-directory /home/x/Dropbox/website/src/sessions/
   :base-extension css\\|js\\|png
   :publishing-directory /home/x/Dropbox/website
/public_html/sessions/
   :publishing-function org-publish-attachment)

   (rss_posts
:base-directory /home/x/Dropbox/website/src/posts/
:base-extension org
:rss-image-url http://..free.fr/fp_icon.png;
:html-link-home http://..free.fr;
:rss-extension xml
:publishing-directory /home//Dropbox/website/public_html/posts/
:publishing-function (org-rss-publish-to-rss)
:section-numbers nil
:exclude .*
:include (index.org)
:table-of-contents nil)

  (website :components (orgfiles images style
sessions rss_posts))
 )
   )


Any ideas?



2013/7/10 flammable project flammable.proj...@gmail.com

 OK so let's move on Emacs 24...

 Thanks for the rapid answer!

 Basile


 2013/7/10 Bastien b...@gnu.org

 flammable project flammable.proj...@gmail.com writes:

  I'm trying to use ox-rss to generate a rss feed but I'm facing an
  error :
 
  let*: Symbol's function definition is void: url-encode-url

 Mh, yes, `url-encode-url' is not available in Emacs 24.1.

 I just mentioned this in the comment section, thanks for reporting
 this problem.

 2012-05-09  Chong Yidong  c...@gnu.org

 * url-util.el (url-encode-url): New function for URL quoting.

 --
  Bastien





Re: [O] Help with new exporter

2013-07-10 Thread Rasmus

Hi John,

Sorry, I meant to email this to the list . . .

 My problem is that I can't get the exporter to produce chunks like 
 this:

 \begin{questions}
 \question
 A paragraph describing how the students should answer the following 
 questions.
 \begin{parts}
 \part
 A multi-line question
 \part
 Another multi-line question
 \end{parts}
 \end{questions}

1. You could let * SOMETHING become a section.  See The sectioning
structure (it seems you already tried, though).  This would allow you
to get around your problem using usual org latex classes.
Cf. Robert's solution.

2. Presumably, the best way way to do this is to make a derived back-end,
see 

http://orgmode.org/worg/dev/org-export-reference.html

What you first need to think about is how you want your Org files to
look.

E.g.:

* question 1
  A paragraph describing how the students should answer the following 
  questions.
  1. A multi-line question
  2. Another multi-line question?

Then you have to define the appropriate functions for your backend.
It won't be many since it inherits everything from the LaTeX class.

Of ocurse whether this is necessary depends on how much you want to
'specialize' the org layout compared to the 'usual' LaTeX org-layout.

–Rasmus

-- 
May the Force be with you




Re: [O] tikz for multiple targets

2013-07-10 Thread Andreas Leha
Hi Eric,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 Rasmus ras...@gmx.us writes:

 [...]

 Tikz/pgf works for the latex exporter.  Just insert it as a file link
 (with extension tikz or pgf) or as latex verbatim code.

 Yes, thanks.  However, I guess I didn't explain very well what I was
 looking for.  

 I use tikz all the time and typically enclose it in a #+begin_LaTeX
 ... #+end_LaTeX block.  That is fine for most of my documents where I
 only wish to export to PDF via LaTeX.

 However, what I would like is to be able to use the same code, inline
 within the org file and not as a separate .tikz file, in some cases to
 export to both LaTeX and HTML (or ODT for that matter).  The code in the
 link I posted used to do this by dynamically setting the :exports and/or
 :results options using org babel headers with emacs lisp code.  A
 variation of this worked with the old exporter but doesn't with the new
 one.

 Thanks again,
 eric

I updated the example again.  Try this:

--8---cut here---start-8---
#+LATEX_HEADER: \usepackage{tikz}

* Tikz test
#+name: contents
#+header: :exports (if (and (boundp 'backend) (eq (org-export-backend-name 
backend) (intern latex))) results none)
#+header: :results latex
#+begin_src latex
  \begin{tikzpicture}
\node[red!50!black] (a) {A};
\node (b) [right of=a] {B};
\draw[-] (a) -- (b);
  \end{tikzpicture}
#+end_src

#+header: :exports (if (and (boundp 'backend) (eq (org-export-backend-name 
backend) (intern latex))) none results)
#+header: :results raw :file test.png
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400
#+header: :fit yes :noweb yes :headers '(\\usepackage{tikz})
#+begin_src latex
  contents
#+end_src
--8---cut here---end---8---

Regards,
Andreas




Re: [O] Help with new exporter

2013-07-10 Thread John Rakestraw

Hi, Robert --

Thanks very much for your work on this. I'm now *much* closer than I 
was. However, I'm not there yet.


Here's a snippet of the tex file that I need:

--8---cut here---start-8---
\begin{questions}
\question
A paragraph here describes this section and tells students how many 
terms to

identify.
\begin{parts}
\part
term 1
\vspace*{\fill}
\part
term 2
\vspace*{\fill}
\part
term 3
\vspace*{\fill}
\part
term 4
\vspace*{\fill}
\part
term 5
\vspace*{\fill}
\part
term 6
\vspace*{\fill}
\part
term 7
\vspace*{\fill}
\part
term 7
\vspace*{\fill}
\part
term 8
\end{parts}
\end{questions}
--8---cut here---end---8---

However, if I use the org-latex-class definition that you suggested, 
this is what I get:


--8---cut here---start-8---
\begin[]{questions}{}
\label{sec-1}
\question[]{}
\label{sec-1-1}
A paragraph here describes this section and tells students how many 
terms to

identify.
\begin[]{parts}{}
\label{sec-1-1-1}
\part[]{}
\label{sec-1-1-1-1}
term 1
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-2}
term 2
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-3}
term 3
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-4}
term 4
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-5}
term 5
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-6}
term 6
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-7}
term 7
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-8}
term 8
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-9}
term 9
\newpage
\fillwithdottedlines{\fill}
\newpage
\end{parts}

--8---cut here---end---8---


The additional lines in the tex file add numbers and oddly formatted 
text to the pdf. The numbering scheme is also off -- these lines in the 
class definition:


\renewcommand\thequestion{\Roman{question}}
\renewcommand\thepartno{\arabic{partno}}
\renewcommand\partlabel{\thepartno.}

are supposed to have to have the question-level headings numbered with 
Roman numerals and the part-level headings numbered with Arabic numbers. 
But for some reason that numbering scheme isn't imposed.


Perhaps I need either just to write in latex or to work with what 
Rasmus is suggesting; I've not had time yet to digest his suggestions. 
I'm floating on the edge of my knowledge here


Thanks again.

--John

--
John Rakestraw



Re: [O] Use babel to import table data from OpenDocument spreadsheets?

2013-07-10 Thread Andreas Leha
Hi James,

James Harkins jamshar...@gmail.com writes:

 At Wed, 03 Jul 2013 10:35:51 +0800,
 James Harkins wrote:
 Anyway, I'm not convinced that org-odt-convert would meet my needs
 anyway. It will have to be a multi-worksheet file, and I'll have to
 extract just one or two of the worksheets. The macro might be the
 way to go.

 I've made a bit more progress with this. I found a utility,
 unoconv[1], which I can persuade to produce a tab-separated export of
 the first worksheet of an ODS document. That much should work for my
 needs -- I can reserve the first worksheet for the data to be
 published, and put all the calculations in other sheets.

 I'm not sure how to import this as an org table. I found
 org-table-import, but it seems that this must insert a table into a
 buffer and then convert to org-table format in the buffer. I don't
 know how to integrate that with babel. If I set :exports results,
 should I assume then that the code block should return a string
 consisting of the org-formatted table?

 - Or, do I have to say :exports none and do some save-excursion
 magic with moving the point to the right place before calling
 org-table-import? (That's probably okay for this small-scale usage,
 but it would be slicker to put a #+CALL in the right location.)

 - Or, do I have to write my own lisp function to format the table as a string?

 The goal is that I should be able to do C-c C-e h h from the org
 document, and babel will run a short emacs-lisp block to invoke
 unoconv (producing a CSV file on disk) and then insert the table under
 the right heading.

 Thanks,
 hjh

 [1] http://linux.die.net/man/1/unoconv

I did not follow the thread, but reading ods files into org is easy, if
you have access to R:

--8---cut here---start-8---
#+name: firstsheet
#+begin_src R :colnames yes
  library(ROpenOffice)
  read.ods(~/tmp/not.ods)[[1]]
#+end_src

#+results: firstsheet
| first col | second col | third col |
|---++---|
| 8 |  4 | 5 |
|  1541 | 79 |   628 |


#+name: secondsheet
#+begin_src R :colnames yes
  library(ROpenOffice)
  read.ods(~/tmp/not.ods)[[2]]
#+end_src

#+results: secondsheet
| dtr   | egd   | pdrn |
|---+---+--|
| ugn   | apggh | gpd  |
| ulgnd | pugn  | pdsg |
--8---cut here---end---8---

Regards,
Andreas




Re: [O] Cannot convert to Odt

2013-07-10 Thread Tim Hawes

Jambunathan K writes:

I am able to convert the same file on my home laptop with org-version
7.8.11

Nonetheless, I tried it with this minimal file:
#+STARTUP: showeverything

* Heading 1

  1. Item 1

starting emacs with emacs -Q I am getting this error:
(emacs)
Loading term/xterm...done
For information about GNU Emacs and the GNU system, type C-h C-a.
kmacro-call-macro: No kbd macro has been defined
Making completion list... [2 times]
Export buffer: 
Debug (org-odt): Searching for OpenDocument schema files...
Debug (org-odt): Trying 
/usr/pkg/share/emacs/24.2/lisp/contrib/odt/etc/schema/...
Debug (org-odt): No OpenDocument schema files installed
Debug (org-odt): Searching for OpenDocument styles files...
Debug (org-odt): Trying /usr/pkg/share/emacs/24.2/lisp/etc/styles/...
Debug (org-odt): Trying /usr/pkg/share/emacs/24.2/lisp/org/etc/styles/...
Debug (org-odt): Trying /usr/pkg/share/emacs/24.2/etc/org/...
Debug (org-odt): Using styles under /usr/pkg/share/emacs/24.2/etc/org/
Exporting to ODT using org-lparse...
Using vacuous schema
org-babel-exp processing... [2 times]
org-odt-format-source-code-or-example-colored: Symbol's function definition is 
void: copy-seq
byte-code: Beginning of buffer [16 times]


 (New file)


 It may have something to do with what you have in your Org file.  Try
 minimizing your Org file one by one until you find where the problem
 is.






Re: [O] Help with new exporter

2013-07-10 Thread John Rakestraw
Apologies for responding to myself, but I realized after writing the 
message below that if I use sed to remove the lines with the word 
label and all of the empty brackets (i.e., =[]= and ={}= ) in the tex 
file, then I'm very, very close to what I need. I assume I could write a 
function and then call it in the publishing routine?


--John

On 10.07.2013 16:46, John Rakestraw wrote:

Hi, Robert --

Thanks very much for your work on this. I'm now *much* closer than I
was. However, I'm not there yet.

Here's a snippet of the tex file that I need:

--8---cut here---start-8---
\begin{questions}
\question
A paragraph here describes this section and tells students how many 
terms to

identify.
\begin{parts}
\part
term 1
\vspace*{\fill}
\part
term 2
\vspace*{\fill}
\part
term 3
\vspace*{\fill}
\part
term 4
\vspace*{\fill}
\part
term 5
\vspace*{\fill}
\part
term 6
\vspace*{\fill}
\part
term 7
\vspace*{\fill}
\part
term 7
\vspace*{\fill}
\part
term 8
\end{parts}
\end{questions}
--8---cut here---end---8---

However, if I use the org-latex-class definition that you suggested,
this is what I get:

--8---cut here---start-8---
\begin[]{questions}{}
\label{sec-1}
\question[]{}
\label{sec-1-1}
A paragraph here describes this section and tells students how many 
terms to

identify.
\begin[]{parts}{}
\label{sec-1-1-1}
\part[]{}
\label{sec-1-1-1-1}
term 1
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-2}
term 2
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-3}
term 3
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-4}
term 4
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-5}
term 5
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-6}
term 6
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-7}
term 7
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-8}
term 8
\vspace*{\fill}

\part[]{}
\label{sec-1-1-1-9}
term 9
\newpage
\fillwithdottedlines{\fill}
\newpage
\end{parts}

--8---cut here---end---8---


The additional lines in the tex file add numbers and oddly formatted
text to the pdf. The numbering scheme is also off -- these lines in
the class definition:

\renewcommand\thequestion{\Roman{question}}
\renewcommand\thepartno{\arabic{partno}}
\renewcommand\partlabel{\thepartno.}

are supposed to have to have the question-level headings numbered
with Roman numerals and the part-level headings numbered with Arabic
numbers. But for some reason that numbering scheme isn't imposed.

Perhaps I need either just to write in latex or to work with what
Rasmus is suggesting; I've not had time yet to digest his 
suggestions.

I'm floating on the edge of my knowledge here

Thanks again.

--John


--
John Rakestraw



Re: [O] Cannot convert to Odt

2013-07-10 Thread Jambunathan K
Tim Hawes haw...@anx.com writes:

 Jambunathan K writes:

 I am able to convert the same file on my home laptop with org-version
 7.8.11

 Nonetheless, I tried it with this minimal file:
 #+STARTUP: showeverything

 * Heading 1

   1. Item 1



 starting emacs with emacs -Q I am getting this error:
 (emacs)
 Loading term/xterm...done
 For information about GNU Emacs and the GNU system, type C-h C-a.
 kmacro-call-macro: No kbd macro has been defined
 Making completion list... [2 times]
 Export buffer: 
 Debug (org-odt): Searching for OpenDocument schema files...
 Debug (org-odt): Trying 
 /usr/pkg/share/emacs/24.2/lisp/contrib/odt/etc/schema/...
 Debug (org-odt): No OpenDocument schema files installed
 Debug (org-odt): Searching for OpenDocument styles files...
 Debug (org-odt): Trying /usr/pkg/share/emacs/24.2/lisp/etc/styles/...
 Debug (org-odt): Trying /usr/pkg/share/emacs/24.2/lisp/org/etc/styles/...
 Debug (org-odt): Trying /usr/pkg/share/emacs/24.2/etc/org/...
 Debug (org-odt): Using styles under /usr/pkg/share/emacs/24.2/etc/org/
 Exporting to ODT using org-lparse...
 ^^
 ^^
 Using vacuous schema
 org-babel-exp processing... [2 times]
 org-odt-format-source-code-or-example-colored: Symbol's function
  ^
  ^
 definition is void: copy-seq
   
 byte-code: Beginning of buffer [16 times]

The ODT exporter is 7.8.11 version.  (The presence of org-lparse says it
is a 7.8 version)

You are having a old version of Emacs and hence org-odt.el.  Try
upgrading it to emacs-24.3 (or whatever is the newest stable version) or
the latest Org-7.8.X version.



I see no correspondence between the example Org file and the problem
reported.  Problematic path gets triggered only if there are source
blocks.  The Org file has no source block.  Definitely there is
something amiss at your side.



Org-7.8.11 is more or less on life-support.  Issues with Org-8.0 will be
more interesting.  Make sure to use GNU ELPA package and isolate
the issue further.

Start Emacs *normally*.  (Otherwise the exporter used will be the old
one.)  

*After* export, try 

M-x org-version RET

M-x locate-library RET org-compat RET

and ensure that the right version of Org is picked up.

The problem comes from one of the shell blocks (either babel execution
or source block coloration.)




 (New file)


 It may have something to do with what you have in your Org file.  Try
 minimizing your Org file one by one until you find where the problem
 is.




[O] [BUG] org-agenda-list

2013-07-10 Thread Nick Dokos
I just pulled and I get the attached backtrace from org-agenda-list.
I tried with -q -l minimal.emacs and it's still there.
It's probably caused by commit 42691788273cecb75ec620d40cc5394d2cd95ed1.
When I revert that, the agenda comes up properly.

Org-mode version 8.0.5 (release_8.0.5-334-g1b1469 @
/home/nick/elisp/org-mode/lisp/)
(which includes the revert: the real one is -333-)

Debugger entered--Lisp error: (wrong-type-argument sequencep :newline)
  concat(:newline )
  (cond ((eq (car tg) :startgroup) {) ((eq (car tg) :endgroup) }) ((eq (car 
tg) :grouptags) :) (t (concat (car tg) (if (characterp (cdr tg)) (format 
(%s) (char-to-string (cdr tg))) 
  (lambda (tg) (cond ((eq (car tg) :startgroup) {) ((eq (car tg) :endgroup) 
}) ((eq (car tg) :grouptags) :) (t (concat (car tg) (if (characterp (cdr 
tg)) (format (%s) (char-to-string (cdr tg))) )((:newline))
  mapcar((lambda (tg) (cond ((eq (car tg) :startgroup) {) ((eq (car tg) 
:endgroup) }) ((eq (car tg) :grouptags) :) (t (concat (car tg) (if 
(characterp (cdr tg)) (format (%s) (char-to-string (cdr tg))) ) 
((@DIPLAN) (@HOME . 104) (@IGN) (@KUNDE . 107) (@UNTERWEGS . 85) 
(:newline) (ADMIN . 97) (ASIEN . 65) (diplan . 100) (drill . 68) 
(EMAIL) (export . 101) (HIDE . 72) (HIDEAGENDA) (IGNORE . 120) 
(INFO . 105) (JWINTER . 87) (LESEN . 76) (LPM . 108) (noexport . 110) 
(ONGOING . 111) (PROJEKT) (REFILETARGET . 114) (:newline) 
(REVIEW_WEEKLY) (REVIEW_MONTHLY) (becom . 98) (fleckenm . 102) 
(foerster . 70) (rob . 82) (roth) (SERVICE) (stengele . 115) (TC . 
116) (TEL) (TDEIERL) (WARTEN . 119) (UBMED . 117) (ULLA . 122)))
  (setq tags (mapcar (function (lambda (tg) (cond ((eq (car tg) :startgroup) 
{) ((eq (car tg) :endgroup) }) ((eq (car tg) :grouptags) :) (t (concat 
(car tg) (if ... ... )) org-tag-alist))
  (progn (setq tags (mapcar (function (lambda (tg) (cond ((eq ... :startgroup) 
{) ((eq ... :endgroup) }) ((eq ... :grouptags) :) (t (concat ... ...) 
org-tag-alist)))
  (if (and (not tags) org-tag-alist) (progn (setq tags (mapcar (function 
(lambda (tg) (cond (... {) (... }) (... :) (t ... org-tag-alist
  (let ((re (org-make-options-regexp (quote (FILETAGS TAGS (splitre [  
]+) (start 0) tags ftags key value) (save-excursion (save-restriction (widen) 
(goto-char (point-min)) (while (re-search-forward re nil t) (setq key (upcase 
(org-match-string-no-properties 1)) value (org-match-string-no-properties 2)) 
(if (stringp value) (setq value (org-trim value))) (cond ((equal key TAGS) 
(setq tags (append tags ... ...))) ((equal key FILETAGS) (if (string-match 
\\S- value) (progn ...))) (and ftags (org-set-local (quote org-file-tags) 
(mapcar (quote org-add-prop-inherited) ftags))) (org-set-local (quote 
org-tag-groups-alist) nil) (if (and (not tags) org-tag-alist) (progn (setq tags 
(mapcar (function (lambda (tg) (cond ... ... ... ...))) org-tag-alist (let 
(e tgs g) (while (setq e (car (prog1 tags (setq tags (cdr tags) (cond 
((equal e {) (progn (setq tgs (cons ... tgs)) (if (equal ... :) (progn ... 
... ((equal e :) (setq tgs (cons (quote ...) tgs))) ((equal e }) (setq 
tgs (cons (quote ...) tgs)) (if g (setq g nil))) ((equal e \\n) (setq tgs 
(cons (quote ...) tgs))) ((string-match ^\\([[:alnum:]_@#%]+\\)(\\(.\\))$ e) 
(setq tgs (cons (cons ... ...) tgs)) (if (and g ( g 0)) (setcar 
org-tag-groups-alist (append ... ...))) (if g (setq g (1+ g (t (setq tgs 
(cons (list e) tgs)) (if (and g ( g 0)) (setcar org-tag-groups-alist (append 
... ...))) (if g (setq g (1+ g)) (org-set-local (quote org-tag-alist) nil) 
(while (setq e (car (prog1 tgs (setq tgs (cdr tgs) (or (and (stringp (car 
e)) (assoc (car e) org-tag-alist)) (setq org-tag-alist (cons e 
org-tag-alist (list org-file-tags org-tag-alist org-tag-groups-alist)))
  (progn (org-set-local (quote org-file-tags) nil) (let ((re 
(org-make-options-regexp (quote (FILETAGS TAGS (splitre [ ]+) 
(start 0) tags ftags key value) (save-excursion (save-restriction (widen) 
(goto-char (point-min)) (while (re-search-forward re nil t) (setq key (upcase 
(org-match-string-no-properties 1)) value (org-match-string-no-properties 2)) 
(if (stringp value) (setq value (org-trim value))) (cond ((equal key TAGS) 
(setq tags ...)) ((equal key FILETAGS) (if ... ...)) (and ftags 
(org-set-local (quote org-file-tags) (mapcar (quote org-add-prop-inherited) 
ftags))) (org-set-local (quote org-tag-groups-alist) nil) (if (and (not tags) 
org-tag-alist) (progn (setq tags (mapcar (function (lambda ... ...)) 
org-tag-alist (let (e tgs g) (while (setq e (car (prog1 tags (setq tags 
... (cond ((equal e {) (progn (setq tgs ...) (if ... ...))) ((equal e 
:) (setq tgs (cons ... tgs))) ((equal e }) (setq tgs (cons ... tgs)) (if g 
(setq g nil))) ((equal e \\n) (setq tgs (cons ... tgs))) ((string-match 
^\\([[:alnum:]_@#%]+\\)(\\(.\\))$ e) (setq tgs (cons ... tgs)) (if (and g 
...) (setcar org-tag-groups-alist ...)) (if g (setq g ...))) (t (setq tgs (cons 

Re: [O] [BUG] org-agenda-list

2013-07-10 Thread Noorul Islam K M
Nick Dokos ndo...@gmail.com writes:

 I just pulled and I get the attached backtrace from org-agenda-list.
 I tried with -q -l minimal.emacs and it's still there.
 It's probably caused by commit 42691788273cecb75ec620d40cc5394d2cd95ed1.
 When I revert that, the agenda comes up properly.

 Org-mode version 8.0.5 (release_8.0.5-334-g1b1469 @
 /home/nick/elisp/org-mode/lisp/)
 (which includes the revert: the real one is -333-)

Is this also causing the newline issue that Charles mentioned?

Thanks and Regards
Noorul



[O] default export templates broken?

2013-07-10 Thread Eric Abrahamsen
I wonder if something in the new export backend system has broken
inserting export option templates? Choosing anything but default as
the backend gives me this backtrace, in this case html. The offending
functions seem to have no definition (compiler macros?) so I couldn't
poke further, but it looks like a symbol's being given to something that
expects the new struct-based backend.

Debugger entered--Lisp error: (wrong-type-argument arrayp html)
  org-export-backend-name(html)
  (org-export-get-all-options (org-export-backend-name backend))
  (cond ((eq backend (quote default)) org-export-options-alist) 
((org-export-backend-p backend) (org-export-get-all-options backend)) (t 
(org-export-get-all-options (org-export-backend-name backend
  org-export-insert-default-template(nil nil)
  org-export-dispatch(nil)
  call-interactively(org-export-dispatch nil nil)




Re: [O] Help with new exporter

2013-07-10 Thread Charles Berry
John Rakestraw lists at johnrakestraw.com writes:

 
 Apologies for responding to myself, but I realized after writing the 
 message below that if I use sed to remove the lines with the word 
 label and all of the empty brackets (i.e., =[]= and ={}= ) in the tex 
 file, then I'm very, very close to what I need. I assume I could write a 
 function and then call it in the publishing routine?
 
 --John

One way to implement this is to define one or more filters.

:filter-final-output might do it for the unwanted brackets.
Maybe :filter-special-block is what you want for the unwanted label lines,
which I guess are created in special block handling

See 

http://orgmode.org/worg/exporters/filter-markup.html 

for some tips as well as the section headed

;;; The Filter System

in ox.el.

[rest deleted]




Re: [O] Help with new exporter

2013-07-10 Thread Robert Klein
Hi John,

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


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

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

2. Use the following class definition:

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

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

% END exam Defaults

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

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

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


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


Does this work for you?


Best regards
Robert




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


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



Re: [O] Loading several latex classes for ox-latex

2013-07-10 Thread Julien Cubizolles
Nicolas Richard theonewiththeevill...@yahoo.fr writes:


 that's because your (progn) is unquoted and thus evaluated at the same
 time as eval-after-load, i.e. it returns its last value (which is the
 second add-to-list form) and that is what is being added to the
 eval-after-load list. What you want is the whole (progn) added there, so
 an easy fix probably is to say '(progn ...) *and* remove the quotes
 around the calls to add-to-list.

Thank you, you were right.