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: Sat, 29 Jul 2017 11:09:07 +0300 Message-ID: <83shhf3brw.fsf@gnu.org> References: <87wp75yuuh.fsf@calancha-pc> <83vamobboe.fsf@gnu.org> <87lgnjzs8d.fsf@calancha-pc> <87d18uz8w1.fsf@calancha-pc> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1501315849 17150 195.159.176.226 (29 Jul 2017 08:10:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Jul 2017 08:10:49 +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 Sat Jul 29 10:10:44 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 1dbMpe-00043J-3Y for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jul 2017 10:10:42 +0200 Original-Received: from localhost ([::1]:51499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbMpk-0001if-4F for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Jul 2017 04:10:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbMp3-0001M4-EJ for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:10:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbMp0-0002ug-9k for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:10:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dbMp0-0002uQ-5p for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dbMoz-00081g-WC for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2017 04:10: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: Sat, 29 Jul 2017 08:10: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.150131576930807 (code B ref 27762); Sat, 29 Jul 2017 08:10:01 +0000 Original-Received: (at 27762) by debbugs.gnu.org; 29 Jul 2017 08:09:29 +0000 Original-Received: from localhost ([127.0.0.1]:60549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbMoT-00080p-6s for submit@debbugs.gnu.org; Sat, 29 Jul 2017 04:09:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbMoR-00080a-7s for 27762@debbugs.gnu.org; Sat, 29 Jul 2017 04:09:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbMoI-0002Gd-OC for 27762@debbugs.gnu.org; Sat, 29 Jul 2017 04:09:21 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbMoI-0002GU-Ko; Sat, 29 Jul 2017 04:09:18 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4187 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dbMoH-00078V-B0; Sat, 29 Jul 2017 04:09:17 -0400 In-reply-to: <87d18uz8w1.fsf@calancha-pc> (message from Tino Calancha on Fri, 21 Jul 2017 13:55:26 +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:135105 Archived-At: > From: Tino Calancha > Cc: 27762@debbugs.gnu.org > Date: Fri, 21 Jul 2017 13:55:26 +0900 > > > > With emacs -Q: > > > > (let* ((dir (expand-file-name "src" source-directory)) > > (default-directory dir)) > > (dired (list dir "cygw32.c" "alloc.c" "w32xfns.c" "xdisp.c")) ; Wrong aligment. > > ;; Following just fix the first file, but xdisp.c keeps misaligned. > > (dired-goto-file (expand-file-name "cygw32.c")) > > (forward-line 0) > > (let ((inhibit-read-only t)) > > (dired-align-file (point) (point-max)))) > > > > > > Note that when i eval the previous form GNU 'ls' is used, and i see misalignment. > > I would expect `dired-align-file' fix this problem, but i doesn't. > > > > *) Since this is not specific of `ls-lisp', one alternative fix could > > be to run `dired-align-file' at the end of `dired-internal-noselect' > > when `dired-directory' is a cons. > > > > **) First, we must fix `dired-lign-file', which is not doing its job > > in the snippet above. > Eli, how do you think about following patch? Looks OK, but why this complicated code: > + (when-let* ((col-diff (- (point) (point-at-bol))) > + (higher (> col-diff target))) > + (setq target col-diff))) > + (and (/= first target) target)))) Doesn't current-column do its job in this case? Thanks.