From: Juan <Pechiar@computer.org>
To: carsten.dominik@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: [PATCH] org-capture on file+regexp
Date: Fri, 25 Jun 2010 11:37:10 -0300 [thread overview]
Message-ID: <20100625143710.GA27109@soloJazz.com> (raw)
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))))
next reply other threads:[~2010-06-25 17:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 14:37 Juan [this message]
2010-06-25 18:53 ` [PATCH] org-capture on file+regexp Carsten Dominik
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=20100625143710.GA27109@soloJazz.com \
--to=pechiar@computer.org \
--cc=carsten.dominik@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).