Dired 7.14 bug: Failure to parse ls output on Mac OS X 10.5 Leopard
Dan Poirier <[email protected]> Mon, 24 Dec 2007 16:26:03 -0600
| Newsgroups | gmane.emacs.efs.general |
|---|---|
| Message-ID | <[email protected]> |
This is a followup to a previous report on this problem. I never got any response so I'm not sure if it ever got sent. I'll paste this one into my normal mail program to be sure. Basically, dired in xemacs on Mac OS X 10.5 fails to load most directories. The error message is "no file on this line". The cause appears to be a new output format for ls in Mac OS X 10.5 "Leopard". Here's a sample: drwx------@ 3 poirier staff 102 Dec 7 06:21 .cups drwxr-xr-x 3 poirier staff 102 Nov 30 16:19 .eclipse -rw-r--r-- 1 poirier staff 110 Dec 12 19:02 .eclipse_keyring lrwxr-xr-x 1 poirier staff 25 Dec 1 08:03 .unison -> /Users/ poirier/svn/unison drwx------+ 7 poirier staff 238 Dec 24 12:40 Desktop Note that many lines have an additional character stuck on the end of the permissions. Setting dired-ls-program to point to a little shell script that ran the output of ls through "cut -c 1-10,12-" fixed it, which I think confirms the cause. One way to fix dired was to change the constant value 17 to 18 at two places around line 2786 of dired.el. (This is in dired-manual-move-to-filename). Unfortunately I don't know if that change would break dired on other systems. I suspect that it would. Please let me know if I can provide additional information to help diagnose this, or test possible fixes. Dan Poirier [email protected] Emacs : XEmacs 21.4 (patch 21) "Educational Television" [Lucid] (i386- apple-darwin9.1.0, Mule) of Thu Dec 20 2007 on leo.mynet Package: Dired current state: ============== (setq dired-version "7.14" dired-backup-if-overwrite nil dired-chown-program "/etc/chown" dired-cleanup-alist '(("tex" ".toc" ".log" ".aux" ".dvi") ("latex" ".toc" ".log" ".aux" ".idx" ".lof" ".lot" ".glo" ".dvi") ("bibtex" ".blg" ".bbl") ("texinfo" ".cp" ".cps" ".fn" ".fns" ".ky" ".kys" ".pg" ".pgs" ".tp" ".tps" ".vr" ".vrs") ("patch" ".rej" ".orig") ("backups" "~") ("completion-ignored-extensions" "CM/" "CVS/" ".o" ".obj" ".elc" "~" ".bin" ".lbin" ".dvi" ".class") ) dired-compression-method 'gzip dired-compression-method-alist '((gzip ".gz" ("gzip") ("gzip" "-d") "-f") (compress ".Z" ("compress" "-f") ("compress" "-d") "-f") (pack ".z" ("pack" "-f") ("unpack")) (compact ".C" ("compact") ("uncompact")) (bzip2 ".bz2" ("bzip2") ("bunzip2") "-f")) dired-copy-preserve-time t dired-dwim-target nil dired-failed-marker-shell ?! dired-filename-re-ext "\\..+\\'" dired-find-subdir nil dired-gnutar-program nil dired-keep-marker-compress t dired-keep-marker-copy ?C dired-keep-marker-hardlink ?H dired-keep-marker-kill ?K dired-keep-marker-rename t dired-keep-marker-symlink ?S dired-keep-marker-uucode ?U dired-kept-versions 2 dired-listing-switches "-al" dired-local-variables-file ".dired" dired-ls-F-marks-symlinks nil dired-ls-locale nil dired-ls-program "ls" dired-mail-reader 'vm dired-mode-line-modified "-%s%s%s-" dired-no-confirm nil dired-omit-extensions '(".class" ".lbin" ".bin" ".elc" ".obj" ".o" "CVS/" "CM/" "~" ".orig" ".rej" ".vrs" ".vr" ".tps" ".tp" ".pgs" ".pg" ".kys" ".ky" ".fns" ".fn" ".cps" ".cp" ".bbl" ".blg" ".glo" ".lot" ".lof" ".idx" ".dvi" ".aux" ".log" ".toc") dired-omit-files nil dired-omit-regexps '("\\`#" "\\`\\.") dired-refresh-automatically t dired-show-ls-switches nil dired-trivial-filenames "\\`\\.\\.?\\'\\|\\`#" dired-unshar-program nil dired-use-file-transformers t dired-verify-modtimes nil reporter-version "Your version of reporter is obsolete. Please upgrade." )