Re: [O] [bug] Wrong type argument, computation and layout of inline Babel calls

2015-01-14 Thread Sebastien Vauban
Hello Charles,

Charles C. Berry wrote:
 On Wed, 14 Jan 2015, Sebastien Vauban wrote:
 This ECM exhibits different troubles:

 - error when exporting to HTML
 - bad layout
 - bad computation

 --8---cut here---start-8---
 * Square

 #+name: square
 #+begin_src emacs-lisp :tangle no :var x=1
 (* x x)
 #+end_src

 ** Good computation, good layout

 Carré de 6 : *call_square(x=6)[:results raw]*.

 Carré de 8 : call_square(x=8)[:results raw].

 ** Bad layout in both HTML and LaTeX

 Carré de 5 :
 *call_square(x=5)[:results raw]*.

 ** Error in HTML (Wrong type argument: arrayp, nil) and bad computation in 
 LaTeX

 Carré de 7 :
 call_square(x=7)[:results raw].
 --8---cut here---end---8---

 Looks like `org-babel-get-lob-one-liner-matches' doesn't always put
 point in the right place. Try this:

 ,
 | diff --git a/lisp/ob-core.el b/lisp/ob-core.el
 | index 80542ec..47fcaca 100644
 | --- a/lisp/ob-core.el
 | +++ b/lisp/ob-core.el
 | @@ -251,7 +251,7 @@ Returns non-nil if match-data set
 |  Returns non-nil if match-data set
 |(save-excursion
 |  (unless (= (point) (point-at-bol)) ;; move before inline block
 | -  (re-search-backward [ \f\t\n\r\v] nil t))
 | +  (re-search-backward \\([^[:alnum:]]\\|[ \f\t\n\r\v]\\)call_ nil t))
 |  (if (looking-at org-babel-inline-lob-one-liner-regexp)
 |  t
 |nil)))
 `

 HTH,

It does solve the square of 5 problem, in both HTML and LaTeX. Thanks.

Though, it does not solve anything regarding the last one (square of
7): error in HTML, and results 1 in LaTeX...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] hook for inserting headlines

2015-01-14 Thread Marcin Borkowski

On 2015-01-14, at 18:27, Subhan Michael Tindall subh...@familycareinc.org 
wrote:

 -Original Message-
 From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org
 [mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On
 Behalf Of Marcin Borkowski
 Sent: Tuesday, January 13, 2015 4:36 PM
 To: emacs-orgmode@gnu.org
 Subject: Re: [O] hook for inserting headlines
 
 
 On 2015-01-14, at 01:18, Subhan Michael Tindall
 subh...@familycareinc.org wrote:
 
  Is there a hook that is run with creating a new headline in org mode?
  I have several properties that I always set for working todos  I'd
  like to have them automatically created when I make a new headline
  (say when I hit return at the end of it)
  IE:
  ,*** this is a sample headline hit enter here
 
  ,*** this is a sample headline
  :PROPERTIES:
  some properties here
  :END:
 
  And maybe even an interactive schedule/deadline prompt?
  I have a function to create the properties drawer but don't know how to
 hook it to headline creation.
 
 Why not create a specialized function which might ask for the title of the
 headline and insert that headline along with the properties?  Or even insert
 an /empty/ headline with these properties and place the point after the
 string of asterisks and a space, so that you can type the title?  Or, if we 
 are at
 it, why not use Yasnippet for that?
 
 Not exactly what you want, but maybe this is what you /need/?
 
 If not, I guess that advising org-return /might/ be the way to go.
 (For instance, you might check whether the user hits RET with the point at
 the end of a headline with empty contents.)
 This last one sounds closest.  I'm not really familiar with how advising a 
 function works though.
 The point (for me) is to avoid interrupting my 'flow' while setting up 
 projects, TODOs, etc.  I'm pretty well programmed to manually type my 
 headlines and having some of the extra drudge work get added in automatically 
 would help my process quite a bit.
 Thanks for the suggestion!

Adivising functions is easy (especially in Emacs 24.4+).  Basically, you
give some code which will be executed before or after (or both) the
advised function.

Also, Yasnippet might really be the way to go.  Very easy to set up and
configure.  See
http://sachachua.com/blog/2015/01/thinking-make-better-use-yasnippet-emacs-workflow/,
for instance.  (Sacha also mentions org-capture, which is yet another 
alternative.)

You might configure Yasnippet so that if you type e.g. todo and press
TAB, it expands to the template of your headline, with the drawer and
such, with the point in desired place.

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] :results none doesn't seem to be documented

2015-01-14 Thread Grant Rettke
Good to know, thanks for sharing that.

That is really helpful if you are duplicating Knitr's approach in Org
for example because you get kind of motion sick watching the mode line
bounce up and down.

On Wed, Jan 14, 2015 at 3:47 PM, Kodi Arfer k...@arfer.net wrote:
 none is allowed as an argument to :results (see, for example, ob-core.el
 line 704 as of Git d36bd8d), but this isn't mentioned in results.html. I
 just learned of its existence while reading ob-core.el.

 To me, by the way, :results none seems like a useful feature rather than
 being redundant with :results silent, because it won't attempt to print a
 massive object to the echo area. (Pehaps silent wasn't a great choice of
 name.)




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



Re: [O] :results none doesn't seem to be documented

2015-01-14 Thread Andreas Leha

Fabrice Niessen fni-n...@pirilampo.org writes:
 Hello,

 Andreas Leha wrote:
 Kodi Arfer k...@arfer.net writes:
 none is allowed as an argument to :results (see, for example,
 ob-core.el line 704 as of Git d36bd8d), but this isn't mentioned in
 results.html. I just learned of its existence while reading
 ob-core.el.

 To me, by the way, :results none seems like a useful feature rather
 than being redundant with :results silent, because it won't attempt
 to print a massive object to the echo area. (Pehaps silent wasn't a
 great choice of name.)

 Especially given that :results none prints results silenced in the
 echo area.  Should rather be results nonced ;-)

 They're not the same...

I know.  I just wanted to stress the unfortunate naming.  Unfortunate,
because if you want the source block to produce results silenced you
must not specify :results silent, but rather :results none which is
counter intuitive.


 Extract from my modest (and still work in progress) Org-Babel
 refcard [1]:

 - :results silent ::
  Sends the commands, echoes the results in the minibuffer (to see
  code block output), but *does not change the Org mode buffer* (even
  during export, *no results are inserted* into the exported
  document).
  (default for Org and Screen code blocks)

 - :results none ::
  Silents the results, even for the minibuffer.  By definition, such
  a code block is run for its side effects.

 Best regards,
 Fabrice

 [1] https://github.com/fniessen/refcard-org-babel

That looks nice!


Andreas




Re: [O] :results none doesn't seem to be documented

2015-01-14 Thread John Hendy
On Jan 14, 2015 3:48 PM, Kodi Arfer k...@arfer.net wrote:

 none is allowed as an argument to :results (see, for example,
ob-core.el line 704 as of Git d36bd8d), but this isn't mentioned in
results.html. I just learned of its existence while reading ob-core.el.

 To me, by the way, :results none seems like a useful feature rather
than being redundant with :results silent, because it won't attempt to
print a massive object to the echo area. (Pehaps silent wasn't a great
choice of name.)


This might not be documented as it was a patch resulting from this thread
where I was getting really slow results using R and results :silent. See
this thread:
- https://www.mail-archive.com/emacs-orgmode@gnu.org/msg62120.html

Makes me wonder if the code was added but the manual not updated?

John


Re: [O] :results none doesn't seem to be documented

2015-01-14 Thread Samuel Wales
if we redo this, perhaps we can also include an option that does
export like :results verbatim, but does not send to echo area?

unless i am misunderstanding something about babel [which is possible].



[O] :results none doesn't seem to be documented

2015-01-14 Thread Kodi Arfer
none is allowed as an argument to :results (see, for example, 
ob-core.el line 704 as of Git d36bd8d), but this isn't mentioned in 
results.html. I just learned of its existence while reading ob-core.el.


To me, by the way, :results none seems like a useful feature rather 
than being redundant with :results silent, because it won't attempt to 
print a massive object to the echo area. (Pehaps silent wasn't a great 
choice of name.)




Re: [O] :results none doesn't seem to be documented

2015-01-14 Thread Andreas Leha
Kodi Arfer k...@arfer.net writes:
 none is allowed as an argument to :results (see, for example,
 ob-core.el line 704 as of Git d36bd8d), but this isn't mentioned in
 results.html. I just learned of its existence while reading
 ob-core.el.

 To me, by the way, :results none seems like a useful feature rather
 than being redundant with :results silent, because it won't attempt
 to print a massive object to the echo area. (Pehaps silent wasn't a
 great choice of name.)

Especially given that :results none prints results silenced in the
echo area.  Should rather be results nonced ;-)

Andreas




Re: [O] :results none doesn't seem to be documented

2015-01-14 Thread Fabrice Niessen
Hello,

Andreas Leha wrote:
 Kodi Arfer k...@arfer.net writes:
 none is allowed as an argument to :results (see, for example,
 ob-core.el line 704 as of Git d36bd8d), but this isn't mentioned in
 results.html. I just learned of its existence while reading
 ob-core.el.

 To me, by the way, :results none seems like a useful feature rather
 than being redundant with :results silent, because it won't attempt
 to print a massive object to the echo area. (Pehaps silent wasn't a
 great choice of name.)

 Especially given that :results none prints results silenced in the
 echo area.  Should rather be results nonced ;-)

They're not the same...

Extract from my modest (and still work in progress) Org-Babel
refcard [1]:

- :results silent ::
 Sends the commands, echoes the results in the minibuffer (to see
 code block output), but *does not change the Org mode buffer* (even
 during export, *no results are inserted* into the exported
 document).
 (default for Org and Screen code blocks)

- :results none ::
 Silents the results, even for the minibuffer.  By definition, such
 a code block is run for its side effects.

Best regards,
Fabrice

[1] https://github.com/fniessen/refcard-org-babel

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] [PATCH] org-rss-headline

2015-01-14 Thread Nicolas Petton
Hi,

Here's a new version that uses :RSS_TITLE. Do you think it's good enough
for a first patch? I'll work on the export back-end, but that'll take
some more time.

diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index fddaa1d..5617d26 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -244,11 +244,12 @@ communication channel.
 			  (format-time-string
 			   %a, %d %b %Y %H:%M:%S %z
 			   (org-time-string-to-time pubdate0)
-	   (title (replace-regexp-in-string
-		   org-bracket-link-regexp
-		   (lambda (m) (or (match-string 3 m)
-   (match-string 1 m)))
-		   (org-element-property :raw-value headline)))
+	   (title (or (org-element-property :EXPORT_TITLE headline)
+		  (replace-regexp-in-string
+		   org-bracket-link-regexp
+		   (lambda (m) (or (match-string 3 m)
+   (match-string 1 m)))
+		   (org-element-property :raw-value headline
 	   (publink
 	(or (and hl-perm (concat (or hl-home hl-pdir) hl-perm))
 		(concat

Cheers,
Nico


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

 Hello,

 Nicolas Petton nico...@petton.fr writes:

 I'm a happy user of ox-rss.el, but was annoyed the other day when I
 wanted to export an article with a headline containing markup.

 What problem did you encounter? 

 The problem is that org-rss-headlines uses the raw-value of the headline
 to export the title, which could contain any markup.

 Actually, an export back-end isn't expected to use :raw-value. 

 One way to handle this is to create an anonymous export back-end that
 strips unwanted objects, or export them differently (e.g., a link is
 exported as its description, if any, or its path). See, for example
 `org-html--format-toc-headline'.

 Here's a patch that uses the :EXPORT_TITLE property if present,
 :raw-value if not.

 :EXPORT_TITLE is meant to replace #+TITLE: during a subtree export.
 There is ALT_TITLE property, but this is usually used in table of
 contents.


 Regards,

-- 
Nicolas Petton
http://nicolas-petton.fr


Re: [O] [bug] Wrong type argument, computation and layout of inline Babel calls

2015-01-14 Thread Charles C. Berry

On Wed, 14 Jan 2015, Sebastien Vauban wrote:


Hello Charles,

Charles C. Berry wrote:

On Wed, 14 Jan 2015, Sebastien Vauban wrote:

This ECM exhibits different troubles:


[snip]



Carré de 7 :
call_square(x=7)[:results raw].
--8---cut here---end---8---


Looks like `org-babel-get-lob-one-liner-matches' doesn't always put
point in the right place. Try this:

,
| diff --git a/lisp/ob-core.el b/lisp/ob-core.el
| index 80542ec..47fcaca 100644
| --- a/lisp/ob-core.el
| +++ b/lisp/ob-core.el
| @@ -251,7 +251,7 @@ Returns non-nil if match-data set
|  Returns non-nil if match-data set
|(save-excursion
|  (unless (= (point) (point-at-bol)) ;; move before inline block
| -  (re-search-backward [ \f\t\n\r\v] nil t))
| +  (re-search-backward \\([^[:alnum:]]\\|[ \f\t\n\r\v]\\)call_ nil t))
|  (if (looking-at org-babel-inline-lob-one-liner-regexp)
|  t
|nil)))
`

HTH,


It does solve the square of 5 problem, in both HTML and LaTeX. Thanks.

Though, it does not solve anything regarding the last one (square of
7): error in HTML, and results 1 in LaTeX...


It does solve the babel-execute part.
But I didn't copy-and-paste that last `.' which affects export.

---

After C-c C-c or org-export-execute-babel-code:

,
| call_square(x=7)[:results raw] 49.
`

What this crestes on export is an ordered list with one element whose 
:bullet is followed by an empty paragraph.


A `feature' not a bug?

Note what this yields:

* ordered list

src_emacs-lisp[:results raw]{100}.
src_emacs-lisp[:results raw]{99}.
src_emacs-lisp[:results raw]{98}.
call_square(x=1)[:results raw].


Under ascii backend:

,
| 1.
| 2.
| 3.
| 4.
`

HTH,

Chuck

[O] Getting beginning postiion of a description list

2015-01-14 Thread Calvin Young
Hi all,

If my cursor is in a description list item, what's the recommended way of
getting the point at the beginning of the description list text (i.e.,
after the bullet character)? To illustrate, given the following description
list item, I'd like to get the point represented by the pipe character |:

- |foo :: bar

If I use something like `(org-element-property :contents-begin
(org-element-at-point))`, that gives me the point at the beginning of the
description, not the list item:

- foo :: |bar

How do I need to massage this to give me the beginning of the whole list
item? Is there a recommended solution that'd work for both description
lists *and* plain lists?

Thanks everyone :)

Calvin


Re: [O] Showing next items in agenda + deadline in past

2015-01-14 Thread Giulio Petrucci
Hi Florian,

On Wed, Jan 14, 2015 at 2:09 PM, Florian Lindner mailingli...@xgm.de wrote:
 1) How can I configure it to show not the next n days, but the next n events
 like:

Don't know but I mus confess I am struggling with the same problem in
these days.

 2) There is this 75 d. ago Abstract DEADLINE. How am I supposed to act on
 deadlines in the past? The item has no TODO/DONE marker, just the DEADLINE.
 How to say that the action that relates to this deadline is done?

I resolved marked it as DONE.
I think makes sense: you need to tell org-mode that your deadline has been met.
Would be interesting to know if there is a way to tell org-mode to
load only /future/ deadline in the agenda...

Ciao,
Giulio

--



[O] [bug] Wrong type argument, computation and layout of inline Babel calls

2015-01-14 Thread Sebastien Vauban
Hello,

This ECM exhibits different troubles:

- error when exporting to HTML
- bad layout
- bad computation

--8---cut here---start-8---
* Square

#+name: square
#+begin_src emacs-lisp :tangle no :var x=1
(* x x)
#+end_src

** Good computation, good layout

Carré de 6 : *call_square(x=6)[:results raw]*.

Carré de 8 : call_square(x=8)[:results raw].

** Bad layout in both HTML and LaTeX

Carré de 5 :
*call_square(x=5)[:results raw]*.

** Error in HTML (Wrong type argument: arrayp, nil) and bad computation in LaTeX

Carré de 7 :
call_square(x=7)[:results raw].
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] hook for inserting headlines

2015-01-14 Thread Subhan Michael Tindall
 -Original Message-
 From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org
 [mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On
 Behalf Of Marcin Borkowski
 Sent: Tuesday, January 13, 2015 4:36 PM
 To: emacs-orgmode@gnu.org
 Subject: Re: [O] hook for inserting headlines
 
 
 On 2015-01-14, at 01:18, Subhan Michael Tindall
 subh...@familycareinc.org wrote:
 
  Is there a hook that is run with creating a new headline in org mode?
  I have several properties that I always set for working todos  I'd
  like to have them automatically created when I make a new headline
  (say when I hit return at the end of it)
  IE:
  ,*** this is a sample headline hit enter here
 
  ,*** this is a sample headline
  :PROPERTIES:
  some properties here
  :END:
 
  And maybe even an interactive schedule/deadline prompt?
  I have a function to create the properties drawer but don't know how to
 hook it to headline creation.
 
 Why not create a specialized function which might ask for the title of the
 headline and insert that headline along with the properties?  Or even insert
 an /empty/ headline with these properties and place the point after the
 string of asterisks and a space, so that you can type the title?  Or, if we 
 are at
 it, why not use Yasnippet for that?
 
 Not exactly what you want, but maybe this is what you /need/?
 
 If not, I guess that advising org-return /might/ be the way to go.
 (For instance, you might check whether the user hits RET with the point at
 the end of a headline with empty contents.)
This last one sounds closest.  I'm not really familiar with how advising a 
function works though.
The point (for me) is to avoid interrupting my 'flow' while setting up 
projects, TODOs, etc.  I'm pretty well programmed to manually type my headlines 
and having some of the extra drudge work get added in automatically would help 
my process quite a bit.
Thanks for the suggestion!


 
  Thanks!
  Subhan
 
 Hth,
 
 --
 Marcin Borkowski
 http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
 Faculty of Mathematics and Computer Science Adam Mickiewicz University


This message is intended for the sole use of the individual and entity to which 
it is addressed and may contain information that is privileged, confidential 
and exempt from disclosure under applicable law. If you are not the intended 
addressee, nor authorized to receive for the intended addressee, you are hereby 
notified that you may not use, copy, disclose or distribute to anyone the 
message or any information contained in the message. If you have received this 
message in error, please immediately advise the sender by reply email and 
delete the message.  Thank you.




Re: [O] [bug] Wrong type argument, computation and layout of inline Babel calls

2015-01-14 Thread Charles C. Berry

Sebastien,

See below.

On Wed, 14 Jan 2015, Sebastien Vauban wrote:


Hello,

This ECM exhibits different troubles:

- error when exporting to HTML
- bad layout
- bad computation

--8---cut here---start-8---
* Square

#+name: square
#+begin_src emacs-lisp :tangle no :var x=1
(* x x)
#+end_src

** Good computation, good layout

Carré de 6 : *call_square(x=6)[:results raw]*.

Carré de 8 : call_square(x=8)[:results raw].

** Bad layout in both HTML and LaTeX

Carré de 5 :
*call_square(x=5)[:results raw]*.

** Error in HTML (Wrong type argument: arrayp, nil) and bad computation in LaTeX

Carré de 7 :
call_square(x=7)[:results raw].
--8---cut here---end---8---



Looks like `org-babel-get-lob-one-liner-matches' doesn't always put
point in the right place. Try this:


,
| diff --git a/lisp/ob-core.el b/lisp/ob-core.el
| index 80542ec..47fcaca 100644
| --- a/lisp/ob-core.el
| +++ b/lisp/ob-core.el
| @@ -251,7 +251,7 @@ Returns non-nil if match-data set
|  Returns non-nil if match-data set
|(save-excursion
|  (unless (= (point) (point-at-bol)) ;; move before inline block
| -  (re-search-backward [ \f\t\n\r\v] nil t))
| +  (re-search-backward \\([^[:alnum:]]\\|[ \f\t\n\r\v]\\)call_ nil t))
|  (if (looking-at org-babel-inline-lob-one-liner-regexp)
|  t
|nil)))
`

HTH,

Chuck

Re: [O] Args out of range: #buffer test.org, 0, 1

2015-01-14 Thread Sebastien Vauban
Nicolas Richard wrote:
 Sebastien Vauban writes:
 This still leaves me with one question: how do we reproduce the
 problem?  What's the trigger for it?

 Mostly luck. i.e. you need to have called a function that callled
 string-match on a string, with a regexp containing (at least)
 4 grouping constructs, and the 4th matched at the beginning of that
 string (beginning position 0) but only one character (end position
 1). And then later call org-babel-demarcate-block. Between the two,
 many things may have happened as long as the match data was preserved.

OK. I understand now I had problems figuring out what the trigger was
for the problem...

 PS- @NicolasG, thanks for fixing it...

 And also thanks for mentionning org-babel-src-block-regexp... and
 completely rewriting org-babel-where-is-src-block-head. Very
 impressive!

Yep, that was quick (as very often).

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Showing next items in agenda + deadline in past

2015-01-14 Thread Florian Lindner
Hello,

two questions regarding agenda views. The agenda for the current week looks 
like that:

Week-agenda (W03):
Monday 12 January 2015 W03
  capture:TODO Stellwände für kommenden Montag besorgen
Tuesday13 January 2015
Wednesday  14 January 2015
  uni:75 d. ago:  Abstract
  uni:In   6 d.:  TODO Registration
Thursday   15 January 2015
Friday 16 January 2015
Saturday   17 January 2015
Sunday 18 January 2015


1) How can I configure it to show not the next n days, but the next n events 
like:

Next events-agenda (W03):
Monday 12 January 2015 W03
  capture:TODO Stellwände für kommenden Montag besorgen
Wednesday  14 January 2015 
  uni:75 d. ago:  Abstract
  uni:In   6 d.:  TODO Registration
Saturday   17 January 2015 (+ 3d)
  whatever

(I also added a (+ 3d) to days as an idea)

2) There is this 75 d. ago Abstract DEADLINE. How am I supposed to act on 
deadlines in the past? The item has no TODO/DONE marker, just the DEADLINE. 
How to say that the action that relates to this deadline is done?

Thanks,
Florian





Re: [O] doc patch: move footnote in external links

2015-01-14 Thread Alan Schmitt
On 2015-01-12 23:56, Nicolas Goaziou m...@nicolasgoaziou.fr writes:

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

 Should we assume the cookie is at the end of the headline or not?

 The cookie can be anywhere within the headline text.

 I'd gladly do this, but to use the `org-element-map' function it seem
 that I need a parse tree. How can I get it? Or is it possible to use
 directly `org-element-map' on a buffer?

 You don't need to use `org-element-map'[fn:1]. However, you cannot just use
 `re-search-forward' either. You probably need to map over entries (e.g.,
 with `org-map-entries'), apply some filter to current headline, and
 compare it with link's path. This is slower than the current
 implementation.

 Another option would be to ignore only contents of statistics cookies,
 not the whole cookie. This way we still can turn path into a proper
 regexp.

Would the following work as a regexp builder that allows arbitrary space
and cookies between each word (making sure there is at least one)?

#+begin_src emacs-lisp
(defun org-heading-regexp-build (s)
  (let* ((sp (reverse (org-split-string s)))
 (wspace [ \t])
 (wspaceopt (concat wspace *))
 (cookie (concat \\(?:
 wspaceopt
 \\(?:\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]\\)
 wspaceopt
 \\)))
 (sep (concat \\(?: wspace +\\| cookie +\\)))
 res)
(dolist (w sp) (setq res (concat w sep res)))
(concat sep res)))
#+end_src

This of course needs to be extended with the other headline features
(todo keyword, tags, …), this is just to know if I'm on the right track.

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature