[Top][All Lists]

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

Re: Any problems with this change?

From: Juri Linkov
Subject: Re: Any problems with this change?
Date: Thu, 25 Mar 2004 23:59:28 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:
> Does anyone see a problem with this change?
> To: address@hidden
> From: address@hidden (=?iso-8859-1?q?H=E5kan?= Granath)
> Date: 22 Mar 2004 11:11:03 +0100
> Subject: dired-move-to-filename-regexp
> Sender: address@hidden
> In my locale sv_SE the output of ls -l may look like
>   drwx------    2 hakan    users        4096 15 mar 14.47 bin
> The time format (14.47 instead of 14:47) gives problems in dired. The
> following patch redefines 'dired-move-to-filename-regexp' and solves
> the problem for me. However, I do not know if this is the correct fix.

I don't see a problem with this change.

However, I have a related problem.

The function `dired-mark-sexp' don't work when dates in the dired buffer
are in ISO format, because month names are hard-coded in its regexp.

I propose to replace this regexp with the variable
`dired-move-to-filename-regexp'.  Luckily it will work here because
this variable has the date in its first parenthetical subexpression,
and `dired-mark-sexp' expects the start of the date in the first
subexpression too.

Index: emacs/lisp/dired-x.el
RCS file: /cvsroot/emacs/emacs/lisp/dired-x.el,v
retrieving revision 1.53
diff -c -r1.53 dired-x.el
*** emacs/lisp/dired-x.el       23 Mar 2004 07:38:57 -0000      1.53
--- emacs/lisp/dired-x.el       25 Mar 2004 22:06:54 -0000
*** 1517,1524 ****
                ;; Karsten Wenger <address@hidden> fixed uid.
                (setq uid (buffer-substring (+ (point) 1)
                                          (progn (forward-word 1) (point))))
!               (re-search-forward "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|\
! Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)")
                (goto-char (match-beginning 1))
                (forward-char -1)
                (setq size (string-to-int (buffer-substring (save-excursion
--- 1517,1523 ----
                ;; Karsten Wenger <address@hidden> fixed uid.
                (setq uid (buffer-substring (+ (point) 1)
                                          (progn (forward-word 1) (point))))
!               (re-search-forward dired-move-to-filename-regexp)
                (goto-char (match-beginning 1))
                (forward-char -1)
                (setq size (string-to-int (buffer-substring (save-excursion

Juri Linkov

reply via email to

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