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

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

dired.el regex not matching spaces before file names


From: Daniel Ortmann
Subject: dired.el regex not matching spaces before file names
Date: Tue, 21 Nov 2000 14:46:03 -0600

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (rs6000-ibm-aix4.3.3.0, Motif)
 of Mon Nov 20 2000 on neon.rchland.ibm.com
configured using `configure  
--prefix=/afs/rch/rel/common/prod/ct/local/200011/rs_aix43 --with-x 
--with-x-toolkit=motif'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I've reported this bug before and (I think) I was told it was fixed in the new
version.  Perhaps the fix was applied to a different version?

In the following lines from a dired buffer note the extra whitespace before
the "37R00B9_data" filename:

  -rwxr-xr-x   1 ortmann  ortmann     3410 Oct 23 13:49 .login.runpsp
  -r--r--r--   1 ortmann  ortmann    39466 May 05 2000  37R00B9_data

This extra whitespace causes emacs to be unable to recognize the file when I
press "v" for "visit".

The following patch to some regex in dired.el seems to fix the problem for me.
It should, of course, be reviewed for general safety and utility:

neon:lisp$ diff -c dired.el~ dired.el
*** dired.el~   Mon Nov 29 09:04:12 1999
--- dired.el    Tue Nov 21 14:34:58 2000
***************
*** 1374,1380 ****
         (western (concat "\\(" month s dd "\\|" dd s month "\\)"
           ;; weiand: changed: year potentially unaligned
  ;;old                   s "\\(" HH:MM "\\|" s yyyy "\\|" yyyy s "\\)"))
!                         s "\\(" HH:MM "\\|" s "?" yyyy "\\|" yyyy s "\\)"))
         (japanese (concat mm k s dd k s "\\(" s HH:MM "\\|" yyyy k "\\)")))
         ;; The "[0-9]" below requires the previous column to end in a digit.
         ;; This avoids recognizing `1 may 1997' as a date in the line:
--- 1374,1380 ----
         (western (concat "\\(" month s dd "\\|" dd s month "\\)"
           ;; weiand: changed: year potentially unaligned
  ;;old                   s "\\(" HH:MM "\\|" s yyyy "\\|" yyyy s "\\)"))
!                         s "\\(" HH:MM "\\|" s "?" yyyy s "+\\|" yyyy s 
"+\\)"))
         (japanese (concat mm k s dd k s "\\(" s HH:MM "\\|" yyyy k "\\)")))
         ;; The "[0-9]" below requires the previous column to end in a digit.
         ;; This avoids recognizing `1 may 1997' as a date in the line:
***************
*** 1382,1388 ****
         ;; The ".*" below finds the last match if there are multiple matches.
         ;; This avoids recognizing `jservice  10  1024' as a date in the line:
         ;; drwxr-xr-x  3 jservice  10  1024 Jul  2  1997 esg-host
!     (concat ".*[0-9]" s "\\(" western "\\|" japanese "\\)" s))
    "Regular expression to match up to the file name in a directory listing.
  The default value is designed to recognize dates and times
  regardless of the language.")
--- 1382,1388 ----
         ;; The ".*" below finds the last match if there are multiple matches.
         ;; This avoids recognizing `jservice  10  1024' as a date in the line:
         ;; drwxr-xr-x  3 jservice  10  1024 Jul  2  1997 esg-host
!     (concat ".*[0-9]" s "+\\(" western "\\|" japanese "\\)" s))
    "Regular expression to match up to the file name in a directory listing.
  The default value is designed to recognize dates and times
  regardless of the language.")

Recent input:
SPC SPC SPC SPC C-x C-s M-} S-down-mouse-1 C-x d t 
m p return n n n n n n n n n n n n n n n n n n n n 
p v C-x k return M-> M-< C-n C-n C-n C-n C-n C-n M-x 
C-g C-x b * s c tab return l o a d - p a t h C-j C-p 
M-% SPC return C-q C-j return ! C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-e C-p C-p C-b C-SPC C-a C-f M-w 
M-x r e p o r tab return

Recent messages:
Loading view...
Loading view...done
Type C-h for help, h for commands, q to quit.
Mark set [2 times]
Quit
Mark set
Replaced 24 occurrences
Mark set
Loading emacsbug...
Loading emacsbug...done

-- 
Daniel Ortmann, IBM Circuit Technology, Rochester, MN 55901-7829
address@hidden / internal 8.553.6795 / external 507.253.6795
address@hidden home 507.288.7732

"The answers are so simple, and we all know where to look,
but it's easier just to avoid the question." -- Kansas



reply via email to

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