Re: [Orgmode] Non-ascii tag names

2007-06-18 Thread Carsten Dominik


On Jun 17, 2007, at 0:15, Carsten Dominik wrote:


It should be largely sufficient - maybe not 100%, but close.

Unfortunately this does not work under XEmacs as far as I know.

- Carsten


Thanks for tha patch, i'll put it in with a way to
get back XEmacs funtionality.

- Carsten



On Jun 16, 2007, at 20:01, David Smith wrote:


Carsten, you said in
http://thread.gmane.org/gmane.emacs.orgmode/1327/focus=1328 that 
non-ascii
tag names are not supported. I've written a patch that seems to make 
this

work appropriately just by fixing the regexps involving tags to use
[:alnum:] instead of a-zA-Z0-9. Is this insufficient?

Cheers,
David

i18n_tags.patch___
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



___
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



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Non-ascii tag names

2007-06-16 Thread David Smith
Carsten, you said in
http://thread.gmane.org/gmane.emacs.orgmode/1327/focus=1328 that non-ascii
tag names are not supported. I've written a patch that seems to make this
work appropriately just by fixing the regexps involving tags to use
[:alnum:] instead of a-zA-Z0-9. Is this insufficient?

Cheers,
David

# HG changeset patch
# User David Smith [EMAIL PROTECTED]
# Date 1182016499 -32400
# Node ID fbf053db75b446b7b896a943ed07696e2fe08110
# Parent  8296b36637ff07252e11bd5eb3f87946f33351a9
patch queue: i18n tags

diff -r 8296b36637ff -r fbf053db75b4 org.el
--- a/org.el	Sun Jun 17 02:38:36 2007 +0900
+++ b/org.el	Sun Jun 17 02:54:59 2007 +0900
@@ -3494,7 +3494,7 @@ means to push this value onto the list i
 	(cond
 	 ((equal e {) (push '(:startgroup) tgs))
 	 ((equal e }) (push '(:endgroup) tgs))
-	 ((string-match ^\\([EMAIL PROTECTED])(\\(.\\))$ e)
+	 ((string-match ^\\([[:alnum:[EMAIL PROTECTED])(\\(.\\))$ e)
 	  (push (cons (match-string 1 e)
 			  (string-to-char (match-string 2 e)))
 		tgs))
@@ -3530,7 +3530,7 @@ means to push this value onto the list i
 	  org-todo-line-tags-regexp
 	  (concat ^\\(\\*+\\)[ \t]*\\(?:\\(
 		  (mapconcat 'regexp-quote org-todo-keywords-1 \\|)
-		  \\))? *\\(.*?\\([ \t]:[a-zA-Z0-9:[EMAIL PROTECTED]:[ \t]*\\)?$\\))
+		  \\))? *\\(.*?\\([ \t]:[[:alnum:]:[EMAIL PROTECTED]:[ \t]*\\)?$\\))
 	  org-looking-at-done-regexp
 	  (concat ^ \\(?:
 		  (mapconcat 'regexp-quote org-done-keywords \\|) \\)
@@ -4230,7 +4230,7 @@ between words.
 	\\)\\)))
 
 (defun org-activate-tags (limit)
-  (if (re-search-forward [ \t]\\(:[EMAIL PROTECTED]:]+:\\)[ \r\n] limit t)
+  (if (re-search-forward [ \t]\\(:[[:alnum:]_@:]+:\\)[ \r\n] limit t)
   (progn
 	(add-text-properties (match-beginning 1) (match-end 1)
 			 (list 'mouse-face 'highlight
@@ -5981,7 +5981,7 @@ this heading.
 	  (progn
 		(if (re-search-forward
 		 (concat \\(^\\|\r\\)
-			 (regexp-quote heading) [ \t]*\\(:[a-zA-Z0-9_@:]+:\\)?[ \t]*\\($\\|\r\\))
+			 (regexp-quote heading) [ \t]*\\(:[[:alnum:]_@:]+:\\)?[ \t]*\\($\\|\r\\))
 		 nil t)
 		(goto-char (match-end 0))
 		  ;; Heading not found, just insert it at the end
@@ -6100,7 +6100,7 @@ If ONOFF is `on' or `off', don't toggle 
   (let (res current)
 (save-excursion
   (beginning-of-line)
-  (if (re-search-forward [ \t]:\\([a-zA-Z0-9_@:]+\\):[ \t]*$
+  (if (re-search-forward [ \t]:\\([[:alnum:]_@:]+\\):[ \t]*$
 			 (point-at-eol) t)
 	  (progn
 	(setq current (match-string 1))
@@ -6206,9 +6206,9 @@ outside the table.)
 
 (defconst org-table-range-regexp2
   (concat
-   \\( @[-0-9I$]+ \\| [a-zA-Z]\\{1,2\\}\\([0-9]+\\|\\) \\| \\$[a-zA-Z0-9]+ \\)
+   \\( @[-0-9I$]+ \\| [a-zA-Z]\\{1,2\\}\\([0-9]+\\|\\) \\| \\$[[:alnum:]]+ \\)
\\.\\.
-   \\( @?[-0-9I$]+ \\| [a-zA-Z]\\{1,2\\}\\([0-9]+\\|\\) \\| \\$[a-zA-Z0-9]+ \\))
+   \\( @?[-0-9I$]+ \\| [a-zA-Z]\\{1,2\\}\\([0-9]+\\|\\) \\| \\$[[:alnum:]]+ \\))
   Match a range for reference display.)
 
 (defconst org-table-translate-regexp
@@ -7731,7 +7731,7 @@ When NAMED is non-nil, look for a named 
 	\n)))
 
 (defsubst org-table-formula-make-cmp-string (a)
-  (when (string-match ^\\(@\\([0-9]+\\)\\)?\\(\\$?\\([0-9]+\\)\\)?\\(\\$?[a-zA-Z0-9]+\\)? a)
+  (when (string-match ^\\(@\\([0-9]+\\)\\)?\\(\\$?\\([0-9]+\\)\\)?\\(\\$?[[:alnum:]]+\\)? a)
 (concat
  (if (match-end 2) (format @%05d (string-to-number (match-string 2 a))) )
  (if (match-end 4) (format $%05d (string-to-number (match-string 4 a))) )
@@ -7752,7 +7752,7 @@ When NAMED is non-nil, look for a named 
   (when (looking-at \\([ \t]*\n\\)*#\\+TBLFM: *\\(.*\\))
 	(setq strings (org-split-string (match-string 2)  *:: *))
 	(while (setq string (pop strings))
-	  (when (string-match \\(@[0-9]+\\$[0-9]+\\|\\$\\([a-zA-Z0-9]+\\)\\) *= *\\(.*[^ \t]\\) string)
+	  (when (string-match \\(@[0-9]+\\$[0-9]+\\|\\$\\([[:alnum:]]+\\)\\) *= *\\(.*[^ \t]\\) string)
 	(setq scol (if (match-end 2)
 			   (match-string 2 string)
 			 (match-string 1 string))
@@ -10070,7 +10070,7 @@ according to FMT (default from `org-emai
   ;; We are using a headline, clean up garbage in there.
   (if (string-match org-todo-regexp s)
 	  (setq s (replace-match  t t s)))
-  (if (string-match :[EMAIL PROTECTED]:]+:[ \t]*$ s)
+  (if (string-match :[[:alnum:]_@:]+:[ \t]*$ s)
 	  (setq s (replace-match  t t s)))
   (setq s (org-trim s))
   (if (string-match (concat ^\\( org-quote-string \\|
@@ -10078,7 +10078,7 @@ according to FMT (default from `org-emai
 	  (setq s (replace-match  t t s)))
   (while (string-match org-ts-regexp s)
 	(setq s (replace-match  t t s
-(while (string-match [^a-zA-Z_0-9 \t]+ s)
+(while (string-match [^[:alnum:] \t]+ s)
   (setq s (replace-match   t t s)))
 (or string (setq s (concat * s)))  ; Add * for headlines
 (mapconcat 'identity (org-split-string s [ \t]+)  )))
@@ -10420,7 +10420,7 @@ optional argument IN-EMACS is non-nil, E
 	(setq 

Re: [Orgmode] Non-ascii tag names

2007-06-16 Thread Carsten Dominik

It should be largely sufficient - maybe not 100%, but close.

Unfortunately this does not work under XEmacs as far as I know.

- Carsten

On Jun 16, 2007, at 20:01, David Smith wrote:


Carsten, you said in
http://thread.gmane.org/gmane.emacs.orgmode/1327/focus=1328 that 
non-ascii
tag names are not supported. I've written a patch that seems to make 
this

work appropriately just by fixing the regexps involving tags to use
[:alnum:] instead of a-zA-Z0-9. Is this insufficient?

Cheers,
David

i18n_tags.patch___
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



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode