From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Random tag-related thoughts Date: Thu, 23 Nov 2006 11:54:05 +0100 Message-ID: <3ee6ff63d5cbf764c48423de546d4a33@science.uva.nl> References: <87fycbnike.fsf@tallis.ilo.ucl.ac.uk> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gnldx-0007Vc-7f for emacs-orgmode@gnu.org; Fri, 24 Nov 2006 19:43:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gnldu-0007UN-UB for emacs-orgmode@gnu.org; Fri, 24 Nov 2006 19:43:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gnldu-0007UC-Kp for emacs-orgmode@gnu.org; Fri, 24 Nov 2006 19:43:42 -0500 Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gnldu-00069e-If for emacs-orgmode@gnu.org; Fri, 24 Nov 2006 19:43:42 -0500 Received: from [193.252.22.241] (helo=smtp-1.orange.nl) by mx20.gnu.org with esmtp (Exim 4.52) id 1GnCEp-0007UY-BL for emacs-orgmode@gnu.org; Thu, 23 Nov 2006 05:55:27 -0500 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf6008.orange.nl (SMTP Server) with ESMTP id 0F6977000084 for ; Thu, 23 Nov 2006 11:54:06 +0100 (CET) In-Reply-To: <87fycbnike.fsf@tallis.ilo.ucl.ac.uk> 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: Bastien Cc: emacs-orgmode@gnu.org On Nov 23, 2006, at 0:54, Bastien wrote: > Hi Carsten and list, > > just a few midnight thoughts on tags. > > 0) regexp matching > > Let's say we have :tag0: and :tag1: - then we want C-c \ to match > all :tag.: - would that be possible? You could use org-occur for doing something like this: C-c / :tag.: RET > 1) numeric tagging > > Imagine we use numeric tags like :000: :001: 002: etc. Sometimes > and somehow we want to match tags between :001: and :X: (X being a > number between 0 and 999:) - can we achieve this? > > (Actuallay i stumbled on this while tagging programming tasks with > expected version numbers but was stuck because i couldn't look up > for tags between two versions.) I guess the best for this would be to write your own little helper function that produces the tag list and then calls org-sparse-tree. Something along the lines of (untested): (defun my-org-tag-range-tree (arg base n1 n2) "Tags sparse tree for a range of numbered tags." (interactive "P\nsBase: \nnStart: \nnEnd: ") (let ((match "") (n n1) numbers) (if (> n1 n2) (setq n n2 n2 n1)) (while (<= n n2) (push n numbers) (setq n (1+ n))) (setq match (mapconcat (lambda (x) (format "%s%03d" base x)) numbers "|")) (message match) (org-tags-sparse-tree arg match))) > 2) grouping tags > > { tag1 tag2 } is for mutually exclusive tags > > What about [ tag1 tag2 (tag)] for grouping tags - "(tag)" being the > tag-name of the group (i.e. matching all tags in this group)? I have seen this request before (I think from Tim). But you could also define custom searches for that list of tags. Still, this remains an interesting idea. - Carsten