From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Dunsmore Subject: Re: Remove current heading from refile targets? Date: Thu, 21 Jul 2011 09:15:36 -0500 Message-ID: <877h7bhg8n.fsf@riotblast.dunsmor.com> References: <878vrwk8pk.fsf@riotblast.dunsmor.com> <87livvxq3x.fsf@gnu.org> <87r55ndy2w.fsf@riotblast.dunsmor.com> <871uxnxkz9.fsf@gnu.org> <878vrue403.fsf@riotblast.dunsmor.com> <8739hz4wb0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qju2T-0003JQ-Uy for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 10:15:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qju2M-0008BZ-Fc for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 10:15:45 -0400 Received: from deathroller.dunsmor.com ([98.129.169.48]:54935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qju2M-0008BB-CU for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 10:15:38 -0400 In-Reply-To: <8739hz4wb0.fsf@gnu.org> (Bastien's message of "Thu, 21 Jul 2011 15:06:59 +0200") 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: Bastien Cc: Org-mode mailing list Bastien writes: > Hi Jason, > > Jason Dunsmore writes: > >> It looks like it removes top-level headings from the refile targets, but >> nothing below that. For example, in the org file below, place the >> cursor on Subheading1 and type "M-x org-refile". The current >> heading will be in the list of refile targets. >> >> * Heading1 >> ** Subheading1 >> * Heading2 > > Okay, I didn't get it first. > > Please test this attached patch against latest git. Looks good except for one quirk. If the heading has a TODO keyword, it isn't excluded. Example: --8<---------------cut here---------------start------------->8--- * Heading1 ** TODO Subheading1 * Heading2 --8<---------------cut here---------------end--------------->8--- Thanks!