From: Roberto Huelga <rhuelga@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Patch org-capure-fill-template
Date: Wed, 29 Oct 2014 18:46:12 +0100 [thread overview]
Message-ID: <CAPJ+JL23yzD3vFwQYH4KSpk2=E5nHRfzpufqbUoVNPxOG08OhQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 72 bytes --]
Patch proposal fro org-capture-fill-template
Hope it's useful.
Thanks.
[-- Attachment #1.2: Type: text/html, Size: 140 bytes --]
[-- Attachment #2: 0001-org-capture.el-Fix-expand-template-order.patch --]
[-- Type: application/octet-stream, Size: 1503 bytes --]
From 3298e255aa8cc0c0bb5367a469d578fc8ed45600 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roberto=20Huelga=20D=C3=ADaz?= <rhuelga@gmail.com>
Date: Wed, 29 Oct 2014 18:29:11 +0100
Subject: [PATCH] org-capture.el: Fix expand template order
* lisp/org-capture.el (org-capture-fill-template): expand %(sexp) after
%:keywords
When a template is expanded first the simple %-escapes, %:keywords and
after that the %(sexp).
Patch proposal by Roberto Huelga Díaz.
TINYCHANGE
---
lisp/org-capture.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 9f8107e..65de098 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1608,8 +1608,6 @@ The template may still contain \"%?\" for cursor positioning."
(insert-file-contents filename)
(error (insert (format "%%![Couldn't insert %s: %s]"
filename error)))))))
- ;; %() embedded elisp
- (org-capture-expand-embedded-elisp)
;; The current time
(goto-char (point-min))
@@ -1639,6 +1637,10 @@ The template may still contain \"%?\" for cursor positioning."
(intern (match-string 1))) ""))
(replace-match x t t)))))
+ ;; %() embedded elisp
+ (goto-char (point-min))
+ (org-capture-expand-embedded-elisp)
+
;; Turn on org-mode in temp buffer, set local variables
;; This is to support completion in interactive prompts
(let ((org-inhibit-startup t)) (org-mode))
--
1.7.10.2 (Apple Git-33)
next reply other threads:[~2014-10-29 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 17:46 Roberto Huelga [this message]
2014-10-30 15:48 ` Patch org-capure-fill-template Nicolas Goaziou
2014-10-30 16:21 ` Roberto Huelga
2014-11-02 9:44 ` Nicolas Goaziou
2014-11-02 19:59 ` Roberto Huelga
2014-11-02 21:41 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPJ+JL23yzD3vFwQYH4KSpk2=E5nHRfzpufqbUoVNPxOG08OhQ@mail.gmail.com' \
--to=rhuelga@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).