From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: TODO type problem on speedbar and imenu. Date: Sat, 13 Aug 2011 12:16:34 +0200 Message-ID: <871uwp8vlp.fsf@gmail.com> References: <8762mwsdhv.fsf@gmail.com> <87vcursd79.fsf@altern.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:53476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsBHA-0002lQ-5Q for emacs-orgmode@gnu.org; Sat, 13 Aug 2011 06:17:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QsBH8-0005x1-F8 for emacs-orgmode@gnu.org; Sat, 13 Aug 2011 06:17:08 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:37578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsBH7-0005wx-R8 for emacs-orgmode@gnu.org; Sat, 13 Aug 2011 06:17:06 -0400 Received: by wyi11 with SMTP id 11so3106626wyi.0 for ; Sat, 13 Aug 2011 03:17:04 -0700 (PDT) In-Reply-To: <87vcursd79.fsf@altern.org> (Bastien's message of "Sun, 24 Jul 2011 21:00:26 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Osamu OKANO --=-=-= Content-Type: text/plain Hello, Bastien writes: > Yep. When you have some free time (!), please suggest a patch and a > small org test file so that we can test. Here is an attempt to convert word boundaries into white spaces where it matters. I paste again the test file from Osamu Okano for reference. #+begin_src org #+TYP_TODO: SOMEDAY * someday/maybe * SOMEDAY/maybe * SOMEDAY maybe * someday maybe * read/review * READ/review * conf #+end_src Regards, -- Nicolas Goaziou --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Enforce-white-space-after-todo-keywords.patch >From 95709480975155387121fdd18cea144145b47e5c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 25 Jul 2011 17:50:28 +0200 Subject: [PATCH] Enforce white space after todo keywords * lisp/org.el (org-set-regexps-and-options): enforce white space after todo keyword, as word boundary isn't sufficient (i.e. in matches * TODO/this) --- lisp/org.el | 28 +++++++++++++++------------- 1 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a13730b..9fef2a8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4537,38 +4537,40 @@ means to push this value onto the list in the variable.") org-not-done-heading-regexp (concat "^\\(\\*+\\)[ \t]+\\(" (mapconcat 'regexp-quote org-not-done-keywords "\\|") - "\\)\\>") + "\\)[ \t]+") org-todo-line-regexp (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - "\\)\\>\\)?[ \t]*\\(.*\\)") + "\\)[ \t]+\\)?\\(.*\\)") org-complex-heading-regexp (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - "\\)\\>\\)?\\(?:[ \t]*\\(\\[#.\\]\\)\\)?[ \t]*\\(.*?\\)" + "\\)[ \t]+\\)?" + "\\(?:\\(\\[#.\\]\\)[ \t]+\\)?" + "\\(.*?\\)" "\\(?:[ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ \t]*$") org-complex-heading-regexp-format (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - "\\)\\>\\)?" - "\\(?:[ \t]*\\(\\[#.\\]\\)\\)?" - "\\(?:[ \t]*\\(?:\\[[0-9%%/]+\\]\\)\\)?" ;; stats cookie - "[ \t]*\\(%s\\)" - "\\(?:[ \t]*\\(?:\\[[0-9%%/]+\\]\\)\\)?" ;; stats cookie - "\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?[ \t]*$") + "\\)[ \t]+\\)?" + "\\(?:\\(\\[#.\\]\\)[ \t]+\\)?" + "\\(?:\\(?:\\[[0-9%%/]+\\]\\)[ \t]+\\)?" ; stats cookie + "\\(%s\\)[ \t]*" + "\\(?:\\[[0-9%%/]+\\]\\)?" ; stats cookie + (org-re "\\(?:[ \t]+\\(:[[:alnum:]_@#%%:]+:\\)\\)?[ \t]*$")) org-nl-done-regexp (concat "\n\\*+[ \t]+" "\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|") - "\\)" "\\>") + "\\)" "[ \t]+") org-todo-line-tags-regexp (concat "^\\(\\*+\\)[ \t]+\\(?:\\(" (mapconcat 'regexp-quote org-todo-keywords-1 "\\|") - (org-re - "\\)\\>\\)? *\\(.*?\\([ \t]:[[:alnum:]:_@#%]+:[ \t]*\\)?$\\)")) + "\\)[ \t]+\\)" + (org-re "\\(.*?\\([ \t]:[[:alnum:]:_@#%]+:[ \t]*\\)?$\\)")) org-looking-at-done-regexp (concat "^" "\\(?:" (mapconcat 'regexp-quote org-done-keywords "\\|") "\\)" - "\\>") + "[ \t]+") org-deadline-regexp (concat "\\<" org-deadline-string) org-deadline-time-regexp (concat "\\<" org-deadline-string " *<\\([^>]+\\)>") -- 1.7.6 --=-=-=--