* Random tag-related thoughts
@ 2006-11-22 23:54 Bastien
2006-11-23 10:54 ` Carsten Dominik
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2006-11-22 23:54 UTC (permalink / raw)
To: emacs-orgmode
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?
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.)
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'll stop here - was just musing around posibilities, not actual need.
But thought it might be interesting anyway.
Best,
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Random tag-related thoughts
2006-11-22 23:54 Random tag-related thoughts Bastien
@ 2006-11-23 10:54 ` Carsten Dominik
2006-11-23 11:45 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2006-11-23 10:54 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Random tag-related thoughts
2006-11-23 10:54 ` Carsten Dominik
@ 2006-11-23 11:45 ` Bastien
0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2006-11-23 11:45 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
> You could use org-occur for doing something like this:
>
> C-c / :tag.: RET
Right - but we don't have agenda functionnalities.
> (defun my-org-tag-range-tree (arg base n1 n2))
Yes, it does the right job! Many thanks.
>> 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.
Maybe the most useful feature is to allow for regexp matching when
doing a tag/todo query in the agenda buffer.
Regards,
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-25 0:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-22 23:54 Random tag-related thoughts Bastien
2006-11-23 10:54 ` Carsten Dominik
2006-11-23 11:45 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).