From mboxrd@z Thu Jan 1 00:00:00 1970 From: l.stelmach@samsung.com (=?utf-8?Q?=C5=81ukasz?= Stelmach) Subject: finding a parent node Date: Tue, 02 Jul 2013 09:56:33 +0200 Message-ID: <87hagdo0ni.fsf@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utvf6-0006LD-CC for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 04:10:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utvf5-0001rj-8N for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 04:10:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:58053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utvf5-0001rM-22 for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 04:10:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Utvf1-0008Hn-AV for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 10:10:03 +0200 Received: from 217-67-201-162.itsa.net.pl ([217.67.201.162]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jul 2013 10:10:03 +0200 Received: from l.stelmach by 217-67-201-162.itsa.net.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jul 2013 10:10:03 +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: emacs-orgmode@gnu.org Hello All. What is the best way to iterate over ((great)*grand)?parent headlines of the current one (at point), that meets some criteria. --8<---------------cut here---------------start------------->8--- * Projects I am working on. ** Project for Mondays *** tasks *** resources ** Project for the rest of the week *** tasks :TASKS: ^ <------ (3) I'd like it to move here If I do this stuff I will rule the world. ^ <----- (2) or it may be here. **** TODO do this **** TODO do that I am trying. ^ <------ (1) point is here **** TODO WAT? *** resources --8<---------------cut here---------------end--------------->8--- With my point somewher deep I'like to find the closest parent heading tagged :TASKS:. If that helps, I'd like to export the subtree of the heading I find by simply running the export function at any point of the subtree. Kind regards, -- Ɓukasz Stelmach Samsung R&D Institute Poland Samsung Electronics