emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Nicolas Goaziou
Subject: Re: [O] doc patch: move footnote in external links
Date: Fri, 16 Jan 2015 09:57:05 +0100

Alan Schmitt <address@hidden> writes:

> 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)))

You can ignore SP for the time being.

>          (wspace "[ \t]")
>          (wspaceopt (concat wspace "*"))
>          (cookie (concat "\\(?:"
>                          wspaceopt
>                          "\\(?:\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]\\)"

  "\\[[0-9]*\\(%\\|/[0-9]*\\)\\]"

statistics cookies can be empty.

>                          wspaceopt
>                          "\\)"))
>          (sep (concat "\\(?:" wspace "+\\|" cookie "+\\)"))
>          res)
>     (dolist (w sp) (setq res (concat w sep res)))
>     (concat sep res))

(concat sep (mapconcat #'identity (org-split-string s) sep) sep)

> This of course needs to be extended with the other headline features
> (todo keyword, tags, …)

I don't think so. Other features can be ignored (see, e.g.,
`org-get-heading').


Regards,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]