Re: [O] beamer export org 8.0.2

2014-02-15 Thread Eric S Fraga
Mohamed mohamed.hi...@gmail.com writes:

 Dear All,
 I have a problem with beamer export.
 (Org-mode version 8.0.2 (8.0.2-dist @ /home/user/.emacs.d/elpa/org-20140127/)
 when trying to export a small file I got the following message:

There's really not enough information here to figure out what has gone
wrong.  Can you post a small example org file that leads to this error?
Can you also try without any of your own customisations, if any?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.2, Org release_8.2.5h-608-g27a978



Re: [O] Graph not hierarchical?

2014-02-15 Thread Eric S Fraga
Lawrence Bottorff borg...@gmail.com writes:

 Is there any way to have org mode simulate a graph structure rather than
 always a (folding) hierarchy? 

Sure: you could superimpose a graph structure using headline
properties.  You could define CHILDREN, PARENT, NODES, NEXT, PREVIOUS,
... types of properties entries and write emacs lisp code to process
these.  Not sure what you want to do accomplish in the end, mind you...

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.2, Org release_8.2.5h-608-g27a978




Re: [O] beamer export org 8.0.2

2014-02-15 Thread Achim Gratz
Mohamed writes:
 I have a problem with beamer export.
 (Org-mode version 8.0.2 (8.0.2-dist @ /home/user/.emacs.d/elpa/org-20140127/)

You have a problem with your installation.  You are apparently running a
mixed installation between Org from a tarball and Org ELPA.  Fix that
first, please, then try Beamer export again.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] beamer export org 8.0.2

2014-02-15 Thread Mohamed
Achim Gratz Stromeko at nexgo.de writes:

 
 Mohamed writes:
  I have a problem with beamer export.
  (Org-mode version 8.0.2 (8.0.2-dist  at 
/home/user/.emacs.d/elpa/org-20140127/)
 
 You have a problem with your installation.  You are apparently running a
 mixed installation between Org from a tarball and Org ELPA.  Fix that
 first, please, then try Beamer export again.
 
 Regards,
 Achim.


Thank you for the answers,
It was fixed by customizing org-export-backends. I added beamer but it
didn't work the first time I evaluated the expression within the session. I
had to start a ne emacs session.
Regards,
Mohamed







[O] simple way to call `C-c a v' or a way to bind it to a key?

2014-02-15 Thread Yasushi SHOJI
Hello,

These days I hit `C-c a v' many many times a day, and now feel that
the three key combination is too much. I'd like to improve the
situation by binding the same functionality to a key, say, F12, if
possible.

Looking at the `org-agenda' dispatch code, there are quite a few lines
before calling `org-agenda-list'.  Simply binding `org-agenda-list' to
a key does not seem to work.

Is there a simple way to do it?  Or do I have to re-implement my own
function?

Thanks in advance,
-- 
  yashi



[O] parser: verbatim or code?

2014-02-15 Thread Yasushi SHOJI
Hello,

While writing a new exporter I've noticed that `=' is actually for
verbatim and `~' is for code emphasis despite the fact that the
current org manual says:

You can make words *bold*, /italic/, _underlined_, =code= and
~verbatim~

Is this documentation bug?

regards,
-- 
yashi



Re: [O] parser: verbatim or code?

2014-02-15 Thread Nick Dokos
Yasushi SHOJI ya...@atmark-techno.com writes:

 Hello,

 While writing a new exporter I've noticed that `=' is actually for
 verbatim and `~' is for code emphasis despite the fact that the
 current org manual says:

   You can make words *bold*, /italic/, _underlined_, =code= and
   ~verbatim~

 Is this documentation bug?


I think it's a code bug: ~verbatim~ is the precedent-setting latex
convention.

However fixing it might break existing documents (although in many
instances code and verbatim are treated equivalently, so that might
not be much of a problem).

-- 
Nick




[O] Sub-totals

2014-02-15 Thread Cecil Westerhof
At the moment I have the folowing:
|--+--+-|
| activity | Time | sub |
|--+--+-|
| Activity A   |3 | |
| Activity B   |5 | |
| Activity C   |2 | |
| Activity D   |7 | |
| Activity E   |8 | |
| Activity F   |   12 | |
|--+--+-|
| Activity 1   |9 | |
| Activity 2   |2 | |
| Activity 3   |4 | |
| Activity 4   |3 | |
|--+--+-|
| Activity I   |   23 | |
| Activity II  |   51 | |
| Activity III |   37 | |
|--+--+-|
|  |  163 | |
|--+--+-|
#+TBLFM: @$2=vsum(@3..@-1)


But I want the following:
|--+--+-|
| activity | Time | sub |
|--+--+-|
| Activity A   |3 | |
| Activity B   |5 | |
| Activity C   |2 | |
| Activity D   |7 | |
| Activity E   |8 | |
| Activity F   |   12 |  34 |
|--+--+-|
| Activity 1   |9 | |
| Activity 2   |2 | |
| Activity 3   |4 | |
| Activity 4   |3 |  18 |
|--+--+-|
| Activity I   |   23 | |
| Activity II  |   51 | |
| Activity III |   37 | 111 |
|--+--+-|
|  |  163 | |
|--+--+-|
#+TBLFM: @$2=vsum(@3..@-1)

Subtotals from every range is calculated. Preferable from second to second
last, so it goes OK when a range is added.

Is this possible?

-- 
Cecil Westerhof


Re: [O] simple way to call `C-c a v' or a way to bind it to a key?

2014-02-15 Thread Thorsten Jolitz
Yasushi SHOJI ya...@atmark-techno.com writes:

 Hello,

 These days I hit `C-c a v' many many times a day, and now feel that
 the three key combination is too much. I'd like to improve the
 situation by binding the same functionality to a key, say, F12, if
 possible.

 Looking at the `org-agenda' dispatch code, there are quite a few lines
 before calling `org-agenda-list'.  Simply binding `org-agenda-list' to
 a key does not seem to work.

 Is there a simple way to do it?  Or do I have to re-implement my own
 function?

 Thanks in advance,

instead of:

   ,-
   | (global-set-key \C-ca 'org-agenda)
   `-

use:

   ,---
   | (global-set-key (kbd f12) 'org-agenda)
   `---

-- 
cheers,
Thorsten




Re: [O] Sub-totals

2014-02-15 Thread Michael Brand
Hi Cecil

What about this?:

|--+--+-|
| activity | Time | sub |
|--+--+-|
| Activity A   |3 | |
|--+--+-|
| Activity B   |5 |  34 |
| Activity C   |2 |  34 |
| Activity D   |7 |  34 |
| Activity E   |8 |  34 |
| Activity F   |   12 |  34 |
|--+--+-|
| Activity 1   |9 |  18 |
| Activity 2   |2 |  18 |
| Activity 3   |4 |  18 |
| Activity 4   |3 |  18 |
|--+--+-|
| Activity I   |   23 | 111 |
| Activity II  |   51 | 111 |
| Activity III |   37 | 111 |
|--+--+-|
|  |  163 | |
|--+--+-|
#+TBLFM: @$2 = vsum(@..@) :: @$3..@$3 = vsum(@-I$2..@+I$2)

Michael



Re: [O] Graph not hierarchical?

2014-02-15 Thread Lawrence Bottorff
Org mode seems to lack data extraction/insertion. There's agenda view, but
that's just one method. Obviously, you could use things like grep or other
command-line Unix utilities, but being able to organize and extract based
on your stuff being stored graph-aware would be nice, IMHO. Being able to
traverse a graph data structure and do an add or read or whatever would be
great, IHMO. You'd have the benefits of a database with all the good stuff
about org mode retained.


On Sat, Feb 15, 2014 at 4:44 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 Lawrence Bottorff borg...@gmail.com writes:

  Is there any way to have org mode simulate a graph structure rather than
  always a (folding) hierarchy?

 Sure: you could superimpose a graph structure using headline
 properties.  You could define CHILDREN, PARENT, NODES, NEXT, PREVIOUS,
 ... types of properties entries and write emacs lisp code to process
 these.  Not sure what you want to do accomplish in the end, mind you...

 --
 : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.2, Org
 release_8.2.5h-608-g27a978



Re: [O] simple way to call `C-c a v' or a way to bind it to a key?

2014-02-15 Thread Yasushi SHOJI
Hi,

On Feb 15, 2014 11:38 PM, Thorsten Jolitz tjol...@gmail.com wrote:

,---
| (global-set-key (kbd f12) 'org-agenda)
`---

Thanks, but that's still two keys away. I want a single key to call the
function.

Regards,
-- 
yashi


Re: [O] Sub-totals

2014-02-15 Thread Cecil Westerhof
2014-02-15 16:19 GMT+01:00 Michael Brand michael.ch.br...@gmail.com:

 What about this?:

 |--+--+-|
 | activity | Time | sub |
 |--+--+-|
 | Activity A   |3 | |
 |--+--+-|
 | Activity B   |5 |  34 |
 | Activity C   |2 |  34 |
 | Activity D   |7 |  34 |
 | Activity E   |8 |  34 |
 | Activity F   |   12 |  34 |
 |--+--+-|
 | Activity 1   |9 |  18 |
 | Activity 2   |2 |  18 |
 | Activity 3   |4 |  18 |
 | Activity 4   |3 |  18 |
 |--+--+-|
 | Activity I   |   23 | 111 |
 | Activity II  |   51 | 111 |
 | Activity III |   37 | 111 |
 |--+--+-|
 |  |  163 | |
 |--+--+-|
 #+TBLFM: @$2 = vsum(@..@) :: @$3..@$3 = vsum(@-I$2..@+I$2)


It is certainly a big step in the right direction. I have to study it to
understand what it does. (You also changed the part I already had. I have
to look to see why that is better.)

There are a few problems with it:
- As your example shows, the first element is not filled and when the
first range only has one element ...
- I would like to have only the last element of the range filled.

But it is certainly helpful: thanks.

-- 
Cecil Westerhof


Re: [O] Sub-totals

2014-02-15 Thread Cecil Westerhof
2014-02-15 18:14 GMT+01:00 Cecil Westerhof cldwester...@gmail.com:

 2014-02-15 16:19 GMT+01:00 Michael Brand michael.ch.br...@gmail.com:

 What about this?:

 |--+--+-|
 | activity | Time | sub |
 |--+--+-|
 | Activity A   |3 | |
 |--+--+-|
 | Activity B   |5 |  34 |
 | Activity C   |2 |  34 |
 | Activity D   |7 |  34 |
 | Activity E   |8 |  34 |
 | Activity F   |   12 |  34 |
 |--+--+-|
 | Activity 1   |9 |  18 |
 | Activity 2   |2 |  18 |
 | Activity 3   |4 |  18 |
 | Activity 4   |3 |  18 |
 |--+--+-|
 | Activity I   |   23 | 111 |
 | Activity II  |   51 | 111 |
 | Activity III |   37 | 111 |
 |--+--+-|
 |  |  163 | |
 |--+--+-|
 #+TBLFM: @$2 = vsum(@..@) :: @$3..@$3 = vsum(@-I$2..@+I$2)


 It is certainly a big step in the right direction. I have to study it to
 understand what it does. (You also changed the part I already had. I have
 to look to see why that is better.)

 There are a few problems with it:
 - As your example shows, the first element is not filled and when the
 first range only has one element ...
 - I would like to have only the last element of the range filled.

 But it is certainly helpful: thanks.


When looking better I saw there was a nasty bug. The following works and
gets rid of the first 'problem':
|--+--+-|
| activity | Time | sub |
|--+--+-|
| Activity A   |3 |   3 |
|--+--+-|
| Activity B   |5 |  34 |
| Activity C   |2 |  34 |
| Activity D   |7 |  34 |
| Activity E   |8 |  34 |
| Activity F   |   12 |  34 |
|--+--+-|
| Activity 1   |9 |  18 |
| Activity 2   |2 |  18 |
| Activity 3   |4 |  18 |
| Activity 4   |3 |  18 |
|--+--+-|
| Activity I   |   23 | 111 |
| Activity II  |   51 | 111 |
| Activity III |   37 | 111 |
|--+--+-|
|  |  166 | |
|--+--+-|
#+TBLFM: @$2 = vsum(@..@) :: @$3..@$3 = vsum(@-I$2..@+I$2)




-- 
Cecil Westerhof


Re: [O] simple way to call `C-c a v' or a way to bind it to a key?

2014-02-15 Thread Thorsten Jolitz
Yasushi SHOJI ya...@atmark-techno.com writes:

 Hi,

 On Feb 15, 2014 11:38 PM, Thorsten Jolitz tjol...@gmail.com wrote:

 ,---
 | (global-set-key (kbd f12) 'org-agenda)
 `---

 Thanks, but that's still two keys away. I want a single key to call
 the function.

`org-agenda' is just a dispatcher function, 'C-h f org-agenda' shows you
the specific functions you select with the second key, e.g.:

,-
| a Call `org-agenda-list' to display the agenda for current day or week.
| t Call `org-todo-list' to display the global todo list.
| T Call `org-todo-list' to display the global todo list, select only
|   entries with a specific TODO keyword (the user gets a prompt).
| m Call `org-tags-view' to display headlines with tags matching
|   a condition  (the user is prompted for the condition).
| 
| More commands can be added by configuring the variable
| `org-agenda-custom-commands'.  In particular, specific tags and TODO keyword
| searches can be pre-defined in this way.
`-

so instead of binding the dispatcher function to a global key you can
bind one or more of the specific functions, e.g.

,
| (global-set-key (kbd f12) 'org-agenda-list)
`

-- 
cheers,
Thorsten




[O] [patch] Support CUSTOM_ID property in latex export

2014-02-15 Thread Richard Lawrence
From 81115d0884c165778520aa1b4d4fa83580417e1c Mon Sep 17 00:00:00 2001
From: Richard Lawrence richard.lawre...@berkeley.edu
Date: Sat, 15 Feb 2014 11:59:44 -0800
Subject: [PATCH] LaTeX export: support CUSTOM_ID property in section labels
 and link refs

* lisp/ox-latex.el (org-latex-headline): when exporting a headline, if
  it has a CUSTOM_ID property, use that value as the associated
  label for a section (or whatever)
(org-latex-link): when exporting a link, if the
  destination is a headline with a CUSTOM_ID property, use that value
  in the referencing command

Fixes an issue raised at: http://thread.gmane.org/gmane.emacs.orgmode/54039

TINYCHANGE
---
 lisp/ox-latex.el |   25 -
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 5815874..cbca0a5 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1372,11 +1372,14 @@ holding contextual information.
 	   (full-text (funcall org-latex-format-headline-function
 			   todo todo-type priority text tags))
 	   ;; Associate \label to the headline for internal links.
+	   ;; Use the value of :CUSTOM_ID: property as label if it is defined.
 	   (headline-label
-	(format \\label{sec-%s}\n
-		(mapconcat 'number-to-string
-			   (org-export-get-headline-number headline info)
-			   -)))
+	(let ((custom-label (org-element-property :CUSTOM_ID headline)))
+	  (if custom-label (format \\label{%s}\n custom-label)
+		(format \\label{sec-%s}\n
+			(mapconcat 'number-to-string
+   (org-export-get-headline-number headline info)
+   -)
 	   (pre-blanks
 	(make-string (org-element-property :pre-blank headline) 10)))
   (if (or (not section-fmt) (org-export-low-level-p headline info))
@@ -1846,11 +1849,15 @@ INFO is a plist holding contextual information.  See
 	  ;; title.
 	  (headline
 	   (let ((label
-		  (format sec-%s
-			  (mapconcat
-			   'number-to-string
-			   (org-export-get-headline-number destination info)
-			   -
+		  (or
+		   ;; Case 1: headline has a CUSTOM_ID property; use that as label
+		   (org-element-property :CUSTOM_ID destination)
+		   ;; Case 2: headline has no CUSTOM_ID; use default numbering 
+		   (format sec-%s
+			   (mapconcat
+			'number-to-string
+			(org-export-get-headline-number destination info)
+			-)
 	 (if (and (plist-get info :section-numbers) (not desc))
 		 (format \\ref{%s} label)
 	   (format \\hyperref[%s]{%s} label
-- 
1.7.10.4


Hi Orgsters,

Here is a patch to add support for using CUSTOM_ID properties for labels
and refs in the LaTeX exporter.

The patch uses the value of CUSTOM_ID when exporting a headline for the
associated \label, and when exporting a link for the associated \ref
command (or whatever).

For example, from this Org file:

===
* Headline 1
  :PROPERTIES:
  :CUSTOM_ID: sec:headline1
  :END:
  Links to headlines which have no CUSTOM_ID still work normally, like
  this one: [[Headline 2]].

* Headline 2
  Links to headlines which have a CUSTOM_ID property will use this
  value to refer to them:

  This link refers to Headline 1 using the builtin syntax for
  CUSTOM_ID: [[#sec:headline1]].

  This one uses the fuzzy search on the headline text: [[Headline 1]].
===

the relevant section is now exported as:

===
\section{Headline 1}
\label{sec:headline1}
Links to headlines which have no CUSTOM\(_{\text{ID}}\) still work normally, 
like
this one: \ref{sec-2}.
\section{Headline 2}
\label{sec-2}
Links to headlines which have a CUSTOM\(_{\text{ID}}\) property will use this
value to refer to them:

This link refers to Headline 1 using the builtin syntax for
CUSTOM\(_{\text{ID}}\): \ref{sec:headline1}.

This one uses the fuzzy search on the headline text: \ref{sec:headline1}.
===

Previously, the label for Headline 1 would have been \label{sec-1}, and
the links under Headline 2 would have been exported as \ref{sec-1}. 

This addresses an issue that was raised here, but got no response:
http://thread.gmane.org/gmane.emacs.orgmode/54039

I also need this behavior, which is why I wrote this.

Hope that's helpful!

Best,
Richard



Re: [O] Graph not hierarchical?

2014-02-15 Thread Eric S Fraga
Lawrence Bottorff borg...@gmail.com writes:

 Org mode seems to lack data extraction/insertion. 

Check out 

  http://orgmode.org/worg/dev/org-syntax.html

and maybe org-element.el in the org mode distribution you are using.

I've not tried the org element parser but others on this list have so
I'm sure you can get some advice from them.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.2, Org release_8.2.5h-633-gec0998



Re: [O] [patch] Support CUSTOM_ID property in latex export

2014-02-15 Thread Nicolas Goaziou
Hello,

Richard Lawrence richard.lawre...@berkeley.edu writes:

 Here is a patch to add support for using CUSTOM_ID properties for labels
 and refs in the LaTeX exporter.

Thank you for the patch. Though, I don't understand why it is needed.

 The patch uses the value of CUSTOM_ID when exporting a headline for the
 associated \label, and when exporting a link for the associated \ref
 command (or whatever).

[...]

 This addresses an issue that was raised here, but got no response:
 http://thread.gmane.org/gmane.emacs.orgmode/54039

The issue no longer applies since \label{custom-id} are not generated
anymore. Moreover, the bug is probably a misunderstanding of
`org-export-solidify-link-text' (actually, its 7.8 counterpart).

 I also need this behavior, which is why I wrote this.

Would you mind explaining your use case?

From a user's perspective, CUSTOM_ID allows an user to refer to
a particular headline with a specific internal link type. How this is
done internally is something different, which belong to the
implementation level.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch] Support CUSTOM_ID property in latex export

2014-02-15 Thread Richard Lawrence
Nicolas Goaziou n.goaz...@gmail.com writes:

 Richard Lawrence richard.lawre...@berkeley.edu writes:

 Here is a patch to add support for using CUSTOM_ID properties for labels
 and refs in the LaTeX exporter.

 Thank you for the patch. Though, I don't understand why it is needed.

 I also need this behavior, which is why I wrote this.

 Would you mind explaining your use case?

 From a user's perspective, CUSTOM_ID allows an user to refer to
 a particular headline with a specific internal link type. How this is
 done internally is something different, which belong to the
 implementation level.

Sure.  I apologize -- I should have said more about this in my previous
email than just referring to that old post.

I am presently using Org to write my dissertation, which I compile using
the LaTeX exporter.  This means I am writing long documents with
embedded LaTeX blocks.  (Maybe this is ill-advised, but it has worked
great so far!)

Basically, I want control over how the labeling is done in the exported
document for two reasons:

1) Sometimes I need to refer to a section from within an embedded LaTeX
block.  In that case, I need to know the appropriate label to use at the
LaTeX level, not just in Org.  For example:

* A headline
  :PROPERTIES:
  :CUSTOM_ID: sec:a-headline
  :END:

# ... stuff ...

#+BEGIN_LATEX
% ... more stuff ...
(see section~\ref{sec:a-headline})
#+END_LATEX

This is not possible with the present section labeling in LaTeX export,
because I have no way of forcing Org to use a particular label for a
section.

2) I hope this doesn't happen, but there may come a time when I need to
move away from Org and just use straight LaTeX.  Having control over the
labeling will make this transition much easier, because it means I won't
have to worry about manually changing the labels in a long document from
Org's default sec-... numbering to my own semantic labels.

Right now, I am at a risk of losing a lot of information if I have to
make this transition, because my CUSTOM_ID values don't have any effect
on the generated LaTeX.  Being able to set section labels as needed from
within Org would reduce this risk and therefore allow me to put this
transition off longer.

Another reason (not mine, but someone else might care) is:

3) This will make the LaTeX exporter's behavior more consistent with the
HTML exporter's behavior.  The HTML exporter will use CUSTOM_ID if it is
supplied to construct the id attributes of headlines and divs.  If
someone is relying on this behavior of the HTML exporter, they might be
unpleasantly surprised by the LaTeX exporter's behavior.

Does all that seem reasonable?
  
Best,
Richard