emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Regex Speedup for org-refresh-category-properties.


From: Nick Dokos
Subject: Re: [O] Regex Speedup for org-refresh-category-properties.
Date: Tue, 29 Jul 2014 10:47:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Malcolm Purvis <address@hidden> writes:

> I use the master version of org, and some months ago the time required
> to generate my custom agenda view sky rocketed.  I've found that 90% of
> the time was being spent in the call to re-search-forward in
> org-refresh-category-properties.  The patch below speeds up the regular
> expression search and makes the generation of my agenda as fast as
> before.
>
> Malcolm
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 7e30061..2fc6854 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -9474,7 +9474,7 @@ The refresh happens only for the current tree (not 
> subtree)."
>        (goto-char (point-min))
>        (put-text-property (point) (point-max) 'org-category def-cat)
>        (while (re-search-forward
> -              "^[ \t]*\\(#\\+CATEGORY:\\|[ \t]*:CATEGORY:\\)\\(.*\\)" nil t)
> +              "^[ \t]*\\(#\\+CATEGORY:\\|*:CATEGORY:\\)\\(.*\\)" nil t)
                                            ^
                                            ^
                   What does the asterisk do?

Can you explain what this regexp is supposed to match?

Thanks,
Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]