From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: agenda restriction locks and searching all nodes quickly Date: Fri, 5 Nov 2010 16:47:00 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=33323 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PEVzs-0006WG-0g for emacs-orgmode@gnu.org; Fri, 05 Nov 2010 19:47:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PEVzr-00075K-4s for emacs-orgmode@gnu.org; Fri, 05 Nov 2010 19:47:03 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:64347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PEVzr-00075G-0O for emacs-orgmode@gnu.org; Fri, 05 Nov 2010 19:47:03 -0400 Received: by wyf23 with SMTP id 23so4109846wyf.0 for ; Fri, 05 Nov 2010 16:47:01 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Having trouble with setting a restriction lock and also with searching quickly. Can somebody kindly respond to the questions in the comments below? (defun alpha-org-agenda-parent-subtree () "Show agenda for all tasks in subtree above point. This means all /siblings/ of point and everything beneath them. If the region is active, operate only on the region. You can get a fast sorted view with this command. In this example, the agenda will show tasks under my subtree. * top level 1 -- not shown * my subtree -- shown * TODO a * some other headline | (<- point is here) * TODO [#A] b * top level 2 -- not shown If you sort by priority, b will sort above a. This allows you to organize nodes hierarchically instead of keeping things at the same level merely to allow sorting. " (interactive) (save-excursion ;;unwind-protect (if (not (org-up-heading-safe)) (message "top level is nyi") ;;is this the right way to do it? i tried ;;(let (org-agenda-overriding-restriction ... ;; ;;how do i make this work for the active region? (org-agenda-set-restriction-lock 'subtree) ;;is there a less kludgey way to specify all tasks in the restriction? ;;more importantly, what is the absolutely /fastest/ way? ;; ;;this seems to take forever even for a single node (org-search-view nil "{.}")))) Thanks. Samuel -- Q: How many CDC "scientists" does it take to change a lightbulb? A: "You only think it's dark." [CDC has denied a deadly serious disease for 25 years] ========== HIV-like virus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE === I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper.