emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastien.guerry@wikimedia.fr>
To: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-scan-tags
Date: Thu, 03 Feb 2011 00:17:11 +0100	[thread overview]
Message-ID: <87lj1y6n7s.fsf@altern.org> (raw)
In-Reply-To: <AANLkTinghT-fKTLVR9Mz9a3hrXUNu-f-XW8GjU8-0H9p@mail.gmail.com> (Ilya Shlyakhter's message of "Tue, 14 Sep 2010 23:19:21 -0400")

Hi Ilya,

Ilya Shlyakhter <ilya_shl@alum.mit.edu> 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

  parent reply	other threads:[~2011-02-02 23:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15  3:19 org-scan-tags Ilya Shlyakhter
2010-09-15 14:36 ` org-scan-tags Ilya Shlyakhter
2010-09-15 16:13 ` org-scan-tags Ilya Shlyakhter
2011-02-02 23:17 ` Bastien [this message]
2011-02-03  5:32 ` org-scan-tags Carsten Dominik
2011-02-03 16:13   ` org-scan-tags Carsten Dominik
2011-02-03 16:37     ` org-scan-tags Bastien
2011-02-03 16:47       ` org-scan-tags Carsten Dominik
2011-02-05  0:36       ` org-scan-tags Ilya Shlyakhter

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=87lj1y6n7s.fsf@altern.org \
    --to=bastien.guerry@wikimedia.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=ilya_shl@alum.mit.edu \
    /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).