unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Dired listing is not left aligned
@ 2020-03-24 17:35 Pascal Quesseveur
  2020-03-24 18:36 ` Drew Adams
  2020-03-25 14:14 ` Eli Zaretskii
  0 siblings, 2 replies; 3+ messages in thread
From: Pascal Quesseveur @ 2020-03-24 17:35 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I use emacs 26.3 on Windows 64 bits and I encounter a problem with
dired. Some entries are not correctly left aligned: they are shifted
by spaces towards right. In fact each time a directory is inserted in
the dired listing, existing lines below the new entry are shifted by 2
spaces.

I tried emacs -Q and the problem is still there. I also tried emacs
26.3 on Linux (actually on WSL) and there is no problem.

Start with dired on etc directory:

  c:/Users/quessev/etc:
  drwxrwxrwx quessev          98304 03-13 16:09 cmd
  drwxrwxrwx quessev          12288 03-04 19:12 shells
  drwxrwxrwx quessev          12288 03-02 19:43 wsl

I hit i on shells:

  c:/Users/quessev/etc:
  drwxrwxrwx quessev          98304 03-13 16:09 cmd
  drwxrwxrwx quessev          12288 03-04 19:12 shells
  drwxrwxrwx quessev          12288 03-02 19:43 wsl

  c:/Users/quessev/etc/shells:
  -rw-rw-rw- quessev   481 10-15 09:51 sc01.sh
  -rw-rw-rw- quessev   600 10-15 09:51 sc02.sh
  ...

I hit i on cmd:

  c:/Users/quessev/etc:
  drwxrwxrwx quessev          98304 03-13 16:09 cmd
  drwxrwxrwx quessev          12288 03-04 19:12 shells
  drwxrwxrwx quessev          12288 03-02 19:43 wsl

  c:/Users/quessev/etc/cmd:
  -rwxrwxrwx quessev   682 01-16 16:04 cmd01.cmd
  -rwxrwxrwx quessev   214 01-16 16:05 cmd02.cmd
  ...

    c:/Users/quessev/etc/shells:
    -rw-rw-rw- quessev   481 10-15 09:51 sc01.sh
    -rw-rw-rw- quessev   600 10-15 09:51 sc02.sh
    ...

shells entries are right shifted by 2 spaces.

I hit i on wsl:

  c:/Users/quessev/etc:
  drwxrwxrwx quessev          98304 03-13 16:09 cmd
  drwxrwxrwx quessev          12288 03-04 19:12 shells
  drwxrwxrwx quessev          12288 03-02 19:43 wsl

  c:/Users/quessev/etc/cmd:
  -rwxrwxrwx quessev   682 01-16 16:04 cmd01.cmd
  -rwxrwxrwx quessev   214 01-16 16:05 cmd02.cmd
  ...

    c:/Users/quessev/etc/shells:
    -rw-rw-rw- quessev   481 10-15 09:51 sc01.sh
    -rw-rw-rw- quessev   600 10-15 09:51 sc02.sh
    ...

  c:/Users/quessev/etc/wsl:
  -rwxrwxrwx quessev   682 01-16 16:04 cmd01.sh
  -rwxrwxrwx quessev   214 01-16 16:05 cmd02.sh
  ...


-- 
Pascal Quesseveur
pquessev@gmail.com




^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Dired listing is not left aligned
  2020-03-24 17:35 Dired listing is not left aligned Pascal Quesseveur
@ 2020-03-24 18:36 ` Drew Adams
  2020-03-25 14:14 ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2020-03-24 18:36 UTC (permalink / raw)
  To: pquessev, help-gnu-emacs

> I use emacs 26.3 on Windows 64 bits and I encounter a problem with
> dired. Some entries are not correctly left aligned: they are shifted
> by spaces towards right. In fact each time a directory is inserted in
> the dired listing, existing lines below the new entry are shifted by 2
> spaces.
> 
> I tried emacs -Q and the problem is still there. I also tried emacs
> 26.3 on Linux (actually on WSL) and there is no problem.

I confirm this.  What's worse, it is true back through
Emacs 24.5.  Emacs 24 seems to be where this regression
was introduced - in Emacs 23.4 there is no such problem.

The recipe I used was to insert two subdirs of a dir D,
and then to insert a subdir of one of those subdirs.

When I did the latter action, the second subdir of D
that I inserted was shifted right.

Debugging with `emacs -Q' just a bit, the problem seems
to be in `dired-insert-directory', when it does this:

(indent-rigidly opoint (point) 2)

The problem is that (point) is past the end of the
subdir that is being inserted.  It's past the end of
the next subdir, so that one gets indented also.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Dired listing is not left aligned
  2020-03-24 17:35 Dired listing is not left aligned Pascal Quesseveur
  2020-03-24 18:36 ` Drew Adams
@ 2020-03-25 14:14 ` Eli Zaretskii
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2020-03-25 14:14 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Pascal Quesseveur <pquessev@gmail.com>
> Date: Tue, 24 Mar 2020 18:35:16 +0100
> 
> I use emacs 26.3 on Windows 64 bits and I encounter a problem with
> dired. Some entries are not correctly left aligned: they are shifted
> by spaces towards right. In fact each time a directory is inserted in
> the dired listing, existing lines below the new entry are shifted by 2
> spaces.

A flawed patch review from 7 years ago comes back to bite ;-)

Thanks, should be fixed now.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-25 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-24 17:35 Dired listing is not left aligned Pascal Quesseveur
2020-03-24 18:36 ` Drew Adams
2020-03-25 14:14 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).