bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#27762: 26.0.50; ls-lisp: misalignment when dired-directory is a cons


From: Eli Zaretskii
Subject: bug#27762: 26.0.50; ls-lisp: misalignment when dired-directory is a cons
Date: Wed, 19 Jul 2017 20:04:33 +0300

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Wed, 19 Jul 2017 12:21:58 +0900
> 
> 
> There are some misalignment on Dired buffers when using 'ls-lisp'
> and 'dired-directory' is a cons.
> 
> 
> I)
> emacs -Q -l ls-lisp -eval '(setq ls-lisp-use-insert-directory-program nil)'
> Eval this form:
> (let* ((dir source-directory)
>        (default-directory dir)
>        (files (mapcar (lambda (f) (concat "src/" f))
>                         (directory-files (expand-file-name "src") nil 
> "\\.*\\.c\\'"))))
> (dired (nconc (list dir) files)))
> ;; Note some lines have an additional space in front;  the space must
> ;; be added in the size column.
> 
> The first patch solves this problem.
> 
> II) Now suppose we want to list the same files _but_ we want that
> "cyge32.c" appears the first.
> emacs -Q -l ls-lisp -eval '(setq ls-lisp-use-insert-directory-program nil)'
> Eval this form:
> 
> (let* ((dir source-directory)
>        (default-directory dir)
>        (files (mapcar (lambda (f) (concat "src/" f))
>                         (cons "cygw32.c"
>                                   (delete "cygw32.c"
>                                                   (directory-files 
> (expand-file-name "src") nil "\\.*\\.c\\'"))))))
> (dired (nconc (list dir) files)))
> ;; Note how the first file looks misaligned.

Thanks, but I'd prefer to keep the ls-lisp related stuff confined to
ls-lisp.el.  Is it possible to rewrite the patch such that dired.el
code doesn't need to call ls-lisp functions directly (and thus the
need for (featurep 'ls-lisp) etc. would be avoided)?

Also, what exactly is the source of the differences between ls-lisp
and the 'ls' command, and are you sure the differences aren't specific
to GNU 'ls'?





reply via email to

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