emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r99465: Fix to uid/gid format in eshe


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99465: Fix to uid/gid format in eshell's ls (Bug#5528).
Date: Sun, 07 Feb 2010 01:23:10 -0500
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99465
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2010-02-07 01:23:10 -0500
message:
  Fix to uid/gid format in eshell's ls (Bug#5528).
  
  * eshell/esh-util.el (eshell-file-attributes): New optional arg
  ID-FORMAT.  Pass it to `file-attributes'.
  
  * eshell/em-ls.el (eshell-do-ls): Use it (Bug#5528).
modified:
  lisp/ChangeLog
  lisp/eshell/em-ls.el
  lisp/eshell/esh-util.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-02-07 04:14:26 +0000
+++ b/lisp/ChangeLog    2010-02-07 06:23:10 +0000
@@ -1,3 +1,10 @@
+2010-02-07  Chong Yidong  <address@hidden>
+
+       * eshell/esh-util.el (eshell-file-attributes): New optional arg
+       ID-FORMAT.  Pass it to `file-attributes'.
+
+       * eshell/em-ls.el (eshell-do-ls): Use it (Bug#5528).
+
 2010-02-07  sj  <address@hidden>  (tiny change)
 
        * faces.el (set-face-attribute): Allow calling

=== modified file 'lisp/eshell/em-ls.el'
--- a/lisp/eshell/em-ls.el      2010-01-13 08:35:10 +0000
+++ b/lisp/eshell/em-ls.el      2010-02-07 06:23:10 +0000
@@ -393,13 +393,13 @@
               (eshell-glob-regexp ignore-pattern))))
      ;; list the files!
      (eshell-ls-entries
-      (mapcar (function
-              (lambda (arg)
-                (cons (if (and (eshell-under-windows-p)
-                               (file-name-absolute-p arg))
-                          (expand-file-name arg)
-                        arg)
-                      (eshell-file-attributes arg))))
+      (mapcar (lambda (arg)
+               (cons (if (and (eshell-under-windows-p)
+                              (file-name-absolute-p arg))
+                         (expand-file-name arg)
+                       arg)
+                     (eshell-file-attributes
+                      arg (if numeric-uid-gid 'integer 'string))))
              args)
       t (expand-file-name default-directory)))
    (funcall flush-func)))
@@ -710,7 +710,7 @@
            (funcall insert-func need-return "\n"))))))
 
 (defun eshell-ls-entries (entries &optional separate root-dir)
-  "Output PATH's directory ENTRIES, formatted according to OPTIONS.
+  "Output PATH's directory ENTRIES.
 Each member of ENTRIES may either be a string or a cons cell, the car
 of which is the file name, and the cdr of which is the list of
 attributes.

=== modified file 'lisp/eshell/esh-util.el'
--- a/lisp/eshell/esh-util.el   2010-01-13 08:35:10 +0000
+++ b/lisp/eshell/esh-util.el   2010-02-07 06:23:10 +0000
@@ -701,8 +701,11 @@
        (forward-line)))
     entry))
 
-(defun eshell-file-attributes (file)
-  "Return the attributes of FILE, playing tricks if it's over ange-ftp."
+(defun eshell-file-attributes (file &optional id-format)
+  "Return the attributes of FILE, playing tricks if it's over ange-ftp.
+The optional argument ID-FORMAT specifies the preferred uid and
+gid format.  Valid values are 'string and 'integer, defaulting to
+'integer.  See `file-attributes'."
   (let* ((file (expand-file-name file))
         entry)
     (if (string-equal (file-remote-p file 'method) "ftp")
@@ -723,7 +726,7 @@
                      (setq entry (cdr fentry))
                    (setq entry nil)))))
          entry)
-      (file-attributes file))))
+      (file-attributes file id-format))))
 
 (defalias 'eshell-copy-tree 'copy-tree)
 


reply via email to

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