emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Juan
Subject: [Orgmode] [PATCH] org-capture on file+regexp
Date: Fri, 25 Jun 2010 11:37:10 -0300
User-agent: Mutt/1.5.20 (2009-06-14)

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



reply via email to

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