Re: [O] Let's discuss citation and Org syntax

2013-06-27 Thread Christian Wittern
Sorry about this late contribution to this thread.  I just stumbled on the 
RTF/ODF scan tool for Zotero at[1], which seems to do something similar to 
the ideas ventilated in this thread.  Since Zotero compatibility is high on 
the list of desirables mentioned here, I thought it might be an interisting 
point of reference.


This page also mentions that Zotero can be told to provide a scannable 
Cite as output format, which works with things like

|{See | Smith, (2012) |p. 45 | for an example |zu:2433:WQVBH98K}

which the format engine than turns into
|
(See Smith, 2012, p. 45 for an example)

I wonder if it would be worthwhile if the citation handling in Org would 
become compatible with this approach?


Christian W.

[1] http://zotero-odf-scan.github.io/zotero-odf-scan/


On 2013-05-26 23:23, Darlan Cavalcante Moreira wrote:

I prefer the [cite:citekey] syntax similar to [fn:number] for footnotes.

But no matter which syntax is chosen I think we can easily make reftex work
with it. All we need is to set the variable reftex-cite-format [1] to a
string with the desired format. For the syntax [cite:citekey] the string
would be [cite:%l].

[1] We probably need to make that a local variable in org-mode buffers so
 that the global value is kept on default for latex buffers.

--
Darlan

 
At Thu, 23 May 2013 10:05:37 +0200,

Christian Moe wrote:


Matt Price writes:

On Wed, May 22, 2013 at 5:02 AM, Christian Moe m...@christianmoe.com wrote:

I have a rough, working example of this enabling Zotero cites for ODT
export (attached).

Hi Christian,

I'm really interested in this, as I use Zotero not only for writing
but for group bibliographies in my  courses.  The broader conversation
about the appropriate syntax is a bit beyond me,

Hi, Matt,

As the org-zotero-export.el shows, getting Zotero references from Org
into ODT is pretty simple. That framework could be implemented whatever
syntax we end up with to take care of the details. I'm interested in
feedback on the syntax, though -- that is, on the way I'm using the
description part of the link to convey various bits of information to
Zotero. Is it worth pursuing, or would people prefer other ways of
doing it? If worth pursuing, could it be improved?


(1) How do you get the Zotero cite keys right now, and what method do
you think would ultimately be the best to try for?

The best to try for: Something with as brilliant an interface as RefTex...

Since this thread is on citation syntax, I think I'll gather my thoughts
about how to get there (zotero-plain? Zotero Server API? sqlite? word
processor plugin emulation?), and about your other questions, and start
another Zotero-related thread in a day or two.

Right now: I'm still depending on Quick Copy with a custom Zotero
translator. That is, I tab from Emacs to Firefox, look up a reference in
the Zotero pane, and Quick Copy (C-S-c) to a formatted link to the
clipboard. Tab back to Emacs, yank the link, manually tweak the
description as necessary. RefTex it ain't, and it's cumbersome for
multiple citations, but it works.


Yours,
Christian







--
Christian Wittern, Kyoto




Re: [O] evaluation context in call statements

2013-06-27 Thread Andreas Leha
Hi all


Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:
 My vote is for adding #+name support to call lines, and then handling
 their results in the same manner as code block results.

 Achim Gratz strom...@nexgo.de writes:
 I'm not sure what this would entail other than replacing the call with
 its arguments with the name of the call in the results line.  But yes,
 that'd be a step forward, although you'd have to be careful when copying
 calls.


 This could work exactly as named source blocks work.  E.g.,
 [...]

 I see.  The problem then really is that #+CALL lines are currently
 implicitly named by copying their arguments to the results line.  If
 explicit naming is allowed, this implicit naming should go away or at
 least not be the default, IMHO.


[ ... ]

I did not follow this tread, so I just wanted to clarify:  You are talking
about making me to replace

--8---cut here---start-8---
#+call: number_of_sth(origin=dataset1) :results table
#+call: number_of_sth(origin=dataset2) :results table
--8---cut here---end---8---

with

--8---cut here---start-8---
#+name: call_number_of_sth_with_origin_dataset1
#+call: number_of_sth(origin=dataset1) :results table
#+name: call_number_of_sth_with_origin_dataset2
#+call: number_of_sth(origin=dataset2) :results table
--8---cut here---end---8---

?


Such change would make (some of) my orgmode files look rather
complicated.  The 'implicit' naming of call lines does make sense IMO,
as all that may distinguish two call lines really are the arguments.

I understand that there are problems with the current implementation of
call lines.  But I just want to say, that I would vote for not dropping
the implicit naming of call lines -- but for fixing their problems
instead.  An explicit name overriding the default implicit name would
be the preferable solution to me.

Regards,
Andreas




Re: [O] Process diagrams with dot and some glue using Org-mode

2013-06-27 Thread Karl Voit
* Thorsten Jolitz tjol...@gmail.com wrote:

 not really an answer to your question, but I wrote a library
 (picodoc.el) that automatically generates PlantUML scripts from PicoLisp
 source code:

Thanks for the pointer. Looks interesting but as you wrote, not
really the solution that seems applicable in my case. However, I
should start reading ELISP like that :-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Process diagrams with dot and some glue using Org-mode

2013-06-27 Thread Karl Voit
* Rick Frankel r...@rickster.com wrote:
 On 2013-06-26 13:03, Karl Voit wrote:
 * Rick Frankel r...@rickster.com wrote:
 
 However, the header information seems to get lost. This requires
 hard-coded column content which is a minor drawback of this method.

 Just use `:colnames no':

I love Org-mode :-)

 Regardless, here's a hack which does what you want. Note to things:
   - it executes the dot code directly and uses the :file
 header argument for output, because you need the
 colnames of the graph table but not of the node table.

Got it.

   - It requires you to specify the range on the node table

Sorry, I did not understand this since I could not locate any range
specification below except that one for foobar-node-table in the
header. Is this the thing you mentioned? If so, I do not consider
this as an issue at all because [2:-1] is right for any number of
rows.

   #+HEADER: :var nodes=foobar-node-table[2:-1]
   #+HEADER: :var graph=foobar-graph-table
   #+BEGIN_SRC emacs-lisp :results file :file ./t.png
 (org-babel-execute:dot
  (concat
 digraph {
   (mapconcat
(lambda (x)
  (format %s [label=\%s\ shape=%s fillcolor=%s]
  (car x) (nth 1 x)
  (if (string=  (nth 2 x)) box (nth 2 x))
  (if (string=  (nth 3 x)) none (nth 3 
 x nodes \n)
   \n
   (let* ((to-nodes (car graph)) (len (length to-nodes)))
 (mapconcat
  (lambda (x)
(let ((name (car x)))
  (mapconcat
   'identity
   (loop with result = '()
 for i from 1 to len
 do
 (when ( (length (nth i x)) 0)
   (add-to-list 'result

 (format %s - %s [label=\%s\]\n
   
  name
   
  (nth i to-nodes)
   
  (substring (nth i x) 0 -1
 finally
 return result) \n))) (cdr graph) 
 ))
   }) params)
   #+END_SRC

I'll have to take a look at this.

 And here's a simplier version which uses a graph table in the
 following format:

   #+name: foobar-graph
   | from   | to | label |
   |++---|
   | S_start| S_fill |   |
   | S_fill | S_send |   |
   | S_send | S_complete |   |
   | S_complete | S_fill | N |
   | S_complete | S_do   | Y |
   | S_do   | S_end  |   |

   #+HEADER: :var nodes=foobar-node-table graph=foobar-graph
   #+BEGIN_SRC emacs-lisp :file ./t2.png :colnames yes
 (org-babel-execute:dot
  (concat
   digraph {\n
   (mapconcat
(lambda (x)
  (format %s [label=\%s\ shape=%s fillcolor=%s]
  (car x) (nth 1 x)
  (if (string=  (nth 2 x)) box (nth 2 x))
  (if (string=  (nth 3 x)) none (nth 3 
 x nodes \n)
   \n
   (mapconcat
(lambda (x)
  (format %s - %s [taillabel=\%s\]
  (car x) (nth 1 x) (nth 2 x))) graph \n)
   }\n) params)
   #+END_SRC

Wow, this looks great to me!

Most likely, I will stick to this simpler version. Thank you very
much for your effort! And thank you for the ELISP example I will try
to fully understand.

I love this community :-)

Where should I place this method? Org-tutorials? [1] probably? New
section in [2]?

  1. http://orgmode.org/worg/org-tutorials/#sec-3-2
  2. http://orgmode.org/worg/org-tutorials/#sec-4
-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] how to change appearance of org-mode files on Github?

2013-06-27 Thread Peter Salazar
Github supports org-mode files, and has a renderer that parses .org files
and converts them to HTML form. Headings appear in larger font, org tables
are converted to graphical HTML tables, etc.

Is there a way to control the way .org files appear on Github?

I tried adding some export options in the usual manner

#+OPTIONS:   H:2 toc:t

but the options are not reflected.

Is this possible?

If not, what's the best way to automatically push to the web the most
version of a locally stored org-mode file without having to Export to HTML
every time I make a change?


Re: [O] Process diagrams with dot and some glue using Org-mode

2013-06-27 Thread Karl Voit
* Eric S Fraga e.fr...@ucl.ac.uk wrote:

 Hi Karl,

Hi Eric!

 I did something simple for generating graphs but without an adjacency
 type of matrix as you have defined and without the special types of
 edges.  So, quite limited with respect to what you want.  In any case,
 I've attached what I played with a while ago in the hope that maybe some
 of it proves useful.  What I did taxed my abilities in emacs lisp so I
 won't be able to help much in adapting it to what you want...

Looks cool! I definitely have to look into this snippet. However,
for now I probably will stick to Ricks simple solution since I
almost understand, how it is achieved. :-)

So far, your solutions looks like something for a more generic
problem. Thanks for providing it!

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Proper use of 'org-file-apps'

2013-06-27 Thread Vladimir Lomov
** Nick Dokos [2013-06-27 01:52:49 -0400]:

 Vladimir Lomov lomov...@gmail.com writes:

  #+BEGIN_SRC emacs-lisp :tangle org-apps-c.el
(add-to-list 'load-path /usr/share/emacs/site-lisp/org)
(require 'org)
(setq org-file-apps
 '( (\\.pdf::\\(\\d+\\)\\' . run-me --page %1 %s)
(\\.pdf\\' . run-me %s)
  )
)
  #+END_SRC


 \d is Perl regexp syntax for matching a digit, but (afaik) not emacs
 syntax. Try

 '( (\\.pdf::\\([0-9]+\\)\\' . run-me --page %1 %s)

 or

 '( (\\.pdf::\\([[:digit:]]+\\)\\' . run-me --page %1 %s)

 instead.
D'oh, I had searched Emacs manual about meaning of \' but didn't try to
check if \d is acceptable. Nevertheless, 'org-file-apps' docstring must
be updated then, because this \\d part is from it.

Thank you Nick, [[:digit:]] works fine.

---
WBR, Vladimir Lomov

-- 
My family history begins with me, but yours ends with you.
-- Iphicrates



[O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread chris
I want to set up Org-mode variable org-agenda-files.

How to Let [C-c a] to search over all files in a directory *recursively* ?

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

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


signature.asc
Description: Digital signature


Re: [O] how to change appearance of org-mode files on Github?

2013-06-27 Thread Suvayu Ali
On Thu, Jun 27, 2013 at 02:54:18AM -0400, Peter Salazar wrote:
 Github supports org-mode files, and has a renderer that parses .org files
 and converts them to HTML form. Headings appear in larger font, org tables
 are converted to graphical HTML tables, etc.
 
 Is there a way to control the way .org files appear on Github?
 
 I tried adding some export options in the usual manner
 
 #+OPTIONS:   H:2 toc:t
 
 but the options are not reflected.
 
 Is this possible?

No.  The github parser is very basic and is outdated.

 
 If not, what's the best way to automatically push to the web the most
 version of a locally stored org-mode file without having to Export to HTML
 every time I make a change?

Since you are using git, you can try git push hooks.  For hints you can
look at the setup on Worg.

  http://orgmode.org/worg/worg-setup.html

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



[O] bug#13820: It was not fixed; it now is, though I don't understand the reason

2013-06-27 Thread Sebastien Vauban
Hi Stefan,

Stefan Monnier wrote:
 Debugger entered--Lisp error: (wrong-type-argument symbolp (autoload
   [...]
   interactive-form((autoload org-agenda Activate appointments found
   [...]
   advice--make-interactive-form(ad-Advice-org-agenda-to-appt (autoload

 I installed a patch into trunk that should fix this, thank you.

Thanks to you.

I'll take a look as soon as the next binary is available (on Dani's Dropbox).

Best regards,
  Seb

-- 
Sebastien Vauban





Re: [O] Help with beamer environments + org-special-blocks!

2013-06-27 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou wrote:
 Sebastien Vauban writes:
 Vikas Rawal wrote:

 For example, if I use the following:

 (add-to-list 'org-beamer-environments-extra
  '(textpos1 w \\begin{textblock}%h \\visible %a { }
 \\end{textblock}))

 and write the headline as {10}(3,3), I get \{10\}(3,3) in beamer
 export rather than {10}(3,3).

 I think we should changes some environment placeholders:

   + Introduce %r which would stand for the raw headline (without any
 processing)
   + %H and %U would use the raw headline text instead.

 The previous definition would become:

   '(textpos1 w \\begin{textblock}%r \\visible %a { } \\end{textblock})

 WDYT?

I'm not sure to understand. Where would he put his options?  Directly on the
heading line, with no text, then?

Something like this:

--8---cut here---start-8---
** {10}(3,3)   :textpos1:

Contents to position
at some (x,y) coordinates...
--8---cut here---end---8---

   #+begin_myenvironment{3}\#+begin\_myenvironment\{3\}
   Test of a new   Test of a new
   environment.environment.
   #+end_myenvironment \#+end\_myenvironment

 This should work with a recent Org.

What do you call a recent Org?  I'm blocked on commit 26a9b02, from May 27th,
as long as the #+SETUPFILE: bug is not fixed (fontification is broken).

So, is that one (4 weeks old) a recent Org?

 There is also:

   #+attr_latex: :options {3}
   #+begin_myenvironment
   Test of a new
   environment
   #+end_myenvironment

Aahh!  I wasn't aware (enough) of that way to pass my arguments to my own
environments. Thanks a lot, that works like a charm!

Best regards,
  Seb

-- 
Sebastien Vauban




[O] org-babel-lob-execute: Wrong type argument: integer-or-marker-p

2013-06-27 Thread Loris Bennett
Hi,

When I add the caching option to a call to a code block, like this 

  #+CALL: get_raw_timelimit_elapsed_data() :cache yes

everything  works OK, but I get the error

  org-babel-lob-execute: Wrong type argument: integer-or-marker-p

With an ECM the error does not occur, just with my crufty .emacs.  As I
say, the problem seems to be purely cosmetic, but I was wondering what
could be causing this.

Any ideas?

Loris
-- 
This signature is currently under construction.







[O] Add figure/table numbers to HTML captions

2013-06-27 Thread Yoshinari Nomura
Hi all,

I sometimes need to export an org document into both HTML and LaTeX.
In such case, I want HTML exporter to create numbered captions for
figures and tables.

So, I've written a small patch to add figure/table numbers to HTML
captions. (see 0001-Add-figure-table-numbers-to-HTML-captions.patch)

I'll be very happy if this feature is merged into the master branch.

This is my first post to this list.
Please teach me if we have some better way to submit the patch.

Thanks.
--
Yoshinari Nomura
https://github.com/yoshinari-nomura


Example:
-
#+TITLE: Add figure/table numbers to HTML captions
#+LATEX_CLASS: article
#+LANGUAGE: en
#+OPTIONS: toc:nil

* Figure Test
  See Figure[[fig:screenshot]] for screenshot.
  See Figure[[fig:manual]] for printed version of Org's manual.

  #+CAPTION: Org mode screen shot
  #+name: fig:screenshot
  [[http://orgmode.org/img/main.jpg]]

  This is org-mode logo: [[http://orgmode.org/img/org-mode-unicorn-logo.png]]
  (no caption, excluded from ordinal list).

  #+CAPTION: Org mode manual
  #+name: fig:manual
  [[http://orgmode.org/img/org-mode-7-network-theory.jpg]]

* Table Test
  Table[[tab:phone]] shows phone numbers.
  Table[[tab:age]] shows age list.

  #+caption: Phones
  #+name: tab:phone
  | Name  | Phone | Age |
  |---+---+-|
  | Peter |  1234 |  17 |
  | Anna  |  4321 |  25 |

  This is a plain table (no caption, excluded from ordinal list):
  | No. | Letter |
  |-+|
  |   1 | A  |
  |   2 | B  |

  #+caption: Ages
  #+name: tab:age
  | Name  | Age | Phone |
  |---+-+---|
  | Peter |  17 |  1234 |
  | Anna  |  25 |  4321 |
-
From b406e083af930644017d84144554b992cf8a788f Mon Sep 17 00:00:00 2001
From: Yoshinari Nomura n...@quickhack.net
Date: Thu, 27 Jun 2013 18:15:36 +0900
Subject: [PATCH] Add figure/table numbers to HTML captions

---
 lisp/ox-html.el | 29 ++---
 lisp/ox.el  | 10 --
 2 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index a996b40..7217eab 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2534,6 +2534,15 @@ Inline images can have these attributes:
 	 (parent (org-export-get-parent-element link))
 	 (caption (org-export-data (org-export-get-caption parent) info))
 	 (label (org-element-property :name parent)))
+(unless (string= caption )
+  (let* ((org-html-standalone-image-predicate
+	  (lambda (img) (org-element-property :caption img)))
+	 (number (org-export-get-ordinal
+		  link info nil 'org-html-standalone-image-p)))
+	(setq caption
+	  (concat
+	   (format (org-html--translate Figure %d: info) number)
+	 caption
 ;; Return proper string, depending on DISPOSITION.
 (org-html-format-inline-image
  path info caption label
@@ -2725,14 +2734,23 @@ INFO is a plist holding contextual information.  See
 		 (org-export-solidify-link-text href) attributes desc)))
 	  ;; Fuzzy link points to a target.  Do as above.
 	  (t
-	   (let ((path (org-export-solidify-link-text path)) number)
+	   (let ((path (org-export-solidify-link-text path)) number
+		 caption-predicate org-html-standalone-image-predicate)
 	 (unless desc
+	   (setq caption-predicate
+		 (if (org-element-property :caption destination)
+			 (lambda (elem optional info)
+			   (org-element-property :caption elem))
+		   (lambda (elem optional info)
+			 (not (org-element-property :caption elem)
+	   (setq org-html-standalone-image-predicate caption-predicate)
 	   (setq number (cond
 			 ((org-html-standalone-image-p destination info)
 			  (org-export-get-ordinal
 			   (assoc 'link (org-element-contents destination))
 			   info 'link 'org-html-standalone-image-p))
-			 (t (org-export-get-ordinal destination info
+			 (t (org-export-get-ordinal
+ destination info nil caption-predicate
 	   (setq desc (when number
 			(if (atom number) (number-to-string number)
 			  (mapconcat 'number-to-string number .)
@@ -3145,6 +3163,9 @@ contextual information.
 (t
  (let* ((label (org-element-property :name table))
 	(caption (org-export-get-caption table))
+	(number (org-export-get-ordinal
+		 table info nil
+		 (lambda (tbl info) (org-element-property :caption tbl
 	(attributes
 	 (if (org-html-html5-p info) 
 	   (org-html--make-attribute-string
@@ -3183,7 +3204,9 @@ contextual information.
 		 (format (if org-html-table-caption-above
 			 caption align=\above\%s/caption
 			   caption align=\bottom\%s/caption)
-			 (org-export-data caption info)))
+			 (concat
+			  (format (org-html--translate Table %d: info) number)
+			(org-export-data caption info
 	   (funcall table-column-specs table info)
 	   contents)
 
diff --git a/lisp/ox.el b/lisp/ox.el
index fb56da4..1133f21 100644
--- 

Re: [O] Add figure/table numbers to HTML captions

2013-06-27 Thread Rasmus
Hi Yoshinari,

 I sometimes need to export an org document into both HTML and LaTeX.
 In such case, I want HTML exporter to create numbered captions for
 figures and tables.

I think many would appreciate that feature.

 So, I've written a small patch to add figure/table numbers to HTML
 captions. (see 0001-Add-figure-table-numbers-to-HTML-captions.patch)

That's cool!  

I'm not an expert on html, but how easy it is to enable/disable/alter
your solution locally compared to a html5/css solution?  E.g. as here:

  
http://tympanus.net/codrops/2013/05/02/automatic-figure-numbering-with-css-counters/

Note, I don't know if this can be used for tables, or only figures,
but being able to change the style in css seems nice.

 This is my first post to this list.
 Please teach me if we have some better way to submit the patch.

Check: 

   http://orgmode.org/worg/org-contribute.html

You could use git format-patch and make sure that the commit message
is a change-log entry as described on Worg (C-x 4 a on your change in
the diff file should bring up the correct changelog mode).

–Rasmus

-- 
Dung makes an excellent fertilizer




[O] Variable in file name for babel output?

2013-06-27 Thread Loris Bennett
Hi,

Is it possible to pass a variable to a source block such that the
variable can be used as part of the name of the output file?

Currently I have

#+HEADER: :var data=timelimit-elapsed-data year=2011 :colnames yes
#+HEADER: :session *r* :file (org-babel-temp-file time-elapsed- .pdf)

which gets me a different name for each value of 'year', but ideally I
would like the files to be called

time-elapsed-2011.pdf
time-elapsed-2012.pdf
time-elapsed-2013.pdf

etc.

Can this be done? 

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] Process diagrams with dot and some glue using Org-mode

2013-06-27 Thread Rick Frankel
On Thu, Jun 27, 2013 at 08:47:14AM +0200, Karl Voit wrote:
 * Rick Frankel r...@rickster.com wrote:
 
  - It requires you to specify the range on the node table
 
 Sorry, I did not understand this since I could not locate any range
 specification below except that one for foobar-node-table in the
 header. Is this the thing you mentioned? If so, I do not consider
 this as an issue at all because [2:-1] is right for any number of
 rows.
[snip]
 
  #+HEADER: :var nodes=foobar-node-table[2:-1]

Yes, that's the range spec i was referring to.

[snip]
 Where should I place this method? Org-tutorials? [1] probably? New
 section in [2]?
 
   1. http://orgmode.org/worg/org-tutorials/#sec-3-2
   2. http://orgmode.org/worg/org-tutorials/#sec-4

I'm not sure. Carsten or Bastien would be a better person to ask. It
might also belong in the Hacks?

rick



Re: [O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread J. David Boyd
chris numbch...@gmail.com writes:

 I want to set up Org-mode variable org-agenda-files.

 How to Let [C-c a] to search over all files in a directory *recursively* ?

It's in the doc help for org-agenda-files:

   The files to be used for agenda display.
   Entries may be added to this list with M-x org-agenda-file-to-front and 
removed with
   M-x org-remove-file.  You can also use customize to edit the list.
   
   If an entry is a directory, all files in that directory that are matched by
   `org-agenda-file-regexp' will be part of the file list.
   
   If the value of the variable is not a list but a single file name, then
   the list of agenda files is actually stored and maintained in that file, one
   agenda file per line.  In this file paths can be given relative to
   `org-directory'.  Tilde expansion and environment variable substitution
   are also made.

So just set it to be a directory, as I do.

Dave




Re: [O] Proper use of 'org-file-apps'

2013-06-27 Thread Nick Dokos
Vladimir Lomov lomov...@gmail.com writes:

 ** Nick Dokos [2013-06-27 01:52:49 -0400]:

 Vladimir Lomov lomov...@gmail.com writes:

  #+BEGIN_SRC emacs-lisp :tangle org-apps-c.el
(add-to-list 'load-path /usr/share/emacs/site-lisp/org)
(require 'org)
(setq org-file-apps
 '( (\\.pdf::\\(\\d+\\)\\' . run-me --page %1 %s)
(\\.pdf\\' . run-me %s)
  )
)
  #+END_SRC


 \d is Perl regexp syntax for matching a digit, but (afaik) not emacs
 syntax. Try

 '( (\\.pdf::\\([0-9]+\\)\\' . run-me --page %1 %s)

 or

 '( (\\.pdf::\\([[:digit:]]+\\)\\' . run-me --page %1 %s)

 instead.
 D'oh, I had searched Emacs manual about meaning of \' but didn't try to
 check if \d is acceptable. Nevertheless, 'org-file-apps' docstring must
 be updated then, because this \\d part is from it.


Yes, indeed. There's also the vexing question of backslashes. At least
in my version of the C-h v org-file-apps output, the examples appear
with single backslashes in the quoted strings, so if somebody just cuts
and pastes, it is *not* going to work.

Could you make a patch?
-- 
Nick




Re: [O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread Nick Dokos
da...@adboyd.com (J. David Boyd) writes:

 chris numbch...@gmail.com writes:

 How to Let [C-c a] to search over all files in a directory *recursively* ?

 It's in the doc help for org-agenda-files:

...
If an entry is a directory, all files in that directory that are matched by
`org-agenda-file-regexp' will be part of the file list.
...

 So just set it to be a directory, as I do.


That's not going to work *recursively*, unless all the subdirectory names
match org-agenda-file-regexp as well (and I'm not sure it is going to
work even if that is the case - haven't tried it).

-- 
Nick




Re: [O] evaluation context in call statements

2013-06-27 Thread Achim Gratz
Andreas Leha writes:
 I did not follow this tread, so I just wanted to clarify:  You are talking
 about making me to replace

 #+call: number_of_sth(origin=dataset1) :results table
 #+call: number_of_sth(origin=dataset2) :results table

 with

 #+name: call_number_of_sth_with_origin_dataset1
 #+call: number_of_sth(origin=dataset1) :results table
 #+name: call_number_of_sth_with_origin_dataset2
 #+call: number_of_sth(origin=dataset2) :results table

No.  What I'm talking about is that this behaviour is sensible only for
#+CALL lines that have functional semantics (i.e. always produce the
same result as long as the arguments stay the same) and therefore
shouldn't be the (unconditional) default.


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

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread Nicolas Richard
chris numbch...@gmail.com writes:

 How to Let [C-c a] to search over all files in a directory *recursively* ?

AFAIK, there's no built in way.

Applying the following patch to the function org-agenda-files gets you
there, but it's not clean at all, and certainly very unefficient :

Modified   lisp/org.el
diff --git a/lisp/org.el b/lisp/org.el
index 7fd1576..0068c49 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17797,8 +17797,7 @@ used by the agenda files.  If ARCHIVE is `ifmode', do 
this only if
 (setq files (apply 'append
   (mapcar (lambda (f)
 (if (file-directory-p f)
-(directory-files
- f t org-agenda-file-regexp)
+(find-lisp-find-files f 
org-agenda-file-regexp)
   (list f)))
   files)))
 (when org-agenda-skip-unavailable-files

Also it might be faster to rely on an external find tool but that requires
modifying the regexp (-regex applies to whole path).

HTH,

-- 
N.



Re: [O] Add figure/table numbers to HTML captions

2013-06-27 Thread Nicolas Goaziou
Hello,

Yoshinari Nomura n...@quickhack.net writes:


 I sometimes need to export an org document into both HTML and LaTeX.
 In such case, I want HTML exporter to create numbered captions for
 figures and tables.

 So, I've written a small patch to add figure/table numbers to HTML
 captions. (see 0001-Add-figure-table-numbers-to-HTML-captions.patch)

I hadn't noticed HTML export back-end didn't provide this feature
already. I agree this should be implemented. Thank you for taking care
of it.

 I'll be very happy if this feature is merged into the master branch.

Sure. Here are a few comments in addition to those suggested by Rasmus
in this thread.

 +(unless (string= caption )
 +  (let* ((org-html-standalone-image-predicate
 +   (lambda (img) (org-element-property :caption img)))
 +  (number (org-export-get-ordinal
 +   link info nil 'org-html-standalone-image-p)))

You should put this function at the top level instead, since another
transcoder use it. See `org-ascii--has-caption-p' in ascii export
back-end. You can also use a lambda each time. Your call.

 + (setq caption
 +   (concat
 +(format (org-html--translate Figure %d: info) number)
 +  caption

I would move this in the first caption binding. Assuming you implemented
`org-html--has-caption-p', you could use something like:

  (let (...
(caption
 (let ((raw (org-export-data (org-export-get-caption parent) info)))
   (when (org-string-nw-p raw)
 (concat (format (org-html--translate Figure %d: info)
 (org-export-get-ordinal
  link info nil 'org-html--has-caption-p))
  
 raw))

  ;; Return proper string, depending on DISPOSITION.
  (org-html-format-inline-image
   path info caption label
 @@ -2725,14 +2734,23 @@ INFO is a plist holding contextual information.  See
(org-export-solidify-link-text href) attributes desc)))
 ;; Fuzzy link points to a target.  Do as above.
 (t
 -(let ((path (org-export-solidify-link-text path)) number)
 +(let ((path (org-export-solidify-link-text path)) number
 +  caption-predicate org-html-standalone-image-predicate)
(unless desc
 +(setq caption-predicate
 +  (if (org-element-property :caption destination)
 +  (lambda (elem optional info)
 +(org-element-property :caption elem))
 +(lambda (elem optional info)
 +  (not (org-element-property :caption elem)
 +(setq org-html-standalone-image-predicate caption-predicate)
  (setq number (cond
((org-html-standalone-image-p destination info)
 (org-export-get-ordinal
  (assoc 'link (org-element-contents destination))
  info 'link 'org-html-standalone-image-p))
 -  (t (org-export-get-ordinal destination info
 +  (t (org-export-get-ordinal
 +  destination info nil
 caption-predicate

You don't need to change `org-html-link'. I think it already DTRT.

  (setq desc (when number
   (if (atom number) (number-to-string number)
 (mapconcat 'number-to-string number .)
 @@ -3145,6 +3163,9 @@ contextual information.
  (t
   (let* ((label (org-element-property :name table))
   (caption (org-export-get-caption table))
 + (number (org-export-get-ordinal
 +  table info nil
 +  (lambda (tbl info) (org-element-property :caption tbl

See comment above.

 - (es :default Figura))
 + (es :default Figura)
 + (ja :html #22259; :utf-8 図))
 +(Figure %d:
 + (de :default Abbildung %d:)
 + (es :default Figura %d:)
 + (ja :html #22259;%d: :utf-8 図%d:))

Maybe you should also provide a :default value, otherwise it will use
Figure %d: for latex, texinfo, ascii...

Also, I think it belong to a different patch. Would you mind splitting
them?

  (Footnotes
   (ca :html Peus de pagrave;gina)
   (cs :default Pozn\xe1mky pod carou)
 @@ -5312,7 +5317,8 @@ them.
   (de :default Tabelle %d)
   (es :default Tabla %d)
   (fr
 -  :ascii Tableau %d : :default Tableau nº %d : :latin1 Tableau %d 
 :))
 +  :ascii Tableau %d : :default Tableau nº %d : :latin1 Tableau %d 
 :)
 + (ja :html #34920;%d: :utf-8 表%d:))

Ditto.


Regards,

-- 
Nicolas Goaziou



Re: [O] Org 8.0 -- Export postamble

2013-06-27 Thread Bastien
Hi Chao,

Chao Lu loochao.l...@gmail.com writes:

 But the problem is this will override the default postabmle, how to
 keep both? Please see the attached picture for a better description.

Well, you can't concatenate the default postamble and a custom one.
Maybe you can simply right a function that emulates this?

-- 
 Bastien



Re: [O] Setting a parametric org-agenda-skip-function?

2013-06-27 Thread Bastien
Hi Alan,

Alan Schmitt alan.schm...@polytechnique.org writes:

 I make org-agenda-skip-entry-unless-tags as debugged, and when I call
 this agenda view, I don't go in the debugger, so I guess it is not
 called.

I'd try edebug-defun'ing `org-agenda-skip-eval' and track what's wrong
from there.

HTH,

-- 
 Bastien



Re: [O] overview of org files

2013-06-27 Thread Bastien
D M German d...@uvic.ca writes:

 the code is here:

 https://github.com/dmgerman/org-manage

Maybe you can advertize this somewhere on Worg?

We certainly can't keep track of all Org add-ons written
on github, but it's always good to edit Worg and make it
better.

Thanks!

-- 
 Bastien



Re: [O] orgguide-es

2013-06-27 Thread Bastien
Hi David,

davi...@es.gnu.org (David Arroyo Menéndez) writes:

 The spanish version of orgguide is good maintained and from my point of
 view would be useful to the spanish org people add a link to
 http://orgmode.org/#docs. For instance:

   Read the compact guide in spanish: HTML or PDF

Since orgguide.es.texi is a project per se, I'd recommend hosting it
and publishing the HTML pages somewhere so that we can link to them.

Then I guess Worg is a better place, but index.html#doc could do too.

But let's first host orgguide.es.html somewhere reachable...

-- 
 Bastien



Re: [O] [PATCH] * lisp/org.el (org-scan-tags): do not impose a value of case-fold-search on the user

2013-06-27 Thread Bastien
Hi Nicolas

Nicolas Richard theonewiththeevill...@yahoo.fr writes:

 doesn't list Eva Luator in the Contacts buffer, although
 case-fold-search is set to t for me. I think it's an org-mode bug in
 fact ; I suggest the following :

Applied, thanks.

-- 
 Bastien



Re: [O] [PATCH] do not use mapcar* for transposing tables

2013-06-27 Thread Bastien
Hi Achim,

Achim Gratz strom...@nexgo.de writes:

 I've recently stumbled over a mapcar* compiled into Org for transposing
 tables.  This is a function from cl / cl-lib and should not be used at
 runtime.  Since we can make some simplifying assumptions about the data
 we'll have to deal with, re-implmenting the two uses with plain mapcar
 was (relatively) painless.

Looks good, please apply in maint.

Thanks!

-- 
 Bastien



Re: [O] [bug] org-capture fails with undefined org-time-was-given variable

2013-06-27 Thread Bastien
Hi Eric,

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

 I have tried tracing this through but have failed to figure out why the
 setting of this variable makes a difference.

Thanks for the directions, fixed in maint now.

-- 
 Bastien



Re: [O] Hide empty custom agenda sections

2013-06-27 Thread Bastien
Hi Ken,

Ken Mankoff mank...@gmail.com writes:

 Right now I have this at the bottom of my custom agenda, and it is
 therefore often off-screen. I would like to have it at the top, but
 only appear when there are items under this section. Most of the time
 it is there and three lines are wasting space (header separator 
 =, header REFILE, and a blank line).

So you are using agenda blocks, right?  

Please post the skeleton of your custom agendas so that we can better
understand.

Thanks,

-- 
 Bastien



Re: [O] [BUG] org-agenda-open-link does not open bbdb links

2013-06-27 Thread Bastien
Hi Matt,

Matt Lundin m...@imapmail.org writes:

 The function org-agenda-open-link does not open bbdb links.

 The reason is that bbdb agenda lines contain links that are not found in
 the entry. 

I'm not sure I understand.  Can you provide a minimal example/recipe?

 Because the agenda line is added to the strings scanned by
 org-offer-links-in-entry, it is added to the list of links (lk). I.e.,
 both buffer and lk are defined, which triggers the first cond statement.
 The function then proceeds to search for this link in the buffer. It
 does not find it, since a bbdb-anniversary entry typically looks like
 this:

 * Anniversaries
   :PROPERTIES:
   :CATEGORY: anniv
   :END:
 %%(org-bbdb-anniversaries)

 But as a result, the function org-offer-links-in-entry never gets to the
 second cond statement, which would indeed open the link found in the
 agenda buffer.

 It seems to me that feeding the agenda line as a prefix to
 org-offer-links-in-entry is redundant, since the second cond statement
 explicitly looks for links in the agenda line.

 The following change fixes the problem, but before I submit it as a
 properly formatted patch, I want to make sure that it does not interfere
 with some other functionality.

The patch would need to update `org-offer-links-in-entry' too, as the
occurrence you changed is the only one requiring a zero arg.  I remember
this was intentional, but the code is convoluted here.

Anyway, a recipe on how to reproduce the problem will help.

Thanks!

-- 
 Bastien



Re: [O] [RFC] Replace some HTML related keywords with OPTIONS items

2013-06-27 Thread Bastien
Hi Nicolas,

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

 Applied on master, since it introduces a syntax change. Tell me if you
 want it on maint anyway (or just cherry-pick it yourself).

2 cents: it's better on maint, since people are more likely to read
change logs for 8.1 rather than for 8.0.4.

-- 
 Bastien



Re: [O] orgguide-es

2013-06-27 Thread Bastien
Hi David,

davi...@es.gnu.org (David Arroyo Menéndez) writes:

 I'm trying update worg to link to orgguide.es.html, but I'm finding a not
 found in http://orgmode.org/worg/orgguide/orgguide.es.html. 

Worg is not for pushing HTML pages, but .org files, who then get
exported as HTML pages.

If you want to store HTML pages on Worg, put them in worg/code/,
they will then get published as attachments.

Hope this helps,

-- 
 Bastien



Re: [O] Open Document Exporter

2013-06-27 Thread Bastien
Hi Georg,

Georg Lehner jorge-...@magma.com.ni writes:

 diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
 index a76f7dd..c8b704c 100644

This is quite a significant patch.  If you want to let us apply
it for Org, you will need to sign the FSF copyright assignment:

  http://orgmode.org/cgit.cgi/org-mode.git/plain/request-assign-future.txt

Thanks in advance for your help!

-- 
 Bastien



Re: [O] [PATCH] Use geiser for babel scheme evaluation.

2013-06-27 Thread Bastien
Hi Greg,

Greg Minshall minsh...@acm.org writes:

 hi.  what happened to this patch?  i don't see it anywhere.  cheers!

Can you give a pointer to this patch?

Thanks!

-- 
 Bastien



Re: [O] [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties)

2013-06-27 Thread Bastien
Hi Peter,

Peter Münster pmli...@free.fr writes:

 * contrib/lisp/org-notify.el (org-notify-make-todo): Properties from
 org-element are all uppercase now.

Mhh... not sure what it means -- do you have a pointer?

 -(let* ((list (nth 1 heading))  (notify (or (get :notify) default))
 +(let* ((list (nth 1 heading))  (notify (or (get :NOTIFY) default))

I feel dull: please let me know why this is needed.

Thanks!

-- 
 Bastien



Re: [O] Alternatives to Org-modes (TreeSheets, WorkFlowy, ...)

2013-06-27 Thread Bastien
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 A couple of months ago, I found WorkFlowy[3] which is an online
 service that offers some features of Org-mode as well.

(The guys at workflowy told me one year ago that they would allow 
.org export... I'm still waiting it!)

-- 
 Bastien



Re: [O] [RFC] Replace some HTML related keywords with OPTIONS items

2013-06-27 Thread Bastien
Hi Nicolas,

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

 Basically,

   #+HTML_INCLUDE_STYLE: nil

 becomes

   #+OPTIONS: html-style:nil

Is this the rule for all #+... options ?

What about #+LaTeX: options ?

See for example ox-rss.el: should I keep using #+RSS_EXTENSION or use
a new item for #+OPTIONS: ?

Thanks for the directions!

-- 
 Bastien



Re: [O] Org mode and right-to-left paragraphs

2013-06-27 Thread Bastien
Hi Manuel,

Manuel GJT valh...@gmail.com writes:

 org-version 8.0.3, same issue with v. 7.9.4

 Any fixes or workarounds? Your help is much appreciated, most of my
 brain is linked to org-mode.

I'm afraid there is no real fix:

  (setq bidi-paragraph-direction 'left-to-right)

is in the very definition of Org-mode.  But experience
shows that I'm often too pessimistic on this list :)

-- 
 Bastien



Re: [O] orgstruct: broken global visibility cycling, when in comments

2013-06-27 Thread Bastien
Hi Nathaniel,

Nathaniel Cunningham nathaniel.cunning...@gmail.com writes:

 Note that this value for the prefix (actually the version with a
 space, ^;; ) is suggested by the Org manual for version 8.0.3

I fixed the manual.  Thanks for reporting this!

-- 
 Bastien



Re: [O] Blank lines in date-trees

2013-06-27 Thread Vincent Beffara

Hi Bastien,

 Very (very!) minor question: when capturing into a date-tree, is it
 possible to have a blank line inserted before created day-headings?

 C-h v org-capture-templates RET

 [...]

  :empty-lines-before Set this to the number of lines the should be inserted
  before the new item.  Overrides :empty-lines for the
  number lines inserted before.

 Hope that helps.. and works :)

Thanks - but it doesn't ... More precisely, it does insert a blank line
before the new entry itself, but not before the higher-level month and
day entries that possibly need to be created. Like this:


a question raised in \citet*{BenArous}.
*** 2013-06-27 Thursday

 sldkfj : lskdjf

sldkf


Again, this is *really* minor!

-- 
Vincent Beffara




Re: [O] org-id should require newcomment?

2013-06-27 Thread Bastien
Hi Samuel,

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

 If newcomment is loaded, this bug does not occur:

 Pasting link results in org-run-like-in-org-mode: Symbol's value as
 variable is void: comment-region-function.

Can you send a full backtrace of the error?

Thanks,

-- 
 Bastien



Re: [O] Filtering in org-agenda-filter-by-category

2013-06-27 Thread Gustav Wikström
Oh, ok. Didn't realize. I did the change a long time ago in my private
installation.

One difference in my version is the visibility of the filter in the
mode-line though. Doing C-u  multiple times adds every removed
category to the display in the mode-line.

I updated to 8.0.3 recently and did some changes to my version to
correspond to the evolution in the main repository. Here comes an
updated version:

(defun org-agenda-filter-by-category (strip)
  Keep only those lines in the agenda buffer that have a specific category.
The category is that of the current line.
  (interactive P)
  (if (and org-agenda-filtered-by-category
  org-agenda-category-filter)
  (org-agenda-filter-show-all-cat)
(let ((cat (org-no-properties (get-text-property (point) 'org-category
  (cond
   ((and cat strip)
(org-agenda-filter-apply
 (push (concat - cat) org-agenda-category-filter) 'category))
   ((and cat)
(org-agenda-filter-apply
 (setq org-agenda-category-filter
  (list (concat + cat))) 'category))
   ((error No category at point))

I also attached a diff between the above and the code in 8.0.3.

Regards Gustav

On Thu, Jun 27, 2013 at 4:48 PM, Bastien b...@gnu.org wrote:

 Hi Gustav,

 (please use plain text when posting code, other the code snippet
 is often mangled and not readable... thanks!)

 Gustav Wikström gustav.e...@gmail.com writes:

  I'd like to propose an addition to the function
  org-agenda-filter-by-category; that is, the function called when pushing
   in an agenda.
 
  As some might know adding a C-u in front of the command filters away the
  current category instead of only listing it solemnly. I've made a change in
  my source to allow multiple categories to be filtered away, instead of the
  current functionality where only one category could be removed at a time.

 Using C-u  multiple times to exclude entries from multiple categories
 works here.  What version of Org are you using (M-x org-version RET)?

 Thanks,

 --
  Bastien
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index fe2c743..e1fc4ec 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7307,12 +7307,15 @@ The category is that of the current line.
   org-agenda-category-filter)
   (org-agenda-filter-show-all-cat)
 (let ((cat (org-no-properties (get-text-property (point) 'org-category
-  (if (and cat (not (string=  cat)))
- (org-agenda-filter-apply
-  (setq org-agenda-category-filter
-(list (concat (if strip - +) cat)))
-  'category)
-   (error No category at point)
+  (cond
+   ((and cat strip)
+(org-agenda-filter-apply
+ (push (concat - cat) org-agenda-category-filter) 'category))
+   ((and cat)
+(org-agenda-filter-apply
+ (setq org-agenda-category-filter
+  (list (concat + cat))) 'category))
+   ((error No category at point))
 
 (defun org-find-top-headline (optional pos)
   Find the topmost parent headline and return it.


Re: [O] Hide empty custom agenda sections

2013-06-27 Thread Ken Mankoff
Hi Bastien,

Here is my custom agenda section. I'd like to have the DEADLINE and the
REFILE only show up if items exist in those sections, not when they are
empty. Actually, I guess I'd like this for all sections.

(setq org-agenda-custom-commands
  '((c My Custom Agenda
 (
  (tags REFILE ((org-agenda-overriding-header REFILE)))
  (tags-todo +DEADLINE=\+3d\
 (
  (org-agenda-overriding-header Deadline = 3 Days)
  ))
  (tags-todo +SCHEDULED\tomorrow\
 (
  (org-agenda-overriding-header Scheduled Today)
  ))
  (todo INPROGRESS ((org-agenda-overriding-header In Progress)))
  (todo WAITING|VERIFY ((org-agenda-overriding-header Waiting or
Verify)))
  (agenda  (
  (org-agenda-overriding-header Scheduled)
  (org-deadline-warning-days 0)
  ))
  (todo SOMEDAY ((org-agenda-overriding-header Someday)))
  (tags REFILE ((org-agenda-overriding-header REFILE)))
  ) nil (org.txt org.html org.ics



On Thu, Jun 27, 2013 at 10:44 AM, Bastien b...@gnu.org wrote:

 Hi Ken,

 Ken Mankoff mank...@gmail.com writes:

  Right now I have this at the bottom of my custom agenda, and it is
  therefore often off-screen. I would like to have it at the top, but
  only appear when there are items under this section. Most of the time
  it is there and three lines are wasting space (header separator 
  =, header REFILE, and a blank line).

 So you are using agenda blocks, right?

 Please post the skeleton of your custom agendas so that we can better
 understand.

 Thanks,

 --
  Bastien



Re: [O] Elpa twice in load-path

2013-06-27 Thread Bastien
Hi Rene,

Rene jl...@yahoo.com writes:

 The way elpa works, it automatically adds packages to `load-path'.  There is
 therefore no need to have such a line

   (add-to-list 'load-path (or (file-name-directory #$) (car load-path)))

 in the `package-autoloads.el file.

Where is this file?

-- 
 Bastien



Re: [O] org-map-entries - wrong use or bug?

2013-06-27 Thread Bastien
Hi Nick,

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

 There probably should be a link from the Using the mapping API section
 to the Matching tags and properties section. I thought there was one,
 but I just checked and didn't see it.

Please feel free to add it if needed!

Thanks,

-- 
 Bastien



Re: [O] Oorg-export-generic.el and emphasize

2013-06-27 Thread Bastien
Wes Hardaker wjhns...@hardakers.net writes:

 What feature from `org-export-generic' do you think is missing in
 ox.el?

 ox.el is a wonderfully designed parser and exporter (from what I've read
 of code, not actually used it (yet)).  And my kudos to that and the
 suite of exporters that go with it!

 org-export-generic had an entirely different audience in mind, though:
 the non-programmer.

And this is *very* important IMHO.

Maybe we could write an interactive exporter generator based on ox.el?

Something with simple questions that will write the new ox-xxx.el file
itself, with no fiddling from the user.  Not immediately, at least.

On my todo list, but I'd be glad if someones beats me on this one :)

-- 
 Bastien



Re: [O] Help with beamer environments + org-special-blocks!

2013-06-27 Thread Sebastien Vauban
Hello Nicolas,

Nicolas Goaziou wrote:
 Sebastien Vauban writes:
 Nicolas Goaziou wrote:
 The previous definition would become:

   '(textpos1 w \\begin{textblock}%r \\visible %a { } 
 \\end{textblock})

 WDYT?

 I'm not sure to understand. Where would he put his options?  Directly on the
 heading line, with no text, then?

 Something like this:

 ** {10}(3,3)   :textpos1:

 Contents to position
 at some (x,y) coordinates...

 Correct.

I think this is quite elegant...

With what you say below, we then have 3 different solutions (at least) for new
environments:

- the one above, where you add a new environment definition (but, then, it's
  kind of private for your own files; difficult to share)

- the Org special blocks, ancient way, which you've fixed

#+begin_myenv{2cm}
Contents...
#+end_myenv

- the Org special blocks, new way, with the OPTIONS

#+LaTeX_ATTR: :options {2cm}
#+begin_myenv{2cm}
Contents...
#+end_myenv

Now, a big question: outside the fact that some such standards (like
texpos1) would have to be added IMHO as default Beamer environments, what
about standard LaTeX?

I think normal, then, to wanna get that same behavior in the LaTeX backend.
How to do that?  I'm a bit puzzled by the differences to get some similar
results...

- In LaTeX, you have the inline tasks which can be used to insert blocks, but
  not the system where you create blocks by adding an ignoreheading heading,
  right?

- In Beamer, we have both?  And, for whatever reason (which must escape me),
  we tend to prefer the ignoreheading for closing a block.

In my latest slides, I've been quite disturbed by how much pure LaTeX I've
finally inserted in my slides, for inserting TikZ nodes to render boxes. I had
the impression to write LaTeX inside an Org file; and that's not the right
approach:

- too much LaTeX tag overload,

- no HTML equivalent for the contents of my boxes -- while, as presented here
  above for the textpos, even in HTML, it'd be quite nice.

- no Org syntax usable: inside my boxes (TikZ nodes), I had to use \textbf for
  bold, not the stars...

Now, there are, once again, other extra solutions: MACRO and Org Babel calls.

Too much solutions...

 What do you call a recent Org?  I'm blocked on commit 26a9b02, from May 27th,
 as long as the #+SETUPFILE: bug is not fixed (fontification is broken).

 So, is that one (4 weeks old) a recent Org?

 No. I fixed it ten days ago (dffdc49).

OK, thanks!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Feature request: Tags exported as drop down filters in HTML export

2013-06-27 Thread Bastien
Hi Hagino,

Hagino hagiha...@hotmail.com writes:

 I would like tags (and the new group tags) to be rendered as a drop
 down menu on HTML export, to allow different versions of the same
 website to be filtered and viewed.

You'll need to find a javascript Guru somewhere.

Patch welcome!

-- 
 Bastien



Re: [O] http proxy problem.

2013-06-27 Thread Bastien
Hi David, Eric,

DAVID QI david...@vtech.com writes:

 1 [submodule testing/jump]
 2 path = testing/jump
 3 url = https://github.com/eschulte/jump.el.git

This submodule is here for tests only and I think we
can simply get rid of it.  Eric, do I get this right? 

Thanks,

-- 
 Bastien



Re: [O] [PATCH] org-mouse: Fix incorrect replacement for checkbox lists

2013-06-27 Thread Bastien
Hi Ilya,

Ilya Zonov izo...@gmail.com writes:

 I have prepared patch which fixes incorrect replacement with
 org-mouse popup function for checkbox lists: All Set and All
 Clear. Please, check it. See attachment.

Applied, thanks.

Please add TINYCHANGE at the end of your commit message for such
changes next time, it helps us keep track of what does not need
a copyright assignment.

Thanks!

-- 
 Bastien



Re: [O] Relation between todo-mode.el and Org-mode?

2013-06-27 Thread Bastien
Hi Stephen,

Stephen Berman stephen.ber...@gmx.net writes:

 Maybe I'll give Org another try.

Glad to have you on this list -- I'm one of those who is curious
about todo-mode.el and I'll try to try (sic) one day.

Just one question: do you get feedback from todo-mode.el users?
Do you know if there are some/many out there?  Just curious to
see other's people use.

Thanks!

-- 
 Bastien



Re: [O] Filtering in org-agenda-filter-by-category

2013-06-27 Thread Bastien
Gustav Wikström gustav.e...@gmail.com writes:

 I updated to 8.0.3 recently and did some changes to my version to
 correspond to the evolution in the main repository. Here comes an
 updated version:

Applied, thanks!

-- 
 Bastien



Re: [O] Process diagrams with dot and some glue using Org-mode

2013-06-27 Thread Bastien
Rick Frankel r...@rickster.com writes:

 Where should I place this method? Org-tutorials? [1] probably? New
 section in [2]?
 
   1. http://orgmode.org/worg/org-tutorials/#sec-3-2
   2. http://orgmode.org/worg/org-tutorials/#sec-4

 I'm not sure. Carsten or Bastien would be a better person to ask. It
 might also belong in the Hacks?

org-tutorials would do.  Thanks in advance!

-- 
 Bastien



Re: [O] how to disable timestamp html export

2013-06-27 Thread Bastien
OSiUX xu...@osiux.com.ar writes:

 When export using org-publish-project,
 Org add a comment with timestamp in HTML:

  # git diff

  html xmlns=http://www.w3.org/1999/xhtml; lang=es xml:lang=es
   head
   titleviewing two years of orgmode with gnuplot/title
  -!-- 2013-06-05 mié 12:10 --
  +!-- 2013-06-05 mié 12:38 --
   meta  http-equiv=Content-Type content=text/html;charset=utf-8 /
   meta  name=generator content=Org-mode /

 In my .emacs, I have:

 (setq org-publish-project-alist
   (quote ((osiux-blog-org
 ...others...options...
 :with-timestamps nil

 How I can disable this feature?

(setq org-export-time-stamp-file nil)

or

:time-stamp-file nil

in publishing projects.

-- 
 Bastien



Re: [O] Filtering in org-agenda-filter-by-category

2013-06-27 Thread Bastien
Hi Gustav,

(please use plain text when posting code, other the code snippet
is often mangled and not readable... thanks!)

Gustav Wikström gustav.e...@gmail.com writes:

 I'd like to propose an addition to the function
 org-agenda-filter-by-category; that is, the function called when pushing
  in an agenda.

 As some might know adding a C-u in front of the command filters away the
 current category instead of only listing it solemnly. I've made a change in
 my source to allow multiple categories to be filtered away, instead of the
 current functionality where only one category could be removed at a time.

Using C-u  multiple times to exclude entries from multiple categories
works here.  What version of Org are you using (M-x org-version RET)?

Thanks,

-- 
 Bastien



Re: [O] Setting entry title by a standard org function?

2013-06-27 Thread Bastien
Hi Klaus-Dieter,

Klaus-Dieter Bauer bauer.klaus.die...@gmail.com writes:

 Is there a standard way in the org-mode modules to change the text of
 a heading conserving tags, todo type, priority etc?

There is no function for this.

I use

(setq org-special-ctrl-a/e 'reversed)
(setq org-special-ctrl-k t)

which makes it easy to interactively edit the heading,
but this is not a function.

Hope this helps anyway,

-- 
 Bastien



Re: [O] [RFC] Replace some HTML related keywords with OPTIONS items

2013-06-27 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

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

 Basically,

   #+HTML_INCLUDE_STYLE: nil

 becomes

   #+OPTIONS: html-style:nil

 Is this the rule for all #+... options ?

 What about #+LaTeX: options ?

 See for example ox-rss.el: should I keep using #+RSS_EXTENSION or use
 a new item for #+OPTIONS: ?

 Thanks for the directions!

Basically, #+keyword: is for strings, #+OPTIONS: use `read' on the
values, so it should be used for every other type.

AFAIU, #+rss_extension: expects a string as its value, so there's
nothing to change.


Regards,

-- 
Nicolas Goaziou



Re: [O] Blank lines in date-trees

2013-06-27 Thread Bastien
Hi Vincent,

Vincent Beffara vbeff...@ens-lyon.fr writes:

 Hi, 

 Very (very!) minor question: when capturing into a date-tree, is it
 possible to have a blank line inserted before created day-headings?

C-h v org-capture-templates RET

[...]

 :empty-lines-before Set this to the number of lines the should be inserted
 before the new item.  Overrides :empty-lines for the
 number lines inserted before.

Hope that helps.. and works :)

-- 
 Bastien



Re: [O] Help with beamer environments + org-special-blocks!

2013-06-27 Thread Nicolas Goaziou


Hello,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 With what you say below, we then have 3 different solutions (at least) for new
 environments:

 - the one above, where you add a new environment definition (but, then, it's
   kind of private for your own files; difficult to share)

If you use advanced features of Org, you're more or less bound to share
your documents with a config file anyway.

[...]


 - the Org special blocks, new way, with the OPTIONS

 #+LaTeX_ATTR: :options {2cm}
 #+begin_myenv{2cm}
 Contents...
 #+end_myenv

Correction:

  #+attr_latex: :options {2cm}
  #+begin_myenv
  Contents...
  #+end_myenv

 Now, a big question: outside the fact that some such standards (like
 texpos1) would have to be added IMHO as default Beamer environments, what
 about standard LaTeX?

 I think normal, then, to wanna get that same behavior in the LaTeX backend.
 How to do that?  I'm a bit puzzled by the differences to get some similar
 results...

 - In LaTeX, you have the inline tasks which can be used to insert blocks, but
   not the system where you create blocks by adding an ignoreheading heading,
   right?

 - In Beamer, we have both?  And, for whatever reason (which must escape me),
   we tend to prefer the ignoreheading for closing a block.

I don't understand your question. Equivalent blocks do not exist in
standard LaTeX, do they? Also, this has nothing to do with inlinetasks.

In Beamer export, headlines can generate blocks. This is handy because
they can be easily nested, accept properties through drawers, etc.
Special blocks are more limited. Though, you cannot close a headline, so
the ignoreheading trick was implemented.

In LaTeX export, headlines generate headlines.

 In my latest slides, I've been quite disturbed by how much pure LaTeX I've
 finally inserted in my slides, for inserting TikZ nodes to render boxes. I had
 the impression to write LaTeX inside an Org file; and that's not the right
 approach:

 - too much LaTeX tag overload,

 - no HTML equivalent for the contents of my boxes -- while, as presented here
   above for the textpos, even in HTML, it'd be quite nice.

 - no Org syntax usable: inside my boxes (TikZ nodes), I had to use \textbf for
   bold, not the stars...

I think you are asking too much for Org syntax.

 Now, there are, once again, other extra solutions: MACRO and Org Babel
 calls.

Indeed.


Regards,

-- 
Nicolas Goaziou




Re: [O] [RFC] Replace some HTML related keywords with OPTIONS items

2013-06-27 Thread Bastien
Hi Nicolas,

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

 Basically, #+keyword: is for strings, #+OPTIONS: use `read' on the
 values, so it should be used for every other type.

Thanks for the explanation, it makes sense.

Let's make it explicit somewhere in the manual, so that users
have a clear rule in mind when wondering what syntax they need
to look for.

Best,

-- 
 Bastien



Re: [O] [PATCH 2/2] org-notify: Fix compatibility with latest org-element (uppercase properties)

2013-06-27 Thread Peter Münster
On Thu, Jun 27 2013, Bastien wrote:

 * contrib/lisp/org-notify.el (org-notify-make-todo): Properties from
 org-element are all uppercase now.

 Mhh... not sure what it means -- do you have a pointer?

Yes, here: http://article.gmane.org/gmane.emacs.orgmode/73628

Citation:

  | (defun org-element-headline-parser (limit optional raw-secondary-p)
  |   Parse a headline.
  |
  | Return a list whose CAR is `headline' and CDR is a plist
  | containing `:raw-value', `:title', `:alt-title', `:begin',
  | `:end', `:pre-blank', `:hiddenp', `:contents-begin' and
  | `:contents-end', `:level', `:priority', `:tags',
  | `:todo-keyword',`:todo-type', `:scheduled', `:deadline',
  | `:closed', `:quotedp', `:archivedp', `:commentedp' and
  | `:footnote-section-p' keywords.
  |
  | The plist also contains any property set in the property drawer,
  | with its name in upper cases and colons added at the
  | beginning (i.e. `:CUSTOM_ID').
  |
[...]


 -(let* ((list (nth 1 heading))  (notify (or (get :notify) default))
 +(let* ((list (nth 1 heading))  (notify (or (get :NOTIFY) default))

 I feel dull: please let me know why this is needed.

No problem. Here another pointer:
http://article.gmane.org/gmane.emacs.orgmode/73637

-- 
   Peter




[O] [PATCH] Append value of #+HTML_LINK_HOME to links relative with paths

2013-06-27 Thread Bastien
Hi all,

the attached patch appends the value of #+HTML_LINK_HOME
to links with relative paths in the HTML export.

I need this for RSS feeds, in which relative paths are not
allowed.

This should not break anything, but I'd be glad if someone
can test this heavily against his HTML publishing setup.

Thanks!

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index c0509ff..b4000b4 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2485,7 +2485,8 @@ standalone images, do the following.
 DESC is the description part of the link, or the empty string.
 INFO is a plist holding contextual information.  See
 `org-export-data'.
-  (let* ((link-org-files-as-html-maybe
+  (let* ((home (org-trim (plist-get info :html-link-home)))
+	 (link-org-files-as-html-maybe
 	  (function
 	   (lambda (raw-path info)
 	 Treat links to `file.org' as links to `file.html', if needed.
@@ -2511,9 +2512,12 @@ INFO is a plist holding contextual information.  See
 		  (funcall link-org-files-as-html-maybe raw-path info))
 	;; If file path is absolute, prepend it with protocol
 	;; component - file://.
-	(when (file-name-absolute-p raw-path)
-	  (setq raw-path
-		(concat file:// (expand-file-name raw-path
+	(cond ((file-name-absolute-p raw-path)
+		   (setq raw-path
+			 (concat file:// (expand-file-name
+	raw-path
+		  (home
+		   (setq raw-path (concat (file-name-as-directory home) raw-path
 	;; Add search option, if any.  A search option can be
 	;; relative to a custom-id or a headline title.  Any other
 	;; option is ignored.

-- 
 Bastien


Re: [O] Setting a parametric org-agenda-skip-function?

2013-06-27 Thread Alan Schmitt
Hi Bastien,

b...@gnu.org writes:

 Hi Alan,

 Alan Schmitt alan.schm...@polytechnique.org writes:

 I make org-agenda-skip-entry-unless-tags as debugged, and when I call
 this agenda view, I don't go in the debugger, so I guess it is not
 called.

 I'd try edebug-defun'ing `org-agenda-skip-eval' and track what's wrong
 from there.

Thank you for the suggestion. Unfortunately I don't know how to step
inside the '(eval form)' bit: if I hit 'i' edebug tells me eval is a
built-in function. So I could just skip over it but I won't see what
the problem is.

Alan



Re: [O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread J. David Boyd
Nicolas Richard theonewiththeevill...@yahoo.fr writes:

 chris numbch...@gmail.com writes:

 How to Let [C-c a] to search over all files in a directory *recursively* ?

 AFAIK, there's no built in way.

 Applying the following patch to the function org-agenda-files gets you
 there, but it's not clean at all, and certainly very unefficient :

   Modified   lisp/org.el
 diff --git a/lisp/org.el b/lisp/org.el
 index 7fd1576..0068c49 100644
 --- a/lisp/org.el
 +++ b/lisp/org.el
 @@ -17797,8 +17797,7 @@ used by the agenda files.  If ARCHIVE is `ifmode', do 
 this only if
  (setq files (apply 'append
  (mapcar (lambda (f)
(if (file-directory-p f)
 -  (directory-files
 -   f t org-agenda-file-regexp)
 +  (find-lisp-find-files f 
 org-agenda-file-regexp)
  (list f)))
  files)))
  (when org-agenda-skip-unavailable-files

 Also it might be faster to rely on an external find tool but that requires
 modifying the regexp (-regex applies to whole path).

 HTH,

Huh, when I set my org-agenda-files to ~/org/, and have TODO files in
~/org/home and ~/org/work, and press C-c a a, it loads all the todo file,
recursed down to all the subdirectories.

However, and this is strange, after it loads them all up, it changes
org-agenda-files to discrete filepaths, and not just the directory anymore.

That seems like a bug to me

Dave




Re: [O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread Nicolas Richard
da...@adboyd.com (J. David Boyd) writes:
 Huh, when I set my org-agenda-files to ~/org/, and have TODO files in
 ~/org/home and ~/org/work, and press C-c a a, it loads all the todo file,
 recursed down to all the subdirectories.

 However, and this is strange, after it loads them all up, it changes
 org-agenda-files to discrete filepaths, and not just the directory anymore.

It's what happens for me too, but I specifically wrote some elisp to do
that in my .emacs. Can you reproduce from -Q ?

-- 
N.



Re: [O] [PATCH] do not use mapcar* for transposing tables

2013-06-27 Thread Achim Gratz
Bastien writes:
 Looks good, please apply in maint.

Done.


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] [RFC] Replace some HTML related keywords with OPTIONS items

2013-06-27 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

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

 Basically, #+keyword: is for strings, #+OPTIONS: use `read' on the
 values, so it should be used for every other type.

 Thanks for the explanation, it makes sense.

 Let's make it explicit somewhere in the manual, so that users
 have a clear rule in mind when wondering what syntax they need
 to look for.

I tend to think it's more a developer information. By looking at the
manual, there's no confusion possible for a user.

Maybe it should go in `org-export-options-alist' docstring instead.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] do not use mapcar* for transposing tables

2013-06-27 Thread Bastien
Achim Gratz strom...@nexgo.de writes:

 Bastien writes:
 Looks good, please apply in maint.

 Done.

Thanks!

-- 
 Bastien



Re: [O] org-id should require newcomment?

2013-06-27 Thread Samuel Wales
Debugger entered--Lisp error: (void-variable comment-region-function)
  default-value(comment-region-function)
  org-run-like-in-org-mode(org-insert-link)
  org-insert-link-global()
  call-interactively(org-insert-link-global nil nil)


On 6/27/13, Bastien b...@gnu.org wrote:
 Hi Samuel,

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

 If newcomment is loaded, this bug does not occur:

 Pasting link results in org-run-like-in-org-mode: Symbol's value as
 variable is void: comment-region-function.

 Can you send a full backtrace of the error?

 Thanks,

 --
  Bastien



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

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

Denmark: free Karina Hansen NOW.



Re: [O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread J. David Boyd
Nicolas Richard theonewiththeevill...@yahoo.fr writes:

 da...@adboyd.com (J. David Boyd) writes:
 Huh, when I set my org-agenda-files to ~/org/, and have TODO files in
 ~/org/home and ~/org/work, and press C-c a a, it loads all the todo file,
 recursed down to all the subdirectories.

 However, and this is strange, after it loads them all up, it changes
 org-agenda-files to discrete filepaths, and not just the directory anymore.

 It's what happens for me too, but I specifically wrote some elisp to do
 that in my .emacs. Can you reproduce from -Q ?

emacs -Q didn't work at all, so I went digging into my config file.

Here's what recursively loads .org files for me.  I don't remember when I
added this, but it's been a while...

In my emacs-init.org file, I have:


(add-hook 'org-agenda-mode-hook
(lambda ()
(setq org-agenda-files
(find-lisp-find-files ~/org \.org$)
)
)
)



So no matter what I might type into the org-agenda-files in customize, this is
what really runs.   And it works fine too.  I think I got this code from Sacha
Chua, but I'm not certain.

Dave




[O] Arranging BABEL source block and output figure side by side in html output

2013-06-27 Thread RCY
Hi,
 I apologize in advance if this is documented in the manual or
addressed already in the mailing list but I was unable to find an
answer.

Is it possible to arrange a BABEL asymptote source block and the
resulting output figure side by side in html output?

Thanks for any help.

RC



Re: [O] Arranging BABEL source block and output figure side by side in html output

2013-06-27 Thread Eric Schulte
RCY re...@yahoo.com writes:

 Hi,
  I apologize in advance if this is documented in the manual or
 addressed already in the mailing list but I was unable to find an
 answer.

 Is it possible to arrange a BABEL asymptote source block and the
 resulting output figure side by side in html output?

 Thanks for any help.

 RC


I haven't used it in some time, so it probably needs some repair, but I
put together a tool for exactly this use case.

  http://eschulte.github.io/org-docco/org-docco.html

Hope this helps,

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



[O] bug with LaTeX exporter

2013-06-27 Thread Dennis van Dok
Hi,

I noticed a bug where a subsubsection without a 'parent' subsection
would migrate up into the previous section to end up under the nearest
subsection.

I tried to make a minimalistic example, but when I export this file to
LaTeX, the entire subsubsection disappears!

This is emacs24 on Debian Wheezy, org-mode version 7.7.

* Bug demonstration

  This short and simple file demonstrates a bug in org-mode with
  exporting to LaTeX.

** First Subsection

   This is a subsection.

* Header

  This is a section, number two in fact.

*** subsubsection

This is odd: the subsubsection is missing it's natural parent: a
subsection. Probably not what the author meant, but certainly this
should not just disappear (which is what happens).

* Another Header

  The third header.


Thanks for making such an awesome product,

Cheers,

Dennis van Dok

-- 
D.H. van Dok :: Software Engineer :: www.nikhef.nl/grid ::
Phone +31 20 592 22 28 :: http://www.nikhef.nl/~dennisvd/



Re: [O] Variable in file name for babel output?

2013-06-27 Thread Andreas Leha
Hi Loris,

Loris Bennett loris.benn...@fu-berlin.de writes:

 Hi,

 Is it possible to pass a variable to a source block such that the
 variable can be used as part of the name of the output file?

 Currently I have

 #+HEADER: :var data=timelimit-elapsed-data year=2011 :colnames yes
 #+HEADER: :session *r* :file (org-babel-temp-file time-elapsed- .pdf)

 which gets me a different name for each value of 'year', but ideally I
 would like the files to be called

 time-elapsed-2011.pdf
 time-elapsed-2012.pdf
 time-elapsed-2013.pdf

 etc.

 Can this be done? 


Maybe not what you are looking for, but you could handle the assembly of
the filename within your code block.

Something like:

#+HEADER: :var year=2011 :session *r* :results file
#+begin_src R
  filename - paste0(time-elapsed-, year, .pdf)
  
  pdf(filename)
## your code
  dev.off()
  
  filename
#+end_src

Regards,
Andreas




Re: [O] Arranging BABEL source block and output figure side by side in html output

2013-06-27 Thread RCY
On Thu, Jun 27, 2013 at 6:18 PM, Eric Schulte schulte.e...@gmail.com wrote:
 RCY re...@yahoo.com writes:

 Hi,
  I apologize in advance if this is documented in the manual or
 addressed already in the mailing list but I was unable to find an
 answer.

 Is it possible to arrange a BABEL asymptote source block and the
 resulting output figure side by side in html output?

 Thanks for any help.

 RC


 I haven't used it in some time, so it probably needs some repair, but I
 put together a tool for exactly this use case.

   http://eschulte.github.io/org-docco/org-docco.html

 Hope this helps,

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

Thanks I will look in modifying it for my use.
RC



Re: [O] evaluation context in call statements

2013-06-27 Thread Andreas Leha
Achim Gratz strom...@nexgo.de writes:

 Andreas Leha writes:
 I did not follow this tread, so I just wanted to clarify:  You are talking
 about making me to replace

 #+call: number_of_sth(origin=dataset1) :results table
 #+call: number_of_sth(origin=dataset2) :results table

 with

 #+name: call_number_of_sth_with_origin_dataset1
 #+call: number_of_sth(origin=dataset1) :results table
 #+name: call_number_of_sth_with_origin_dataset2
 #+call: number_of_sth(origin=dataset2) :results table

 No. [...]

Thanks for that reassuring clarification.

- Andreas




Re: [O] Add figure/table numbers to HTML captions

2013-06-27 Thread Yoshinari Nomura
Hi Rasmus,

Thanks your good suggestion.

 I'm not an expert on html, but how easy it is to enable/disable/alter
 your solution locally compared to a html5/css solution?  E.g. as here:
 
   
 http://tympanus.net/codrops/2013/05/02/automatic-figure-numbering-with-css-counters/
 
 Note, I don't know if this can be used for tables, or only figures,
 but being able to change the style in css seems nice.

I'm also not an expert on HTML, but I think we can add some HTML
annotations such as id, class... That will help the HTML5 staffs to
manipulate the ordinal-number part in captions.

Besides the HTML matter, I might have to add some control variables to
on/off the numbering feature.

As for the ``automatic numbering with css'' concept, it might be
difficult to work with ox-html. Because ox-html has to control all the
ordinal numbers by itself to use the numbers in the anchor texts
conforming with the numbers in captions. Also, TOC scheme might be suffered.

http://orgmode.org/worg/org-contribute.html
 
 You could use git format-patch and make sure that the commit message
 is a change-log entry as described on Worg (C-x 4 a on your change in
 the diff file should bring up the correct changelog mode).

Thanks a lot! I've forgot the word RTFM :)
--
Yoshinari Nomura
https://github.com/yoshinari-nomura



Re: [O] How to let Org Agenda search all files in a directory *recursively* ?

2013-06-27 Thread Suvayu Ali
On Thu, Jun 27, 2013 at 03:53:53PM +0800, chris wrote:
 I want to set up Org-mode variable org-agenda-files.
 
 How to Let [C-c a] to search over all files in a directory *recursively* ?

You can try this function:


;; recursively find .org files in provided directory
;; modified from an Emacs Lisp Intro example
(defun find-org-file-recursively (directory optional filext)
  Return .org and .org_archive files recursively from DIRECTORY.
If FILEXT is provided, return files with extension FILEXT instead.
  (interactive DDirectory name: )
  (let* (org-file-list
 (case-fold-search t)   ; filesystems are case sensitive
 (fileregex (if filext (format ^[^.#].*\\.\\(%s$\\) filext)
  ^[^.#].*\\.\\(org$\\|org_archive$\\)))
 (cur-dir-list (directory-files directory t ^[^.#].*))) ; exclude .*
;; loop over directory listing
(dolist (file-or-dir cur-dir-list org-file-list) ; returns org-file-list
  (cond
   ((file-regular-p file-or-dir) ; regular files
(if (string-match fileregex file-or-dir) ; org files
(add-to-list 'org-file-list file-or-dir)))
   ((file-directory-p file-or-dir)
(dolist (org-file (find-org-file-recursively file-or-dir filext)
  org-file-list) ; add files found to result
  (add-to-list 'org-file-list org-file)))


I'm pretty sure there are a few bugs, so test well.


-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Proper use of 'org-file-apps'

2013-06-27 Thread Vladimir Lomov
Hello,
** Nick Dokos [2013-06-27 09:33:41 -0400]:

 Vladimir Lomov lomov...@gmail.com writes:

 ** Nick Dokos [2013-06-27 01:52:49 -0400]:

 Vladimir Lomov lomov...@gmail.com writes:

 #+BEGIN_SRC emacs-lisp :tangle org-apps-c.el
   (add-to-list 'load-path /usr/share/emacs/site-lisp/org)
   (require 'org)
   (setq org-file-apps
'( (\\.pdf::\\(\\d+\\)\\' . run-me --page %1 %s)
   (\\.pdf\\' . run-me %s)
 )
   )
 #+END_SRC


 \d is Perl regexp syntax for matching a digit, but (afaik) not emacs
 syntax. Try

'( (\\.pdf::\\([0-9]+\\)\\' . run-me --page %1 %s)

or

'( (\\.pdf::\\([[:digit:]]+\\)\\' . run-me --page %1 %s)

 instead.
 D'oh, I had searched Emacs manual about meaning of \' but didn't try to
 check if \d is acceptable. Nevertheless, 'org-file-apps' docstring must
 be updated then, because this \\d part is from it.

 Yes, indeed. There's also the vexing question of backslashes. At least
 in my version of the C-h v org-file-apps output, the examples appear
 with single backslashes in the quoted strings, so if somebody just cuts
 and pastes, it is *not* going to work.

 Could you make a patch?

Something like that?

---
WBR, Vladimir Lomov

-- 
Are we running light with overbyte?
From 7840435bd76b38ab536108dfc105fdc53a6aa80d Mon Sep 17 00:00:00 2001
From: Vladimir Lomov lomov...@gmail.com
Date: Fri, 28 Jun 2013 08:42:15 +0900
Subject: [PATCH] Fix docstring for `org-file-apps'

  * lisp/org.el: `org-file-apps' docstring: doubled backslashes (would
give usable output when run 'C-h v org-file-apps') and use correct
regexp to match digits.

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

diff --git a/lisp/org.el b/lisp/org.el
index d0dffc7..5e56231 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1940,8 +1940,8 @@ file identifier are
  filename matches the regexp.  If you want to
  use groups here, use shy groups.
 
- Example: (\\\.x?html\\'\ . \firefox %s\)
-  (\\\(?:xhtml\\|html\\)\ . \firefox %s\)
+ Example: (\.x?html'\ . \firefox %s\)
+  (\(?:xhtml|html)\ . \firefox %s\)
   to open *.html and *.xhtml with firefox.
 
- Regular expression which contains (non-shy) groups:
@@ -1956,7 +1956,7 @@ file identifier are
  In a custom lisp form, you can access the group matches with
  (match-string n link).
 
- Example: (\\\.pdf::\\(\\d+\\)\\'\ . \evince -p %1 %s\)
+ Example: (\.pdf::([[:digit:]]+)'\ . \evince -p %1 %s\)
  to open [[file:document.pdf::5]] with evince at page 5.
 
  `directory'   Matches a directory
-- 
1.8.3.1



Re: [O] bug with LaTeX exporter

2013-06-27 Thread Rasmus
Hello Dennis,

 I tried to make a minimalistic example, but when I export this file to
 LaTeX, the entire subsubsection disappears!

Can't reproduce.

 This is emacs24 on Debian Wheezy, org-mode version 7.7.

The current version is 8.0.3.

 * Bug demonstration

   This short and simple file demonstrates a bug in org-mode with
   exporting to LaTeX.

 ** First Subsection

This is a subsection.

 * Header

   This is a section, number two in fact.

 *** subsubsection

 This is odd: the subsubsection is missing it's natural parent: a
 subsection. Probably not what the author meant, but certainly this
 should not just disappear (which is what happens).

It won't.  But how it's translated depends on #+OPTIONS: H:n where n
is an integer.

To solve your problem: 
 1. see if it works as expected with emacs -q.
 2. upgrade to the current release.

 Thanks for making such an awesome product,

Org ain't a commodity.

Hope it helps,
Rasmus

-- 
C is for Cookie




Re: [O] Add figure/table numbers to HTML captions

2013-06-27 Thread Yoshinari Nomura
Hi Nicolas, 

On Thu, 27 Jun 2013 16:46:19 +0200,
Nicolas Goaziou n.goaz...@gmail.com said:

 Sure. Here are a few comments in addition to those suggested by Rasmus
 in this thread.

Thanks for your to-the-point advice. I've hesitated to add some
functions at the top level and split commits. I'll follow your advice.

 +(unless (string= caption )
 +  (let* ((org-html-standalone-image-predicate
 +  (lambda (img) (org-element-property :caption img)))
 + (number (org-export-get-ordinal
 +  link info nil 'org-html-standalone-image-p)))
 
 You should put this function at the top level instead, since another
 transcoder use it. See `org-ascii--has-caption-p' in ascii export
 back-end. You can also use a lambda each time. Your call.

Thanks, you encouraged me. Also, while I made this patch, I was in
the mood for consolidating some exporter-local functions around the
captions. Especially, ox-odt and ox-ascii seem to have rich functions to
add ordinal numbers to captions. It might be over-killing, though.

Anyway, I'll add `org-html--has-caption-p' for this time.

 @@ -2725,14 +2734,23 @@ INFO is a plist holding contextual information.  See
   (org-export-solidify-link-text href) attributes desc)))
;; Fuzzy link points to a target.  Do as above.
(t
 -   (let ((path (org-export-solidify-link-text path)) number)
 +   (let ((path (org-export-solidify-link-text path)) number
 + caption-predicate org-html-standalone-image-predicate)
   (unless desc
 +   (setq caption-predicate
 + (if (org-element-property :caption destination)
 + (lambda (elem optional info)
 +   (org-element-property :caption elem))
 +   (lambda (elem optional info)
 + (not (org-element-property :caption elem)
 +   (setq org-html-standalone-image-predicate caption-predicate)
 (setq number (cond
   ((org-html-standalone-image-p destination info)
(org-export-get-ordinal
 (assoc 'link (org-element-contents destination))
 info 'link 'org-html-standalone-image-p))
 - (t (org-export-get-ordinal destination info
 + (t (org-export-get-ordinal
 + destination info nil
 caption-predicate
 
 You don't need to change `org-html-link'. I think it already DTRT.

I'm afraid I made some misunderstand, but without this hunk,
Tables/Figures without captions are mistakenly counted as a part of
numbered staffs. As shown below, Figure[[fig:manual]] makes Figure3
instead of Figure2.

* Figure Test
  See Figure[[fig:screenshot]] for screenshot.
  See Figure[[fig:manual]] for printed version of Org's manual.

  #+CAPTION: Org mode screen shot
  #+name: fig:screenshot
  [[http://orgmode.org/img/main.jpg]]

  This is org-mode logo: [[http://orgmode.org/img/org-mode-unicorn-logo.png]]
  (no caption, excluded from ordinal list).

  #+CAPTION: Org mode manual
  #+name: fig:manual
  [[http://orgmode.org/img/org-mode-7-network-theory.jpg]]


 - (es :default Figura))
 + (es :default Figura)
 + (ja :html #22259; :utf-8 図))
 +(Figure %d:
 + (de :default Abbildung %d:)
 + (es :default Figura %d:)
 + (ja :html #22259;%d: :utf-8 図%d:))
 
 Maybe you should also provide a :default value, otherwise it will use
 Figure %d: for latex, texinfo, ascii...

Let me confirm, do you mean I should have add :default value to the ``ja''
entry like: (ja :default 図 :html #22259; :utf-8 図)? In this
case, is the `:utf-8' meaning-less? Also, can I put UTF-8 word in `:default'?

 Also, I think it belong to a different patch. Would you mind splitting
 them?

Indeed.

I'll revise my patch in this weekend. thanks.
Regards,
--
Yoshinari Nomura
https://github.com/yoshinari-nomura



Re: [O] Proper use of 'org-file-apps'

2013-06-27 Thread Nick Dokos
Vladimir Lomov lomov...@gmail.com writes:

 Something like that?

The only question I had was whether there should be a \\' at the end of
the xhtml line. I'm not sure how much real difference it makes, but I
wonder if its absence is going to trip up somebody: Why do the other
two have a \\' but this one doesn't?

But I'll let you decide whether it should be present or not. It's
already an improvement as it stands.

I did apply the patch btw and checked that the docstring is as it
should: it's good to go (with the above caveat).


 From 7840435bd76b38ab536108dfc105fdc53a6aa80d Mon Sep 17 00:00:00 2001
 From: Vladimir Lomov lomov...@gmail.com
 Date: Fri, 28 Jun 2013 08:42:15 +0900
 Subject: [PATCH] Fix docstring for `org-file-apps'

   * lisp/org.el: `org-file-apps' docstring: doubled backslashes (would
 give usable output when run 'C-h v org-file-apps') and use correct
 regexp to match digits.

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

 diff --git a/lisp/org.el b/lisp/org.el
 index d0dffc7..5e56231 100644
 --- a/lisp/org.el
 +++ b/lisp/org.el
 @@ -1940,8 +1940,8 @@ file identifier are
   filename matches the regexp.  If you want to
   use groups here, use shy groups.
  
 - Example: (\\\.x?html\\'\ . \firefox %s\)
 -  (\\\(?:xhtml\\|html\\)\ . \firefox %s\)
 + Example: (\.x?html'\ . \firefox %s\)
 +  (\(?:xhtml|html)\ . \firefox %s\)
to open *.html and *.xhtml with firefox.
  
 - Regular expression which contains (non-shy) groups:
 @@ -1956,7 +1956,7 @@ file identifier are
   In a custom lisp form, you can access the group matches with
   (match-string n link).
  
 - Example: (\\\.pdf::\\(\\d+\\)\\'\ . \evince -p %1 %s\)
 + Example: (\.pdf::([[:digit:]]+)'\ . 
 \evince -p %1 %s\)
   to open [[file:document.pdf::5]] with evince at page 5.
  
   `directory'   Matches a directory

-- 
Nick




Re: [O] bug with LaTeX exporter

2013-06-27 Thread Nick Dokos
Rasmus ras...@gmx.us writes:

 Hello Dennis,

 I tried to make a minimalistic example, but when I export this file to
 LaTeX, the entire subsubsection disappears!

 Can't reproduce.

 This is emacs24 on Debian Wheezy, org-mode version 7.7.

 The current version is 8.0.3.

 * Bug demonstration

   This short and simple file demonstrates a bug in org-mode with
   exporting to LaTeX.

 ** First Subsection

This is a subsection.

 * Header

   This is a section, number two in fact.

 *** subsubsection

 This is odd: the subsubsection is missing it's natural parent: a
 subsection. Probably not what the author meant, but certainly this
 should not just disappear (which is what happens).

 It won't.  But how it's translated depends on #+OPTIONS: H:n where n
 is an integer.


The old latex exporter was much more finicky about such structure
violations: I tried 7.7 (and 7.9.4 to see if it was ever changed) and it
does indeed eat the subsubsection.

 To solve your problem: 
  1. see if it works as expected with emacs -q.
  2. upgrade to the current release.


2. is the only option.

 Thanks for making such an awesome product,

 Org ain't a commodity.


Indeed: it's a state of mind :-)

 Hope it helps,
 Rasmus

-- 
Nick




[O] archiving old repeated task logbook entries

2013-06-27 Thread Samuel Wales
Just wondering if anybody has done any significant work on
automatically expiring old logbook entries for archiving.  A search
did not find anything.  I know it's been discussed here.

Samuel

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

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

Denmark: free Karina Hansen NOW.



[O] [PATCH] Add a flat clocktable formatter useful for tables whose CSV export can be imported into accounting/invoiving tools such as Zoho Invoicing.

2013-06-27 Thread Ross Patterson

---
 lisp/org-clock.el |   77 +
 1 file changed, 77 insertions(+)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 8ac215e..bad653e 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -325,6 +325,14 @@ play with them.
   :group 'org-clocktable
   :type 'plist)
 
+(defcustom org-clock-clocktable-flat-columns
+  '(Invoice Date Invoice Number Customer Name
+Item Name Item Desc Quantity Item Price)
+  Columns for the org-clocktable-write-flat clocktable formatter.
+Default value matches the ZOHO CSV import format.
+  :group 'org-clocktable
+  :type '(repeat string))
+
 (defcustom org-clock-idle-time nil
   When non-nil, resolve open clocks if the user is idle more than X minutes.
   :group 'org-clock
@@ -2546,6 +2554,75 @@ from the dynamic block definition.
   (org-table-delete-column))
 total-time))
 
+(defun org-clocktable-write-flat (ipos tables params)
+  Write out a flat clock table at position IPOS in the current
+buffer.  Useful to render a table which can be exported to CSV and
+then imported into accounting/invoiving tools such as Zoho Invoicing.
+TABLES is a list of tables with clocking data as produced by
+`org-clock-get-table-data'.
+
+PARAMS is the parameter property list obtained from the dynamic block
+definition.  Several parameters are used beyond those used by the
+clocktable dynamic block:
+:customer A string to be inserted into the 'Customer Name' column
+:price A number to be inserted into the 'Item Price' column as a rate
+:number A string to be inserter into the Invoice Number column
+:columns A list which overrides the default CSV columns from
+ `org-clock-clocktable-flat-columns'
+
+Several other columns are calculated automatically:
+Item Name: The path to the parent headline
+Item Desc: The headline
+Quantity: The clocktime.  Useful with the `;t' formatter to get a
+  decimal billable time.
+
+  (let ((date (format-time-string %Y-%m-%d))
+   (customer (plist-get params :customer))
+   (number (plist-get params :number))
+   (price (plist-get params :price))
+   (columns (or (plist-get params :columns)
+org-clock-clocktable-flat-columns)))
+(insert \n|)
+(dolist (column columns)
+  (insert column |))
+(insert \n|-\n)
+(dolist (table tables)
+  (let ((rows (nth 2 table))
+   (parents (list )))
+   (dotimes (row-idx (length rows))
+ (let ((row (nth row-idx rows)))
+   (if (listp row)
+   (progn
+ (dotimes (parent-idx
+   (- (nth 0 (nth (- row-idx 1) rows)) (nth 0 row)))
+   (setcdr (last parents 2) nil))
+ (if (and ( row-idx (- (length rows) 1))
+  ( (nth 0 row) (nth 0 (nth (+ row-idx 1) rows
+ (nconc parents (list (cadr row)))
+   (insert |)
+   (dolist (column columns)
+ (cond
+  ((equal column Invoice Date) (insert date))
+  ((equal column Invoice Number) (insert number))
+  ((equal column Customer Name) (insert customer))
+  ((equal column Item Name)
+   (dotimes (parent-idx (length parents))
+ (insert (nth parent-idx parents))
+ (if (not (or (= parent-idx 0)
+  (= parent-idx (- (length parents) 1
+ (insert /
+  ((equal column Item Desc) (insert (cadr row)))
+  ((equal column Quantity)
+   (insert (org-minutes-to-hh:mm-string (nth 3 row
+  ((equal column Item Price)
+   (insert (format %s price
+ (insert |))
+   (insert \n
+(insert #+TBLFM:  (plist-get params :formula))
+(org-ctrl-c-ctrl-c)
+(goto-char ipos)
+(skip-chars-forward ^|)))
+
 (defun org-clocktable-indent-string (level)
   (if (= level 1)
   
-- 
1.7.9.5




Re: [O] default face org-column

2013-06-27 Thread Xiao-Yong Jin
On Jun 1, 2013, at 3:17 PM, Carsten Dominik carsten.domi...@gmail.com wrote:

 Hi Xiao,
 
 I remember that I struggled with the problem that I had to make sure that 
 column view used a fixed-width face - and this was the solution that worked - 
 not a particular pretty one, admittedly.
 
 Do you have an idea on how to change this code that it will always work?  I'd 
 be very happy to accept a good patch.
 
 - Carsten

Hi Carsten,

I wasn't sure what you were talking about until I tried out the theme, 
leuven... and that was really fanciful and totally screwed the column-view 
without your fixed-width face fix.

In order to make it more flexible, instead of just set it once when 
org-faces.el is loaded, I think enforcing it every time when column-view is 
called is a better choice.  Thus came the following little patch.

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index a98deec..f3b8e42 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -169,8 +169,10 @@ This is the compiled version of the format.)
(get-text-property (point-at-bol) 'face))
   'default))
 (color (list :foreground (face-attribute ref-face :foreground)))
-(face (list color 'org-column ref-face))
-(face1 (list color 'org-agenda-column-dateline ref-face))
+(font (list :height (face-attribute 'default :height)
+:family (face-attribute 'default :family)))
+(face (list color font 'org-column ref-face))
+(face1 (list color font 'org-agenda-column-dateline ref-face))
 (cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp))
 pom property ass width f string ov column val modval s2 title calc)
 ;; Check if the entry is in another buffer.
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index 5472964..e968657 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -217,12 +217,6 @@ column view defines special faces for each outline level.  
See the file
   Face for column display of entry properties.
   :group 'org-faces)
 
-(when (fboundp 'set-face-attribute)
-  ;; Make sure that a fixed-width face is used when we have a column table.
-  (set-face-attribute 'org-column nil
- :height (face-attribute 'default :height)
- :family (face-attribute 'default :family)))
-
 (defface org-agenda-column-dateline
   (org-compatible-face 'org-column
 '((t nil)))

In this way, the column-view face will not be bound only to the font family and 
size at the time of loading org-faces.el, but anytime column-view is called.  
I'm not sure if I covered all the cases, but it seems to work well for me.  I 
hope the patch is not broken by the mail app, but I guess it is simple enough 
to read it in one sip of coffee, though I tracked the issue and wrote the patch 
with one cup.

Best,
Xiao-Yong

PS. I realized it was almost a month-old email.  Org-mode is really good at 
remembering it for me.

[O] org-mode and python pandas

2013-06-27 Thread Dov Grobgeld
Has anyone used org-mode with the python pandas package? Pandas is in
a certain way an alternative to R, but with the (for me) familiar
syntax of python. See: http://pandas.pydata.org/

Pandas is very much built to be used interactively, and it outputs its
data in space separated tabular format. E.g. in ipython:

In [1]: import pandas as pd
In [2]: import numpy as np

In [3]: pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
Out[3]:
  A B C
0  0.628365  0.424279  0.619791
1  0.799666  0.527572  0.132928
2  0.837255  0.138906  0.408233
3  0.388080  0.146212  0.575346

Unfortunately this doesn't output as nicely when used from org-mode:

#+BEGIN_SRC python
import pandas as pd
import numpy as np

return pd.DataFrame(np.random.random((4,3)), columns=list('ABC'))
#+END_SRC

#+RESULTS:
: A B C
: 0  0.827817  0.664009  0.089161
: 1  0.170031  0.729214  0.110918
: 2  0.575918  0.863924  0.757536
: 3  0.682722  0.774445  0.992041

while I would like to have:

|   |A |B |C |
|---+--+--+--|
| 0 | 0.827817 | 0.664009 | 0.089161 |
| 1 | 0.170031 | 0.729214 | 0.110918 |
| 2 | 0.575918 | 0.863924 | 0.757536 |
| 3 | 0.682722 | 0.774445 | 0.992041 |

The question is how to get this? Here are a few ideas:

1. Write a general filter in the org-mode elisp than uses heuristics
to recognize ascii aligned tables and change these to org-tables.
2. Add to pandas the option of globally influencing the text
formatting so that it outputs something more parsable by org-mode.
3. Create a special language pandas that recognize the ascii aligned
tables and saves the need to import pandas and np?
4. And the obvious approach of writing a python function that writes a
org-mode parsable table and always call it as part of the return.

Which is the preferable approach? Any other ideas?

Regards,
Dov