From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Patch org-capture-set-target-location Date: Sun, 23 Nov 2014 19:15:53 +0100 Message-ID: <87h9xp3hra.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xsbgl-0006b9-8v for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 13:15:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xsbgb-0003WJ-5i for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 13:15:11 -0500 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:53489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xsbga-0003WF-VO for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 13:15:01 -0500 In-Reply-To: (Roberto Huelga's message of "Sat, 22 Nov 2014 20:51:55 +0100") 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: Roberto Huelga Cc: emacs-orgmode@gnu.org Hello, Roberto Huelga writes: > Patch proposal for org-capture-set-target-location Thanks for the patch. > 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. AFAIU, :exact-position is an internal property (it isn't documented in (info "(org) Template elements"). You are not expected to set it directly. After a cursory look into "org-capture.el", if (point) is on a headline, the template should create a subheading (see `org-capture-place-entry'). Can't you use that instead? Regards, -- Nicolas Goaziou