unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Michael Albinus <michael.albinus@gmx.de>, 18051@debbugs.gnu.org
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	[thread overview]
Message-ID: <87tx6c7f5v.fsf@web.de> (raw)
In-Reply-To: <83y4vq6cz3.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Jul 2014 15:57:52 +0300")

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.





  parent reply	other threads:[~2014-07-20  5:49 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1XMiOq-0000si-VD@vcs.savannah.gnu.org>
2014-07-18  6:22 ` bug#18051: 24.3.92; ls-lisp: Sorting; make ls-lisp-string-lessp a normal function? Michael Heerdegen
2014-07-18  6:53   ` Eli Zaretskii
2014-07-18  7:33     ` Michael Heerdegen
2014-07-18  8:53       ` Eli Zaretskii
2014-07-18  9:37         ` Michael Heerdegen
2014-07-18  9:46           ` Eli Zaretskii
2014-07-18 10:18             ` Michael Heerdegen
2014-07-18 13:03               ` Eli Zaretskii
2014-07-19  1:25                 ` Michael Heerdegen
2014-07-19  8:17                   ` Eli Zaretskii
2014-07-19 10:52                     ` Michael Heerdegen
2014-07-19 10:56                     ` Eli Zaretskii
2014-07-18  9:24       ` Michael Albinus
2014-07-18  9:33         ` Eli Zaretskii
2014-07-18 10:12           ` Michael Albinus
2014-07-18 12:57             ` Eli Zaretskii
2014-07-18 13:18               ` Michael Albinus
2014-07-18 13:44                 ` Eli Zaretskii
2014-07-18 16:21                   ` Michael Albinus
2014-07-20  5:49               ` Michael Heerdegen [this message]
2014-07-20  6:07                 ` Eli Zaretskii
2014-07-20  6:21                   ` Michael Heerdegen
2014-07-20  6:33                     ` Eli Zaretskii
2014-07-20  7:30                       ` Michael Heerdegen
2014-07-20  8:14                         ` Eli Zaretskii
2014-07-20  8:24                           ` Michael Heerdegen
2014-07-20  8:38                             ` Eli Zaretskii
2014-07-20  9:15                               ` Michael Heerdegen
2014-07-20  9:18                                 ` Eli Zaretskii
2014-07-20 11:44                               ` Michael Albinus
2014-07-20 11:59                                 ` Eli Zaretskii
2014-07-20 15:26                                   ` Michael Albinus
2014-07-20 16:16                                     ` Eli Zaretskii
2014-08-16 21:52                                     ` Michael Albinus
2014-08-17 16:38                                       ` Eli Zaretskii
2014-08-17 17:55                                         ` Eli Zaretskii
2014-08-17 18:46                                           ` Michael Albinus
2014-08-17 18:52                                             ` Eli Zaretskii
2014-08-21  9:05                                               ` Michael Albinus
2014-08-21 14:41                                                 ` Eli Zaretskii
2014-08-22 14:23                                                   ` Michael Albinus
2014-08-23  9:05                                                     ` Eli Zaretskii
2014-08-23 16:42                                                       ` Michael Albinus
2014-08-23 17:33                                                         ` Eli Zaretskii
2014-08-23 20:32                                                           ` Michael Albinus
2014-08-24 14:54                                                             ` Eli Zaretskii
2014-08-24 16:18                                                               ` Michael Albinus
2014-08-25 15:01                                                               ` Stefan Monnier
2014-08-27  8:49                                                                 ` Michael Albinus
2014-08-27 15:37                                                                   ` Eli Zaretskii
2014-08-27 18:02                                                                     ` Michael Albinus
2014-08-27 15:48                                                                   ` Glenn Morris
2014-08-27 16:53                                                                     ` Eli Zaretskii
2014-08-28  3:23                                                                       ` Stefan Monnier
2014-08-27 18:08                                                                     ` Michael Albinus
2014-08-27 18:30                                                                       ` Glenn Morris
2014-08-25 16:45                                                             ` Glenn Morris
2014-08-25 17:36                                                               ` Eli Zaretskii
2014-07-20  6:18                 ` Michael Heerdegen
2014-07-20 14:22                   ` Stefan Monnier
2014-08-27 23:57   ` bug#18051: trunk r117751: Improve robustness of new string-collation code Katsumi Yamaoka
2014-08-28  0:51     ` Paul Eggert
2014-08-28  3:09   ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tx6c7f5v.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=18051@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).