[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] org-scan-tags
From: |
Bastien |
Subject: |
Re: [Orgmode] org-scan-tags |
Date: |
Thu, 03 Feb 2011 00:17:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Ilya,
Ilya Shlyakhter <address@hidden> writes:
> In org-scan-tags, if todo-only is t, would it be possible to speed
> things up by changingthe regexp go to just the lines with a TODO
> keyword?
> I.e. in
>
> (let* ((re (concat "^" outline-regexp " *\\(\\<\\("
> (mapconcat 'regexp-quote org-todo-keywords-1 "\\|")
> (org-re
> "\\>\\)\\)? *\\(.*?\\)\\(:[[:alnum:]_@:]+:\\)?[
> \t]*$")))
>
> remove the first "?" if todo-only is t. Also, regexp-opt might make
> a more efficient regexp than mapconcat with regexp-quote.
I've optimized org-scan-tags a bit following your ideas (gaining ~12%
according to elp) -- thanks for these directions.
> It would be good if the parameter todo-only could be a list of
> strings, and org-scan-tags would return only the headlines where the
> todo keyword is from this list.
This would be confusing. Particularily, org-tags-view uses
org-scan-tags using both the todo-only argument and a matcher: so
if you make the todo-only argument aware of TODO keywords, there
might be some interference between todo-only and the matcher.
I'd rather not go that route.
Thanks,
--
Bastien
- Re: [Orgmode] org-scan-tags,
Bastien <=