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

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Wed, 19 Jul 2017 03:23:02 UTC

Severity: minor

Found in version 26.0.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 27762 <at> debbugs.gnu.org
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 <at> 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'?




This bug report was last modified 7 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.