* [BUG] emacs-21.3 dired-move-to-filename is confused by locales that've quote in month names
@ 2003-06-26 3:29 Thierry Vignaud
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Vignaud @ 2003-06-26 3:29 UTC (permalink / raw)
Hi.
I'm the emacs packager in the Mandrake Linux distro.
i've find out that emacs-21.3 dired mode (really dired-move-to-filename) is
confused by locales that've quotes in month names.
this bug has been seen on ix86 machines running mandrake linux 9.1 and mandrake
linux cooker.
the following packages were installed on these machines:
tv@du ~ $ rpm -q glibc locales{,-br} emacs
glibc-2.3.2-4mdk
locales-2.3.2-2mdk
locales-br-2.3.2-2mdk
emacs-21.3-5mdk
locale was configured as
tv@du ~ $ cat .i18n
LC_TELEPHONE=br_FR
LC_PAPER=br_FR
LC_NAME=br_FR
LC_CTYPE=br_FR
LANGUAGE=br:fr_FR:fr
LC_NUMERIC=br_FR
LC_MEASUREMENT=br_FR
LC_MONETARY=br_FR
LC_TIME=br_FR
LANG=br_FR
LC_IDENTIFICATION=br_FR
LC_ADDRESS=br_FR
LC_MESSAGES=br_FR
Description:
============
emacs dired mode is confused when file date is displayed in locales that have
non alphabetic characters.
eg: i use breton locale (locale used in britanny, west area of france) where
February localized name is C'Hwevrer (C'H being a character of the breton
alphabet, noted as the three charaters "c", "'" and "h").
the problem is that the "'" single quote character confuse dired mode
English month | breton month
--------------+-------------
January | Genver
February | C'hwevrer
March | Meurzh
April | Ebrel
May | Mae
June | Mezheven
July | Gouere
August | Eost
September | Gwengolo
October | Here
November | Du
December | Kerzu
How to reproduce
================
- locate a file dating from february, or alter the system clock to return back
to february and touch a file to date it from february
- run "LC_TIME=br emacs" (you need the /usr/share/locale/br/LC_TIME file from
glibc locales)
- open the directory where there's a "last altered in february" file
- try to open it in dired mode by typing enter on it
eg, when i open on my local hard disk the /pub/bzh.me/keltia/ directory, emacs
open a dired buffer whose content is:
>===============================================================================>
> /pub/bzh.me/keltia: >
> used 340 available 6814708 >
> drwxr-xr-x 9 tv tv 4096 Eve 8 16:43 . >
> drwxr-xr-x 15 tv tv 4096 Eve 6 10:31 .. >
> drwxr-xr-x 4 tv tv 4096 Eve 8 16:45 1 >
> drwxrwxr-x 2 tv tv 4096 Meu 18 2002 css >
> -rw-r--r-- 1 tv tv 350 Mae 14 2002 DEBILE >
> drwxr-xr-x 5 tv tv 4096 Gwe 22 2001 eXtrans-1.2.0 >
> -rw-rw-r-- 1 tv tv 129 C'hw 25 2002 FAMILLE >
> -rw-r--r-- 1 tv tv 22186 C'hw 13 2002 fortunes-brt.tar.bz2 >
> drwxr-xr-x 7 tv tv 4096 Mae 10 2001 IPROtools >
> drwxr-xr-x 8 tv tv 4096 Eve 8 16:28 keltia >
> drwxr-xr-x 9 tv tv 4096 Eve 8 12:46 keltia.oldw3 >
> -rw-r--r-- 1 tv tv 224531 Eve 4 16:03 klt.diff >
> -rw-r--r-- 1 tv tv 115 Ebr 21 2002 mail >
> -rw-r--r-- 1 tv tv 61 C'hw 13 2002 Makefile >
> -rw-r--r-- 1 tv tv 390 Gwe 21 2002 notes >
> -rw-r--r-- 1 tv tv 74 Gwe 21 2002 NOTES >
> -rw-r--r-- 1 tv tv 8538 Eve 3 17:44 o >
> drwxr-xr-x 3 tv tv 4096 Eve 26 2001 old >
> -rw-r--r-- 1 tv tv 117 Eve 6 2002 quota >
> -rw-r--r-- 1 tv tv 6655 C'hw 21 2002 quotes.en >
> -rw-r--r-- 1 tv tv 502 C'hw 13 2002 style.css >
> -rw-r--r-- 1 tv tv 90 C'hw 13 2002 TAILLE >
>===============================================================================>
when i scroll the files through the down key, the cursor is on the first letter
of the file name.
but when i go on Makefile entry, the cursor goes at the beginning of the line
instead of goring on the first "M" of Makefile. when i type <enter>, emacs
display "No file on this line" in the minibuffer window and
"dired-move-to-filename: No file on this line" is inserted in the *Messages*
buffer.
obviously, dired seems confused because of the single quote in the date field
that prevent it to parse the Makefile file line in the dired buffer
if your system does not have the britton locale (iso code lang code being
"br"[0]), you can get it from glibc sources
[0] "br" lang code is not the brasilian portuguese code which is pt_br (but "br"
country code does be the brasil one)
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <mailman.8646.1056598652.21513.bug-gnu-emacs@gnu.org>]
* Re: [BUG] emacs-21.3 dired-move-to-filename is confused by locales that've quote in month names
[not found] <mailman.8646.1056598652.21513.bug-gnu-emacs@gnu.org>
@ 2003-06-26 15:33 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2003-06-26 15:33 UTC (permalink / raw)
Cc: Thierry Vignaud
Thierry Vignaud writes:
> i've find out that emacs-21.3 dired mode (really dired-move-to-filename) is
> confused by locales that've quotes in month names.
...
> emacs dired mode is confused when file date is displayed in locales that have
> non alphabetic characters.
>
> eg: i use breton locale (locale used in britanny, west area of france) where
> February localized name is C'Hwevrer (C'H being a character of the breton
> alphabet, noted as the three charaters "c", "'" and "h").
I was suprised to learn there is no single Unicode character for that
letter:
http://groups.yahoo.com/group/unicode/message/18451
> the problem is that the "'" single quote character confuse dired mode
>
> English month | breton month
> --------------+-------------
> January | Genver
> February | C'hwevrer
> March | Meurzh
> April | Ebrel
> May | Mae
> June | Mezheven
> July | Gouere
> August | Eost
> September | Gwengolo
> October | Here
> November | Du
> December | Kerzu
I can think of 2 different changes to dired-move-to-filename-regexp's
value:
1. Allow ' anywhere in month names:
*** emacs-21.3/lisp/dired.el.orig Fri Feb 7 04:48:13 2003
--- emacs-21.3/lisp/dired.el Thu Jun 26 09:20:41 2003
***************
*** 1506,1512 ****
;;; Functions for finding the file name in a dired buffer line.
(defvar dired-move-to-filename-regexp
! (let* ((l "\\([A-Za-z]\\|[^\0-\177]\\)")
;; In some locales, month abbreviations are as short as 2 letters,
;; and they can be padded on the right with spaces.
;; weiand: changed: month ends potentially with . or , or .,
--- 1506,1512 ----
;;; Functions for finding the file name in a dired buffer line.
(defvar dired-move-to-filename-regexp
! (let* ((l "\\([A-Za-z']\\|[^\0-\177]\\)")
;; In some locales, month abbreviations are as short as 2 letters,
;; and they can be padded on the right with spaces.
;; weiand: changed: month ends potentially with . or , or .,
2. Allow ' just as the second character of month names:
*** emacs-21.3/lisp/dired.el.orig Fri Feb 7 04:48:13 2003
--- emacs-21.3/lisp/dired.el Thu Jun 26 09:28:56 2003
***************
*** 1510,1517 ****
;; In some locales, month abbreviations are as short as 2 letters,
;; and they can be padded on the right with spaces.
;; weiand: changed: month ends potentially with . or , or .,
! ;;old (month (concat l l "+ *"))
! (month (concat l l "+[.]?,? *"))
;; Recognize any non-ASCII character.
;; The purpose is to match a Kanji character.
(k "[^\0-\177]")
--- 1510,1517 ----
;; In some locales, month abbreviations are as short as 2 letters,
;; and they can be padded on the right with spaces.
;; weiand: changed: month ends potentially with . or , or .,
! ;;old (month (concat l "'?" l "+ *"))
! (month (concat l "'?" l "+[.]?,? *"))
;; Recognize any non-ASCII character.
;; The purpose is to match a Kanji character.
(k "[^\0-\177]")
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-26 15:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-26 3:29 [BUG] emacs-21.3 dired-move-to-filename is confused by locales that've quote in month names Thierry Vignaud
[not found] <mailman.8646.1056598652.21513.bug-gnu-emacs@gnu.org>
2003-06-26 15:33 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.