emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Random tag-related thoughts
Date: Thu, 23 Nov 2006 11:54:05 +0100	[thread overview]
Message-ID: <3ee6ff63d5cbf764c48423de546d4a33@science.uva.nl> (raw)
In-Reply-To: <87fycbnike.fsf@tallis.ilo.ucl.ac.uk>


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

  reply	other threads:[~2006-11-25  0:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22 23:54 Random tag-related thoughts Bastien
2006-11-23 10:54 ` Carsten Dominik [this message]
2006-11-23 11:45   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ee6ff63d5cbf764c48423de546d4a33@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).