[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal
From: |
Michael Heerdegen |
Subject: |
bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function? |
Date: |
Sun, 20 Jul 2014 07:49:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) |
Eli Zaretskii <eliz@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.
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, (continued)
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Albinus, 2014/07/18
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/18
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Albinus, 2014/07/18
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/18
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Albinus, 2014/07/18
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/18
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Albinus, 2014/07/18
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?,
Michael Heerdegen <=
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Heerdegen, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Heerdegen, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Heerdegen, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Heerdegen, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Eli Zaretskii, 2014/07/20
- bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function?, Michael Albinus, 2014/07/20