emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Orgmode] [PATCH] Distinguish between TEST todo tag and TESTING header
@ 2006-09-06 23:08 Jason Riedy
  2006-09-07  7:36 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Riedy @ 2006-09-06 23:08 UTC (permalink / raw)
  To: emacs-orgmode

For various reasons, I need both a TEST todo tag and a 
header named TESTING in the same document.  The current
org-mode correctly distinguishes between them internally,
but not for export.

The appended patch works for me with a recent Emacs
snapshot, but my org-mode uses are pretty trivial (for now).
I don't have a wide variety of cases to test against.

Jason
---

--- org.el.orig	2006-09-06 15:31:20.000000000 -0700
+++ org.el	2006-09-06 15:31:08.000000000 -0700
@@ -2806,15 +2806,15 @@
 			     "\\|")
 		  "\\)\\>")
 	  org-todo-line-regexp
-	  (concat "^\\(\\*+\\)[ \t]*\\("
+	  (concat "^\\(\\*+\\)[ \t]*\\(?:\\("
 		  (mapconcat 'regexp-quote org-todo-keywords "\\|")
-		  "\\)? *\\(.*\\)")
+		  "\\)\\>\\)? *\\(.*\\)")
 	  org-nl-done-regexp
 	  (concat "[\r\n]\\*+[ \t]+" org-done-string "\\>")
 	  org-todo-line-tags-regexp
-	  (concat "^\\(\\*+\\)[ \t]*\\("
+	  (concat "^\\(\\*+\\)[ \t]*\\(?:\\("
 		  (mapconcat 'regexp-quote org-todo-keywords "\\|")
-		  "\\)? *\\(.*?\\([ \t]:[a-zA-Z0-9:_@]+:[ \t]*\\)?$\\)")
+		  "\\)\\>\\)? *\\(.*?\\([ \t]:[a-zA-Z0-9:_@]+:[ \t]*\\)?$\\)")
 	  org-looking-at-done-regexp (concat "^" org-done-string "\\>")
 	  org-deadline-regexp (concat "\\<" org-deadline-string)
 	  org-deadline-time-regexp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Orgmode] [PATCH] Distinguish between TEST todo tag and TESTING header
  2006-09-06 23:08 [Orgmode] [PATCH] Distinguish between TEST todo tag and TESTING header Jason Riedy
@ 2006-09-07  7:36 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2006-09-07  7:36 UTC (permalink / raw)
  To: Jason Riedy; +Cc: emacs-orgmode

Hi Jason,

yes, this is a bug, and your fix does work correctly.  Thank you very 
much.

- Carsten

On Sep 7, 2006, at 1:08, Jason Riedy wrote:

> For various reasons, I need both a TEST todo tag and a
> header named TESTING in the same document.  The current
> org-mode correctly distinguishes between them internally,
> but not for export.
>
> The appended patch works for me with a recent Emacs
> snapshot, but my org-mode uses are pretty trivial (for now).
> I don't have a wide variety of cases to test against.
>
> Jason
> ---
>
> --- org.el.orig	2006-09-06 15:31:20.000000000 -0700
> +++ org.el	2006-09-06 15:31:08.000000000 -0700
> @@ -2806,15 +2806,15 @@
>  			     "\\|")
>  		  "\\)\\>")
>  	  org-todo-line-regexp
> -	  (concat "^\\(\\*+\\)[ \t]*\\("
> +	  (concat "^\\(\\*+\\)[ \t]*\\(?:\\("
>  		  (mapconcat 'regexp-quote org-todo-keywords "\\|")
> -		  "\\)? *\\(.*\\)")
> +		  "\\)\\>\\)? *\\(.*\\)")
>  	  org-nl-done-regexp
>  	  (concat "[\r\n]\\*+[ \t]+" org-done-string "\\>")
>  	  org-todo-line-tags-regexp
> -	  (concat "^\\(\\*+\\)[ \t]*\\("
> +	  (concat "^\\(\\*+\\)[ \t]*\\(?:\\("
>  		  (mapconcat 'regexp-quote org-todo-keywords "\\|")
> -		  "\\)? *\\(.*?\\([ \t]:[a-zA-Z0-9:_@]+:[ \t]*\\)?$\\)")
> +		  "\\)\\>\\)? *\\(.*?\\([ \t]:[a-zA-Z0-9:_@]+:[ \t]*\\)?$\\)")
>  	  org-looking-at-done-regexp (concat "^" org-done-string "\\>")
>  	  org-deadline-regexp (concat "\\<" org-deadline-string)
>  	  org-deadline-time-regexp
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-07  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-06 23:08 [Orgmode] [PATCH] Distinguish between TEST todo tag and TESTING header Jason Riedy
2006-09-07  7:36 ` Carsten Dominik

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).