Boris Folgmann writes:
So it's really needed to fix XEmacs I think. I can program in
Elisp, but
I don't think that is's fair to expect every end-user to fix some
regular expressions.
As Spanish user, I had this problem some time ago, but I fixed it with
a quick'n'dirty hack in dired.el (I use 21.1.12), waiting for a better
solution. I looked like this:
(defvar dired-re-month-and-time
(concat
(let ((language (getenv "LANG")))
(cond
((equal language "es_ES")
"
\\(ene\\|feb\\|mar\\|abr\\|may\\|jun\\|jul\\|ago\\|sep\\|oct\\|nov\\|dic\\)")
(t "
\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|June?\\|July?\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)")))
; June and July are for HP-UX 9.0
" [ 0-3][0-9]\\("
" [012][0-9]:[0-6][0-9] \\|" ; time
" [12][90][0-9][0-9] \\|" ; year on IRIX, NeXT, SunOS, ULTRIX, Apollo,
; HP-UX, A/UX
" [12][90][0-9][0-9] \\)" ; year on AIX
))
This worked just fine for me. It could be easily extended to support
other languages.
How could it be done?
1. Is it really necessary to match on the monthnames to recognize a
dired line? My dired view contains only file and directory lines except
of the first two.
I think the regular expression could be simplified, just waiting for
three or four chars, letting the ls command do the job of generating
proper month names. This would make the problem just dissapear.
2. Unset the LC variables when calling programs where you expect
english
output.
I think this is a bit intrusive.
3. Localise XEmacs (it's time :-), sprintf() does the job of
translating
monthnames.
This is The Right Thing To Do. I hope that future work will go this
way.
Saludos