GNU bug report logs -
#18051
24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Fri, 18 Jul 2014 06:24:01 UTC
Severity: wishlist
Found in version 24.3.92
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #62 received at 18051 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> I don't think you understood what Michael wanted, but I'll let Michael
> speak for himself.
I don't use Tramp often currently.
Generally, I switched to ls-lisp because I liked that it gives me more
control over how dired looks like.
Sorting is one only thing (that could probably be done with Tramp).
There are other things. What I don't like from ls is that it shows
symlinks like this:
lrwxrwxrwx ... ...
rwxrwxrwx is redundant. When you use M on a link in dired, you actually
set the modes of the target. I want to see the target file's modes, so
I use this:
,----------------------------------------------------------------------
| (defun my-ls-lisp-treat-symlinks-ad (file-alist &rest _)
| "Make it show modes of truenames for symlinks."
| (mapc (lambda (file-line)
| (let ((filename (expand-file-name (car file-line)
| default-directory))
| modes-string)
| (when (file-symlink-p filename)
| (setq modes-string (nth 8 (file-attributes
| (file-truename filename))))
| (if (not modes-string) ;; link could be dead!
| (setq modes-string "l?????????")
| (aset modes-string 0 ?l))
| (setf (nth 9 file-line) modes-string))))
| file-alist)
| file-alist)
|
| (advice-add 'ls-lisp-handle-switches :after #'my-ls-lisp-treat-symlinks-ad)
`----------------------------------------------------------------------
AFAIK this can't be reached with ls. Just one example. Trying to do
such things with Tramp would probably indeed slow it down.
This bug report was last modified 10 years and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.