[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Add the capture feature "%(sexp)" to org-feed
From: |
Michael Brand |
Subject: |
Re: [O] Add the capture feature "%(sexp)" to org-feed |
Date: |
Sun, 24 Jun 2012 19:51:32 +0200 |
Hi all
On Sun, Jun 17, 2012 at 4:07 AM, Nick Dokos <address@hidden> wrote:
> Either require org-capture in org-feed or move the function to org.el, which
> both org-capture and org-feed require.
Thank you for the help. I have chosen the solution with require org-capture.
The patch is now finished and attached:
Add the capture feature "%(sexp)" to org-feed
* lisp/org-capture.el (org-capture-fill-template): Fold the code for
embedded elisp $(sexp) into the following new function and constant.
(org-capture-template-embedded-elisp-re): New constant, contains the
already existing common regexp.
(org-capture-eval-and-replace-embedded-elisp): New function, contains the
already existing common code.
(org-capture-inside-embedded-elisp-p): New function to tell whether the
point is inside embedded elisp %(sexp).
* lisp/org-feed.el (org-feed-default-template): Add the new functionality
to the docstring.
(org-feed-format-entry): Add require org-capture to access the new common
function. Add escaping of `"' to "simple %-escapes" if necessary for
embedded lisp %(sexp). Add evaluation and replacement of embedded lisp
%(sexp).
Support for example %(capitalize \\\"%h\\\")" in the template of org-feed.
Michael
0001-Add-the-capture-feature-sexp-to-org-feed.patch.txt
Description: Text document