From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27762: 26.0.50; ls-lisp: misalignment when dired-directory is a cons Date: Wed, 19 Jul 2017 20:04:33 +0300 Message-ID: <83vamobboe.fsf@gnu.org> References: <87wp75yuuh.fsf@calancha-pc> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1500483916 4914 195.159.176.226 (19 Jul 2017 17:05:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Jul 2017 17:05:16 +0000 (UTC) Cc: 27762@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 19 19:05:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXsPH-0000h3-3z for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Jul 2017 19:05:03 +0200 Original-Received: from localhost ([::1]:34321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXsPM-0004E5-RX for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Jul 2017 13:05:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXsPH-00044Q-8y for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2017 13:05:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXsPG-0001PG-Ad for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2017 13:05:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXsPG-0001PA-82 for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2017 13:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dXsPG-0007ZE-1K for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2017 13:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jul 2017 17:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27762-submit@debbugs.gnu.org id=B27762.150048389829074 (code B ref 27762); Wed, 19 Jul 2017 17:05:01 +0000 Original-Received: (at 27762) by debbugs.gnu.org; 19 Jul 2017 17:04:58 +0000 Original-Received: from localhost ([127.0.0.1]:48049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXsPB-0007Ys-VZ for submit@debbugs.gnu.org; Wed, 19 Jul 2017 13:04:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXsP9-0007Ye-Uo for 27762@debbugs.gnu.org; Wed, 19 Jul 2017 13:04:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXsP0-0001GP-1s for 27762@debbugs.gnu.org; Wed, 19 Jul 2017 13:04:50 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXsOz-0001GJ-VK; Wed, 19 Jul 2017 13:04:45 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2207 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dXsOz-0003hx-8F; Wed, 19 Jul 2017 13:04:45 -0400 In-reply-to: <87wp75yuuh.fsf@calancha-pc> (message from Tino Calancha on Wed, 19 Jul 2017 12:21:58 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134749 Archived-At: > From: Tino Calancha > 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'?