GNU bug report logs -
#27762
26.0.50; ls-lisp: misalignment when dired-directory is a cons
Previous Next
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: Tino Calancha <tino.calancha <at> gmail.com>
> Cc: 27762 <at> 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.
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.