emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: [PATCH] org-capture on file+regexp


From: Carsten Dominik
Subject: [Orgmode] Re: [PATCH] org-capture on file+regexp
Date: Fri, 25 Jun 2010 20:53:30 +0200

Applied, thanks.

- Carsten

On Jun 25, 2010, at 4:37 PM, Juan wrote:

Hi,

Below is a patch for capturing on file+regexp (was using the file
name as regexp).

Regards,
.j.

P.S. Now I have to figure out why org-capture-place-entry inserts a
new level 1 if (not target-entry-p) instead of keeping the point where
it was (i.e. regexp match).

8<------------------------------------------------------------

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 879dd25..03387c0 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -556,7 +556,7 @@ already gone."
       ((eq (car target) 'file+regexp)
       (set-buffer (org-capture-target-buffer (nth 1 target)))
       (goto-char (point-min))
-       (if (re-search-forward (nth 1 target) nil t)
+       (if (re-search-forward (nth 2 target) nil t)
           (progn
             (goto-char (match-beginning 0))
(setq target-entry-p (and (org-mode-p) (org-at-heading- p))))

- Carsten






reply via email to

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