bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] emacs-21.3 dired-move-to-filename is confused by locales that'


From: Kevin Rodgers
Subject: Re: [BUG] emacs-21.3 dired-move-to-filename is confused by locales that've quote in month names
Date: Thu, 26 Jun 2003 09:33:35 -0600

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:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]