[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Random tag-related thoughts
From: |
Carsten Dominik |
Subject: |
Re: [Orgmode] Random tag-related thoughts |
Date: |
Thu, 23 Nov 2006 11:54:05 +0100 |
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