Re: [O] A question on org-element-headline-interperter

2014-10-03 Thread Thorsten Jolitz
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

Hi,

 I guess I don't understand something.  I have a headline in a `headline'
 variable (say that I did something like (org-element-parse-buffer) and
 took one of the headlines from there).  I thought that

 (insert
  (org-element-headline-interpreter headline (org-element-property


  :contents headline)))

 would put it into the current buffer; however, it only puts the first
 line (without the actual contents).

 What is my misconception here?

as I learned myself from Nicolas recently, these are internal functions,
the API function for interpreting is 

,[ C-h f org-element-interpret-data RET ]
| org-element-interpret-data is an autoloaded compiled Lisp function in
| `org-element.el'.
| 
| (org-element-interpret-data DATA optional PSEUDO-OBJECTS)
| 
| Interpret DATA as Org syntax.
| 
| DATA is a parse tree, an element, an object or a secondary string
| to interpret.
| 
| Optional argument PSEUDO-OBJECTS is a list of symbols defining
| new types that should be treated as objects.  An unknown type not
| belonging to this list is seen as a pseudo-element instead.  Both
| pseudo-objects and pseudo-elements are transparent entities, i.e.
| only their contents are interpreted.
| 
| Return Org syntax as a string.
`

-- 
cheers,
Thorsten




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

2014-10-03 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Alan did some testing on a slightly older version of this patch and he
 managed to publish his book without errors and with working links.  So
 let's give it another shot.

 I briefly tested the output of LaTeX, html, texinfo, odt, md, and
 plaintext and made sure links work and that the right text is shown in
 the output.

Thanks. It looks mostly good. Some minor comments follow.

 I think the following is more in the spirit of the code (you don't
 ignore :custom-id property):

   (ids (delq nil
  (list (org-element-property :CUSTOM_ID headline)
(org-export-get-headline-id headline info)
(org-element-property :ID headline
   (preferred-id (car ids))

 But we are not checking that :CUSTOM_ID is unique.

This is not our problem, but user's.

 In ox-latex you're required to turn on a variable on to get this
 behavior (I could be mistaken here). For now I have done as you
 suggest. But I don't understand why we are favoring CUSTOM_ID here
 over the nice, unique label we've generated?

We could do the same as ox-latex, default to generated label, and
optionally allow users to use raw custom-id instead (with usual caveat).

Meanwhile, I think it is reasonable to stick to the current behaviour.

 Last line:

   (list headline (incf num))

 Oh incf is quite handy.  Didn't know that one.

 I leave it as (cons headline (list (incf num))).  Why?  'Cause that's
 the format used by `org-export--collect-headline-numbering'.  While
 simpler is nicer, I think it's better not to have to consider
 different data structures depending on whether data is from
 `org-export--collect-headline-numbering' or
 `org-export--collect-unnumbered-headline-id'.

I don't get your point. (cons 'a (list 'b)) is equivalent to (list 'a
'b). Why do you think this changes the data structure?

   (unless (org-some
(lambda (h) (org-not-nil (org-element-property :UNNUMBERED h)))
(org-export-get-genealogy headline))
 ...)

 Handy.  AFAIK BLOB is not a member of (org-export-get-genealogy BLOB)
 (or so the output suggests), so (or · ·) is still needed.

I think

  (org-some (lambda (h) ...)
(cons headline (org-export-get-genealogy headline)))

is more elegant.

 +   ;; headline linked via CUSTOM_ID

  ;; Headline linked via CUSTOM_ID.

 +   (or (and (string= type custom-id)
 +(org-element-property :CUSTOM_ID destination))
 +   (org-export-get-headline-id destination info)
 +   (t (error Shouldn't reach here
;; What description to use?
(desc
 ;; Case 1: Headline is numbered and LINK has no
 @@ -3073,13 +3063,16 @@ holding contextual information.
(let* ((class-num (+ (org-export-get-relative-level parent info)
  (1- (plist-get info :html-toplevel-hlevel
(section-number
 -   (mapconcat
 -'number-to-string
 -(org-export-get-headline-number parent info) -)))
 +   (and (org-export-numbered-headline-p parent info)
 +(mapconcat
 + 'number-to-string

Nitpick: #'number-to-string

 +  ;; Test if destination is a numbered headline

Missing full stop.

 +  (let ((num 0))
 +(org-element-map data 'headline
 + (lambda (headline)
 +   (unless (org-export-numbered-headline-p headline options)
 + (cons headline (list (incf num

See above.

 +  (unless
 +  (or (org-element-property :UNNUMBERED headline)
 +   (org-some (lambda (head) (org-not-nil (org-element-property 
 :UNNUMBERED head)))
 + (org-export-get-genealogy headline)))
 +(let ((sec-num (plist-get info :section-numbers))
 +   (level (org-export-get-relative-level headline info)))
 +  (if (wholenump sec-num) (= level sec-num) sec-num

Per above

  (unless (org-some
   (lambda (h) (org-not-nil (org-element-property :UNNUMBERED h)))
   (cons headline (org-export-get-genealogy headline)))
...)

 +(ert-deftest test-org-export/org-export-get-headline-id ()
 +  Test `org-export-get-headline-id' specifications.
 +  (should
 +   (equal sec-1
 +   (org-test-with-parsed-data * Headline
 + (org-export-get-headline-id
 +  (org-element-map tree 'headline 'identity info t)
 +  info
 +  (should
 +   (equal unnumbered-1
 +   (org-test-with-parsed-data * Headline\n:PROPERTIES:\n:UNNUMBERED: 
 t\n:END:
 + (org-export-get-headline-id
 +  (org-element-map tree 'headline 'identity info t)
 +  info
 +  (should
 +   (equal unnumbered-1
 +   (org-test-with-parsed-data * Headline\n#+OPTIONS: num:nil
 + (org-export-get-headline-id
 +  (org-element-map tree 'headline 'identity info t)
 +  info)

I suggest to also test tricky inherited UNNUMBERED properties

  * H
  

[O] Suggestion, ox-latex: Perhaps a line break should be inserted into low-level headlines

2014-10-03 Thread Anders Johansson

Hi,
Currently low-level headlines in latex export to:

\item HEADLINE-TEXT
\label{sec-1-3}
CONTENTS

This makes the headline text and contents go together in the same line 
with just a space in between. I think there should be a line break or 
paragraph break between them.


Something like

\item HEADLINE-TEXT
\label{sec-1-3}\\
CONTENTS

Or:

\item HEADLINE-TEXT
\label{sec-1-3}

CONTENTS

The first variant means modifying the headline-label variable (or 
something like that) in org-latex-headline. The second is less messy to 
implement.


Cheers,
Anders Johansson



Re: [O] behavior of org-image-actual-size with units in attr_* :width

2014-10-03 Thread Nicolas Goaziou
Hello,

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

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

 is it the case that ATTR_HTML width attributes are only in pixels? 

No, but it's the only export back-end dedicated to on-screen display.
So, in-buffer width is probably only meaningful there.

 If so, that is certainly an easier modification to make, and would
 solve my problem (we almost exclusively use attr_latex for that
 export).

 Your comment inspired me to solve it this way:

 #+attr_latex: :width 4in :placement [H]
 #+attr_org: :width 400
 [[./images/batch-multiple.png]]


 For inline images, the attr_org is found first, but in latex export it
 is ignored and it gets the width there.

 Maybe no change is needed at all.

It works but is certainly hackish.


Regards,

-- 
Nicolas Goaziou



Re: [O] Suggestion, ox-latex: Perhaps a line break should be inserted into low-level headlines

2014-10-03 Thread Nicolas Goaziou
Hello,

Anders Johansson mejlaande...@gmail.com writes:

 Currently low-level headlines in latex export to:

 \item HEADLINE-TEXT
 \label{sec-1-3}
 CONTENTS

Not really. Export respects blank lines between the headline an its
contents. So

  * Headline

Contents

will be exported as

  \item Headline
  \label{whatever}

  Contents

 This makes the headline text and contents go together in the same line
 with just a space in between. I think there should be a line break or
 paragraph break between them.

I don't think is should be mandatory.

  * Low-level-headline ---
Some conents

is meant to be inserted on the same line.


Regards,

-- 
Nicolas Goaziou



[O] Release Org 8.2.8

2014-10-03 Thread Bastien
Hi all,

I've released Org 8.2.8, a bugfix release.
Thanks to everyone who worked on it.

I also sync'ed this release with the Emacs 24 branch.

Enjoy!

-- 
 Bastien




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

2014-10-03 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 +  ;; Test if destination is a numbered headline

 Missing full stop.

Small question about conventions for writing comments... Can I consider
the following to be the rule?

- If it's a *sentence* (like the above example, in the imperative form),
  begin with a capital and end with a dot.
  
- Otherwise (like ;; pattern found), begin with a small letter and
  don't end with a dot.

?

Tips on writing comments found on
https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html
aren't very helpful IMHO, as you see things such as:

- ; there was there was a base version to which this looks like
  a subversion, that is a sentence with no capital nor dot...

- ;; Update mode line., that is a sentence with both beginning capital
  and to.

-  The kill ring, an expression with a capital...

That page seems to be more on the usage of ;, ;;, ;;; and 
than on the usage of capitals and dots.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Release Org 8.2.8

2014-10-03 Thread Glyn Millington
Bastien b...@gnu.org writes:

 Hi all,

 I've released Org 8.2.8, a bugfix release.
 Thanks to everyone who worked on it.

 I also sync'ed this release with the Emacs 24 branch.

Thank you!!



atb

Glyn




Re: [O] Release Org 8.2.8

2014-10-03 Thread Pascal Wittmann
On 10/03/2014 10:18 AM, Bastien wrote:
 I've released Org 8.2.8, a bugfix release.
 Thanks to everyone who worked on it.

Thanks! I've already updated the package on NixOS.



signature.asc
Description: OpenPGP digital signature


[O] Export dispatcher interface change

2014-10-03 Thread Jacek Generowicz
Hello,

I am used to the export dispatcher offering sections for export to HTML
[h] and LaTeX [l].

After having upgraded a number of things on my system (including a small
bump of Emacs, but NOT (to my knowledge) org mode), the dispatcher no
longer offers the [h] and [l] options ... until I invoke one of the
commands via M-x. In other words,

M-x org-html-export-to-html

causes the [h] section to be available in the dispatcher thereafter.

Any ideas what might have caused this change, or what I might do to have
the [h] and [l] dispatcher options be available automatically?

My versions:

  (emacs-version)
  GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2)
   of 2014-09-08 on binet, modified by Debian
  
  (org-version)
  8.2

Thanks.



Re: [O] Solution for very long hyperlinks when exporting to latex?

2014-10-03 Thread Martin Weigele
Problem solved by uncommenting the [NO-DEFAULT-PACKAGES] and [EXTRA] 
parts (see elisp part below) in the emacs lisp initialisation of .emacs.

Am Mittwoch, 1. Oktober 2014, 02:29:23 schrieb Martin Weigele:
 That is exactly the problem, Rasmus... I am lost in the complexity of object
 and metalevels and don't really know where to start reducing it. Except for
 the naughty monster urls everything else works fine. Thanks anyway. :)
 
 Good night, Martin
 
 Am Mittwoch, 1. Oktober 2014, 02:20:45 schrieb Rasmus:
  Martin Weigele mar...@weigele.de writes:
   There you go. Thx.
  
  Please send a minimal example that displays the undesired behavior :)
  
   #+TITLE: Blah
   #+AUTHOR: Me und Du
   
   #+OPTIONS:   H:20
   #+LATEX_CLASS: scrbook
   
   #+LATEX_CLASS_OPTIONS:
   [paper=17cm:22cm,DIV=calc,BCOR=12mm,titlepage,11pt,scrhack]
   
   #+LATEX_HEADER: \usepackage[english,ngerman]{babel}
   #+LATEX_HEADER:\usepackage{
   #+LATEX_HEADER:  fixltx2e  % Verbessert einige Kernkompetenzen von
   LaTeX2e
   #+LATEX_HEADER:}
   #+LATEX_HEADER:\usepackage{%
   #+LATEX_HEADER:  ellipsis, % Korrigiert den Weißraum um
   Auslassungspunkte
   #+LATEX_HEADER:  ragged2e, % Ermöglicht Flattersatz mit Silbentrennung
   #+LATEX_HEADER: marginnote,% Für bessere Randnotizen mit \marginnote
   statt
   #+LATEX_HEADER:% \marginline
   #+LATEX_HEADER:}
   #+LATEX_HEADER:\usepackage[tracking=true]{microtype}%
   #+LATEX_HEADER:% Microtype ist einfach super, aber lesen Sie
   #+LATEX_HEADER:% unbedingt die Anleitung um das Folgende zu
   #+LATEX_HEADER:% verstehen.
   #+LATEX_HEADER: \usepackage{mathptmx, enumerate,
   setspace,alnumsec}\alnumsecstyle{LRald}
   #+LATEX_HEADER: \pagenumbering{roman}
   #+LATEX_HEADER: \usepackage[hyphens]{url}
   #+LATEX_HEADER: \usepackage{pdfpages}
   #+LATEX_HEADER: \usepackage{graphics, color}
   #+LATEX_HEADER: \usepackage{xcolor}
   #+LATEX_HEADER: \usepackage{graphicx, latexsym, keyval, ifthen,
   moreverb}
   #+LATEX_HEADER: \usepackage{gnuplottex}
   #+LATEX_HEADER: \usepackage{tikz}
   #+LATEX_HEADER: \usepackage{gnuplot-lua-tikz}
   #+LATEX_HEADER: \hypersetup{
   #+LATEX_HEADER:  breaklinks=true,
   #+LATEX_HEADER:  pdfkeywords={},
   #+LATEX_HEADER:  pdfsubject={},
   #+LATEX_HEADER:  pdfcreator={Emacs Org-mode version }}
   
   #+TEXT: [TABLE-OF-CONTENTS]
   
   -
   
   (require 'package)
   (add-to-list 'package-archives '(org . http://orgmode.org/elpa/;) t)
   (require 'ox-odt)
   (require 'org-latex)
   (setq org-export-latex-listings t)
   (add-to-list 'org-latex-classes
   
'(scrartcl

  \\documentclass{scrartcl}
   
   ;; [NO-DEFAULT-PACKAGES]
   ;; [EXTRA]
   
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))
   
   (add-to-list 'org-latex-classes
   
  '(scrbook
  
  \\documentclass{scrbook}
   
   ;; [NO-DEFAULT-PACKAGES]
   ;; [EXTRA]
   
(\\chapter{%s} . \\chapter*{%s})

  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s})
  (\\subparagraph{%s} . \\subparagraph*{%s})))
   
   ;; active Babel languages
   (org-babel-do-load-languages
   
'org-babel-load-languages
'((gnuplot . t)))
   
   ;; add additional languages with '((language . t)))
   (custom-set-variables
   
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-latex-with-hyperref nil))
   
   (custom-set-faces
   
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
   
   
   
   Am Mittwoch, 1. Oktober 2014, 02:04:34 schrieb Rasmus:
   Martin Weigele mar...@weigele.de writes:
Hi Rasmus, thank you very much, Wasn't really aware of texdoc
package
this is great. A lot improvement since the old days... :)
   
   TL is astonishing software.
   

Re: [O] Release Org 8.2.8

2014-10-03 Thread Igor Sosa Mayor
Bastien b...@gnu.org writes:

 Hi all,

 I've released Org 8.2.8, a bugfix release.
 Thanks to everyone who worked on it.

thanks!

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::




Re: [O] [bug] Alignment bug in clock tables

2014-10-03 Thread Joost Helberg
Francesco,

I reported this on September 2nd too. Hitting C-c C-c inside the table
fixes the formatting. Also moving to a position inside the table and
doing: M-x org-table-align fixes the formatting. Hence
I tried to create a new formatter function in order to re-align after
writing the table:

(defun my-formatter( ipos tables params )
  (progn
(org-clocktable-write-default ipos tables params)
(forward-line 2)
(org-table-align)
)
  )

and install this as the formatter, but it didn't help. If it would have
helped, I could have fixed the default table-writer by adding
(org-table-align). 

Anyone an idea?

regards,

Joost Helberg

 Francesco == Francesco Pizzolante f...@missioncriticalit.com writes:
  From: Francesco Pizzolante f...@missioncriticalit.com
  To: mailing-list-org-mode emacs-orgmode@gnu.org
  Subject: [O] [bug] Alignment bug in clock tables
  Date: 2014-10-02T17:41:07+0200

  Hi,

  I'm having an alignment issue in clock tables, both in the agenda and in
  dynamic blocks.

  By default, \emsp is displayed in clock tables for level 2 (or above) to
  indent headings. To avoid that, I set the variable `org-pretty-entities'
  to t, and in this case the alignment of the table is broken when you
  regenerate it.

  I currently see no solution if I want correct alignment in clock tables
  without seeing \emsp.

  Any idea how to achieve that?

  Here's a small screen capture that shows the issue:
  http://screencast.com/t/qpmxDV8R543G

  Thanks.

   Francesco


-- 
Snow B.V.



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

2014-10-03 Thread Rasmus
Hi,

Now odt output doesn't look ugly.  I fixed the other things you
mentioned.  Make test passes.


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

 But we are not checking that :CUSTOM_ID is unique.

 This is not our problem, but user's.

 In ox-latex you're required to turn on a variable on to get this
 behavior (I could be mistaken here). For now I have done as you
 suggest. But I don't understand why we are favoring CUSTOM_ID here
 over the nice, unique label we've generated?

 We could do the same as ox-latex, default to generated label, and
 optionally allow users to use raw custom-id instead (with usual caveat).

 Meanwhile, I think it is reasonable to stick to the current behaviour.


Fine with me.  Maybe some other day. . .

 I don't get your point. (cons 'a (list 'b)) is equivalent to (list 'a
 'b). Why do you think this changes the data structure?

Right.  No point. 

   (org-some (lambda (h) ...)
 (cons headline (org-export-get-genealogy headline)))

 is more elegant.

That's true.


 I suggest to also test tricky inherited UNNUMBERED properties

Added.

—Rasmus

-- 
Vote for proprietary math!
From 75309757d30c9920077d1ec82a61713830cb4888 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Sun, 21 Sep 2014 16:17:55 +0200
Subject: [PATCH] ox: Support unnumbered headlines via property.

* ox.el (org-export--collect-headline-numbering): Ignore unnumbered headline.
(org-export-get-headline-id,
org-export--collect-unnumbered-headline-id): New functions.
(org-export-numbered-headline-p): Further tests for unnumbered headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support ununbered headlines.
* test-ox.el (test-org-export/org-export-get-headline-id): New test.
* OrgOdtStyles.xml: Add styles for unnumbered headings.
---
 etc/styles/OrgOdtStyles.xml | 19 ++
 lisp/org.el |  2 +-
 lisp/ox-ascii.el|  8 --
 lisp/ox-html.el | 40 +
 lisp/ox-latex.el| 23 +
 lisp/ox-md.el   | 24 ++
 lisp/ox-odt.el  | 46 -
 lisp/ox.el  | 52 +++--
 testing/lisp/test-ox.el | 62 +
 9 files changed, 191 insertions(+), 85 deletions(-)

diff --git a/etc/styles/OrgOdtStyles.xml b/etc/styles/OrgOdtStyles.xml
index f41d984..a164335 100644
--- a/etc/styles/OrgOdtStyles.xml
+++ b/etc/styles/OrgOdtStyles.xml
@@ -109,34 +109,53 @@
   /style:style
   style:style style:name=Heading_20_1 style:display-name=Heading 1 style:family=paragraph style:parent-style-name=Heading style:next-style-name=Text_20_body style:default-outline-level=1 style:class=text
style:text-properties fo:font-size=115% fo:font-weight=bold style:font-size-asian=115% style:font-weight-asian=bold style:font-size-complex=115% style:font-weight-complex=bold/
+   style:style style:name=Heading_20_1_unnumbered style:family=paragraph style:parent-style-name=Heading_20_1 style:list-style-name=
   /style:style
   style:style style:name=Heading_20_2 style:display-name=Heading 2 style:family=paragraph style:parent-style-name=Heading style:next-style-name=Text_20_body style:default-outline-level=2 style:class=text
style:text-properties fo:font-size=14pt fo:font-style=italic fo:font-weight=bold style:font-size-asian=14pt style:font-style-asian=italic style:font-weight-asian=bold style:font-size-complex=14pt style:font-style-complex=italic style:font-weight-complex=bold/
   /style:style
+style:style style:name=Heading_20_2_unnumbered style:family=paragraph style:parent-style-name=Heading_20_2 style:list-style-name=
+  /style:style
   style:style style:name=Heading_20_3 style:display-name=Heading 3 style:family=paragraph style:parent-style-name=Heading style:next-style-name=Text_20_body style:default-outline-level=3 style:class=text
style:text-properties fo:font-size=14pt fo:font-weight=bold style:font-size-asian=14pt style:font-weight-asian=bold style:font-size-complex=14pt style:font-weight-complex=bold/
   /style:style
+style:style style:name=Heading_20_3_unnumbered style:family=paragraph style:parent-style-name=Heading_20_3 style:list-style-name=
+  /style:style
   style:style style:name=Heading_20_4 style:display-name=Heading 4 style:family=paragraph style:parent-style-name=Heading style:next-style-name=Text_20_body style:default-outline-level=4 style:class=text
style:text-properties fo:font-size=85% fo:font-style=italic fo:font-weight=bold style:font-size-asian=85% style:font-style-asian=italic style:font-weight-asian=bold style:font-size-complex=85% style:font-style-complex=italic style:font-weight-complex=bold/
   /style:style
+style:style 

Re: [O] Export dispatcher interface change

2014-10-03 Thread Nicolas Goaziou
Hello,

Jacek Generowicz jacek.generow...@cern.ch writes:

 I am used to the export dispatcher offering sections for export to HTML
 [h] and LaTeX [l].

 After having upgraded a number of things on my system (including a small
 bump of Emacs, but NOT (to my knowledge) org mode), the dispatcher no
 longer offers the [h] and [l] options ... until I invoke one of the
 commands via M-x. In other words,

 M-x org-html-export-to-html

 causes the [h] section to be available in the dispatcher thereafter.

 Any ideas what might have caused this change, or what I might do to have
 the [h] and [l] dispatcher options be available automatically?

Only loaded export back-ends appear in the dispatcher. See

  (info (org) Export back-ends)

You can either customize  `org-export-backends' or simply (require
'ox-html) in your config.

However, both latex and html back-ends are expected to be loaded by
default. Thus, there may be something going on with your installation or
configuration.


Regards,

-- 
Nicolas Goaziou



[O] Help on org-export-filter-link-functions

2014-10-03 Thread Daimrod
Hi,

I've wrote a simple filter to customize how links are exported in
latex:
#+BEGIN_SRC
(defun dmd--latex-bib-link-filter (data backend info)
  Convert a bib link to a citation (e.g. bib:foo93 - \cite{foo93}).
  (let* ((beg (next-property-change 0 data))
 (link (if beg (get-text-property beg :parent data
(cond ((and link
(org-export-derived-backend-p backend 'latex)
(string= (org-element-property :type link) bib))
   (format \\cite{%s} (org-element-property :path link)))
  ((and link
(org-export-derived-backend-p backend 'latex)
(string= (org-element-property :type link) file)
(string= (org-element-property :path link) ~/.bib.bib))
   (format \\cite{%s} (org-element-property :search-option link)))
  (t data
#+END_SRC

And I was wondering whether there is an easier way to retrieve the org
properties stored in the text properties of DATA.

Best,

-- 
Daimrod/Greg


signature.asc
Description: PGP signature


Re: [O] Export dispatcher interface change

2014-10-03 Thread Jacek Generowicz

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

 Only loaded export back-ends appear in the dispatcher. See

   (info (org) Export back-ends)

 You can either customize  `org-export-backends' or simply (require
 'ox-html) in your config.

 However, both latex and html back-ends are expected to be loaded by
 default. Thus, there may be something going on with your installation or
 configuration.

Yes, it looks like something fishy is going on: At startup the value of
`org-export-backends' is

   (ascii html icalendar latex)

but the dispatcher doesn't show them. (require 'ox-html) is enough to
make [h] appear in the dispatcher. (Which is good enough for me for now,
given the time I have available to fix it.)

Thanks for your suggestion.



Re: [O] A question on org-element-headline-interperter

2014-10-03 Thread Marcin Borkowski

On 2014-10-03, at 09:08, Thorsten Jolitz wrote:

 Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 What is my misconception here?

 as I learned myself from Nicolas recently, these are internal functions,
 the API function for interpreting is 

 ,[ C-h f org-element-interpret-data RET ]
 | org-element-interpret-data is an autoloaded compiled Lisp function in
 | `org-element.el'.
 | 
 | (org-element-interpret-data DATA optional PSEUDO-OBJECTS)
 | 
 | Interpret DATA as Org syntax.
 | 
 | DATA is a parse tree, an element, an object or a secondary string
 | to interpret.
 | 
 | Optional argument PSEUDO-OBJECTS is a list of symbols defining
 | new types that should be treated as objects.  An unknown type not
 | belonging to this list is seen as a pseudo-element instead.  Both
 | pseudo-objects and pseudo-elements are transparent entities, i.e.
 | only their contents are interpreted.
 | 
 | Return Org syntax as a string.
 `

Thanks a lot, that fixes my problem!  Now I'll move on to the next
one;-).  (I don't have it yet, but I'm sure I'll invent something.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Export dispatcher interface change

2014-10-03 Thread Charles Millar
In case it helps to track the bug, I reported this to the list a week or 
two ago. See my message of 9/24 and the subsequent messages of how M-x 
org-export-html, etc added to the export dsipatcher


Charlie Millar

Jacek Generowicz wrote:

Hello,

I am used to the export dispatcher offering sections for export to HTML
[h] and LaTeX [l].

After having upgraded a number of things on my system (including a small
bump of Emacs, but NOT (to my knowledge) org mode), the dispatcher no
longer offers the [h] and [l] options ... until I invoke one of the
commands via M-x. In other words,

 M-x org-html-export-to-html

causes the [h] section to be available in the dispatcher thereafter.

Any ideas what might have caused this change, or what I might do to have
the [h] and [l] dispatcher options be available automatically?

My versions:

   (emacs-version)
   GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2)
of 2014-09-08 on binet, modified by Debian
   
   (org-version)

   8.2

Thanks.





---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com




Re: [O] Export dispatcher interface change

2014-10-03 Thread Charles Millar

Charles Millar wrote:
In case it helps to track the bug, I reported this to the list a week 
or two ago. See my message of 9/24 and the subsequent messages of how 
M-x org-export-html, etc added to the export dsipatcher


Charlie Millar

My apologies to Brady Trainor and Charles Berry - I neglected to mention 
that they attempted to assist me.


Charlie Millar

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com




[O] Poor man's Org time-tracking on Android

2014-10-03 Thread Christoph LANGE

Dear Org community,

I thought I'd let you know how I clock my Org tasks while I'm on the 
move.  In a really poor man's way, without MobileOrg.


http://langec.wordpress.com/2014/10/03/poor-mans-org-mode-time-logging/

Cheers,

Christoph

--
Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.com/about, Skype duke4701



Re: [O] Suggestion, ox-latex: Perhaps a line break should be inserted into low-level headlines

2014-10-03 Thread Anders Johansson

Nicolas Goaziou writes:

Hello,

Anders Johansson mejlaande...@gmail.com writes:


Currently low-level headlines in latex export to:

\item HEADLINE-TEXT
\label{sec-1-3}
CONTENTS

Not really. Export respects blank lines between the headline an its
contents. So

   * Headline

 Contents

will be exported as

   \item Headline
   \label{whatever}

   Contents


This makes the headline text and contents go together in the same line
with just a space in between. I think there should be a line break or
paragraph break between them.

I don't think is should be mandatory.

   * Low-level-headline ---
 Some conents

is meant to be inserted on the same line.


Regards,


Hi,
I see. This just didn't really fit with my use-case. I seldom decide 
before what will be considered low-level headlines and make them 
special. For my large generated documents I'll hack something together 
then.


I guess that even if it's not mandatory it could always be an option :-)

Cheers,



[O] agenda time grid -- default time slot lines

2014-10-03 Thread hymie!
Greetings.  I have two questions about the default time slots in the Agenda.

First question

When I open the Agenda Day View, I get a bunch of blank lines at the
default times 8am, 10am, 12noon, 2pm, 4pm, and so on.

Friday  3 October 2014
   8:00.. 
   8:50.. now - - - - - - - - - - - - - - - - - - - - - - - - -
  10:00.. 
  12:00.. 
  14:00.. 
  16:00.. 
  18:00.. 
  20:00.. 

Then I did a few tasks, so my agenda for today looks like this:

Friday  3 October 2014
   8:00.. 
  tasks:   8:45- 9:10 Clocked:   (0:25) first attempt failed
  tasks:   9:10- 9:45 Clocked:   (0:35) troubleshoot
  tasks:   9:45-10:45 Clocked:   (1:00) restore image
  10:00.. 
  tasks:  10:45-11:25 Clocked:   (0:40) second attempt
  12:00.. 
  13:20.. now - - - - - - - - - - - - - - - - - - - - - - - - -
  14:00.. 

Is there a way that I can suppress the 10:00 line in this case?

None of the org-agenda- variables that I found seemed to do this.

Second question

My Agenda for a-week-from-next-Tuesday looks like this:

Tuesday14 October 2014
   8:00.. 
  10:00.. 
  12:00.. 
  tasks:  14:00-15:00 IT-Security meeting
  14:00.. 
  16:00.. 

Assuming that I cannot suppress the 14:00 line in this case ...
shouldn't the task line be **below** the 14:00 line?  I can force
it by changing the meeting time from 14:00 to 14:01, but it seems like
this is the wrong way to list them.  The meeting is not between 12:00
and 14:00.  It's between 14:00 and 16:00.

Thanks.

--EbH




Re: [O] Adding new table rows/cols in a formula update

2014-10-03 Thread Dima Kogan
Nick Dokos ndo...@gmail.com writes:

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

 Does it need sanity checking? A typo in a formula can create billions
 and billions[fn:1] of columns inadvertently.

Sure. Updated patch attached.

From 06f09e58a0f8b62429dda2faa913e297218b67b2 Mon Sep 17 00:00:00 2001
From: Dima Kogan d...@secretsauce.net
Date: Tue, 30 Sep 2014 22:36:21 -0700
Subject: [PATCH] org-table.el: field formulas can now create columns as needed

(org-table-recalculate): use the new org-table-formula-make-new-cols
customization to control whether org creates new columns when a
formula explicitly targets them

TINYCHANGE
---
 lisp/org-table.el | 35 ---
 1 file changed, 32 insertions(+), 3 deletions(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 7607ead..14c68d6 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -354,6 +354,18 @@ portability of tables.
 	  (const :tag Stick to hline nil)
 	  (const :tag Error on attempt to cross error)))
 
+(defcustom org-table-formula-create-columns nil
+  Non-nil means that evaluation of a field formula can add new
+columns if an out-of-bounds field is being set.
+  :group 'org-table-calculation
+  :version 24.5
+  :package-version '(Org . 8.3)
+  :type '(choice
+	  (const :tag Setting an out-of-bounds field generates an error (default) nil)
+	  (const :tag Setting an out-of-bounds field silently adds columns as needed t)
+	  (const :tag Setting an out-of-bounds field adds columns as needed, but issues a warning message warn)
+	  (const :tag When setting an out-of-bounds field, the user is prompted prompt)))
+
 (defgroup org-table-import-export nil
   Options concerning table import and export in Org-mode.
   :tag Org Table Import Export
@@ -3125,9 +3137,26 @@ known that the table will be realigned a little later anyway.
   (while (setq eq (pop eqlname1))
 	(message Re-applying formula to field: %s (car eq))
 	(org-goto-line (nth 1 eq))
-	(org-table-goto-column (nth 2 eq))
-	(org-table-eval-formula nil (nth 3 eq) 'noalign 'nocst
-'nostore 'noanalysis))
+	(let ((column-target (nth 2 eq)))
+	  (when ( column-target 1000)
+	(user-error Formula column target too large))
+	  (let* ((column-count (progn (end-of-line)
+  (1- (org-table-current-column
+		 (create-new-column
+		  (and ( column-target column-count)
+		   (or (eq org-table-formula-create-columns t)
+			   (and
+			(eq org-table-formula-create-columns 'warn)
+			(progn
+			  (org-display-warning Out-of-bounds formula added columns)
+			  t))
+			   (and
+			(eq org-table-formula-create-columns 'prompt)
+			(yes-or-no-p Out-of-bounds formula. Add columns?))
+	(org-table-goto-column column-target nil create-new-column))
+
+	  (org-table-eval-formula nil (nth 3 eq) 'noalign 'nocst
+  'nostore 'noanalysis)))
 
   (org-goto-line thisline)
   (org-table-goto-column thiscol)
-- 
2.0.0



Re: [O] Suggestion, ox-latex: Perhaps a line break should be inserted into low-level headlines

2014-10-03 Thread Nicolas Goaziou
Anders Johansson mejlaande...@gmail.com writes:

 I see. This just didn't really fit with my use-case. I seldom decide
 before what will be considered low-level headlines and make them
 special. For my large generated documents I'll hack something
 together then.

You don't have to decide anything. Just put a blank line just after
headline (or planning info) every time.


Regards,



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

2014-10-03 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Now odt output doesn't look ugly.  I fixed the other things you
 mentioned.  Make test passes.

Applied. Thank you very much.

Now, some documentation would be nice.


Regards,

-- 
Nicolas Goaziou



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

2014-10-03 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Rasmus ras...@gmx.us writes:

 Now odt output doesn't look ugly.  I fixed the other things you
 mentioned.  Make test passes.

 Applied. Thank you very much.

Thanks.  Bastien added my key to org-git today, so hopefully you'll be
spared of this in the future.

 Now, some documentation would be nice.

Yeah.  I wans't sure where to put it.

There's

7. Properties and Columns: Storing information about an entry

But this doesn't seem export specific.  E.g.  CUSTOMID is not in the
sec. 7.2 table.

Then there's 12. Exporting, where I guess the closest fitting section
is 12.3 Export settings.

Any opinions? 

—Rasmus

-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio



[O] real-time image rendering

2014-10-03 Thread Doyley, Marvin M.
Dear All,

I am currently using Org mode as a teaching tool for a course that I am 
teaching this semester. I would like to run some python simulations in class 
and save the results to a file. I would like to show the results in real time 
as I change various parameters.  I am using iimage-mode to display images. The 
only snag is that I have to toggle iimage-mode on and off to see the changes. 
Is there away to get iimage-mode to render in real time

thanks
M

Sent from my iPad


Re: [O] real-time image rendering

2014-10-03 Thread Grant Rettke
Sorry for not discussing further:

https://stackoverflow.com/questions/17621495/emacs-org-display-inline-images

On Fri, Oct 3, 2014 at 5:12 PM, Doyley, Marvin M.
mdoy...@ur.rochester.edu wrote:
 Dear All,

 I am currently using Org mode as a teaching tool for a course that I am 
 teaching this semester. I would like to run some python simulations in class 
 and save the results to a file. I would like to show the results in real time 
 as I change various parameters.  I am using iimage-mode to display images. 
 The only snag is that I have to toggle iimage-mode on and off to see the 
 changes. Is there away to get iimage-mode to render in real time

 thanks
 M

 Sent from my iPad



-- 
Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] ob-clojure.el (org-babel for Clojure)

2014-10-03 Thread Daniel Szmulewicz
Daniel Szmulewicz daniel.szmulewicz at gmail.com writes:

 
 Thorsten Jolitz tjolitz at gmail.com writes:
 
  Did you try other :results types like 
  
  ,
  | #+BEGIN_SRC clojure :results raw
  `
  
 
 Yes, thank you. I tried various switches for the results argument, 
 and the result was the same: 
 
 Code block produced no output.
 
 I also wanted to rule out a version mismatch, so I tried in org-mode 
 from the main branch, and the result was the same: 
 
 Code block produced no output.
 
 Things are moving fast with Cider, maybe an API that ob-clojure.el was 
 relying upon underwent a breaking change?.
 
 
Just to confirm that it's a API change that broke ob-clojure.el for cider. 
Also, the cider maintainer suggests to remove the nrepl back-end, 
as it has merged into cider.
I'll be happy to submit a patch to fix ob-clojure.el, 
but I'm not sure how to proceed. 
Pointers welcome.







Re: [O] real-time image rendering

2014-10-03 Thread Doyley, Marvin M.
Thanks
Cheers,
M

Sent from my iPad

 On Oct 3, 2014, at 7:29 PM, Grant Rettke g...@wisdomandwonder.com wrote:
 
 Sorry for not discussing further:
 
 https://urldefense.proofpoint.com/v1/url?u=https://stackoverflow.com/questions/17621495/emacs-org-display-inline-imagesk=p4Ly7qpEBiYPBVenR9G2iQ%3D%3D%0Ar=Fwb4ac3v7AhcQoTcqa9wemihF49yp0vUvrJ%2BiX5Re4w%3D%0Am=Z1cxylKq%2BcxQlQYWByza7usVlHiUrctSCJZH%2BrYsd2c%3D%0As=be48c9d91e056d8bd6c1d1087998c148178cd7448476c9cc4260be57508f602b
 
 On Fri, Oct 3, 2014 at 5:12 PM, Doyley, Marvin M.
 mdoy...@ur.rochester.edu wrote:
 Dear All,
 
 I am currently using Org mode as a teaching tool for a course that I am 
 teaching this semester. I would like to run some python simulations in class 
 and save the results to a file. I would like to show the results in real 
 time as I change various parameters.  I am using iimage-mode to display 
 images. The only snag is that I have to toggle iimage-mode on and off to see 
 the changes. Is there away to get iimage-mode to render in real time
 
 thanks
 M
 
 Sent from my iPad
 
 
 
 -- 
 Grant Rettke
 g...@wisdomandwonder.com | 
 https://urldefense.proofpoint.com/v1/url?u=http://www.wisdomandwonder.com/k=p4Ly7qpEBiYPBVenR9G2iQ%3D%3D%0Ar=Fwb4ac3v7AhcQoTcqa9wemihF49yp0vUvrJ%2BiX5Re4w%3D%0Am=Z1cxylKq%2BcxQlQYWByza7usVlHiUrctSCJZH%2BrYsd2c%3D%0As=2ffec8f094fdc2745d8be47418e74b09f151f07ccb55412fafda2a0d19534ac5
 “Wisdom begins in wonder.” --Socrates
 ((λ (x) (x x)) (λ (x) (x x)))
 “Life has become immeasurably better since I have been forced to stop
 taking it seriously.” --Thompson



Re: [O] ob-clojure.el (org-babel for Clojure)

2014-10-03 Thread Thorsten Jolitz
Daniel Szmulewicz daniel.szmulew...@gmail.com writes:

 Daniel Szmulewicz daniel.szmulewicz at gmail.com writes:

 
 Thorsten Jolitz tjolitz at gmail.com writes:
 
  Did you try other :results types like 
  
  ,
  | #+BEGIN_SRC clojure :results raw
  `
  
 
 Yes, thank you. I tried various switches for the results argument, 
 and the result was the same: 
 
 Code block produced no output.
 
 I also wanted to rule out a version mismatch, so I tried in org-mode 
 from the main branch, and the result was the same: 
 
 Code block produced no output.
 
 Things are moving fast with Cider, maybe an API that ob-clojure.el was 
 relying upon underwent a breaking change?.
 
 
 Just to confirm that it's a API change that broke ob-clojure.el for cider. 
 Also, the cider maintainer suggests to remove the nrepl back-end, 
 as it has merged into cider.
 I'll be happy to submit a patch to fix ob-clojure.el, 
 but I'm not sure how to proceed. 
 Pointers welcome.

try this

,
| http://orgmode.org/worg/org-contribute.html
`

-- 
cheers,
Thorsten




Re: [O] real-time image rendering

2014-10-03 Thread Doyley, Marvin M.
This works better
 (add-hook 'org-babel-after-execute-hook
  'org-display-inline-images)

https://www.mail-archive.com/emacs-orgmode@gnu.org/msg88358.html
thanks
m
On Oct 3, 2014, at 7:29 PM, Grant Rettke g...@wisdomandwonder.com wrote:

 Sorry for not discussing further:
 
 https://urldefense.proofpoint.com/v1/url?u=https://stackoverflow.com/questions/17621495/emacs-org-display-inline-imagesk=p4Ly7qpEBiYPBVenR9G2iQ%3D%3D%0Ar=Fwb4ac3v7AhcQoTcqa9wemihF49yp0vUvrJ%2BiX5Re4w%3D%0Am=Z1cxylKq%2BcxQlQYWByza7usVlHiUrctSCJZH%2BrYsd2c%3D%0As=be48c9d91e056d8bd6c1d1087998c148178cd7448476c9cc4260be57508f602b
 
 On Fri, Oct 3, 2014 at 5:12 PM, Doyley, Marvin M.
 mdoy...@ur.rochester.edu wrote:
 Dear All,
 
 I am currently using Org mode as a teaching tool for a course that I am 
 teaching this semester. I would like to run some python simulations in class 
 and save the results to a file. I would like to show the results in real 
 time as I change various parameters.  I am using iimage-mode to display 
 images. The only snag is that I have to toggle iimage-mode on and off to see 
 the changes. Is there away to get iimage-mode to render in real time
 
 thanks
 M
 
 Sent from my iPad
 
 
 
 -- 
 Grant Rettke
 g...@wisdomandwonder.com | 
 https://urldefense.proofpoint.com/v1/url?u=http://www.wisdomandwonder.com/k=p4Ly7qpEBiYPBVenR9G2iQ%3D%3D%0Ar=Fwb4ac3v7AhcQoTcqa9wemihF49yp0vUvrJ%2BiX5Re4w%3D%0Am=Z1cxylKq%2BcxQlQYWByza7usVlHiUrctSCJZH%2BrYsd2c%3D%0As=2ffec8f094fdc2745d8be47418e74b09f151f07ccb55412fafda2a0d19534ac5
 “Wisdom begins in wonder.” --Socrates
 ((λ (x) (x x)) (λ (x) (x x)))
 “Life has become immeasurably better since I have been forced to stop
 taking it seriously.” --Thompson



Re: [O] [ox-latex] How to force ALL captions below their referents?

2014-10-03 Thread James Harkins
On Thu, 02 Oct 2014 18:54:20 +0200
Nicolas Goaziou m...@nicolasgoaziou.fr wrote:

 You mean moving `org-latex-table-caption-above' to
 `org-latex-caption-above' and making sure every block complies to the
 variable?

Sorry for the late reply. I wasn't feeling quite well yesterday.

Something like that would do it, I think. I hesitate about breaking
backward compatibility, but at the same time, I'm hard-pressed to
imagine why one would want captions to be differently placed in the
same document.

I suppose, if somebody needs to move a caption to the top or bottom
overriding the default, it could be an attribute, hypothetically:

#+name: blah
#+caption: blah blah
#+attr_latex: :captionpos t
#+begin_figure
...
#+end_figure

t would put it at the top, :captionpos b at the bottom and
:captionpos nil (or not specified) would use the default from the
configuration variable.

Reasonable?
hjh