Re: [O] babel and postgresql

2013-02-24 Thread Bastien
Hi Daniel,

dmg d...@uvic.ca writes:

 It looks like my inexperience with Lisp made me ignore the obvious.
 What is needed is not my patch below, but to add posgresql to the
 condition of the case:

 From:
   (case (intern engine)
 ('mysql


 To:

   (case (intern engine)
 ('(postgresql mysql)

 the problem is that I can't get it to work (and I could not find good
 documentation for the case macro anywhere but its definition. It says
 that it takes either an atom (i.e. 'mysql)
 or a list (i.e. '(postgresql mysql) ) but it just does not work me.

I applied this patch, which should do the right thing given your
explanations:

  http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=f8e874

Let me know.  Thanks!

-- 
 Bastien



Re: [O] Fwd: request of numeric arguments handling by +STARTUP: content

2013-02-24 Thread Bastien
Hi Vitaly,

Vitaly jau...@gmail.com writes:

 Why not handling this somewhere in +STARTUP: content N or anywhere
 similar? Since org-mode handles arguments for org-global-cycle, why
 not handle them on startup?

The following patch handle content-2 and content-3 keywords, and allow
`org-startup-folded' to be set to an integer.

I don't like content-1 content-2, this is dirty.

But maybe we can simply allow integers for `org-startup-folded' and
then the user could `org-startup-folded' as a local variable.

Let me know what you think,

diff --git a/lisp/org.el b/lisp/org.el
index 1e22699..d446b66 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -587,6 +587,8 @@ the following lines anywhere in the buffer:
#+STARTUP: fold  (or `overview', this is equivalent)
#+STARTUP: nofold(or `showall', this is equivalent)
#+STARTUP: content
+   #+STARTUP: content-2 (up to headlines of level 2)
+   #+STARTUP: content-3 (up to headlines of level 3)
#+STARTUP: showeverything
 
 By default, this option is ignored when Org opens agenda files
@@ -597,6 +599,7 @@ option, set `org-agenda-inhibit-startup' to nil.
 	  (const :tag nofold: show all nil)
 	  (const :tag fold: overview t)
 	  (const :tag content: all headlines content)
+	  (integerp :tag content: all headlines up to N level 2)
 	  (const :tag show everything, even drawers showeverything)))
 
 (defcustom org-startup-truncated t
@@ -4632,6 +4635,8 @@ After a match, the following groups carry important information:
 (showall org-startup-folded nil)
 (showeverything org-startup-folded showeverything)
 (content org-startup-folded content)
+(content-2 org-startup-folded 2)
+(content-3 org-startup-folded 3)
 (indent org-startup-indented t)
 (noindent org-startup-indented nil)
 (hidestars org-hide-leading-stars t)
@@ -6660,6 +6665,8 @@ With a numeric prefix, show all headlines up to that level.
   (cond
((eq org-startup-folded t)
 (org-cycle '(4)))
+   ((integerp org-startup-folded)
+(org-global-cycle org-startup-folded))
((eq org-startup-folded 'content)
 (let ((this-command 'org-cycle) (last-command 'org-cycle))
   (org-cycle '(4)) (org-cycle '(4)

-- 
 Bastien


Re: [O] Publishing http links inside a begin_src

2013-02-24 Thread Bastien
Emilio Torres Manzanera tor...@uniovi.es writes:

 What should I do to test this issue?

If you can, please test with a more recent Org, e.g. 7.9.3f:

  http://orgmode.org/org-7.9.3f.tar.gz

You can also clone the git repository:

  ~$ git clone git://orgmode.org/org-mode.git

See http://orgmode.org/org.html#Installation for details.

Thanks!

-- 
 Bastien



Re: [O] Exporter question

2013-02-24 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 On 12.2.2013, at 20:46, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,
 
 Dominik, Carsten c.domi...@uva.nl writes:
 
 In a file with some time stamps in headlines, is it still possible to
 get rid of them only for the Table of Contents, but to leave them in
 the headlines themselves?
 
 Good question. You can probably use filters, but it isn't a trivial
 task, depending on the back-end.

 I have now succeeded using CSS, but this is for HTML only, of course.


 
 How did you do it in the previous exporter?


 There used to be a variable org-export-remove-timestamps-from-toc, and
 a function org-export-cleanup-toc-line which provided this
 functionality. It is actually somewhat useful functionality. It there
 a filter that is applied only to toc lines?

Now, almost all back-ends providing a TOC functionality allow to
add :OPTIONAL_TITLE: property in an headline to set its corresponding
entry in the table of contents.

Do you think it's still necessary to provide an equivalent for
`org-export-remove-timestamps-from-toc'? It's only a matter of copying
the headline title in the property, without timestamp.


Regards,

-- 
Nicolas Goaziou



Re: [O] [new exporter] 2 questions

2013-02-24 Thread Nicolas Goaziou
Achim Gratz strom...@nexgo.de writes:

 Nicolas Goaziou writes:
 True, that's why there's also inline \[...\]. But you have to accept
 paragraph limitations (no empty line, do not start a line with list
 markers...).

 Now, given that difference and the fact that these things can span
 over multiple lines and thus include the beginning of line (which
 creates the contention between different tiers of org-element's
 parsing hierarchy),

Note that filling/auto-filling will never put you in this situation,
since Org has a protection mechanism. IOW, if you end up with a list
marker at the beginning of a line, it's your fault.

 let me ask one more time if it would be possible to escape the beginning
 of line (most likely and the obvious choices given Org's history would
 be : or ,) in a general fashion

Be careful here. :  at a beginning of a line defines a fixed-width
area. It is an element and, therefore, would have precedence over your
math snippet. In this case, fontification will warn you.

Adding comma escaping in an object would be complicated because of
filling. It would also add even more problems. So, no, there needn't be
a protection mechanism in inline math snippets.

Also, let me remind you that, LaTeX-wise, -2 is equivalent to - 2.
So, you can avoid that list marker problem pretty easily.


Regards,

-- 
Nicolas Goaziou



Re: [O] Exporter question

2013-02-24 Thread Bastien
Hi Nicolas,

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

 Now, almost all back-ends providing a TOC functionality allow to
 add :OPTIONAL_TITLE: property in an headline to set its corresponding
 entry in the table of contents.

Thanks for implementing this!

 Do you think it's still necessary to provide an equivalent for
 `org-export-remove-timestamps-from-toc'? It's only a matter of copying
 the headline title in the property, without timestamp.

org-html|latex-format-headline-function allow these arguments:

TODO  the todo keyword (string or nil).
TODO-TYPE the type of todo (symbol: `todo', `done', nil)
PRIORITY  the priority of the headline (integer or nil)
TEXT  the main headline text (string).
TAGS  the tags as a list of strings (list of strings or nil).

Why not having another TRIM-REGEXP argument to selectively trim
the content matched by a regexp against TEXT?

`org-export-with-timestamps-in-toc', if nil, would use this arg;
but users could remove anything from the headlines (and the TOC), 
not just from the TOC.

And `org-export-with-timestamps' could be set to 'from-toc or
'from-headline.  And we could extend `org-export-with-tags'
similarily.

(I think `org-export-with-timestamps-in-toc' is better than
`org-export-remove-timestamps-from-toc' because `org-export-with'
is more widely used for the same purposes.)

Just a suggestion for combining backward compatibility and adding
some flexibility thanks for the new engine.

Let me know what you think,

-- 
 Bastien



[O] bug in expansion of variables in babel Perl

2013-02-24 Thread D M German

Hi Everybody,

I found a bug in the Babel perl code. When a table is used as input, the
values of the table  are not escaped. In fact, they are surrounded by
double quotes  instead of single ones '. This means that special
characters are interpreted: $string, and @variable are considered
variables. See below.


For example:
--
#+RESULTS: patito
| alias| uniname
|
|--+|
| Jon  t...@xyz.org  | jon


#+name: output(data=patito)
#+begin_src perl :results output
print Begin\n;
print $$data[0][0], \n;
print End\n;
#+end_src   

 

#+RESULTS: output
: Begin
: Jon  tixy.org
: End   

--

I see two ways to solve this. The first is simply to replace the output
format of the variable from %S to '%s' (use quotes '). The other one
is to optionally escape the fields of the table (which is more
complicated, and would require replacing each). The third one is a
combination of both: replace them only if desired, via some header
configuration variable.

diff --git a/lisp/ob-perl.el b/lisp/ob-perl.el
index ccd3826..2f795aa 100644
--- a/lisp/ob-perl.el
+++ b/lisp/ob-perl.el
@@ -75,7 +75,7 @@ The elisp value, VAR, is converted to a string of perl source 
code
 specifying a var of the same value.
   (if (listp var)
   (concat [ (mapconcat #'org-babel-perl-var-to-perl var , ) ])
-(format %S var)))
+(format '%s' var)))



Debugging perl is very cumbersome in org-mode. It would be nice to have
a feature to export the source to a file. This is because the variable
expansion needs to be done before the code can be used (hence simply cut
and paste does not work, nor shell-command-on-region)

I used the org-babel-perl-command variable to replace perl with a script
that simply wrote to a file. 

It would be nice to be able to write the script created by org a file,
so this can be debugged (it would have the variable definitions). Maybe
this is already a feature and I don't know about it.

As we are into it, I found this declaration to be very useful. 

--
(setq org-babel-perl-wrapper-method
  
use strict;

sub org_columns
{
my ($table) = @_;
my $y = $$table[0];
return scalar(@$y);
}

sub org_rows
{
my ($table) = @_;
return scalar(@$table);
}

sub main {
%s
}

my @r = main;
open(o, \%s\);
print o join(\\\n\, @r), \\\n\)
--

It does two things: it uses strict, so undeclared variables create
errors, and it also creates two functions: org_columns and org_rows
that, when used on the variable declared as input, return its number of
columns and rows:

my $rows = org_rows($data);
my $columns = org_columns($data);

the only problem with using strict is that variables would have to be
defined with my too: so that would require this patch:

diff --git a/lisp/ob-perl.el b/lisp/ob-perl.el
index ccd3826..82f8086 100644
--- a/lisp/ob-perl.el
+++ b/lisp/ob-perl.el
@@ -62,7 +62,7 @@ This function is called by `org-babel-execute-src-block'.
   Return list of perl statements assigning the block's variables.
   (mapcar
(lambda (pair)
- (format $%s=%s;
+ (format my $%s=%s;
 (car pair)
 (org-babel-perl-var-to-perl (cdr pair
(mapcar #'cdr (org-babel-get-header params :var


Finally, if interested, i can write a couple of examples for Perl that
could help people who want to use it. 

thanks again,

--
Daniel M. German  Great algorithms are
   Francis Sullivan - the poetry of computation
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 



Re: [O] Exporter question

2013-02-24 Thread Nicolas Goaziou
Bastien b...@altern.org writes:

 Do you think it's still necessary to provide an equivalent for
 `org-export-remove-timestamps-from-toc'? It's only a matter of copying
 the headline title in the property, without timestamp.

 org-html|latex-format-headline-function allow these arguments:

 TODO  the todo keyword (string or nil).
 TODO-TYPE the type of todo (symbol: `todo', `done', nil)
 PRIORITY  the priority of the headline (integer or nil)
 TEXT  the main headline text (string).
 TAGS  the tags as a list of strings (list of strings or nil).

 Why not having another TRIM-REGEXP argument to selectively trim
 the content matched by a regexp against TEXT?

Because it would have to mach TEXT against destination code, so it would
be fragile (i.e. if you modify how timestamps are transcoded, you have
to modify this regexp accordingly).

If it has to be implemented, it's far easier to remove objects from
parsed data (e.g. in `org-export-get-optional-title').

 `org-export-with-timestamps-in-toc', if nil, would use this arg;
 but users could remove anything from the headlines (and the TOC), 
 not just from the TOC.

 And `org-export-with-timestamps' could be set to 'from-toc or
 'from-headline.  And we could extend `org-export-with-tags'
 similarily.

 (I think `org-export-with-timestamps-in-toc' is better than
 `org-export-remove-timestamps-from-toc' because `org-export-with'
 is more widely used for the same purposes.)

 Just a suggestion for combining backward compatibility and adding
 some flexibility thanks for the new engine.

I have a patch ready with `org-export-with-timestamps-in-toc' variable,
but as I was writing it, I realized it might not be necessary to apply
it. I'd like to avoid over-engineering as much as possible, hence the
question.


Regards,

-- 
Nicolas Goaziou



Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread dmg
Mm, I also noticed that when :results output is used, there is no way
to insert perl code before or after the executed code.
org-babel-perl-wrapper-method only works for all the methods but
output. It would be nice to have a variable that
does this for any output type.

--dmg

On Sun, Feb 24, 2013 at 1:16 AM, D M German d...@uvic.ca wrote:

 Hi Everybody,

 I found a bug in the Babel perl code. When a table is used as input, the
 values of the table  are not escaped. In fact, they are surrounded by
 double quotes  instead of single ones '. This means that special
 characters are interpreted: $string, and @variable are considered
 variables. See below.


--dmg

---
Daniel M. German
http://turingmachine.org



Re: [O] Exporter question

2013-02-24 Thread Bastien
Hi Nicolas,

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

 If it has to be implemented, it's far easier to remove objects from
 parsed data (e.g. in `org-export-get-optional-title').

Got it, thanks.

 `org-export-with-timestamps-in-toc', if nil, would use this arg;
 but users could remove anything from the headlines (and the TOC), 
 not just from the TOC.

 And `org-export-with-timestamps' could be set to 'from-toc or
 'from-headline.  And we could extend `org-export-with-tags'
 similarily.

 (I think `org-export-with-timestamps-in-toc' is better than
 `org-export-remove-timestamps-from-toc' because `org-export-with'
 is more widely used for the same purposes.)

 Just a suggestion for combining backward compatibility and adding
 some flexibility thanks for the new engine.

 I have a patch ready with `org-export-with-timestamps-in-toc' variable,
 but as I was writing it, I realized it might not be necessary to apply
 it. I'd like to avoid over-engineering as much as possible, hence the
 question.

My concern is this: it would be nice to provide a simple way to get
rid of _anything_ (user defined) in headlines and TOC titles.

Actually, the org-export-with-* family contains two categories of
variables: those who are relevant for anything in the buffer, those
who are relevant for the headlines only.  Like these ones:

org-export-with-priority
org-export-with-statistics-cookies
org-export-with-todo-keywords
org-export-with-tags
org-export-with-section-numbers

I set aside the last one, which does not impact the text of the
headline itself, but the way it looks in the target format.

My suggestion is to get rid of these four headlines-only
org-export-with-* variable, and to replace them with

org-export-headline-format
org-export-headline-in-toc-format

with formatters to tell whether to include the TODO keyword, the tags,
the priority cookie, the statistics cookie, the headline text, etc.

And two generic options

org-export-headline-trim-regexp
org-export-headline-in-toc-trim-regexp

which the user can set to whatever he wants.

I think a formatting string for the headline is good as it is quite
intuitive for a vast majority of users.  And the -trim-regexp options
would be flexible enough to remove anything from the headlines.

Please *don't* implement this :)  I just need your gut feeling 
about org-export-headline-format as a formatting string, and if you
think it might be a good idea, I'm willing to help implementing it
(as I know it will change quite a lot of things in the machinery.)

Thanks,

-- 
 Bastien



Re: [O] Warning with latest git pull

2013-02-24 Thread Achim Gratz
Bastien writes:
 There is already this in org-macs.el:

 (when (and (not (fboundp 'with-silent-modifications))
  (or ( emacs-major-version 23)
  (and (= emacs-major-version 23)
   ( emacs-minor-version 2
   (defmacro with-silent-modifications (rest body)
 `(org-unmodified ,@body))
   (def-edebug-spec with-silent-modifications (body)))

We shouldn't define things that don't have an org prefix.  I don't
really see why we needed to replace org-unmodified in the first place,
especially since with-silent-modifications does _more_ than
org-unmodified, not less as your comment in org-macs would imply.
Here's a patch to restore org-unmodified in the sources, make it an
alias to with-silent-modifications when possible and augment the
replacement definition with a few things that with-silent-modifications
does on top of what org-unmodified did.  We might even copy the whole
macro definition from subr.el, but I think we're close enough with this.

From 249b18ee13f2fbf041c081fa63b1ccd40d67dc27 Mon Sep 17 00:00:00 2001
From: Achim Gratz strom...@stromeko.de
Date: Sun, 24 Feb 2013 10:54:29 +0100
Subject: [PATCH 1/2] Revert Use `with-silent-modifications' instead of
 `org-unmodified' when it makes sense

This reverts commit 43c8aa02cc2301661fe203ec4d4a90d94d6353e6.
---
 lisp/org-clock.el   | 158 ++--
 lisp/org-colview.el |  61 ++--
 lisp/org-macs.el|   2 -
 lisp/org.el |  79 +-
 4 files changed, 150 insertions(+), 150 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 02924b8..20e624b 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1700,85 +1700,85 @@ (defun org-clock-sum (optional tstart tend headline-filter propname)
 which HEADLINE-FILTER returns nil are excluded from the clock summation.
 PROPNAME lets you set a custom text property instead of :org-clock-minutes.
   (interactive)
-  (with-silent-modifications
-(let* ((re (concat ^\\(\\*+\\)[ \t]\\|^[ \t]*
-		   org-clock-string
-		   [ \t]*\\(?:\\(\\[.*?\\]\\)-+\\(\\[.*?\\]\\)\\|=[ \t]+\\([0-9]+\\):\\([0-9]+\\)\\)))
-	   (lmax 30)
-	   (ltimes (make-vector lmax 0))
-	   (t1 0)
-	   (level 0)
-	   ts te dt
-	   time)
-  (if (stringp tstart) (setq tstart (org-time-string-to-seconds tstart)))
-  (if (stringp tend) (setq tend (org-time-string-to-seconds tend)))
-  (if (consp tstart) (setq tstart (org-float-time tstart)))
-  (if (consp tend) (setq tend (org-float-time tend)))
-  (remove-text-properties (point-min) (point-max)
-			  `(,(or propname :org-clock-minutes) t
-:org-clock-force-headline-inclusion t))
-  (save-excursion
-	(goto-char (point-max))
-	(while (re-search-backward re nil t)
-	  (cond
-	   ((match-end 2)
-	;; Two time stamps
-	(setq ts (match-string 2)
-		  te (match-string 3)
-		  ts (org-float-time
-		  (apply 'encode-time (org-parse-time-string ts)))
-		  te (org-float-time
-		  (apply 'encode-time (org-parse-time-string te)))
-		  ts (if tstart (max ts tstart) ts)
-		  te (if tend (min te tend) te)
-		  dt (- te ts)
-		  t1 (if ( dt 0) (+ t1 (floor (/ dt 60))) t1)))
-	   ((match-end 4)
-	;; A naked time
-	(setq t1 (+ t1 (string-to-number (match-string 5))
-			(* 60 (string-to-number (match-string 4))
-	   (t ;; A headline
-	;; Add the currently clocking item time to the total
-	(when (and org-clock-report-include-clocking-task
-		   (equal (org-clocking-buffer) (current-buffer))
-		   (equal (marker-position org-clock-hd-marker) (point))
-		   tstart
-		   tend
-		   (= (org-float-time org-clock-start-time) tstart)
-		   (= (org-float-time org-clock-start-time) tend))
-	  (let ((time (floor (- (org-float-time)
-(org-float-time org-clock-start-time)) 60)))
-		(setq t1 (+ t1 time
-	(let* ((headline-forced
-		(get-text-property (point)
-   :org-clock-force-headline-inclusion))
-		   (headline-included
-		(or (null headline-filter)
-			(save-excursion
-			  (save-match-data (funcall headline-filter))
-	  (setq level (- (match-end 1) (match-beginning 1)))
-	  (when (or ( t1 0) ( (aref ltimes level) 0))
-		(when (or headline-included headline-forced)
-		  (if headline-included
-		  (loop for l from 0 to level do
-			(aset ltimes l (+ (aref ltimes l) t1
-		  (setq time (aref ltimes level))
-		  (goto-char (match-beginning 0))
-		  (put-text-property (point) (point-at-eol)
- (or propname :org-clock-minutes) time)
-		  (if headline-filter
-		  (save-excursion
-			(save-match-data
-			  (while
-			  ( (funcall outline-level) 1)
-			(outline-up-heading 1 t)
-			(put-text-property
-			 (point) (point-at-eol)
-			 :org-clock-force-headline-inclusion t))
-		(setq t1 0)
-		(loop for l from level to (1- lmax) do
-		  (aset ltimes l 0)))
-	(setq org-clock-file-total-minutes (aref ltimes 

Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread D M German


 dmg Mm, I also noticed that when :results output is used, there is no way
 dmg to insert perl code before or after the executed code.
 dmg org-babel-perl-wrapper-method only works for all the methods but
 dmg output. It would be nice to have a variable that
 dmg does this for any output type.

I implemented a proof-of-concept. The idea is to have a variable called
org-babel-perl-preface that is inserted before the code. I also like to
be able to use my in all variables, so I can use strict, if I choose
to. See the patch at the bottom. 


here is a test example:


==
Input table

#+RESULTS: patito
| id | title   | year | index | notes | attr |
|+-+--+---+---+--|
| Taxi Driver (1944) | Taxi Driver | 1944 |   |   |  |
| Taxi Driver (1954) | Taxi Driver | 1954 |   |   |  |
| Taxi Driver (1973) | Taxi Driver | 1973 |   |   |  |
| Taxi Driver (1976) | Taxi Driver | 1976 |   |   |  |
| Taxi Driver (1978) | Taxi Driver | 1978 |   |   |  |
| Taxi Driver (1981) | Taxi Driver | 1981 |   |   |  |
| Taxi Driver (1990) | Taxi Driver | 1990 |   |   |  |
| Taxi Driver (2004) | Taxi Driver | 2004 |   |   |  |


Simple row output: the last statement is returned as a list, each in a line.

#+name: output2(data=patito)
#+begin_src perl :results raw
org_rows($data), org_columns($data);
#+end_src

#+RESULTS: output2
8
6

More complex example. By defining org_rows and org_columns in the
preface, it makes it easier to manipulate them. org-babel implements
tables as a reference to an array of references to arrays.

#+name: rip(data=patito)
#+begin_src perl :results output
my $rows = org_rows($data);
my $columns = org_columns($data);

for (my $j=0;$j$rows; $j++) {
for (my $i=0;$i$columns; $i++) {
print $i:$j ;
print $$data[$j][$i];
print;
}
print |\n;
}
print Row $rows\n;
print Columns $columns\n;
#+end_src

#+RESULTS: rip
#+begin_example
0:0 Taxi Driver (1944)   ;1:0 Taxi Driver   ;2:0 1944   ;3:0;4:0;5:0
;|
0:1 Taxi Driver (1954)   ;1:1 Taxi Driver   ;2:1 1954   ;3:1;4:1;5:1
;|
0:2 Taxi Driver (1973)   ;1:2 Taxi Driver   ;2:2 1973   ;3:2;4:2;5:2
;|
0:3 Taxi Driver (1976)   ;1:3 Taxi Driver   ;2:3 1976   ;3:3;4:3;5:3
;|
0:4 Taxi Driver (1978)   ;1:4 Taxi Driver   ;2:4 1978   ;3:4;4:4;5:4
;|
0:5 Taxi Driver (1981)   ;1:5 Taxi Driver   ;2:5 1981   ;3:5;4:5;5:5
;|
0:6 Taxi Driver (1990)   ;1:6 Taxi Driver   ;2:6 1990   ;3:6;4:6;5:6
;|
0:7 Taxi Driver (2004)   ;1:7 Taxi Driver   ;2:7 2004   ;3:7;4:7;5:7
;|
Row 8
Columns 6
#+end_example

==

diff --git a/lisp/ob-perl.el b/lisp/ob-perl.el
index ccd3826..65e6b88 100644
--- a/lisp/ob-perl.el
+++ b/lisp/ob-perl.el
@@ -62,7 +62,7 @@ This function is called by `org-babel-execute-src-block'.
   Return list of perl statements assigning the block's variables.
   (mapcar
(lambda (pair)
- (format $%s=%s;
+ (format my $%s=%s;
 (car pair)
 (org-babel-perl-var-to-perl (cdr pair
(mapcar #'cdr (org-babel-get-header params :var
@@ -85,13 +85,34 @@ specifying a var of the same value.
 
 (defvar org-babel-perl-wrapper-method
   
+%s
 sub main {
 %s
 }
-@r = main;
+my @r = main;
 open(o, \%s\);
 print o join(\\\n\, @r), \\\n\)
 
+(defvar org-babel-perl-preface
+ 
+use strict;
+
+sub org_columns
+{
+my ($table) = @_;
+my $y = $$table[0];
+return scalar(@$y);
+}
+
+sub org_rows
+{
+my ($table) = @_;
+return scalar(@$table);
+}
+
+)
+
+
 (defvar org-babel-perl-pp-wrapper-method
   nil)
 
@@ -102,11 +123,11 @@ of the statements in BODY, if RESULT-TYPE equals 'value 
then
 return the value of the last statement in BODY, as elisp.
   (when session (error Sessions are not supported for Perl))
   (case result-type
-(output (org-babel-eval org-babel-perl-command body))
+(output (org-babel-eval org-babel-perl-command (format %s\n%s 
org-babel-perl-preface body)))
 (value (let ((tmp-file (org-babel-temp-file perl-)))
 (org-babel-eval
  org-babel-perl-command
- (format org-babel-perl-wrapper-method body
+ (format org-babel-perl-wrapper-method org-babel-perl-preface body
  (org-babel-process-file-name tmp-file 'noquote)))
 (org-babel-eval-read-file tmp-file)
 



--
Daniel M. German  In questions of science the authority of
   a thousand is not worth the humble
   Galileo -  reasoning of a single individual.
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 



Re: [O] [new exporter] 2 questions

2013-02-24 Thread Achim Gratz
Nicolas Goaziou writes:
 Note that filling/auto-filling will never put you in this situation,
 since Org has a protection mechanism. IOW, if you end up with a list
 marker at the beginning of a line, it's your fault.

I don't use auto-fill in formulas.  And yes, I take responsibility for
my faults and try to correct them.

 Also, let me remind you that, LaTeX-wise, -2 is equivalent to - 2.
 So, you can avoid that list marker problem pretty easily.

I know there are many such workarounds, I've already used one before I
even asked the original question.  I was asking if it was possible to
solve the problem at its root with a general mechanism that can be used
in all cases and not just a specific one.  I failed to convince you that
this would be a useful thing to have and you failed to convince me that
there is no problem. Let's leave it at that, OK?


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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] org-drill - properties displayed during card review

2013-02-24 Thread Bastien


Hi Paul,

Paul Rudin paul-sqpymovxoov10xsdtd+...@public.gmane.org writes:

 I'm experimenting with org-drill. One thing that seems odd is that when
 reviewing a card for scoring the properties drawer is displayed. It
 seems unlikely that this is intended? Is it intended? If not is there
 some easy way I can fix it? TIA.

I'm not sure Paul is still hacking org-drill.el, so you'll have to
digg a bit yourself.  Or give more context for non-org-drill users
so that they can help with the code.

Thanks!

-- 
 Bastien




[O] Bug: error on html export [7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)]

2013-02-24 Thread Richard Kim

Starting with emacs bzr trunk revision 111688 of Feb 7, 2013,
following three line org file results in error when html export is
attempted.

-- start of foo.org 
#+TITLE: Nothing

# file:/tmp
-- end   of foo.org 

To see the problem, load the three line org file, then hit `C-c C-e h'.
It results in the following stack trace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(\\([^]\\)\\([_^]\\) nil)
  org-export-protect-sub-super(nil)
  org-export-normalize-links()
  org-export-preprocess-string(#(#+TITLE: Nothing\n\n# file:/tmp\n 0 
8 (fontified t font-lock-fontified t org-category foo face 
org-document-info-keyword) 8 13 (fontified t org-category foo) 13 21 
(fontified t org-category foo font-lock-fontified t face org-document-title) 
21 22 (fontified t font-lock-fontified t org-category foo) 22 24 (fontified t 
font-lock-fontified t org-category foo face font-lock-comment-face) 24 30 
(fontified t font-lock-fontified t org-category foo org-no-flyspell t 
mouse-face highlight face font-lock-comment-face keymap (keymap (follow-link . 
mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse))) 
30 31 (fontified t font-lock-fontified t org-category foo rear-nonsticky 
(mouse-face highlight keymap invisible intangible help-echo org-linked-text 
htmlize-link) org-no-flyspell t mouse-face highlight face 
font-lock-comment-face keymap (keymap (follow-link . mouse-face) (mouse-3 . 
org-find-file-at-mouse) (mouse-2 . org-open-at-mouse))) 31 32 
(font-lock-fontified t fontified t org-category foo rear-nonsticky 
(mouse-face highlight keymap invisible intangible help-echo org-linked-text 
htmlize-link) org-no-flyspell t mouse-face highlight face 
font-lock-comment-face keymap (keymap (follow-link . mouse-face) (mouse-3 . 
org-find-file-at-mouse) (mouse-2 . org-open-at-mouse))) 32 33 
(font-lock-fontified t fontified t org-category foo rear-nonsticky 
(mouse-face highlight keymap invisible intangible help-echo org-linked-text 
htmlize-link) org-no-flyspell t mouse-face highlight face 
font-lock-comment-face keymap (keymap (follow-link . mouse-face) (mouse-3 . 
org-find-file-at-mouse) (mouse-2 . org-open-at-mouse))) 33 34 (fontified t 
org-category foo)) :emph-multiline t :for-backend html 
:skip-before-1st-heading nil :drawers nil :todo-keywords t :tasks t :tags 
not-in-toc :priority nil :footnotes t :timestamps t :archived-trees headline 
:select-tags (export) :exclude-tags (noexport) :add-text nil 
:LaTeX-fragments t)
  org-export-as-html(nil)
  call-interactively(org-export-as-html)
  org-export(nil)
  call-interactively(org-export nil nil)

I believe this bug was introduced by bzr version 111688 which has this comment

2013-02-07  Bastien Guerry  b...@gnu.org

* org-exp.el (org-export-normalize-links): Don't match links
within tags.

along with this code change:

=== modified file 'lisp/org/org-exp.el'
--- lisp/org/org-exp.el 2013-01-08 14:27:18 +
+++ lisp/org/org-exp.el 2013-02-07 07:11:59 +
@@ -2113,7 +2113,8 @@
   (put-text-property (match-beginning 0) (match-end 0) 
'org-normalized-link t))
 (goto-char (point-min))
 (while (re-search-forward re-plain-link nil t)
-  (unless (get-text-property (match-beginning 0) 
'org-normalized-link)
+  (unless (or (get-text-property (match-beginning 0) 
'org-normalized-link)
+ (assoc :tags (org-context)))
(goto-char (1- (match-end 0)))
(org-if-unprotected-at (1+ (match-beginning 0))
  (let* ((s (concat (match-string 1)

If I revert this change, then the error goes away.

Since # file:/tmp is a comment line, shouldn't the link be ignored
instead of causing an error?



Emacs  : GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10)
 of 2013-02-22 on kimr-e6410
Package: Org-mode version 7.9.3e (7.9.3e-3-gb07a9b @ 
/u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)

current state:
==
(setq
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 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-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   

[O] request of numeric arguments handling by +STARTUP: content

2013-02-24 Thread Vitaly
I want to have CONTENTS showing headlines up to particular level N when
open file. I couldn't find such a thing in docs and VISIBILITY can't be
used since it takes no arguments too, so having multiple VISIBILITY
properties in every top-level headline is a bit stupid, not saying that it
can not solve the problem fully, because it also doesn't take argument for
children or content.

Why not handling this somewhere in +STARTUP: content N or anywhere
similar? Since org-mode handles arguments for org-global-cycle, why not
handle them on startup?

I managed to get this behavior simply by calling the (org-global-cycle N)
in find-file-hook, but this is somewhat dirty.

Regards, Vitaly


[O] babel :results output and format of output

2013-02-24 Thread D M German

hi everybody,


I have been testing babel with perl and I am very puzzled by the
following:


Say I have the following script that outputs 10 numbers. org/babel wraps
it as a begin_example


#+begin_src perl :results output 
for (my $i=0;$i10;$i++) {
  print $i\n;
}
#+end_src

#+RESULTS:
#+begin_example
0
1
2
3
4
5
6
7
8
9
#+end_example


But if my script only outputs 9 lines then the format is not wrapped by
#+begin_example, and instead is prefixed by :

#+begin_src perl :results output 
for (my $i=0;$i9;$i++) {
  print $i\n;
}
#+end_src

#+RESULTS:
: 0
: 1
: 2
: 3
: 4
: 5
: 6
: 7
: 8

Is this behaviour expected? Is the threshold at which it happens
configurable?

thanks a lot for your help,


--dmg



--
Daniel M. German  In questions of science the authority of
   a thousand is not worth the humble
   Galileo -  reasoning of a single individual.
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 



Re: [O] Exporter question

2013-02-24 Thread Carsten Dominik
Hi Nicolas,

I am curious why you chose the name optional_title for the property?  Why 
not, for example TOC_TITLE or something like this?

- Carsten

On 24.2.2013, at 09:55, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,
 
 Carsten Dominik carsten.domi...@gmail.com writes:
 
 On 12.2.2013, at 20:46, Nicolas Goaziou n.goaz...@gmail.com wrote:
 
 Hello,
 
 Dominik, Carsten c.domi...@uva.nl writes:
 
 In a file with some time stamps in headlines, is it still possible to
 get rid of them only for the Table of Contents, but to leave them in
 the headlines themselves?
 
 Good question. You can probably use filters, but it isn't a trivial
 task, depending on the back-end.
 
 I have now succeeded using CSS, but this is for HTML only, of course.
 
 
 
 How did you do it in the previous exporter?
 
 
 There used to be a variable org-export-remove-timestamps-from-toc, and
 a function org-export-cleanup-toc-line which provided this
 functionality. It is actually somewhat useful functionality. It there
 a filter that is applied only to toc lines?
 
 Now, almost all back-ends providing a TOC functionality allow to
 add :OPTIONAL_TITLE: property in an headline to set its corresponding
 entry in the table of contents.
 
 Do you think it's still necessary to provide an equivalent for
 `org-export-remove-timestamps-from-toc'? It's only a matter of copying
 the headline title in the property, without timestamp.
 
 
 Regards,
 
 -- 
 Nicolas Goaziou




Re: [O] babel :results output and format of output

2013-02-24 Thread Sean O'Halpin
On Sun, Feb 24, 2013 at 10:50 AM, D M German d...@uvic.ca wrote:

 hi everybody,


 I have been testing babel with perl and I am very puzzled by the
 following:


 Say I have the following script that outputs 10 numbers. org/babel wraps
 it as a begin_example


 #+begin_src perl :results output
 for (my $i=0;$i10;$i++) {
   print $i\n;
 }
 #+end_src

 #+RESULTS:
 #+begin_example
 0
 1
 2
 3
 4
 5
 6
 7
 8
 9
 #+end_example


 But if my script only outputs 9 lines then the format is not wrapped by
 #+begin_example, and instead is prefixed by :

 #+begin_src perl :results output
 for (my $i=0;$i9;$i++) {
   print $i\n;
 }
 #+end_src

 #+RESULTS:
 : 0
 : 1
 : 2
 : 3
 : 4
 : 5
 : 6
 : 7
 : 8

 Is this behaviour expected? Is the threshold at which it happens
 configurable?

Yes - it's controlled by =org-babel-min-lines-for-block-output= in
lisp/ob-core.el:

#+BEGIN_QUOTE
(defvar org-babel-min-lines-for-block-output 10
  The minimum number of lines for block output.
If number of lines of output is equal to or exceeds this
value, the output is placed in a #+begin_example...#+end_example
block.  Otherwise the output is marked as literal by inserting
colons at the starts of the lines.  This variable only takes
effect if the :results output option is in effect.)
#+END_QUOTE

Regards,
Sean



Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread Achim Gratz
D M German writes:
 I see two ways to solve this. The first is simply to replace the output
 format of the variable from %S to '%s' (use quotes ').

I think that's the right thing to do.  There shouldn't be anything in
the table that needs to be interpolated by Perl while the variable is
defined.

 +(format '%s' var)))

A slightly more perlish way would be to use
   (format q(%s) var)))

 Debugging perl is very cumbersome in org-mode. It would be nice to have
 a feature to export the source to a file. This is because the variable
 expansion needs to be done before the code can be used (hence simply cut
 and paste does not work, nor shell-command-on-region)

The other languages have the same problem, maybe there should be a
general option to mirror the commands into a source block in the org
file or to make the buffer with the program to be eval'ed stick around.

Eric, WDYT?  Also, I'm not really sure why we need all the complexity of
shell-command-on-region when it looks like we should be able to
call-process-region ourselves.  Modifying Babel to run (non-session and
perhaps optionally) from files instead of buffers seems to be a more
wide-reaching operation.

 As we are into it, I found this declaration to be very useful. 
[…]

I think this is better done by altering org-babel-perl-command to
include -Mstrict.  If you put the helper functions into a module in
@INC or tell Perl where to find them, then you can add -Mmyhelper as
well.  Here's a wrapper to match:

(defvar org-babel-perl-wrapper-method
  {
  my @r = eval( q(%s) );
  open my $BO, qq(%s));
  print $BO join($\\, @r), $\\ ;
})

For your problem with :results output blocks, I think it would be
possible to wrap them (a bit differently) also, but the helper module
above would also solve this problem, so let's see what Eric says since I
don't know if another language has already set a precedent of wrapping
these commands too.


 Finally, if interested, i can write a couple of examples for Perl that
 could help people who want to use it. 

Also a few tests would be highly welcome.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread Achim Gratz
D M German writes:
[…]

Please leave the formats alone, if you change the number of parameters
there folks that use their own definitions won't know what hit them.
What you want is to prepend something to the body that Babel gives you,
so let-bind that result and use it.  You could even advise the function
and have it submit to your will without changing Org.

--8---cut here---start-8---
(defun org-babel-perl-evaluate (session ibody optional result-type)
  Pass BODY to the Perl process in SESSION.
If RESULT-TYPE equals 'output then return a list of the outputs
of the statements in BODY, if RESULT-TYPE equals 'value then
return the value of the last statement in BODY, as elisp.
  (when session (error Sessions are not supported for Perl))
  (let ((body (concat org-babel-perl-preface ibody)))
(case result-type
  (output (org-babel-eval org-babel-perl-command body))
  (value (let ((tmp-file (org-babel-temp-file perl-)))
   (org-babel-eval
org-babel-perl-command
(format org-babel-perl-wrapper-method body
(org-babel-process-file-name tmp-file 'noquote)))
   (org-babel-eval-read-file tmp-file))
--8---cut here---end---8---


BTW, now that I think some more about it: debugging Perl is much easier
than you seem to let on:

(setq org-babel-perl-command perl -Mstrict -ne print).

This will echo the program sent to Perl in full glory into the output
block.


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

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




Re: [O] org-cycle hook recenter question

2013-02-24 Thread Achim Gratz
Arun Persaud writes:
 Steps to reproduce:

 emacs -Q tmp.org
 move point to a lower heading, e.g. the a in 3a30 (5th line from the
 bottom)
 cycle with shift-TAB (I need to hit shift-tab 4 times to see the ...
 at the top)

Yes, that is reproducible.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] [RFC] Small syntax change for footnote definitions

2013-02-24 Thread Nicolas Goaziou
Nicolas Goaziou n.goaz...@gmail.com writes:

 Following a thread started by Samuel Wales (see
 http://permalink.gmane.org/gmane.emacs.orgmode/66558), it appears that
 the standard way to include multiple paragraphs in a footnote definition
 is to rely on \par LaTeXism.

 There are two problems here. Firstly, the parser would have to go out of
 its way to support this trick. Secondly, it isn't very regular wrt Org
 syntax.

 I suggest to end a footnote definition at a headline, another footnote
 definition or *two* blank lines.

Patch applied.

As a reminder, it only requires some change if:

  1. you used \par in the footnote definition: now you can replace it
 with a single blank line.

  2. you need regular text (i.e. not a headline or another footnote
 definition) after the definition: separate definition and text with
 two empty lines.


Regards,

-- 
Nicolas Goaziou



Re: [O] footnotes export verbatim

2013-02-24 Thread Nicolas Goaziou
Hello,

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

 On 2/20/13, Nicolas Goaziou n.goaz...@gmail.com wrote:
   The basic syntax is similar to the one used by `footnote.el', i.e.
   a footnote is defined in a paragraph that is started by a footnote
   marker in square brackets in column 0, no indentation allowed. If you
   need a paragraph break inside a footnote, use the LaTeX idiom `\par'.

 I am aware of that, but blank lines were allowed after a while.  One
 issue was filling.

 Even \par fails to work now.  :(

It should now be fixed.  Just replace \par with an empty line.


Regards,

-- 
Nicolas Goaziou



Re: [O] Exporter question

2013-02-24 Thread Nicolas Goaziou
Carsten Dominik carsten.domi...@gmail.com writes:

 I am curious why you chose the name optional_title for the property?
 Why not, for example TOC_TITLE or something like this?

See http://permalink.gmane.org/gmane.emacs.orgmode/62694

I don't mind changing the name of the property, if needed.


Regards,

-- 
Nicolas Goaziou



Re: [O] Exporter question

2013-02-24 Thread Carsten Dominik

On 24.2.2013, at 15:00, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 
 I am curious why you chose the name optional_title for the property?
 Why not, for example TOC_TITLE or something like this?
 
 See http://permalink.gmane.org/gmane.emacs.orgmode/62694

Ah, I see.  Indeed, there are more uses for such a title than just the toc, so 
I think I agree with Tom.

- Carsten

 
 I don't mind changing the name of the property, if needed.
 
 
 Regards,
 
 -- 
 Nicolas Goaziou




[O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Susan Cragin
I use Meta-up-arrow and Meta-down-arrow to move headings in org and entries in 
spreadsheets. 
Would like to be able to use the same or similar command to move blocks of text 
up or down. 
The current solution--highlight then kill/yank--is just too slow.
Suggestions?






Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Carsten Dominik

On 24.2.2013, at 16:53, Susan Cragin susancra...@earthlink.net wrote:

 I use Meta-up-arrow and Meta-down-arrow to move headings in org and entries 
 in spreadsheets. 
 Would like to be able to use the same or similar command to move blocks of 
 text up or down. 
 The current solution--highlight then kill/yank--is just too slow.
 Suggestions?

Hi Susan,

what do you mean by blocks.  A paragraph?  Does the command

M-x mark-paragraph

select the right amount of text?  If so, you could try the command 
transpose-paragraphs.

- Carsten

 
 
 
 




Re: [O] Online manual

2013-02-24 Thread Mike McLean

On Feb 24, 2013, at 11:03 AM, Sebastian Wiesner lunary...@gmail.com wrote:

 Hello,
 
 how is the online manual of Org mode [1] rendered?  Especially, how is
 the awesome table of contents on the right sight created?

It is done through CSS and I do something similar with most of my HTML exports. 
I have a custom CSS that I load by having the following in every Org file.

#+begin_example
#+HTML_STYLE: link rel=stylesheet type=text/css 
href=/Users/mlm/Documents/OrgMaster/org/css/org-html.css /
#+end_example

Into my custom CSS I copied the TOC CSS from the Org mode home page (see 
below). I may have altered it slightly from what is on Org for colors and such, 
but I don't recall.

#+begin_example
@media screen {

/* TOC inspired by http://jashkenas.github.com/coffee-script */
#table-of-contents {
font-size: 10pt;
position: fixed;
right: 0em;
top: 0em;
background-color: #F3F5F7;
-webkit-box-shadow: 0 0 1em #77;
-moz-box-shadow: 0 0 1em #77;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomleft: 5px;
text-align: right;
/* ensure doesn't flow off the screen when expanded */
max-height: 80%;
overflow: auto;
}

#table-of-contents h2 {
font-size: 10pt;
max-width: 10em;
text-decoration: underline;
padding-left: 0.5em;
padding-left: 0.5em;
padding-top: 0.05em;
padding-bottom: 0.05em;
margin-bottom: 15px;
border: none;
}

#table-of-contents ul {
list-style-type: none;
}

#table-of-contents #text-table-of-contents {
display: none;
text-align: left;
}

#table-of-contents:hover #text-table-of-contents {
display: block;
padding: 0.5em;
margin-top: -1.5em;
}
}

@media print {
/* TOC inspired by http://jashkenas.github.com/coffee-script */
#table-of-contents {
font-size: 10pt;
background: white;
}

#table-of-contents h2 {
font-size: 10pt;
max-width: 10em;
text-decoration: underline;
padding-left: 0.5em;
padding-left: 0.5em;
padding-top: 0.05em;
padding-bottom: 0.05em;
margin-bottom: 15px;
border: none;
}

#table-of-contents ul {
list-style-type: none;
}

#table-of-contents #text-table-of-contents {
text-align: left;
}

#table-of-contents:hover #text-table-of-contents {
display: block;
padding: 0.5em;
margin-top: -1.5em;
}

}
#+end_example




Re: [O] Online manual

2013-02-24 Thread Sebastian Wiesner
2013/2/24 Mike McLean mike.mcl...@pobox.com:

 On Feb 24, 2013, at 11:03 AM, Sebastian Wiesner lunary...@gmail.com wrote:

 Hello,

 how is the online manual of Org mode [1] rendered?  Especially, how is
 the awesome table of contents on the right sight created?

 It is done through CSS and I do something similar with most of my HTML 
 exports. I have a custom CSS that I load by having the following in every Org 
 file.

So is the Org manual written in Org?  I thought it was written in
Texinfo.  After all, there is a Texinfo document in the Org sources
[1]. Is this Texinfo document generated from some Org document?
Generally, can Org be exported to Texinfo/Info?

[1]: http://orgmode.org/cgit.cgi/org-mode.git/tree/doc/org.texi

 #+begin_example
 #+HTML_STYLE: link rel=stylesheet type=text/css 
 href=/Users/mlm/Documents/OrgMaster/org/css/org-html.css /
 #+end_example

 Into my custom CSS I copied the TOC CSS from the Org mode home page (see 
 below). I may have altered it slightly from what is on Org for colors and 
 such, but I don't recall.

 #+begin_example
 @media screen {

 /* TOC inspired by http://jashkenas.github.com/coffee-script */
 #table-of-contents {
 font-size: 10pt;
 position: fixed;
 right: 0em;
 top: 0em;
 background-color: #F3F5F7;
 -webkit-box-shadow: 0 0 1em #77;
 -moz-box-shadow: 0 0 1em #77;
 -webkit-border-bottom-left-radius: 5px;
 -moz-border-radius-bottomleft: 5px;
 text-align: right;
 /* ensure doesn't flow off the screen when expanded */
 max-height: 80%;
 overflow: auto;
 }

 #table-of-contents h2 {
 font-size: 10pt;
 max-width: 10em;
 text-decoration: underline;
 padding-left: 0.5em;
 padding-left: 0.5em;
 padding-top: 0.05em;
 padding-bottom: 0.05em;
 margin-bottom: 15px;
 border: none;
 }

 #table-of-contents ul {
 list-style-type: none;
 }

 #table-of-contents #text-table-of-contents {
 display: none;
 text-align: left;
 }

 #table-of-contents:hover #text-table-of-contents {
 display: block;
 padding: 0.5em;
 margin-top: -1.5em;
 }
 }

 @media print {
 /* TOC inspired by http://jashkenas.github.com/coffee-script */
 #table-of-contents {
 font-size: 10pt;
 background: white;
 }

 #table-of-contents h2 {
 font-size: 10pt;
 max-width: 10em;
 text-decoration: underline;
 padding-left: 0.5em;
 padding-left: 0.5em;
 padding-top: 0.05em;
 padding-bottom: 0.05em;
 margin-bottom: 15px;
 border: none;
 }

 #table-of-contents ul {
 list-style-type: none;
 }

 #table-of-contents #text-table-of-contents {
 text-align: left;
 }

 #table-of-contents:hover #text-table-of-contents {
 display: block;
 padding: 0.5em;
 margin-top: -1.5em;
 }

 }
 #+end_example




Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Susan Cragin



-Original Message-
From: Carsten Dominik carsten.domi...@gmail.com
Sent: Feb 24, 2013 11:16 AM
To: Susan Cragin susancra...@earthlink.net
Cc: emacs-orgmode@gnu.org
Subject: Re: [O] One-keystroke command to move blocks of text up and down


On 24.2.2013, at 16:53, Susan Cragin susancra...@earthlink.net wrote:

 I use Meta-up-arrow and Meta-down-arrow to move headings in org and entries 
 in spreadsheets. 
 Would like to be able to use the same or similar command to move blocks of 
 text up or down. 
 The current solution--highlight then kill/yank--is just too slow.
 Suggestions?

Hi Susan,

what do you mean by blocks.  A paragraph?  Does the command

M-x mark-paragraph

select the right amount of text?  If so, you could try the command 
transpose-paragraphs.

- Carsten

No. I have the following example. Each of these sentences is a paragraph 
because it has a carriage return after it. I need to re-order the 
sentence/paragraphs into correct order. 

** Journal
This is paragraph three. 
This is paragraph two. 
This is paragraph one. 

** Other Heading





Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes:

 D M German writes:
 I see two ways to solve this. The first is simply to replace the output
 format of the variable from %S to '%s' (use quotes ').

 I think that's the right thing to do.  There shouldn't be anything in
 the table that needs to be interpolated by Perl while the variable is
 defined.

 +(format '%s' var)))

 A slightly more perlish way would be to use
(format q(%s) var)))


I just added the variable `org-babel-perl-var-wrap', into ob-perl.el

;; emacs-lisp
(defvar org-babel-perl-var-wrap q(%s)
  Wrapper for variables inserted into Perl code.)

This way we will get what sounds like improved wrapping by default, but
users who really do want to insert interpolated values can customize
this variable.


 Debugging perl is very cumbersome in org-mode. It would be nice to have
 a feature to export the source to a file. This is because the variable
 expansion needs to be done before the code can be used (hence simply cut
 and paste does not work, nor shell-command-on-region)

 The other languages have the same problem, maybe there should be a
 general option to mirror the commands into a source block in the org
 file or to make the buffer with the program to be eval'ed stick around.

 Eric, WDYT?

Are you familiar with `org-babel-expand-src-block' bound to C-c C-v v?
If I understand the desire correctly, it should be what you're after.
Perhaps an option to raise the expanded source code buffer along with
the error buffer when an error is raised would be a useful addition.

 Also, I'm not really sure why we need all the complexity of
 shell-command-on-region when it looks like we should be able to
 call-process-region ourselves.  Modifying Babel to run (non-session
 and perhaps optionally) from files instead of buffers seems to be a
 more wide-reaching operation.


This complexity is related to the need to occasionally run in remote
directories or on remote machines.  If there are ways to reduce this
complexity without losing functionality I'm game.


 As we are into it, I found this declaration to be very useful. 
 […]

 I think this is better done by altering org-babel-perl-command to
 include -Mstrict.  If you put the helper functions into a module in
 @INC or tell Perl where to find them, then you can add -Mmyhelper as
 well.  Here's a wrapper to match:

 (defvar org-babel-perl-wrapper-method
   {
   my @r = eval( q(%s) );
   open my $BO, qq(%s));
   print $BO join($\\, @r), $\\ ;
 })

 For your problem with :results output blocks, I think it would be
 possible to wrap them (a bit differently) also, but the helper module
 above would also solve this problem, so let's see what Eric says since I
 don't know if another language has already set a precedent of wrapping
 these commands too.


I'm not currently aware of any language-wide support for printing the
expanded code block along with the results.  I don't think there has
been any desire for this previously.  It shouldn't be hard to write an
emacs lisp block to give the desired result...

Here's an example of such a function.  Please forgive my complete lack
of Perl knowledge (at one time I knew it well). Note that I had to make
a small change to the return value of `org-babel-expand-src-block'.

#+name: table
| 1 | 2 | 3 |
| 4 | 5 | 6 |

#+name: perl-block
#+begin_src perl :var table=table
  print $table
#+end_src

#+RESULTS: perl-block
: 1

#+begin_src emacs-lisp :var block=perl-block :results raw
  (save-excursion
(message block is %S block)
(org-babel-goto-named-src-block block)
(format #+begin_example\n%S\n↓\n%s\n#+end_example\n
(org-babel-expand-src-block)
(org-babel-execute-src-block)))
#+end_src

#+RESULTS:
#+begin_example
$table=[[q(1), q(2), q(3)], [q(4), q(5), q(6)]];
print $table
↓
1

#+end_example




 Finally, if interested, i can write a couple of examples for Perl that
 could help people who want to use it. 

 Also a few tests would be highly welcome.


+1

Cheers,



 Regards,
 Achim.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte


Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 On 24.2.2013, at 16:53, Susan Cragin susancra...@earthlink.net wrote:

 I use Meta-up-arrow and Meta-down-arrow to move headings in org and entries 
 in spreadsheets. 
 Would like to be able to use the same or similar command to move blocks of 
 text up or down. 
 The current solution--highlight then kill/yank--is just too slow.
 Suggestions?

 Hi Susan,

 what do you mean by blocks.  A paragraph?  Does the command

 M-x mark-paragraph

 select the right amount of text?  If so, you could try the command
 transpose-paragraphs.

M-up and M-down also move paragraphs and most blocks (in Org 7.9).
Unfortunately, binding is shadowed when trying to move a src block.


Regards,

-- 
Nicolas Goaziou



[O] [NEW EXPORTER] [BUG] HTML_CONTAINER_CLASS property ignored

2013-02-24 Thread Rick Frankel
Nicolas-

The new HTML exporter does not actually use the value of the
:HTML_CONTAINER_CLASS: property. The old exporter saved the value off
into the property :html-container-class on the headline (with
`org-export-remember-html-container-classes'), the new exporter
references the `:html-container-class' property on the headline, but i
see no way to set it.

My guess is that on ox-html.el:1917 (the only reference to 
:html-container-class)
   
   (extra-class (org-element-property :html-container-class headline))

should be

   (extra-class (org-element-property :HTML_CONTAINER_CLASS headline))

Does this seem the correct fix to you?

rick



[O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-24 Thread Myles English

Hi,

I have just pulled from git and have been migrating to use the new
exporter.

I have a problem where org-preview-latex-fragment appears not to use a
style file the latex header.

Starting emacs like this:

emacs -Q -l ~/minimal.el ~/file.org

When I export the whole buffer to pdf it looks right.

When I call org-preview-latex-fragment on the fragment the definitions
in a.sty are not picked up.  This previously worked when using the
new exporter before it was merged.

Can anyone help?

Thanks,
Myles


-- ~/bug.sty --
\newcommand{\mysymbol}{\mathbf v}

-- minimal.el 
(add-to-list 'load-path ~/.emacs.d/plugins/org-mode/lisp)
(require 'ox)

-- file.org ---
#+STARTUP: indent
#+LATEX_HEADER: \usepackage{~/bug}

* heading

\[ \mysymbol = f \]-- NO WORK

\[ 0 = f \]-- WORKS

--



Re: [O] [PATCH] bug in expansion of variables in babel Perl

2013-02-24 Thread Achim Gratz
D M German writes:
 I found a bug in the Babel perl code. When a table is used as input, the
 values of the table  are not escaped.

Here are two patches that fix this and implement (partly) some of your
suggestions.  I don't think Org should pollute the global Perl namespace
by default, so I've left the definition of org-babel-perl-preface to the
user for now.  The second patch has the debugging aid you've been
requesting, if you bind the symbol org-babel--debug-input to anything
the temporary input files won't be deleted after the code has run.

From 7a668942b58dc94994b11e6ec0751ec36b07b196 Mon Sep 17 00:00:00 2001
From: Achim Gratz strom...@stromeko.de
Date: Sun, 24 Feb 2013 13:28:50 +0100
Subject: [PATCH 1/2] ob-perl: modify variable definition to be compatible with
 strict and use non-interpolating quotes

* lisp/ob-perl.el (org-babel-variable-assignments:perl): Add my to
  variable declaration so that it becomes compatible with use
  strict;.
* lisp/ob-perl.el (org-babel-perl-var-to-perl): Use Perl
  non-interpolating quoting on the string that defines the variable to
  suppress spurious interpretation of it as Perl syntax.
* lisp/ob-perl.el (org-babel-perl-wrapper-method): Use a block and
  declare all variables as my, also use Perl quoting and the output
  record separator instead of a literal LF character.  Do away with
  the subroutine definition and use eval instead.
* lisp/ob-perl.el (org-babel-perl-preface): Content of this variable
  is prepended to body before invocation of perl.
* lisp/ob-perl.el (org-babel-perl-evaluate): Rename input parameter
  body to ibody and let-bind body to concatentation of
  org-babel-perl-preface and ibody.

Following a suggestion by Daniel M. German in
http://thread.gmane.org/gmane.emacs.orgmode/66855.
---
 lisp/ob-perl.el | 37 -
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/lisp/ob-perl.el b/lisp/ob-perl.el
index ccd3826..53f166e 100644
--- a/lisp/ob-perl.el
+++ b/lisp/ob-perl.el
@@ -62,7 +62,7 @@ (defun org-babel-variable-assignments:perl (params)
   Return list of perl statements assigning the block's variables.
   (mapcar
(lambda (pair)
- (format $%s=%s;
+ (format my $%s=%s;
 	 (car pair)
 	 (org-babel-perl-var-to-perl (cdr pair
(mapcar #'cdr (org-babel-get-header params :var
@@ -75,7 +75,7 @@ (defun org-babel-perl-var-to-perl (var)
 specifying a var of the same value.
   (if (listp var)
   (concat [ (mapconcat #'org-babel-perl-var-to-perl var , ) ])
-(format %S var)))
+(format q(%s) var)))
 
 (defvar org-babel-perl-buffers '(:default . nil))
 
@@ -84,31 +84,34 @@ (defun org-babel-perl-initiate-session (optional session params)
   nil)
 
 (defvar org-babel-perl-wrapper-method
-  
-sub main {
+  {
+  my @r = eval( q(
 %s
-}
-@r = main;
-open(o, \%s\);
-print o join(\\\n\, @r), \\\n\)
+  ));
+  open my $BO, qq(%s) or die qq( Perl: Could not open output file.$\\ );
+  print $BO join($\\, @r), $\\ ;
+})
+
+(defvar org-babel-perl-preface nil)
 
 (defvar org-babel-perl-pp-wrapper-method
   nil)
 
-(defun org-babel-perl-evaluate (session body optional result-type)
+(defun org-babel-perl-evaluate (session ibody optional result-type)
   Pass BODY to the Perl process in SESSION.
 If RESULT-TYPE equals 'output then return a list of the outputs
 of the statements in BODY, if RESULT-TYPE equals 'value then
 return the value of the last statement in BODY, as elisp.
   (when session (error Sessions are not supported for Perl))
-  (case result-type
-(output (org-babel-eval org-babel-perl-command body))
-(value (let ((tmp-file (org-babel-temp-file perl-)))
-	 (org-babel-eval
-	  org-babel-perl-command
-	  (format org-babel-perl-wrapper-method body
-		  (org-babel-process-file-name tmp-file 'noquote)))
-	 (org-babel-eval-read-file tmp-file)
+  (let ((body (concat org-babel-perl-preface ibody)))
+(case result-type
+  (output (org-babel-eval org-babel-perl-command body))
+  (value (let ((tmp-file (org-babel-temp-file perl-)))
+	   (org-babel-eval
+		org-babel-perl-command
+		(format org-babel-perl-wrapper-method body
+			(org-babel-process-file-name tmp-file 'noquote)))
+	   (org-babel-eval-read-file tmp-file))
 
 (provide 'ob-perl)
 
-- 
1.8.1.4

From 6827b07c0e8a03eea11d86ea714c8f10fb05b43d Mon Sep 17 00:00:00 2001
From: Achim Gratz strom...@stromeko.de
Date: Sun, 24 Feb 2013 17:15:36 +0100
Subject: [PATCH 2/2] ob-eval: make org-babel--shell-command-on-region internal
 and simplify
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/ob-eval.el (org-babel-eval): Use simplified version of
  `org-babel--shell-command-on-region´, we are the only caller of this
  function.
* lisp/ob-eval.el (org-babel--shell-command-on-region): Replace
  `org-babel-shell-command-on-region´ with a much more simplified
  internal version, remove superfluous DOCSTRING and interactive
  

Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Susan Cragin
M-up and M-down also move paragraphs and most blocks (in Org 7.9).
Unfortunately, binding is shadowed when trying to move a src block.

When I try that I get these messages:
Cannot drag this element forward. 
Cannot drag this element backward.





Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread Achim Gratz
Eric Schulte writes:
 I just added the variable `org-babel-perl-var-wrap', into ob-perl.el

 ;; emacs-lisp
 (defvar org-babel-perl-var-wrap q(%s)
   Wrapper for variables inserted into Perl code.)

 This way we will get what sounds like improved wrapping by default, but
 users who really do want to insert interpolated values can customize
 this variable.

It would be impossible to use any user variables for interpolation since
we don't have Perl sessions, so only pre-defined variables from Perl
would ever deliver a value (perhaps).  So all interpolation would do
most of the the time is to replace something that happens to look like a
perl variable by nothing.  Having the variable doesn't hurt, but I'm not
sure we should advertize its existence widely since with a more devious
definition you can do arbitrary code execution.

 This complexity is related to the need to occasionally run in remote
 directories or on remote machines.  If there are ways to reduce this
 complexity without losing functionality I'm game.

Already done by throwing away those parts of the code we never used
anyway.  It looks much more manageable now.

 I'm not currently aware of any language-wide support for printing the
 expanded code block along with the results.  I don't think there has
 been any desire for this previously.  It shouldn't be hard to write an
 emacs lisp block to give the desired result...

Also done.  The file the OP wanted to look at gets written out anyway,
we just need to prevent its deletion.  This is a manual affair for now,
if this is really a big issue we can add an option for this.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Online manual

2013-02-24 Thread Thomas S. Dye
Aloha Sebastian,

Sebastian Wiesner lunary...@gmail.com writes:

 So is the Org manual written in Org?  I thought it was written in
 Texinfo.  After all, there is a Texinfo document in the Org sources
 [1]. Is this Texinfo document generated from some Org document?

The Org manual is written in texinfo.  A port to Org is in process (see
https://github.com/tsdye/orgmanual.git). 

 Generally, can Org be exported to Texinfo/Info?

The development version of Org includes a new exporter framework,
written by Nicolas Goaziou, and a texinfo exporter, written by Jonathan
Leech-Pepin.  Both of these are under development and the current
behavior is expected to change slightly in the weeks ahead.  I believe
the goal is to have a stable texinfo exporter for version 8.0.

hth,
Tom

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



Re: [O] Online manual

2013-02-24 Thread Jonathan Leech-Pepin
Hello,

On Feb 24, 2013 11:48 AM, Sebastian Wiesner lunary...@gmail.com wrote:

 2013/2/24 Mike McLean mike.mcl...@pobox.com:
 
  On Feb 24, 2013, at 11:03 AM, Sebastian Wiesner lunary...@gmail.com
wrote:
 
  Hello,
 
  how is the online manual of Org mode [1] rendered?  Especially, how is
  the awesome table of contents on the right sight created?
 
  It is done through CSS and I do something similar with most of my HTML
exports. I have a custom CSS that I load by having the following in every
Org file.

 So is the Org manual written in Org?  I thought it was written in
 Texinfo.  After all, there is a Texinfo document in the Org sources
 [1]. Is this Texinfo document generated from some Org document?
 Generally, can Org be exported to Texinfo/Info?

 [1]: http://orgmode.org/cgit.cgi/org-mode.git/tree/doc/org.texi


Currently the manual is in info, however the new exporter has a texinfo
exporter and I know that Thomas Dye is working on converting it to org.

Regards,
Jon


Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread Achim Gratz
Eric Schulte writes:
 Are you familiar with `org-babel-expand-src-block' bound to C-c C-v v?

I wasn't, obviously, and neither was the OP.

 If I understand the desire correctly, it should be what you're after.
 Perhaps an option to raise the expanded source code buffer along with
 the error buffer when an error is raised would be a useful addition.

Yes, so there's no three ways for Perl to get the same result for
comparison.  :-P

Still, the debugging option might be useful when one needs to to see all
sources created during a publish or something like that; when you don't
know if or where the error occured.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-24 Thread Myles English

Just adding some more information.  It gets curiouser and curiouser...


Myles English writes:

 Hi,

 I have just pulled from git and have been migrating to use the new
 exporter.

 I have a problem where org-preview-latex-fragment appears not to use a
 style file the latex header.

 Starting emacs like this:

 emacs -Q -l ~/minimal.el ~/file.org

 When I export the whole buffer to pdf it looks right.

 When I call org-preview-latex-fragment on the fragment the definitions
 in a.sty are not picked up.  This previously worked when using the
 new exporter before it was merged.

 Can anyone help?

 Thanks,
 Myles


 -- ~/bug.sty --
 \newcommand{\mysymbol}{\mathbf v}

 -- minimal.el 
 (add-to-list 'load-path ~/.emacs.d/plugins/org-mode/lisp)
 (require 'ox)

 -- file.org ---
 #+STARTUP: indent
 #+LATEX_HEADER: \usepackage{~/bug}

 * heading

 \[ \mysymbol = f \]-- NO WORK

 \[ 0 = f \]-- WORKS

\[ \dfrac{\partial a}{\partial b} \]  -- The fragment is perfect,
showing it as da/db but the pdf file shows it as dadb instead.

Another strange thing is that if the \[\] is the last thing in the file
apart from some empty lines then org will fold at the end of it i.e. I
see \[\]...


 --

Myles



Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Bastien
Hi Susan,

Susan Cragin susancra...@earthlink.net writes:

M-up and M-down also move paragraphs and most blocks (in Org 7.9).
Unfortunately, binding is shadowed when trying to move a src block.

 When I try that I get these messages:
 Cannot drag this element forward. 
 Cannot drag this element backward.

Can you share the file on which you tested this?

If there is only one paragraph under a headline, you cannot move
it up and down, the move is constrained by the structure of the
file.

Check also C-M-t (Control Meta t) to transpose elements and
S-M-up/down to move a line up and down (this last command is
structure-agnostic and can be handy sometimes.)

HTH,

-- 
 Bastien



Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Nick Dokos
Susan Cragin susancra...@earthlink.net wrote:

 From: Carsten Dominik carsten.domi...@gmail.com
 On 24.2.2013, at 16:53, Susan Cragin susancra...@earthlink.net wrote:
 
  I use Meta-up-arrow and Meta-down-arrow to move headings in org and 
  entries in spreadsheets. 
  Would like to be able to use the same or similar command to move blocks of 
  text up or down. 
  The current solution--highlight then kill/yank--is just too slow.
  Suggestions?
 
 Hi Susan,
 
 what do you mean by blocks.  A paragraph?  Does the command
 
 M-x mark-paragraph
 
 select the right amount of text?  If so, you could try the command 
 transpose-paragraphs.
 
 - Carsten
 
 No. I have the following example. Each of these sentences is a
 paragraph because it has a carriage return after it. I need to
 re-order the sentence/paragraphs into correct order.
 
 ** Journal
 This is paragraph three. 
 This is paragraph two. 
 This is paragraph one. 
 
 ** Other Heading
 

That's a word processor definition of a paragraph that doesn't really
work with an editor like emacs. It is more likely you will find
paragraph nirvana in emacs if you follow the TeX model where paragraphs
are separated by empty lines.  For example, there are newlines after
each line of this block of text, and an empty line separating it from
the next block of text, so emacs considers each of these blocks a
paragraph: try M-x mark-paragraph and you will see (transient-mark-mode
helps to see the boundaries).

So if you have a second paragraph like this, you can use Carsten's
suggestion of M-x transpose-paragraphs and switch them around (point has
to be somewhere in the first paragraph, including the empty line
separating it from the second for this to work).

If your paragraphs are single lines, as in your example, you can use
transpose-lines to move the lines around (bound to C-x C-t).

HTH,
Nick



Re: [O] bug in expansion of variables in babel Perl

2013-02-24 Thread D M German



 Achim D M German writes:
 Achim […]

 Achim Please leave the formats alone, if you change the number of parameters
 Achim there folks that use their own definitions won't know what hit them.
 Achim What you want is to prepend something to the body that Babel gives you,
 Achim so let-bind that result and use it.  You could even advise the function
 Achim and have it submit to your will without changing Org.

Hi Achim, thanks for the recommendation. As I said before, see my
previous patch as a proof-of-concept and not as something that I think
should be applied. I am fully aware of the potential consequences.

 Achim BTW, now that I think some more about it: debugging Perl is much easier
 Achim than you seem to let on:

 Achim (setq org-babel-perl-command perl -Mstrict -ne print).

Using strict is complicated by use of variables from org tables and the
way that the code in R is executed. It would require the variable @r and
each of the created variables from tables to be defined as my. I know I
can change the behaviour of org-babel-variable-assignment, but perhaps
simply adding my to any variable created in org would be a good thing
to do. I don't think it would harm, anyways.

 Achim This will echo the program sent to Perl in full glory into the output
 Achim block.

thanks, this i a great suggestion that I didn't know about.

--dmg


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

 Achim Waldorf MIDI Implementation  additional documentation:
 Achim http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




--
Daniel M. German  Beware of bugs in the above code;
   I have only proved it
   Donald Knuth  -correct, not tried it.
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 



Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Bastien
Hi Susan,

Susan Cragin susancra...@earthlink.net writes:

 No. I have the following example. Each of these sentences is a paragraph
 because it has a carriage return after it. 

That's your definition but that's not what Emacs and Org understand.
By default, a paragraph needs at least two line breaks.

 I need to re-order the
 sentence/paragraphs into correct order.

 ** Journal
 This is paragraph three. 
 This is paragraph two. 
 This is paragraph one. 

 ** Other Heading

So you need S-M-up/down which moves the line at point up/down.

HTH,

-- 
 Bastien



Re: [O] org-mode git, el-get, recently many functions' defintion void

2013-02-24 Thread Maciek Starzyk
Hi Jeff,

Try removing contrib/lisp from the load path in el-get's org-mode recipe.
It resolved the missing org-element-context issue for me.

Cheers,
Maciek

diff --git a/recipes/org-mode.rcp b/recipes/org-mode.rcp
index 32d988e..daf5e41 100644
--- a/recipes/org-mode.rcp
+++ b/recipes/org-mode.rcp
@@ -12,4 +12,4 @@
  (lambda (target)
(list make target (concat EMACS=
(shell-quote-argument el-get-emacs
  '(oldorg))
-   :load-path (. lisp contrib/lisp))
+   :load-path (. lisp))



On Wed, Feb 20, 2013 at 6:38 AM, Jeff Kowalczyk j...@yahoo.com wrote:

 I use emacs-24, org-mode from git, el-get from git. Each morning I update
 org-mode, make clean  make.

 About 2-3 days ago, I noticed the org-export dispatcher wasn't working.
 Then I
 saw increasing functional areas of org returning errors re: function
 definition
 void:

 : org-ctrl-c-ctrl-c: Symbol's function definition is void:
 org-element-context
 : Updating dynamic block `clocktable' at line 100276...
 : org-clocktable-write-default: Symbol's function definition is void:
 org-table-align

 To eliminate possible interactions of recent changes. I've checked out
 org-mode
 from a week ago, and same with el-get. There is no change in the problem.
 I've
 removed el-get .loaddefs.el[c], and allowed them to regenerate.

 Any suggestions on how to debug? It certainly could be el-get and nothing
 to do
 with org-mode.

 Thanks,
 Jeff






-- 
Maciek Starzyk


Re: [O] [NEW EXPORTER] [BUG] HTML_CONTAINER_CLASS property ignored

2013-02-24 Thread Bastien
Hi Rick,

Rick Frankel r...@rickster.com writes:

 My guess is that on ox-html.el:1917 (the only reference to 
 :html-container-class)

(extra-class (org-element-property :html-container-class headline))

 should be

(extra-class (org-element-property :HTML_CONTAINER_CLASS headline))

 Does this seem the correct fix to you?

Yes.  Fixed, thanks!

-- 
 Bastien



Re: [O] [RFC] [PATCH] conditional use of latex packages

2013-02-24 Thread Aaron Ecay
Hi Nicolas,

Thank you for your comments on this patch.  I appreciate your concerns
about the ordering of packages – this was something I had not considered
fully.  I have reworked the implementation; I think it is now simpler
and more robust.  Instead of a new customization variable, I’ve added a
field to ‘org-latex-(default-)packages-alist’, which indicates whether a
package is to be loaded always, or only if needed.  This is very similar
to the mechanism that already exists to load only a subset of packages
when compiling latex snippets.  This flag is initially set to nil for
all packages, which loads them unconditionally – that is, the default
behavior is unchanged.  Users can set this flag to t for packages for
which they are sure that optional loading is appropriate.

2013ko otsailak 21an, Nicolas Goaziou-ek idatzi zuen:
[...]
 
 My point was that they provide distinct features, so they should be
 included in different sets. But that's your call, really.

You are right about this – I could not see the forest for the trees.
I’ll send the tikz images patch separately.

 Except that the latex exporter supports it,
 
 Technically, latex exporter supports every package. That doesn't mean
 all of them should by included in `org-latex-default-packages-alist'.

What I meant was that the code for the latex exporter specifically
mentions those packages.  There is a very small set of latex packages
that are “blessed” in that way.

   1. it's impossible to guess every package required by an user, so he
 would ultimately have to mess with even more variables to get what he
 wants (I only suggest to tweak `org-latex-class' and, optionally to
 stuff package GCD in `org-latex-packages-alist').

Hopefully the new version of the patch addresses this concern.

 
   2. In general, it's a bad idea to hide LaTeX internals too much as
 it can become very hard to fix a problem when things happen in your
 back.

Well, the LaTeX file which is the output of org’s exporter is always
available for debugging if something goes wrong.  The new patch
explicitly indicates when a package is omitted because org thinks it is
unnecessary, so hopefully it will be very obvious when something goes
wrong.  (Also, org omitting a package will only happen if the user
requests it explicitly.)

The patch should appear as a reply to this email.

-- 
Aaron Ecay



[O] [PATCH] ox-latex: add optional-packages machinery

2013-02-24 Thread Aaron Ecay
This code allows latex packages to be inserted into the output
document only if they are needed.  The function
‘org-latex--record-package’ is provided for code to signal that it
wants a package inserted into the output.  The
‘org-latex-packages-(default-)alist’ variables are extended with an
additional field, which indicates whether each package is to be loaded
always, or only if requested by a call to ‘org-latex--record-package’.

By default, all packages are loaded unconditionally (matching the
present behavior).  The ‘minted’, ‘longtable’, ‘listings’, ‘color’,
‘graphicx’, ‘booktabs’ and ‘wrapfig’ latex packages are requested when
needed, so they may be set to load conditionally.
---
 lisp/org.el  | 88 +++-
 lisp/ox-latex.el | 26 +++--
 2 files changed, 79 insertions(+), 35 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 1d83aa4..51be09c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3735,34 +3735,40 @@ header, or they will be appended.
 (defun org-set-packages-alist (var val)
   Set the packages alist and make sure it has 3 elements per entry.
   (set var (mapcar (lambda (x)
-(if (and (consp x) (= (length x) 2))
-(list (car x) (nth 1 x) t)
+(if (listp x)
+(list (nth 0 x)
+  (nth 1 x)
+  (or (nth 2 x) t)
+  (nth 3 x))
   x))
   val)))
 
 (defun org-get-packages-alist (var)
   Get the packages alist and make sure it has 3 elements per entry.
   (mapcar (lambda (x)
-   (if (and (consp x) (= (length x) 2))
-   (list (car x) (nth 1 x) t)
+   (if (listp x)
+   (list (nth 0 x)
+ (nth 1 x)
+ (or (nth 2 x) t)
+ (nth 3 x))
  x))
  (default-value var)))
 
 (defcustom org-latex-default-packages-alist
-  '((AUTO inputenc  t)
-(T1   fontenc   t)
-( fixltx2e  nil)
-( graphicx  t)
-( longtable nil)
-( float nil)
-( wrapfig   nil)
-( soul  t)
-( textcomp  t)
-( marvosym  t)
-( wasysym   t)
-( latexsym  t)
-( amssymb   t)
-( hyperref  nil)
+  '((AUTO inputenc  t   nil)
+(T1   fontenc   t   nil)
+( fixltx2e  nil nil)
+( graphicx  t   nil)
+( longtable nil nil)
+( float nil nil)
+( wrapfig   nil nil)
+( soul  t   nil)
+( textcomp  t   nil)
+( marvosym  t   nil)
+( wasysym   t   nil)
+( latexsym  t   nil)
+( amssymb   t   nil)
+( hyperref  nil nil)
 \\tolerance=1000)
   Alist of default packages to be inserted in the header.
 
@@ -3786,9 +3792,12 @@ Therefore you should not modify this variable unless you 
know
 what you are doing.  The one reason to change it anyway is that
 you might be loading some other package that conflicts with one
 of the default packages.  Each cell is of the format
-\( \options\ \package\ snippet-flag).  If SNIPPET-FLAG is t,
-the package also needs to be included when compiling LaTeX
-snippets into images for inclusion into non-LaTeX output.
+\(\options\ \package\ snippet-flag conditional-load).  If
+SNIPPET-FLAG is t, the package also needs to be included when
+compiling LaTeX snippets into images for inclusion into non-LaTeX
+output.  If CONDITIONAL-LOAD is t, the package will be loaded
+only if needed by the exporter (as signaled by calls to
+`org-latex--use-package'.)
   :group 'org-latex
   :group 'org-export-latex
   :set 'org-set-packages-alist
@@ -3799,7 +3808,8 @@ snippets into images for inclusion into non-LaTeX output.
   (list :tag options/package pair
 (string :tag options)
 (string :tag package)
-(boolean :tag Snippet))
+(boolean :tag Snippet)
+(boolean :tag Conditional load))
   (string :tag A line of LaTeX
 
 (defcustom org-latex-packages-alist nil
@@ -3808,11 +3818,13 @@ snippets into images for inclusion into non-LaTeX 
output.
 These will be inserted after `org-latex-default-packages-alist'.
 Each cell is of the format:
 
-\(\options\ \package\ snippet-flag)
+\(\options\ \package\ snippet-flag conditional-load)
 
 SNIPPET-FLAG, when t, indicates that this package is also needed
 when turning LaTeX snippets into images for inclusion into
-non-LaTeX output.
+non-LaTeX output.  If CONDITIONAL-LOAD is t, the package will be
+loaded only if needed by the exporter (as signaled by calls to
+`org-latex--use-package'.)
 
 Make sure that you only list packages here which:
 
@@ -3829,7 +3841,8 @@ Make sure that you only list packages here which:
   (list :tag options/package pair
 (string :tag options)
 (string :tag package)
-  

[O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-24 Thread Aaron Ecay
Tikz graphics should be exported to LaTeX by \include, not as a link.
This commit changes the file extension used for tikz graphics from .tex
to .tikz.

TINYCHANGE
---
 lisp/ob-R.el |  2 +-
 lisp/ox-latex.el | 22 +-
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 8db0853..9875f81 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -237,7 +237,7 @@ current code buffer.
 '((:bmp . bmp)
   (:jpg . jpeg)
   (:jpeg . jpeg)
-  (:tex . tikz)
+  (:tikz . tikz)
   (:tiff . tiff)
   (:png . png)
   (:svg . svg)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 0ac251f..13da3f0 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -482,7 +482,7 @@ which format headlines like for Org version prior to 8.0.
   :type 'string)
 
 (defcustom org-latex-inline-image-rules
-  '((file . \\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\)\\'))
+  '((file . \\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\)\\'))
   Rules characterizing image files that can be inlined into LaTeX.
 
 A rule consists in an association whose key is the type of link
@@ -1737,6 +1737,7 @@ used as a communication channel.
 (path (let ((raw-path (org-element-property :path link)))
 (if (not (file-name-absolute-p raw-path)) raw-path
   (expand-file-name raw-path
+(filetype (file-name-extension path))
 (caption (org-latex--caption/label-string parent info))
 ;; Retrieve latex attributes from the element around.
 (attr (org-export-read-attribute :attr_latex parent))
@@ -1764,22 +1765,25 @@ used as a communication channel.
  ((org-string-nw-p opt) (format [%s] opt))
  ((eq float 'float) [width=0.7\\textwidth])
  ((eq float 'wrap) [width=0.48\\textwidth])
- (t )
+ (t 
+(image-code (if (equal filetype tikz)
+(format \\input{%s} path)
+  (format \\includegraphics%s{%s} options path
 ;; Return proper string, depending on FLOAT.
 (case float
   (wrap (format \\begin{wrapfigure}%s
 \\centering
-%s\\includegraphics%s{%s}
-%s\\end{wrapfigure} placement comment-include options path caption))
+%s%s
+%s\\end{wrapfigure} placement comment-include image-code caption))
   (multicolumn (format \\begin{figure*}%s
 \\centering
-%s\\includegraphics%s{%s}
-%s\\end{figure*} placement comment-include options path caption))
+%s%s
+%s\\end{figure*} placement comment-include image-code caption))
   (figure (format \\begin{figure}%s
 \\centering
-%s\\includegraphics%s{%s}
-%s\\end{figure} placement comment-include options path caption))
-  (t (format \\includegraphics%s{%s} options path)
+%s%s
+%s\\end{figure} placement comment-include image-code caption))
+  (t image-code
 
 (defun org-latex-link (link desc info)
   Transcode a LINK object from Org to LaTeX.
-- 
1.8.1.4




Re: [O] Exporter question

2013-02-24 Thread Bastien
Carsten Dominik carsten.domi...@gmail.com writes:

 I am curious why you chose the name optional_title for the
 property?  Why not, for example TOC_TITLE or something like this?

I suggest EXPORT_ALT_TITLE instead.

The EXPORT_ prefix seems more consistent with EXPORT_TITLE,
and ALT sounds clearer (and short enough) to me.

(I first thought TITLE was a bit confusing: IIRC, EXPORT_TITLE
was first introduced for replacing the real title of the doc when
exporting only one subtree... but the title of a headline is
okay, so let's stick to TITLE.)

-- 
 Bastien



Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Susan Cragin
M-up and M-down also move paragraphs and most blocks (in Org 7.9).
Unfortunately, binding is shadowed when trying to move a src block.

 When I try that I get these messages:
 Cannot drag this element forward. 
 Cannot drag this element backward.

Can you share the file on which you tested this?

Here is the file. Most elements have been removed. The test was under today's 
date. 

If there is only one paragraph under a headline, you cannot move
it up and down, the move is constrained by the structure of the
file.

Check also C-M-t (Control Meta t) to transpose elements and
S-M-up/down to move a line up and down (this last command is
structure-agnostic and can be handy sometimes.)

Hmmm 
S-M-up/down should be the ticket but doesn't work for me. 
Assume this is SHIFT-ALT (held down together) up arrow. 
Also tried SHIFT-ESC up. 



temp.org
Description: Binary data


Re: [O] Publishing http links inside a begin_src

2013-02-24 Thread Emilio Torres Manzanera

Hi Bastien,

I have downloaded a new version form an ELPA repository: Org-mode version 
7.9.3e (7.9.3e-16-gf8b15d-elpa @ /home/emilio/.emacs.d/elpa/org-20130218/). It 
runs fine!

Thank you very much for your hard work and endless technical support
¡Muchísimas gracias!
Emilio



Bastien b...@altern.org writes:

 From: Bastien b...@altern.org
 To: tor...@uniovi.es
 Cc: emacs-orgmode@gnu.org
 Subject: Re: Publishing http links inside a begin_src
 Flags: new, unread
 Date: dom 24 feb 2013 09:24:20 CET
 Maildir: /inbox

 Emilio Torres Manzanera tor...@uniovi.es writes:

 What should I do to test this issue?

 If you can, please test with a more recent Org, e.g. 7.9.3f:

   http://orgmode.org/org-7.9.3f.tar.gz

 You can also clone the git repository:

   ~$ git clone git://orgmode.org/org-mode.git

 See http://orgmode.org/org.html#Installation for details.

 Thanks!


-- 
=
Emilio Torres Manzanera
Fac. de Comercio - Universidad de Oviedo
c/ Luis Moya 261, E-33203 Gijón (Spain)
Tel. 985 182 197 email: tor...@uniovi.es
=



Re: [O] block quotes in prose?

2013-02-24 Thread Peter Salazar
Excellent! Thank you so much! :-)


On Sat, Feb 23, 2013 at 4:54 AM, Bastien b...@altern.org wrote:

 Hi Peter,

 Peter Salazar cycleofs...@gmail.com writes:

  What about John Hendy's suggestion of finding a face I like, and then
  adding ^ text... to the list of things org fontifies with that
  style? ('In other words, add ^ text regexp to the existing hunt
  for lines that start with #+ in order to get src code fontification
  applied.')
 
  Is this feasible?

 Use this somewhere in your configuration:

   (font-lock-add-keywords
'org-mode '((^\\(:+\\)  1 (compose-region (match-beginning 1)
 (match-end 1) ? ) nil)))

 M-x org-mode RET in an org-mode buffer if you evaluate this sexp after
 you visited the file, otherwise the change will not be visible.

 HTH,

 --
  Bastien



Re: [O] footnotes export verbatim

2013-02-24 Thread Samuel Wales
On 2/24/13, Nicolas Goaziou n.goaz...@gmail.com wrote:
 Samuel Wales samolog...@gmail.com writes:
 On 2/20/13, Nicolas Goaziou n.goaz...@gmail.com wrote:
   The basic syntax is similar to the one used by `footnote.el', i.e.
   a footnote is defined in a paragraph that is started by a footnote
   marker in square brackets in column 0, no indentation allowed. If you
   need a paragraph break inside a footnote, use the LaTeX idiom `\par'.

 I am aware of that, but blank lines were allowed after a while.  One
 issue was filling.

 Even \par fails to work now.  :(

 It should now be fixed.  Just replace \par with an empty line.

The fix does not work.

I tried blank line and it still exported verbatim.

I then tried \par, and it still filled the footnote and inserted \par into it.

If this cannot be fixed, then I need some way of filtering to achieve it.

Samuel

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Re: [O] One-keystroke command to move blocks of text up and down

2013-02-24 Thread Bastien
Hi Susan,

Susan Cragin susancra...@earthlink.net writes:

 Hmmm 
 S-M-up/down should be the ticket but doesn't work for me. 
 Assume this is SHIFT-ALT (held down together) up arrow. 
 Also tried SHIFT-ESC up. 

Yes, this is shift-alt-up/down, but I just fixed it.

If git is installed on your system, please update Org from
cloning the repository:
  
  ~$ cd git/
  ~$ git clone git://orgmode.org/org-mode.git
  ~$ cd org-mode/
  ~$ make

Then add the directory to your load-path as described in
the manual:

  http://orgmode.org/org.html#Installation

Otherwise I'm afraid you'll have to wait till Org is
updated on your system.

HTH,

-- 
 Bastien



Re: [O] Feature: Group and limit items in agenda

2013-02-24 Thread Samuel Wales
One other use here is to show a small random sample of your tasks
without affecting speed.

In before sorting filter function, set a pseudorandom number (biased
according to a distribution of your choice) on a text property.  You
can set some to appear always.

In the mapcar function, use user-defined sorting to sort according to
the numbers and limit to just the first 5.

Can defadvice be relied on to keep working in future versions of Org?

On 2/23/13, Bastien b...@altern.org wrote:
 Hi Muchenxuan,

 Muchenxuan Tong demon...@gmail.com writes:

 There's a 'org-agenda-before-sorting-filter-function' variable.
 However, I'm not able to use it for grouping things, because it's
 used as '(mapcar org-agenda-before-sorting-filter-function list)'

 Would it be useful to add another function here, not used in
 'mapcar', but work directly on the whole list? I don't know whether
 it is worthy, and I'm OK if that's not general enough to be added,
 because I can use defadvice anyway :)

 Well, I guess you don't want the grouping to take place *before* the
 sorting, as the sorting may destroy it, so a defadvice is the way to
 go here I'd say.  If your defadvice can be useful for others, please
 consider adding it to Worg! (Just send me your public key and I'll
 give you write access to Worg.)

 Thanks,

 --
  Bastien




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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Re: [O] Bug: New HTML exporter incorrect attributes

2013-02-24 Thread Samuel Wales
For flexibility and future proofing, it might be worth considering
universal syntax (e.g. $[link ... :attr1 ... :attr2 ... ...]) for
fancy links instead of changing link syntax.

I've called it extensible syntax too.

Samuel

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Re: [O] comments after paragraph remove newline

2013-02-24 Thread Samuel Wales
On 2/22/13, Nicolas Goaziou n.goaz...@gmail.com wrote:
 I don't think we need it. I have pushed a patch for that. Note that now,
 blank lines before the comment and after it will accumulate.

Thank you.  It works now.

I wonder if we should consider something more fancy for ascii backend
(only).  Delete blank lines between comment and headline, and between
comment and comment.

Samuel

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



[O] [PATCH] datetree: Recognize year headline with tags as a match

2013-02-24 Thread Tim Burt

* lisp/org-datetree.el (org-datetree-find-year-create):
  Include regexp for tags.  Syntax was taken directly
  from org-todo-line-tags-regexp in org.el.

Change made to fix the problem where a year headline of a
datetree was not matched if it had a tag.  The :NOEXPORT: tag
is one useful case that should be matched.

Initial problem observation reported by Jeffrey McBeth on the
org-mode mailing list.

TINYCHANGE
---
 lisp/org-datetree.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index f2e35fa..0102393 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -72,7 +72,7 @@ tree can be found.
   (goto-char (prog1 (point) (widen))
 
 (defun org-datetree-find-year-create (year)
-  (let ((re ^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\s-*$)
+  (let ((re ^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\(.*?\\([ 
\t]:[[:alnum:]:_@#%]+:\\)?\\s-*$\\))
match)
 (goto-char (point-min))
 (while (and (setq match (re-search-forward re nil t))
-- 
1.7.11.7




Re: [O] org-capture, datetree, and tags

2013-02-24 Thread Tim Burt

I have just submitted a patch.  It is marked with TINYCHANGE so that it
can be processed before the assignment paperwork (which I just began
today) is complete.

Good day,
Tim

Tim Burt tcb...@rochester.rr.com writes:

 Bastien b...@altern.org writes:

 Hi Tim,

 Tim Burt tcb...@rochester.rr.com writes:

 :  (defun org-datetree-find-year-create (year)
 :(let ((re ^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)[ 
 \t]*\\(:[[:alnum:]_@]*\\)*:*[ \t]*$)
 :  match)
 I've tested with the following headlines:
  - 2013
- both with and without trailing spaces
  - 2013 :abc:
  - 2013 :abc123:
  - 2013 :abc123:_underscore:@attaboy::
  - 2013 :noexport:

 Any comments on the regular expression are welcome before I make
 patch.

 Thanks for working on fixing this.

 The more or less standard regexp for tags-till-end-of-line is this:

:[[:alnum:]_@#%:]*[ \t]*$
 ^

 With * if you want to match headlines with no tag.

 I may have misapplied what you suggested, but the new regexp (see below)
 does not work on a year headline without tags.
 :  (defun org-datetree-find-year-create (year)
 :(let ((re ^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)[ 
 \t]*\\(:[[:alnum:]_@#%:]*[ \t]*$\\))
 :  match)
 However, the suggestion helped me find the following in 
 org-todo-line-tags-regexp
  \\(.*?\\([ \t]:[[:alnum:]:_@#%]+:[ \t]*\\)?$\\)
 Applying this regexp worked on a tag-free headline (both with and
 without trailing spaces)
 :  (defun org-datetree-find-year-create (year)
 :(let ((re ^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\(.*?\\([ 
 \t]:[[:alnum:]:_@#%]+:[ \t]*\\)?$\\))
 :  match)




 Please have a look at this page before submitting a patch:
 http://orgmode.org/worg/org-contribute.html#sec-5

 Will do.


 Thanks!

-- 
Tim Burt
www.rketburt.org
It is healthful to every sane man to utter the art within him; -- GK 
Chesterton



[O] evaluation of perl in babel

2013-02-24 Thread D M German

Hi Everybody,

I looked a bit more onto the way that perl is evaluated. I know the
support of perl is minor. I understand that, so please, don't see this
message as a complaint, so this is more for discussion and potential
improvements of the Perl support in Babel.

One of the things I have noticed is that the way that Babel handles the
results coming from the code is not the best.

Let me elaborate:

At the bottom you will find a set of test that stress the different
:results types.

There are some bugs. For example, the interpretation of :results table,
vector and list.

But I think the main problem comes from the way that Babel expects the
result. In Babel, and except for :results output, the last expression in
perl is considered the input to the results. This is implementing by
saving the last expression into a variable, and printing each value
separated by a \n (including the last). So basically, org takes the
last expression, and outputs them to the babel input file one per line.

This places some constraints. First, it is not currently capable of
dealing with two dimensional arrays. Second, it makes it hard to create
complex output (such as HTML or LaTeX), and third, it is hard to debug
without first printing the value of the array (this output would be lost
during the evaluation, so it would have be debugged outside org).

I feel that a better approach is to use std output as the default input
to any of these :results types, and then try to parse them into the
corresponding :results types. This will allow the creation of HTML and
LaTeX from perl (which the current implementation does not allow).

So recapitulating, my suggestion is that perl should use STDOUT as the
output of the snippet in any :results type, rather than the result of
the last expression.

I know this will break backwards compatibility. One solution is to keep
the current src perl and add a new perl_stdout mode (or something like
that) that implements this.

--dmg



--
#+begin_src perl :results output 
print Test\n;
(1, 2)
#+end_src

#+RESULTS:
: Test

#+name: t_output_raw
#+begin_src perl :results raw 
print Test\n;
(1, 2)
#+end_src

#+RESULTS: t_output_raw
1
2

#+name: t_output_table
#+begin_src perl :results table
print Test\n;
(1, 2)
#+end_src

#+RESULTS: t_output_table
| 1\n2\n |

#+name: t_output_vector
#+begin_src perl :results vector
print Test\n;
(1, 2)
#+end_src

#+RESULTS: t_output_vector
| 1\n2\n |


#+name: t_output_list
#+begin_src perl :results list
print Test\n;
(1, 2)
#+end_src

#+RESULTS: t_output_list
#+begin_example
- 1
2
#+end_example

#+name: t_output_org
#+begin_src perl :results org
print Test\n;
(1, 2)
#+end_src

#+RESULTS: t_output_org
#+BEGIN_SRC org
1
2
#+END_SRC

#+name: t_output_html
#+begin_src perl :results html
print Test\n;
(1, 2)
#+end_src

#+RESULTS: t_output_html
#+BEGIN_HTML
1
2
#+END_HTML

#+name: t_output_latex
#+begin_src perl :results latex
print Test\n;
(1, 2)
#+end_src

#+RESULTS: t_output_latex
#+BEGIN_LaTeX
1
2
#+END_LaTeX
--


--
Daniel M. German  I see no good reason why the
   views given in this volume
   should shock the religious
   Charles Darwin -   feelings of anyone.
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 



Re: [O] evaluation of perl in babel

2013-02-24 Thread dmg
Mm, I didn't include :results value

I think that :results value should do what it does now: return the
value of the last expression.

--dmg

On Sun, Feb 24, 2013 at 1:08 PM, D M German d...@uvic.ca wrote:

 Hi Everybody,

 I looked a bit more onto the way that perl is evaluated. I know the
 support of perl is minor. I understand that, so please, don't see this
 message as a complaint, so this is more for discussion and potential
 improvements of the Perl support in Babel.

 One of the things I have noticed is that the way that Babel handles the
 results coming from the code is not the best.

 Let me elaborate:

 At the bottom you will find a set of test that stress the different
 :results types.

 There are some bugs. For example, the interpretation of :results table,
 vector and list.

 But I think the main problem comes from the way that Babel expects the
 result. In Babel, and except for :results output, the last expression in
 perl is considered the input to the results. This is implementing by
 saving the last expression into a variable, and printing each value
 separated by a \n (including the last). So basically, org takes the
 last expression, and outputs them to the babel input file one per line.

 This places some constraints. First, it is not currently capable of
 dealing with two dimensional arrays. Second, it makes it hard to create
 complex output (such as HTML or LaTeX), and third, it is hard to debug
 without first printing the value of the array (this output would be lost
 during the evaluation, so it would have be debugged outside org).

 I feel that a better approach is to use std output as the default input
 to any of these :results types, and then try to parse them into the
 corresponding :results types. This will allow the creation of HTML and
 LaTeX from perl (which the current implementation does not allow).

 So recapitulating, my suggestion is that perl should use STDOUT as the
 output of the snippet in any :results type, rather than the result of
 the last expression.

 I know this will break backwards compatibility. One solution is to keep
 the current src perl and add a new perl_stdout mode (or something like
 that) that implements this.

 --dmg



 --
 #+begin_src perl :results output
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS:
 : Test

 #+name: t_output_raw
 #+begin_src perl :results raw
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS: t_output_raw
 1
 2

 #+name: t_output_table
 #+begin_src perl :results table
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS: t_output_table
 | 1\n2\n |

 #+name: t_output_vector
 #+begin_src perl :results vector
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS: t_output_vector
 | 1\n2\n |


 #+name: t_output_list
 #+begin_src perl :results list
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS: t_output_list
 #+begin_example
 - 1
 2
 #+end_example

 #+name: t_output_org
 #+begin_src perl :results org
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS: t_output_org
 #+BEGIN_SRC org
 1
 2
 #+END_SRC

 #+name: t_output_html
 #+begin_src perl :results html
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS: t_output_html
 #+BEGIN_HTML
 1
 2
 #+END_HTML

 #+name: t_output_latex
 #+begin_src perl :results latex
 print Test\n;
 (1, 2)
 #+end_src

 #+RESULTS: t_output_latex
 #+BEGIN_LaTeX
 1
 2
 #+END_LaTeX
 --


 --
 Daniel M. German  I see no good reason why the
views given in this volume
should shock the religious
Charles Darwin -   feelings of anyone.
 http://turingmachine.org/
 http://silvernegative.com/
 dmg (at) uvic (dot) ca
 replace (at) with @ and (dot) with .





-- 
--dmg

---
Daniel M. German
http://turingmachine.org



[O] Symbol's value as variable is void: org-babel-temp-file

2013-02-24 Thread sje30

With today's git I'm getting the following errors when compiling orgmode

$ make

... org-w3m.el:44:1:Error: Symbol's value as variable is void: 
org-babel-temp-file


Its stopping orgmode from working for me -- any clues?

thanks,

Stephen



Re: [O] evaluation of perl in babel

2013-02-24 Thread Achim Gratz
D M German writes:
 There are some bugs. For example, the interpretation of :results table,
 vector and list.

You may misunderstand some things, or I don't understand what you are
asking.  It is (at least currently) the responsibility of the Perl
program (or any other Babel language) to deliver the result in such a
way that it can be interpreted correctly by the result type chosen (in
other word, the program output must be valid Org syntax in the given
context).  You can't have the same program produce tables, vectors and
LaTeX output just by switching the results type.

 But I think the main problem comes from the way that Babel expects the
 result. In Babel, and except for :results output, the last expression in
 perl is considered the input to the results.

That is with the default wrapper function, which expects the program to
return something that either is a string or interpolates to a string
that Babel can interpret.  You can easily define one yourself that does
different things, like simply open the output file then select the
filehandle for output.  That's what I'd do in any case and I think it
would work just as you want.

--8---cut here---start-8---
(defvar org-babel-perl-wrapper-method
  {
  my $prog = q(%s);
  open my $BO, qq(%s) or die qq(Perl: Could not open output file.$\\);
  select $BO;
  eval( $prog );
})
--8---cut here---end---8---

 This is implementing by
 saving the last expression into a variable, and printing each value
 separated by a \n (including the last). So basically, org takes the
 last expression, and outputs them to the babel input file one per line.

Yes, not the most elegant way, not perlish and all that; but there's
nothing to stop you from making that last expression a string variable
that has collected your output.  Try the above and let me know if that
addresses your concerns, if only partly.

As for debugging, the output files that Perl produces and Babel then
interprets are kept in the temporary folder, org-babel-eval-read-file
doesn't delete them after use (it probably should, though).


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

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




[O] apparent limit to headline nesting

2013-02-24 Thread 42 147

I'm unable to go past 14 levels in.

** Headline 14 levels in.
*** Headline 15 levels in.

I can't fold Headline 15 into Headline 14. 




Re: [O] Symbol's value as variable is void: org-babel-temp-file

2013-02-24 Thread Achim Gratz
sj...@damtp.cam.ac.uk writes:
 With today's git I'm getting the following errors when compiling orgmode

 $ make

 ... org-w3m.el:44:1:Error: Symbol's value as variable is void:
 org-babel-temp-file

 Its stopping orgmode from working for me -- any clues?

Well, that doesn't make any sense: org-w3m doesn't contain the string in
question, much less a variable reference in current Org, neither on the
maint nor the master branch.  You will want to be more forthcoming with
information what commit you're at and what exactly you are doing.  Start
with showing us the output of git status and make config-all if that
doesn't already give you a clue as to what is missing.


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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




[O] [PATCH] Synchronize slideshow exporters to ox-html changes.

2013-02-24 Thread Rick Frankel
This patch fixes a couple of bugs in the s5 exporter and brings both
exporters in-sync w/ the updates to ox-html (uppercase properties, and
HTML_CONTAINER_CLASS fix).

Note that ox-deck has so many lines of change due to whitespace
cleanup (won't happen again :).

Rick
---

Synchronize slideshow exporters to ox-html changes.

* ox-deck.el: change menu key to ?d to avoid conflict with ox-s5
  (org-deck-headline): use HTML_CONTAINER_CLASS insead of html-container-class
  (org-html-inner-template): ditto
* ox-s5.el (org-s5-headline): ditto
---
 contrib/lisp/ox-deck.el | 415 
 contrib/lisp/ox-s5.el   |  39 +++--
 2 files changed, 227 insertions(+), 227 deletions(-)

diff --git a/contrib/lisp/ox-deck.el b/contrib/lisp/ox-deck.el
index 7ae6bb9..db7818f 100644
--- a/contrib/lisp/ox-deck.el
+++ b/contrib/lisp/ox-deck.el
@@ -40,13 +40,13 @@
 
 (org-export-define-derived-backend deck html
   :menu-entry
-  (?s Export to deck.js HTML Presentation
+  (?d Export to deck.js HTML Presentation
   ((?H To temporary buffer org-deck-export-as-html)
(?h To file org-deck-export-to-html)
(?o To file and open
-  (lambda (a s v b)
-(if a (org-deck-export-to-html t s v b)
-  (org-open-file (org-deck-export-to-html nil s v b)))
+   (lambda (a s v b)
+ (if a (org-deck-export-to-html t s v b)
+   (org-open-file (org-deck-export-to-html nil s v b)))
   :options-alist
   ((:html-link-home HTML_LINK_HOME nil nil)
(:html-link-up HTML_LINK_UP nil nil)
@@ -60,11 +60,11 @@
(:deck-theme DECK_THEME nil org-deck-theme)
(:deck-transition DECK_TRANSITION nil org-deck-transition)
(:deck-include-extensions DECK_INCLUDE_EXTENSIONS nil
-org-deck-include-extensions split)
+ org-deck-include-extensions split)
(:deck-exclude-extensions DECK_EXCLUDE_EXTENSIONS nil
-org-deck-exclude-extensions split)
+ org-deck-exclude-extensions split)
(:deck-directories DECK_DIRECTORIES nil
-  org-deck-directories split))
+  org-deck-directories split))
   :translate-alist
   ((headline . org-deck-headline)
(inner-template . org-deck-inner-template)
@@ -86,19 +86,19 @@ modernizr; core, extensions and themes directories.)
   (remove-duplicates
(car (remove 'nil components))
:test (lambda (x y)
-  (string= (file-name-nondirectory x)
-   (file-name-nondirectory y)
+   (string= (file-name-nondirectory x)
+(file-name-nondirectory y)
 
 (defun org-deck--find-extensions ()
   Returns a unique list of all extensions found in
 in the extensions directories under `org-deck-directories'
   (org-deck--cleanup-components
- (mapcar   ; extensions under existing dirs
-  (lambda (dir)
-   (when (file-directory-p dir) (directory-files dir t ^[^.])))
-  (mapcar  ; possible extension directories
-   (lambda (x) (expand-file-name extensions x))
-   org-deck-directories
+   (mapcar ; extensions under existing dirs
+(lambda (dir)
+  (when (file-directory-p dir) (directory-files dir t ^[^.])))
+(mapcar   ; possible extension directories
+ (lambda (x) (expand-file-name extensions x))
+ org-deck-directories
 
 (defun org-deck--find-css (type)
   Return a unique list of all the css stylesheets in the themes/TYPE
@@ -107,10 +107,10 @@ directories under `org-deck-directories'.
(mapcar
 (lambda (dir)
   (let ((css-dir (expand-file-name
- (concat (file-name-as-directory themes) type) dir)))
-   (when (file-directory-p css-dir)
- (directory-files css-dir t  \\.css$
-  org-deck-directories)))
+  (concat (file-name-as-directory themes) type) dir)))
+(when (file-directory-p css-dir)
+  (directory-files css-dir t  \\.css$
+org-deck-directories)))
 
 (defun org-deck-list-components ()
   List all available deck extensions, styles and
@@ -168,7 +168,7 @@ Can be overriden with the DECK_BASE_URL property.
   :type 'string)
 
 (defcustom org-deck-footer-template
-h1%author - %title/h1
+  h1%author - %title/h1
   Format template to specify footer div.
 Completed using `org-fill-template'.
 Optional keys include %author, %email, %file, %title and %date.
@@ -190,11 +190,11 @@ This is included in a header section.
 #title-slide h1 {
 position: static; padding: 0;
 margin-top: 10%;
-   -webkit-transform: none;
-   -moz-transform: none;
-   -ms-transform: none;
-   -o-transform: none;
-   transform: none;
+-webkit-transform: none;
+-moz-transform: none;
+-ms-transform: none;
+-o-transform: none;

Re: [O] Symbol's value as variable is void: org-babel-temp-file

2013-02-24 Thread Stephen Eglen
On Sun, Feb 24 2013, Achim Gratz wrote:

 Well, that doesn't make any sense: org-w3m doesn't contain the string in
 question, much less a variable reference in current Org, neither on the
 maint nor the master branch.  You will want to be more forthcoming with
 information what commit you're at and what exactly you are doing.  Start
 with showing us the output of git status and make config-all if that
 doesn't already give you a clue as to what is missing.

Thanks Achim;  if its just my installation, and not others, I'll try and
debug this end.  But just for the record, here's the output you asked
for.   I get the byte-compile error when doing make in the top-level.

Stephen


$ git log | head -3

git log | head -3
commit 3a0e559ad976eaf8e6e6d4b304209d310e282a7d
Author: Bastien Guerry b...@altern.org
Date:   Sun Feb 24 19:42:12 2013 +0100


$ git status
# On branch master
# Untracked files:
#   (use git add file... to include in what will be committed)
#
#   SJENOTES_GIT.org
#   utils/
nothing added to commit but untracked files present (use git add to
track)

make config-all

= Emacs executable and Installation paths
EMACS = emacs
DESTDIR   = 
ORGCM = dirall
ORG_MAKE_DOC= info html pdf
lispdir = /usr/share/emacs/site-lisp/org
infodir = /usr/share/info
datadir = /usr/share/emacs/etc/org
testdir =
/var/folders/91/91jLO-U5Hb8NrhtwVFdhLk+++TI/-Tmp-//tmp-orgtest
= Additional files from contrib/lisp


= Test configuration
BTEST_PRE = 
BTEST_POST  = 
BTEST_OB_LANGUAGES  = awk C fortran maxima lilypond octave python sh
BTEST_EXTRA = 

= Executables used by make
CP= install -m 644 -p
MKDIR = install -m 755 -d
RM= rm -f
RMR   = rm -fr
FIND  = find
SUDO  = sudo
PDFTEX= pdftex
TEXI2PDF  = texi2pdf --batch --clean
TEXI2HTML = makeinfo --html --number-sections
MAKEINFO  = makeinfo
INSTALL_INFO= install-info

= Commands used by make
BATCH = emacs -batch -Q
BATCHL= emacs -batch -Q --eval '(add-to-list '''load-path .)'
ELC   = emacs -batch -Q --eval '(add-to-list '''load-path .)'
--eval '(batch-byte-compile)'
ELCDIR = emacs -batch -Q --eval '(add-to-list '''load-path .)'
--eval '(batch-byte-recompile-directory 0)'
BTEST  = emacs -batch -Q  --eval '(add-to-list '''load-path ./lisp)'
--eval '(add-to-list '''load-path ./testing)'  -l org-loaddefs.el -l
testing/org-test.el --eval '(require '''ob-awk)' --eval '(require
'''ob-C)' --eval '(require '''ob-fortran)' --eval '(require
'''ob-maxima)' --eval '(require '''ob-lilypond)' --eval '(require
'''ob-octave)' --eval '(require '''ob-python)' --eval '(require
'''ob-sh)'  --eval '(setq org-confirm-babel-evaluate nil)' -f
org-test-run-batch-tests
MAKE_LOCAL_MK   = emacs -batch -Q --eval '(add-to-list '''load-path
./lisp)' --eval '(load org-compat.el)' --eval '(load
../mk/org-fixup.el)' --eval '(org-make-local-mk)'
MAKE_ORG_INSTALL   = emacs -batch -Q --eval '(add-to-list
'''load-path .)' --eval '(load org-compat.el)' --eval '(load
../mk/org-fixup.el)' --eval '(org-make-org-loaddefs)'
MAKE_ORG_VERSION   = emacs -batch -Q --eval '(add-to-list
'''load-path .)' --eval '(load org-compat.el)' --eval '(load
../mk/org-fixup.el)' --eval '(org-make-org-version 7.9.3f
release_7.9.3f-1199-g3a0e55 /usr/share/emacs/etc/org)'
= Org version
make:  Org-mode version 7.9.3f (release_7.9.3f-1199-g3a0e55 =
/usr/share/emacs/site-lisp/org)





[O] [texinfo] footnote truncated

2013-02-24 Thread Thomas S. Dye
Aloha all,

This footnote:

  [fn:141] See the attributes ~table:template-name~,
  ~table:use-first-row-styles~, ~table:use-last-row-styles~,
  ~table:use-first-column-styles~, ~table:use-last-column-styles~,
  ~table:use-banding-rows-styles~, and ~table:use-banding-column-styles~
  of the ~table:table~ element in the OpenDocument-v1.2 specification.

Ends up truncated like this in info:

   (3) See the attributes `table:template-name',

All the best,
Tom

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



[O] 13 failures on make ./update

2013-02-24 Thread Jude DaShiell
First did my attempted update disclose anything new that's failed or were 
these issues already on the known bugs list?  This is debian wheezy on an 
amd-64 k8 athelon machine.  I do have an intel machine I could try as well 
if that might help.  I'll preserve the typescript file attached to this 
message and can either put it in my public web space or send it again in 
the body of a message if it doesn't go through as an attachment.  I ran 
make ./clean in the org-mode directory before I started the script command 
too.


--- 
jude jdash...@shellworld.net Remember Microsoft didn't write Tiger 10.4 
or any of its successors.
Script started on Sun 24 Feb 2013 07:52:24 PM EST
jude@hex29:~/org-mode$ make ./update

rm -f 

git remote update

Fetching origin

git pull

Already up-to-date.

make -C doc clean;  make -C lisp clean;

make[1]: Entering directory `/home/jude/org-mode/doc'

rm -f org *.pdf *.html *_letter.tex org-version.inc \

  *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \

  *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps

make[1]: Leaving directory `/home/jude/org-mode/doc'

make[1]: Entering directory `/home/jude/org-mode/lisp'

rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc 
org-install.elc

rm -f *.elc

make[1]: Leaving directory `/home/jude/org-mode/lisp'

make -C doc all;  make -C etc all;  make -C lisp all;

make[1]: Entering directory `/home/jude/org-mode/doc'

org-version: 7.9.3f (release_7.9.3f-1199-g3a0e55)

makeinfo --no-split org.texi -o org

makeinfo --html --number-sections --no-split -o org.html org.texi

texi2pdf --batch --clean org.texi

You don't have a working TeX binary installed, but the texi2dvi script

can't proceed without it. If you want to use this script, you have to

install some kind of TeX, for example TeX Live Debian packages. You can do

that with this command:

   apt-get install texlive

make[1]: *** [org.pdf] Error 1

make[1]: Leaving directory `/home/jude/org-mode/doc'

make[1]: Entering directory `/home/jude/org-mode/etc'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/home/jude/org-mode/etc'

make[1]: Entering directory `/home/jude/org-mode/lisp'

rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc 
org-install.elc

org-version: 7.9.3f (release_7.9.3f-1199-g3a0e55)

Loading /home/jude/org-mode/lisp/org-compat.el (source)...

Loading /home/jude/org-mode/mk/org-fixup.el (source)...

Saving file /home/jude/org-mode/lisp/org-version.el...

Loading vc-git...

Wrote /home/jude/org-mode/lisp/org-version.el

org-loaddefs: 7.9.3f (release_7.9.3f-1199-g3a0e55)

Loading /home/jude/org-mode/lisp/org-compat.el (source)...

Loading /home/jude/org-mode/mk/org-fixup.el (source)...

Generating autoloads for ob-C.el...

Generating autoloads for ob-C.el...done

Generating autoloads for ob-R.el...

Generating autoloads for ob-R.el...done

Generating autoloads for ob-asymptote.el...

Generating autoloads for ob-asymptote.el...done

Generating autoloads for ob-awk.el...

Generating autoloads for ob-awk.el...done

Generating autoloads for ob-calc.el...

Generating autoloads for ob-calc.el...done

Generating autoloads for ob-clojure.el...

Generating autoloads for ob-clojure.el...done

Generating autoloads for ob-comint.el...

Generating autoloads for ob-comint.el...done

Generating autoloads for ob-core.el...

Generating autoloads for ob-core.el...done

Generating autoloads for ob-css.el...

Generating autoloads for ob-css.el...done

Generating autoloads for ob-ditaa.el...

Generating autoloads for ob-ditaa.el...done

Generating autoloads for ob-dot.el...

Generating autoloads for ob-dot.el...done

Generating autoloads for ob-emacs-lisp.el...

Generating autoloads for ob-emacs-lisp.el...done

Generating autoloads for ob-eval.el...

Generating autoloads for ob-eval.el...done

Generating autoloads for ob-exp.el...

Generating autoloads for ob-exp.el...done

Generating autoloads for ob-fortran.el...

Generating autoloads for ob-fortran.el...done

Generating autoloads for ob-gnuplot.el...

Generating autoloads for ob-gnuplot.el...done

Generating autoloads for ob-haskell.el...

Generating autoloads for ob-haskell.el...done

Generating autoloads for ob-io.el...

Generating autoloads for ob-io.el...done

Generating autoloads for ob-java.el...

Generating autoloads for ob-java.el...done

Generating autoloads for ob-js.el...

Generating autoloads for ob-js.el...done

Generating autoloads for ob-keys.el...

Generating autoloads for ob-keys.el...done

Generating autoloads for ob-latex.el...

Generating autoloads for ob-latex.el...done

Generating autoloads for ob-ledger.el...

Generating autoloads for ob-ledger.el...done

Generating autoloads for ob-lilypond.el...

Generating autoloads for ob-lilypond.el...done

Generating autoloads for ob-lisp.el...

Generating autoloads for ob-lisp.el...done

Generating autoloads for 

Re: [O] apparent limit to headline nesting

2013-02-24 Thread Nick Dokos
42 147 aeus...@gmail.com wrote:

 
 I'm unable to go past 14 levels in.
 
 ** Headline 14 levels in.
 *** Headline 15 levels in.
 
 I can't fold Headline 15 into Headline 14. 
 
 

You are probably hitting org-inlinetask-min-level (15 by default).

Nick



Re: [O] 13 failures on make ./update

2013-02-24 Thread Michael Gauland
Jude DaShiell jdashiel at shellworld.net writes:

 In toplevel form:

 ox.el:80:1:Error: Cannot open load file: tabulated-list

I ran into this as well, and resolved it by adding the tabulated-list package
from ELPA, and adding -L ~/.emacs.d/elpa/tabulated-list-0 to the definition of
EMACS in my local.mk.

Hope that helps.

Kind Regards,
Mike





Re: [O] Symbol's value as variable is void: org-babel-temp-file

2013-02-24 Thread Nick Dokos
Stephen Eglen s.j.eg...@damtp.cam.ac.uk wrote:

 On Sun, Feb 24 2013, Achim Gratz wrote:
 
  Well, that doesn't make any sense: org-w3m doesn't contain the string in
  question, much less a variable reference in current Org, neither on the
  maint nor the master branch.  You will want to be more forthcoming with
  information what commit you're at and what exactly you are doing.  Start
  with showing us the output of git status and make config-all if that
  doesn't already give you a clue as to what is missing.
 
 Thanks Achim;  if its just my installation, and not others, I'll try and
 debug this end.  But just for the record, here's the output you asked
 for.   I get the byte-compile error when doing make in the top-level.
 
 Stephen
 
 
 $ git log | head -3
 
 git log | head -3
 commit 3a0e559ad976eaf8e6e6d4b304209d310e282a7d
 Author: Bastien Guerry b...@altern.org
 Date:   Sun Feb 24 19:42:12 2013 +0100
 

FWIW, I'm on that commit and I don't see the problem.

Nick

Org-mode version 7.9.3f (release_7.9.3f-1199-g3a0e55 @ 
/home/nick/elisp/org-mode/lisp/)
GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 
2012-12-29 on alphaville



Re: [O] 13 failures on make ./update

2013-02-24 Thread Nick Dokos
Jude DaShiell jdash...@shellworld.net wrote:

 First did my attempted update disclose anything new that's failed or were 
 these issues already on the known bugs list?  This is debian wheezy on an 
 amd-64 k8 athelon machine.  I do have an intel machine I could try as well 
 if that might help.  I'll preserve the typescript file attached to this 
 message and can either put it in my public web space or send it again in 
 the body of a message if it doesn't go through as an attachment.  I ran 
 make ./clean in the org-mode directory before I started the script command 
 too.
 

It seems that your version of emacs does not come with tabulated-list,
so the require in ox.el causes these failures.

I do have tabulated-list on GNU Emacs 24.3.50.2, so I presume you are
running an earlier version, but I'm not sure when it was introduced into
emacs.  In any case, ox.el will probably need some compatibility work
(perhaps for xemacs as well as for emacs23).

Nick







[O] org-fill-paragraph leaves point at end of table

2013-02-24 Thread Eric Abrahamsen
Calling `org-fill-paragraph' inside a table leaves point at the end of
the table, for reasons that are totally unclear to me.

I've tested this with up-to-date org and emacs -Q, so I'm hoping it's
reproducible. I edebugged org-fill-paragraph, and it appears to do the
right thing, going from the save-excursion to the cond to the org-table
cond statement, and there calling `org-table-align'. That works
correctly, but stepping forward you come to the end of the enclosing
`save-excursion', and emerging from `save-excursion' puts point at the
end of the table -- precisely what it's not supposed to do!

I made a minimum sexp to reproduce the relevant bits of
org-fill-paragraph:

#+BEGIN_SRC emacs-lisp
  (save-excursion
(let ((element (org-element-at-point)))
  (case (org-element-type element)
(table-row (org-table-align) t
#+END_SRC

Putting point in a table and eval'ing that also leaves point at the end
of the table. I tried using (call-interactively 'org-table-align) and it
did the same thing.

I'm baffled, particularly as it doesn't do this for any other element
type. Any clever ideas? M-q after a bit of typing is already stuck in my
fingers, and this bit of strangeness doesn't set the mark, so editing
long tables is a pain...

Thanks!

E




[O] colorg status

2013-02-24 Thread François Pinard
Hi to all my Org friends.

Sigh!  I just had no freetime for colorg this weekend.  With some luck,
I should be able to resume with automated testing, next weekend.

François



Re: [O] 13 failures on make ./update

2013-02-24 Thread Jude DaShiell
I have emacs 23.5 which is current for wheezy.  Probably way outdated and 
it hasn't even got elpa built in.  That explains everything. On Sun, 24 
Feb 2013, Nick Dokos wrote:

 Jude DaShiell jdash...@shellworld.net wrote:
 
  First did my attempted update disclose anything new that's failed or were 
  these issues already on the known bugs list?  This is debian wheezy on an 
  amd-64 k8 athelon machine.  I do have an intel machine I could try as well 
  if that might help.  I'll preserve the typescript file attached to this 
  message and can either put it in my public web space or send it again in 
  the body of a message if it doesn't go through as an attachment.  I ran 
  make ./clean in the org-mode directory before I started the script command 
  too.
  
 
 It seems that your version of emacs does not come with tabulated-list,
 so the require in ox.el causes these failures.
 
 I do have tabulated-list on GNU Emacs 24.3.50.2, so I presume you are
 running an earlier version, but I'm not sure when it was introduced into
 emacs.  In any case, ox.el will probably need some compatibility work
 (perhaps for xemacs as well as for emacs23).
 
 Nick
 
 
 
 
 
 

---
jude jdash...@shellworld.net
Remember Microsoft didn't write Tiger 10.4 or any of its successors.




[O] Bug in behavior of M-RET with latest Org-mode

2013-02-24 Thread John Wiegley
In Org I've liked that fact that hitting M-RET in a list of headlines which
have no intervening whitespace, will add a new headline without whitespace.
Example:

* One
* Twocursor
* Three

If hit M-RET at the cursor, I'll would get:

* One
* Two
* cursor
* Three

With the latest Org, I get:

* One
* Two
* cursor

* Three

Is this just a regression, or has the core behavior been changed to do this?
Is there a new variable I need to tweak to get the old behavior?

Thanks! John



Re: [O] Bug in behavior of M-RET with latest Org-mode

2013-02-24 Thread Nick Dokos
John Wiegley jo...@newartisans.com wrote:

 In Org I've liked that fact that hitting M-RET in a list of headlines which
 have no intervening whitespace, will add a new headline without whitespace.
 Example:
 
 * One
 * Twocursor
 * Three
 
 If hit M-RET at the cursor, I'll would get:
 
 * One
 * Two
 * cursor
 * Three
 
 With the latest Org, I get:
 
 * One
 * Two
 * cursor
 
 * Three
 
 Is this just a regression, or has the core behavior been changed to do this?
 Is there a new variable I need to tweak to get the old behavior?
 

This I think:

,
| org-blank-before-new-entry is a variable defined in `org.el'.
| Its value is ((heading) (plain-list-item))
| Original value was 
| ((heading . auto)
|  (plain-list-item . auto))
| 
| 
| Documentation:
| Should `org-insert-heading' leave a blank line before new heading/item?
| The value is an alist, with `heading' and `plain-list-item' as CAR,
| and a boolean flag as CDR.  The cdr may also be the symbol `auto', in
| which case Org will look at the surrounding headings/items and try to
| make an intelligent decision whether to insert a blank line or not.
| 
| For plain lists, if the variable `org-empty-line-terminates-plain-lists' is
| set, the setting here is ignored and no empty line is inserted, to avoid
| breaking the list structure.
`

Given that this was introduced a long time ago however, I'm not sure what
caused the recent change in behavior:

,
| $ git show 15ad97ac
| commit 15ad97ac3ce0857b92d94cc02d15025fcce05b7d
| Author: Carsten Dominik carsten.domi...@gmail.com
| Date:   Thu Jan 8 09:30:55 2009 +0100
| 
| Editing: Automatic empty lines before new entries.
| 
| The variable `org-blank-before-new-entry' regulates if Org should
| insert a blank line before a new entry, when making a new headline or
| plain list item.  Up to now, the possible values in each case where t
| or nil, i.e. unconditionally do or don't insert a blank line.
| 
| Now each setting can also be `auto'.  If this is the case,  Org will
| look if the current entry, of which the command creates a sibling,
| does have a blank line before it.  If yes, it will also make a blank
| line.  If not, it will not.  This seems so useful that I have made
| this behavior the default.
`

Nick




Re: [O] Bug in behavior of M-RET with latest Org-mode

2013-02-24 Thread Nick Dokos
John Wiegley jo...@newartisans.com wrote:

 In Org I've liked that fact that hitting M-RET in a list of headlines which
 have no intervening whitespace, will add a new headline without whitespace.
 Example:
 
 * One
 * Twocursor
 * Three
 
 If hit M-RET at the cursor, I'll would get:
 
 * One
 * Two
 * cursor
 * Three
 
 With the latest Org, I get:
 
 * One
 * Two
 * cursor
 
 * Three
 
 Is this just a regression, or has the core behavior been changed to do this?
 Is there a new variable I need to tweak to get the old behavior?
 

Actually, with the default (`auto') setting of the variable I indicated
in my previous email (`org-blank-before-new-entry'), I get the first
behavior, not the second.

The only problem is that when I insert the first headline, it gets
inserted after an empty first line, so adding a second headline fools
the auto setting into thinking I want empty lines between headings. But
if I delete the empty first line, M-RET never puts any empty lines between
headings. So the heuristic might not be perfect, but it seems to work for
all but the first headline.

Nick



Re: [O] Symbol's value as variable is void: org-babel-temp-file

2013-02-24 Thread Achim Gratz
Stephen Eglen writes:
 Thanks Achim;  if its just my installation, and not others, I'll try and
 debug this end.  But just for the record, here's the output you asked
 for.   I get the byte-compile error when doing make in the top-level.

This is puzzling, everything appears to be correct.  Do you have
modified local.mk?  Is there any chance you might have memory or disk
space problems or something like that?  If this is still happening, can
you try make clean compile-dirty and show at least a bit of context
around the error (you can edit the path prefixes out if you want)?


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] How to make the new exporter open PDF using evince?

2013-02-24 Thread Nick Dokos
James Harkins jamshar...@gmail.com wrote:

 A quick web search didn't turn up anything handy, so I thought I'd ask here.
 
 Is it possible to configure the new exporter to open a PDF (generated
 by LaTeX) using evince instead of okular?
 
 That is, if I open a file browser (this is Ubuntu 12.04) and
 double-click on a PDF, evince opens it. If I write a beamer
 presentation in org and do C-c C-e l O, okular opens it.
 
 I did a couple of customize-apropos searches but didn't see anything obvious.
 
 (I'm aware that some swear by okular, but I think evince handles
 paging slightly better when zooming to best fit for presentations.
 So I'd rather use that.)
 

There are too many cooks in this particular kitchen, but checking a
couple of places should be enough in most cases: org-file-apps is the
most immediate place but unless you've customized it, it should say

   ...
   (\\.pdf\\' . default)
   ...

which takes us to the next cook: mailcap. ~/.mailcap overrides the
system /etc/mailcap and there may be more (`man 5 mailcap' should reveal
the rest), so check them in order. I prefer xpdf so my mailcap says:

,
| $ grep pdf ~/.mailcap
| application/pdf; xpdf -q %s
`

I like putting things in ~/.mailcap, but you can season to taste.

HTH,
Nick





Re: [O] How to make the new exporter open PDF using evince?

2013-02-24 Thread Mike Gauland
James Harkins jamshark70 at gmail.com writes:

 
 A quick web search didn't turn up anything handy, so I thought I'd ask here.
 
 Is it possible to configure the new exporter to open a PDF (generated
 by LaTeX) using evince instead of okular?

I think you can do that my changing the order of the entries in /etc/mailcap,
but it's been a while since I've mucked with that.




Re: [O] org-drill - properties displayed during card review

2013-02-24 Thread Paul Sexton



I just never got around to fixing that minor glitch until now. I have committed 
a fix to the org-drill repository at

http://bitbucket.org/eeeickythump/org-drill

So if you download and use the org-drill.el from there, the problem will be 
fixed.

On 24/02/2013, at 9:16 PM, Bastien b...@altern.org wrote:

 Hi Paul,
 
 Paul Rudin paul-sqpymovxoov10xsdtd+...@public.gmane.org writes:
 
 I'm experimenting with org-drill. One thing that seems odd is that when
 reviewing a card for scoring the properties drawer is displayed. It
 seems unlikely that this is intended? Is it intended? If not is there
 some easy way I can fix it? TIA.
 
 I'm not sure Paul is still hacking org-drill.el, so you'll have to
 digg a bit yourself.  Or give more context for non-org-drill users
 so that they can help with the code.
 
 Thanks!
 
 -- 
 Bastien