Commits

michaels  committed a5db8a5

Dired 7.16.

  • Participants
  • Parent commits d21345b

Comments (0)

Files changed (20)

-2007-12-17  Norbert Koch  <viteno@xemacs.org>
+2008-01-13  Mike Sperber  <sperber@deinprogramm.de>
 
-	* Makefile (VERSION): XEmacs package 1.18 released.
+	* Dired 7.16.
+
+2008-01-11  Mike Sperber  <sperber@deinprogramm.de>
+
+	* dired.el (dired-mule): Also load dired-mule when (featurep
+	'file-coding).
+
+2008-01-08  Michael Sperber  <sperber@deinprogramm.de>
+
+	* dired.el (dired-listing-switches): Note that it can contain `h'.
+	(dired-re-before-filename): Add size suffixes for "ls -h".
+	(dired-get-file-size): Adjust for above changes.
+
+2008-01-08  Michael Sperber  <sperber@deinprogramm.de>
+
+	* dired-sex.el (dired-parse-ls): Use.
+	* dired.el (dired-manual-move-to-filename): Use.  This avoids a
+	bug with lines like
+	"-rw-r--r--   1 sperber  21  8730 Jan  7 09:25 foo" where
+	"sperber 21 8730" is recgonized as a date.
+	* dired.el (dired-re-before-filename): Add.
 
 2007-12-17  Michael Sperber  <sperber@deinprogramm.de>
 
 include Makefile.dired
 
 VERSION = 1.18
-AUTHOR_VERSION = 7.15
+AUTHOR_VERSION = 7.16
 MAINTAINER = Mike Sperber <sperber@deinprogramm.de>
 PACKAGE = dired
 PKG_TYPE = regular

File Makefile.dired

 #
 # File:         Makefile
 # Release:      $EFS release: 1.21 $
-# Release:      $dired release: 7.15 $
+# Release:      $dired release: 7.16 $
 # Version:      $Revision$
 # RCS:
 # Description:  Makefile for byte-compiling dired (primarily) and EFS.
-This is Dired 7.15
+This is Dired 7.16
 ==================
 
 Dired is a special mode for editing directory trees, both local and
 description of mailing lists relevant to Dired.  We encourage users to
 join these lists.
 
-NOTE: If you're using Dired 7.15 in conjunction with EFS, you are
+NOTE: If you're using Dired 7.16 in conjunction with EFS, you are
       advised to use EFS 1.24 or higher.
 

File dired-cmpr.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-cmpr.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Commands for compressing marked files.
 ;;

File dired-diff.el

 ;;
 ;; File:           dired-diff.el
 ;; RCS:
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; Description:    Support for diff and related commands.
 ;; Author:         Sandy Rutherford <sandy@ibm550.sissa.it>
 ;; Created:        Fri Jun 24 08:50:20 1994 by sandy on ibm550

File dired-faces.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-faces.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   rudimentary face customization support for dired
 ;; Author:        Mike Sperber <sperber@informatik.uni-tuebingen.de>

File dired-grep.el

 ;;
 ;; File:           dired-grep.el
 ;; RCS:
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; Description:    Support for running grep on marked files in a dired buffer.
 ;; Author:         Sandy Rutherford <sandy@ibm550.sissa.it>
 ;; Created:        Tue Jul 13 22:59:37 1993 by sandy on ibm550

File dired-help.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-help.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Obtaining help for dired
 ;; Modified:      Sun Nov 20 21:10:47 1994 by sandy on gandalf

File dired-mob.el

 ;;
 ;; File:           dired-mob.el
 ;; RCS:
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; Description:    Commands for marking files from another buffer.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

File dired-mule.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-mule.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   MULE support for dired.
 ;; Created:       Sun Jul 17 14:45:12 1994 by sandy on ibm550

File dired-oas.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-oas.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   dired odds and sods. Dired functions not usually needed.
 ;;                This file is not a reference to the Organization of

File dired-rgxp.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-rgxp.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Commands for running commands on files whose names
 ;;                match a regular expression.

File dired-sex.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-sex.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Marking files according to sexpressions.  Sorry.
 ;; Created:       Wed Sep 14 01:30:43 1994 by sandy on ibm550
   ;; Moves point within the current line to the end of the file name.
   (let ((bol (progn (beginning-of-line) (point)))
 	(eol (save-excursion (skip-chars-forward "^\n\r") (point))))
-    (if (re-search-forward dired-re-month-and-time eol t)
+    (if (re-search-forward dired-re-before-filename eol t)
 	(let ((mode-len 10)		; length of mode string
-	      (tstart (progn (goto-char (match-beginning 0))
+	      (tstart (progn (goto-char (match-beginning 1))
 			     (skip-chars-forward " ")
 			     (point)))
 	      (fstart (match-end 0))

File dired-shell.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-shell.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Commands for running shell commands on marked files.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-uu.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Commands for uuencoding/uudecoding marked files.
 ;; Author:        Sandy Rutherford <sandy@math.ubc.ca>

File dired-vir.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-vir.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Virtual dired mode for browsing ls -lR listings.
 ;; Author:        Sebastian Kremer <sk@thp.uni-koeln.de>

File dired-xemacs.el

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-xemacs.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   dired functions for XEmacs
 ;; Author:        Mike Sperber <sperber@informatik.uni-tuebingen.de>
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; File:          dired-xy.el
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; RCS:
 ;; Description:   Commands for reading mail from dired.
 ;;
 ;;
 ;; File:          dired.el
 ;; RCS:
-;; Dired Version: 7.15
+;; Dired Version: 7.16
 ;; Description:   The DIRectory EDitor is for manipulating, and running
 ;;                commands on files in a directory.
 ;; Authors:       FSF,
 
 ;;; Dired Version
 
-(defconst dired-version (substring "#Revision: 7.15 $" 11 -2)
+(defconst dired-version (substring "#Revision: 7.16 $" 11 -2)
   "The revision number of Tree Dired (as a string).
 
 Don't forget to mention this when reporting bugs to:
 ;;;###autoload
 (defcustom dired-listing-switches "-al"
   "*Switches passed to ls for dired. MUST contain the `l' option.
-Can contain even `F', `b', `i' and `s'."
+Can contain even `h', `F', `b', `i' and `s'."
   :type '(choice string
 		 (repeat string))
   :group 'dired-programs)
     "Regular expression matching from the date to the filename.
 This regexp MUST match all the way to first character of the filename.")
 
+(defconst dired-re-before-filename
+  (concat ".*[0-9]+[BkKMGTPEZY]? \\(" dired-re-month-and-time "\\)")
+  "Regular expression matching a portion of a directory line up to the filename.
+This regexp MUST match all the way to first character of the filename.
+The first submatch is the date portion of the filename.")
+
 (defvar dired-subdir-regexp
   "\\([\n\r]\n\\|\\`\\). \\([^\n\r]+\\)\\(:\\)\\(\\.\\.\\.\r\\|[\n\r]\\)")
   ;; Regexp matching a maybe hidden subdirectory line in ls -lR output.
 					; separator, node #, separator, owner,
 					; separator
 	     (goto-char (+ bol 17))
-	     (re-search-forward dired-re-month-and-time eol t))
+	     (re-search-forward dired-re-before-filename eol t))
 	    (point)
 	  (goto-char bol)
 	  (if raise-error
 (defun dired-get-file-size ()
   ;; Returns the file size in bytes of the current file, as an integer.
   ;; Assumes that it is on a valid file line. It's the caller's responsibility
-  ;; to ensure this. Assumes that match 0 for dired-re-month-and-time is
-  ;; at the end of the file size.
-  (end-of-line)
-  (search-backward-regexp dired-re-month-and-time)
+  ;; to ensure this.
+  (beginning-of-line)
+  (re-search-forward dired-re-before-filename)
+  (goto-char (match-beginning 1))
   (skip-chars-backward " ")
-  (string-to-int (buffer-substring (point)
-				   (progn (skip-chars-backward "0-9")
-					  (point)))))
+  (dired-size-spec-to-size
+   (buffer-substring (point)
+		     (progn (skip-chars-backward "^ ")
+			    (point)))))
+
+(defun dired-size-spec-to-size (size-spec)
+  "Convert a size specification to a size in bytes."
+  (if (string-match "^[0-9]+$" size-spec)
+      (string-to-int size-spec)
+    (let* ((size (length size-spec))
+	   (num (string-to-int (substring size-spec 0 (- size 1))))
+	   (last ))
+      (* num
+	 (expt 1024
+	       (or (cdr-safe
+		    (assoc (aref size-spec (- size 1))
+			'((?B . 0) (?k . 1) (?K . 1) (?M . 2) (?G . 3) (?T . 4) (?P . 5))))
+		   1)))))) ; probably bogus, but we don't know any better
 
 (defun dired-copy-filenames-as-kill (&optional arg)
   "Copy names of marked (or next ARG) files into the kill ring.
 
 ;;; MULE
 
-(if (or (boundp 'MULE) (featurep 'mule)) (load "dired-mule"))
+(if (or (boundp 'MULE) (featurep 'mule) (featurep 'file-coding)) (load "dired-mule"))
 
 
 ;; Run load hook for user customization.