unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5516: 23.1.92; Bad alignment in dired
@ 2010-02-03 16:36 Michael Albinus
  2010-02-14  9:30 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2010-02-03 16:36 UTC (permalink / raw)
  To: 5516

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
The function `dired-align-file' works only, if the column position of a
file name is less than the column position of the file name in the
previous line. This assumption is not true, when the file list of
`dired' contains a mix of local and remote files. Example:

--8<---------------cut here---------------start------------->8---
(dired
 '("foo"
   "~/.emacs"
   "/ftp:anonymous@alpha.gnu.org:/gnu/emacs/pretest/windows/README"))
--8<---------------cut here---------------end--------------->8---

results in

--8<---------------cut here---------------start------------->8---
  /home/albinus:
  -rwx------ 1 albinus albinus 28790 2010-02-03 17:09 /home/albinus/.emacs
  -rw-r--r--    1 1003     65534       11668 Jan 03 13:32 /ftp:anonymous@alpha.gnu.org:/gnu/emacs/pretest/windows/README
--8<---------------cut here---------------end--------------->8---

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/home/albinus/src/emacs/etc/DEBUG.


In GNU Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.16.1)
 of 2010-02-01 on ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.10600000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  diff-auto-refine-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  iswitchb-mode: t
  icomplete-mode: t
  partial-completion-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Recent input:
f C-x k <return> <down> <down> <return> <home> C-s
C-s C-s C-s C-s C-s C-x k <return> <down> <down> <down>
<return> C-s C-s C-s C-s C-s C-s C-s C-s C-x k <return>
<down> <down> <return> C-s C-s C-s C-s C-x k <return>
<down> <down> <down> <down> <down> <down> <down> <down>
<return> C-s C-s C-s C-x k <return> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <return> C-s C-s C-s C-s
C-x k <return> <down> <down> <down> <return> C-s C-s
C-s C-s C-x k <return> <down> <down> <down> <down>
<down> <down> C-x k <return> C-x k <return> C-x v =
<return> <return> <return> n n p n p n q y C-x 1 C-x
k <return> C-x k <return> C-x k <return> <down> <return>
C-x v = <return> <return> <return> n n p <switch-frame>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <file>
<make-frame> <switch-frame> C-x C-f C h a <tab> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> C h a <tab> <return> <switch-frame> <switch-frame>
q y C-x 0 C-x k <return> <switch-frame> <kp-5> q C-x
C-f <return> g <down> <down> <down> = <return> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> t r
a <tab> l i s <tab> <return> n a n a ! q y C-x 1 C-x
C-s q <kp-divide> C-x k <return> C-x k <return> g =
<return> <up> <up> <up> <return> q y C-x 1 C-x k <return>
C-x k <return> q q C-x k <return> <down-mouse-1> <mouse-1>
<down-mouse-3> <mouse-3> <down-mouse-1> <mouse-1> <down-mouse-3>
<mouse-3> <escape> x r e p o r t <tab> <return>

Recent messages:
Processing difference regions ... done
Quit this Ediff session? (y or n)
Saving file /home/albinus/src/tramp/lisp/tramp-smb.el...
Wrote /home/albinus/src/tramp/lisp/tramp-smb.el
Undo!
Reading file /home/albinus/src/emacs/lisp/net/tramp-smb.el ...
Reading file /home/albinus/src/tramp/lisp/tramp-smb.el ...
Computing differences between tramp-smb.el and tramp-smb.el ...
Processing difference regions ... done
Quit this Ediff session? (y or n)

Load-path shadows:
~/src/tramp/lisp/tramp-imap hides ~/lisp/tramp-imap
~/src/tramp/lisp/tramp-gvfs hides ~/lisp/tramp-gvfs
~/src/tramp/lisp/tramp-fish hides /usr/local/src/emacs/lisp/net/tramp-fish
~/src/tramp/lisp/tramp-cmds hides /usr/local/src/emacs/lisp/net/tramp-cmds
~/src/tramp/lisp/tramp-gvfs hides /usr/local/src/emacs/lisp/net/tramp-gvfs
~/lisp/dbus hides /usr/local/src/emacs/lisp/net/dbus
~/src/tramp/lisp/tramp-cache hides /usr/local/src/emacs/lisp/net/tramp-cache
~/src/tramp/lisp/tramp-uu hides /usr/local/src/emacs/lisp/net/tramp-uu
~/src/tramp/lisp/tramp-smb hides /usr/local/src/emacs/lisp/net/tramp-smb
~/src/tramp/lisp/tramp hides /usr/local/src/emacs/lisp/net/tramp
~/src/tramp/lisp/tramp-imap hides /usr/local/src/emacs/lisp/net/tramp-imap
~/src/tramp/lisp/tramp-compat hides /usr/local/src/emacs/lisp/net/tramp-compat
~/src/tramp/lisp/tramp-gw hides /usr/local/src/emacs/lisp/net/tramp-gw
~/src/tramp/lisp/tramp-ftp hides /usr/local/src/emacs/lisp/net/tramp-ftp
~/src/tramp/lisp/trampver hides /usr/local/src/emacs/lisp/net/trampver

Features:
(shadow emacsbug ediff-vers diff-mode vc-sccs vc-svn vc-cvs vc-rcs
vc-dir ewoc find-dired find-func warnings compile dired-aux conf-mode
newcomment multi-isearch tabify man log-view pcvs-util vc vc-dispatcher
add-log flow-fill help-mode view debug vc-bzr mule-util noutline outline
easy-mmode ange-ftp ediff-merg ediff-diff ediff-wind ediff-help
ediff-util ediff-mult ediff-init ediff time-stamp sort gnus-cite
html2text smiley ansi-color mail-extr gnus-agent gnus-srvr nnvirtual
gnus-async gnus-bcklg parse-time timezone gnus-score score-mode gnus-ml
gnus-msg gnus-art mm-uu mml2015 mm-view smime dig disp-table gnus-cache
gnus-sum nnfolder byte-opt bytecomp byte-compile nnml nndraft nnmh nnnil
smtpmail gnus-demon nntp gnus-group gnus-undo nnmail mail-source nnoo
gnus-start gnus-spec gnus-int gnus-range message sendmail ecomplete
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev gmm-utils mailheader
canlock sha1 hex-util hashcash gnus-win gnus gnus-ems nnheader
mail-utils wid-edit cperl-mode easymenu time tramp-imap assoc tramp-gw
tramp-gvfs zeroconf url-parse url-vars mm-util mail-prsvr dbus xml
tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp auth-source
gnus-util netrc time-date advice help-fns advice-preload shell comint
ring password-cache format-spec tramp-compat cl cl-19 trampver epa-file
epa derived epg epg-config iswitchb jka-compr icomplete complete paren
ps-print ps-def lpr dired regexp-opt tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)







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

* bug#5516: 23.1.92; Bad alignment in dired
  2010-02-03 16:36 bug#5516: 23.1.92; Bad alignment in dired Michael Albinus
@ 2010-02-14  9:30 ` Michael Albinus
  2010-02-14 20:18   ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2010-02-14  9:30 UTC (permalink / raw)
  To: 5516-done

A general solution does not seem to be possible without a multi-pass
parsing of the dired buffer. Likely, that's not desired.

I've added the insertion of "  " in `ange-ftp-insert-directory'. The
results are not perfect, but acceptable, I believe.

Best regards, Michael.






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

* bug#5516: 23.1.92; Bad alignment in dired
  2010-02-14  9:30 ` Michael Albinus
@ 2010-02-14 20:18   ` Stefan Monnier
  2010-02-14 21:12     ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2010-02-14 20:18 UTC (permalink / raw)
  To: 5516; +Cc: Michael Albinus

> A general solution does not seem to be possible without a multi-pass
> parsing of the dired buffer. Likely, that's not desired.

I guess the first thing to do is to have ange-ftp remove any unnecessary
spaces on the single line it returns, so that dired-align-file can then
do its thing (since it only adds spaces).

> I've added the insertion of "  " in `ange-ftp-insert-directory'.

I do not know what change you're referring to.


        Stefan






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

* bug#5516: 23.1.92; Bad alignment in dired
  2010-02-14 20:18   ` Stefan Monnier
@ 2010-02-14 21:12     ` Michael Albinus
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2010-02-14 21:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Michael Albinus, 5516

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I've added the insertion of "  " in `ange-ftp-insert-directory'.
>
> I do not know what change you're referring to.

2010-02-14  Michael Albinus  <michael.albinus@gmx.de>

	* net/ange-ftp.el (ange-ftp-insert-directory): Insert "  " for
	dired's alignment sanity.  (Bug#5516)

Try (dired '("foo" "~/" "/ftp:anonymous@alpha.gnu.org:/gnu/emacs/pretest/windows" "/sudo::/"))

Without my patch, it returns

--8<---------------cut here---------------start------------->8---
  /home/albinus/src/emacs:
  drwxr-xr-x 37 albinus albinus 4096 2010-02-14 22:07 /home/albinus/
drwxr-xr-x    2 1003     1003         4096 Jan 03 13:40 /ftp:anonymous@alpha.gnu.org:/gnu/emacs/pretest/windows
              drwxr-xr-x 21 root root 4096 Feb  7 08:18 /sudo:root@detlef:/
--8<---------------cut here---------------end--------------->8---

Now, with my patch, it does

--8<---------------cut here---------------start------------->8---
  /home/albinus/src/emacs:
  drwxr-xr-x 37 albinus albinus 4096 2010-02-14 22:07 /home/albinus/
  drwxr-xr-x    2 1003     1003         4096 Jan 03 13:40 /ftp:anonymous@alpha.gnu.org:/gnu/emacs/pretest/windows
  drwxr-xr-x   21 root     root         4096 Feb  7 08:18 /sudo:root@detlef:/
--8<---------------cut here---------------end--------------->8---

Not perfect, but better.

>         Stefan

Best regards, Michael.






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

end of thread, other threads:[~2010-02-14 21:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-03 16:36 bug#5516: 23.1.92; Bad alignment in dired Michael Albinus
2010-02-14  9:30 ` Michael Albinus
2010-02-14 20:18   ` Stefan Monnier
2010-02-14 21:12     ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).