[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "M-x locate" regression
From: |
Luc Teirlinck |
Subject: |
Re: "M-x locate" regression |
Date: |
Thu, 10 Nov 2005 09:01:29 -0600 (CST) |
The patch I sent yesterday was silly. I send an alternative patch
below, which I will install if there are no objections. I forgot
about the 'string arg to file-attributes (I should have reread the
docs). The patch below passes the 'string arg to `file-attributes'
and everything works OK, including the GID. The `user-login-name'
stuff is unnecessary if the 'string arg is used. Probably, the
'string arg did not exist when find-lisp was written. I got confused
by the comment on line 521 in ls-lisp.el:
;; Numeric uid/gid are more confusing than helpful;
;; Emacs should be able to make strings of them.
===File ~/find-lisp.el-diff=================================
*** find-lisp.el 09 Nov 2005 17:05:07 -0600 1.10
--- find-lisp.el 10 Nov 2005 08:39:41 -0600
***************
*** 3,9 ****
;; Author: Peter Breton
;; Created: Fri Mar 26 1999
;; Keywords: unix
! ;; Time-stamp: <2005-11-10 09:00:49 teirllm>
;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
;; 2005 Free Software Foundation, Inc.
--- 3,9 ----
;; Author: Peter Breton
;; Created: Fri Mar 26 1999
;; Keywords: unix
! ;; Time-stamp: <2005-11-10 08:39:41 teirllm>
;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
;; 2005 Free Software Foundation, Inc.
***************
*** 293,299 ****
(defun find-lisp-find-dired-insert-file (file buffer)
(set-buffer buffer)
(insert find-lisp-line-indent
! (find-lisp-format file (file-attributes file) (list "")
(current-time))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- 293,299 ----
(defun find-lisp-find-dired-insert-file (file buffer)
(set-buffer buffer)
(insert find-lisp-line-indent
! (find-lisp-format file (file-attributes file 'string) (list "")
(current-time))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
***************
*** 309,326 ****
(if (memq ?s switches) ; size in K
(format "%4d " (1+ (/ (nth 7 file-attr) 1024))))
(nth 8 file-attr) ; permission bits
- ;; numeric uid/gid are more confusing than helpful
- ;; Emacs should be able to make strings of them.
- ;; user-login-name and user-full-name could take an
- ;; optional arg.
(format " %3d %-8s %-8s %8d "
(nth 1 file-attr) ; no. of links
! (if (= (user-uid) (nth 2 file-attr))
! (user-login-name)
! (int-to-string (nth 2 file-attr))) ; uid
(if (eq system-type 'ms-dos)
"root" ; everything is root on MSDOS.
! (int-to-string (nth 3 file-attr))) ; gid
(nth 7 file-attr) ; size in bytes
)
(find-lisp-format-time file-attr switches now)
--- 309,324 ----
(if (memq ?s switches) ; size in K
(format "%4d " (1+ (/ (nth 7 file-attr) 1024))))
(nth 8 file-attr) ; permission bits
(format " %3d %-8s %-8s %8d "
(nth 1 file-attr) ; no. of links
! (if (integerp (nth 2 file-attr))
! (int-to-string (nth 2 file-attr))
! (nth 2 file-attr)) ; uid
(if (eq system-type 'ms-dos)
"root" ; everything is root on MSDOS.
! (if (integerp (nth 3 file-attr))
! (int-to-string (nth 3 file-attr))
! (nth 3 file-attr))) ; gid
(nth 7 file-attr) ; size in bytes
)
(find-lisp-format-time file-attr switches now)
============================================================
- Re: "M-x locate" regression, (continued)
- Re: "M-x locate" regression, Richard M. Stallman, 2005/11/08
- Re: "M-x locate" regression, Nick Roberts, 2005/11/08
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/08
- Re: "M-x locate" regression, Nick Roberts, 2005/11/08
- Re: "M-x locate" regression, Richard M. Stallman, 2005/11/08
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/08
- Re: "M-x locate" regression, Nick Roberts, 2005/11/09
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/09
- Re: "M-x locate" regression, Nick Roberts, 2005/11/09
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/10
- Re: "M-x locate" regression,
Luc Teirlinck <=
- Re: "M-x locate" regression, Richard M. Stallman, 2005/11/09
- Re: "M-x locate" regression, Luc Teirlinck, 2005/11/09
- Re: "M-x locate" regression, Nick Roberts, 2005/11/09
Re: "M-x locate" regression, Luc Teirlinck, 2005/11/06