From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roberto Huelga Subject: Patch org-capture-set-target-location Date: Sat, 22 Nov 2014 20:51:55 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11c38506f061bf050877e516 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsGjG-0001MO-4p for emacs-orgmode@gnu.org; Sat, 22 Nov 2014 14:52:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XsGjB-0000IU-FE for emacs-orgmode@gnu.org; Sat, 22 Nov 2014 14:52:22 -0500 Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:64993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsGjB-0000Hw-35 for emacs-orgmode@gnu.org; Sat, 22 Nov 2014 14:52:17 -0500 Received: by mail-lb0-f171.google.com with SMTP id b6so5735519lbj.30 for ; Sat, 22 Nov 2014 11:52:15 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a11c38506f061bf050877e516 Content-Type: multipart/alternative; boundary=001a11c38506f061ba050877e514 --001a11c38506f061ba050877e514 Content-Type: text/plain; charset=UTF-8 Patch proposal for org-capture-set-target-location The idea is that when somebody use the function or file+function targets you can make the template subheading from the heading where the custom-function set the point. org-capture-set-target-loction force the org-capture-plist :exact-position to (point). So the template is inserted in the same level not as subheading With my patch the custom-function can (org-capture-put :exact-position nil), and now if point its placed in a heading the template is created as his subheading. For a use case can look at the following emacs.stackexchange question http://emacs.stackexchange.com/questions/3750/org-capture-files-entry-under-wrong-datetree/3765#3765 Thanks. Roberto Huelga. --001a11c38506f061ba050877e514 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Patch proposal for org-capture-set-target-location

=
The id= ea is that when somebody use the function or file+function targets you can = make the template subheading from the heading where the custom-function set= the point.
org-capture-set-target-loction force the org-capture-plist = :exact-position to (point).
So the template is inserted in the same leve= l not as subheading

With my patch the custom-function can (org-captu= re-put :exact-position nil), and now if point its placed in a heading the t= emplate is created as his subheading.

For a use case can look at the= following emacs.stackexchange question

http://emacs.stackexchange.com/questions/3750/org-capture-files-e= ntry-under-wrong-datetree/3765#3765

Thanks.

Roberto Huelg= a.
--001a11c38506f061ba050877e514-- --001a11c38506f061bf050877e516 Content-Type: application/octet-stream; name="0001-org-capture.el-set-exact-position-only-if-not-set.patch" Content-Disposition: attachment; filename="0001-org-capture.el-set-exact-position-only-if-not-set.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i2tdwih00 RnJvbSA3ZDNjMjYyYjE0ZmNjYzcyODE2M2Q4NGFkZWQzZWMwZmU4ZmE4OTJmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/Um9iZXJ0bz0yMEh1ZWxnYT0yMEQ9QzM9QURh ej89IDxyaHVlbGdhQGdtYWlsLmNvbT4KRGF0ZTogU2F0LCAyMiBOb3YgMjAxNCAyMDoyOTo1NiAr MDEwMApTdWJqZWN0OiBbUEFUQ0hdIG9yZy1jYXB0dXJlLmVsOiBzZXQgOmV4YWN0LXBvc2l0aW9u IG9ubHkgaWYgbm90IHNldAoKKiBvcmctY2FwdHVyZS5lbDogKG9yZy1jYXB0dXJlLXNldC10YXJn ZXQtbG9jYXRpb24pOiBvbiBmdW5jdGlvbiBhbmQKICBmaWxlK2Z1bmN0aW9uIGRvbid0IHNldCBv cmctY2FwdHVyZS1wbGlzdCA6ZXhhY3QtcG9zaXRpb24gaWYgYWxyZWFkeQogIHNldC4gU28gbm93 IGluIHRoZSBmdW5jdGlvbiB5b3UgY2FuIHNldCBpdCB0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