From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Paul Wallington Newsgroups: gmane.emacs.devel Subject: ls-lisp, dired and --dired switch problem Date: Tue, 13 May 2003 14:26:34 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1052832838 26775 80.91.224.249 (13 May 2003 13:33:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 13 May 2003 13:33:58 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 13 15:33:57 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19FZtv-0006tD-00 for ; Tue, 13 May 2003 15:33:03 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Fa0q-0004Dl-00 for ; Tue, 13 May 2003 15:40:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FZrv-00030h-08 for emacs-devel@quimby.gnus.org; Tue, 13 May 2003 09:30:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19FZqt-0002dx-00 for emacs-devel@gnu.org; Tue, 13 May 2003 09:29:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19FZqT-0002TF-00 for emacs-devel@gnu.org; Tue, 13 May 2003 09:29:30 -0400 Original-Received: from host217-44-221-152.range217-44.btcentralplus.com ([217.44.221.152] helo=indigo.shootybangbang.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FZpD-000263-00 for emacs-devel@gnu.org; Tue, 13 May 2003 09:28:11 -0400 Original-Received: from jpw by indigo.shootybangbang.com with local (Exim 3.36 #1 (Debian)) id 19FZne-0000Rf-00 for ; Tue, 13 May 2003 14:26:34 +0100 Original-To: emacs-devel@gnu.org X-Attribution: jpw X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13827 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13827 eval the following: (setq ls-lisp-use-insert-directory-program nil) (require 'ls-lisp) and run `dired'. The listing isn't good (eg inverted order) because `dired-insert-directory' heeds `dired-use-ls-dired' and concats "--dired " on to the switches, and ls-lisp's `insert-directory' isn't expecting it (and wants one letter args). Maybe ls-lisp should frob `dired-use-ls-dired'. Or it could remove the --dired switch in its `insert-directory' like below. WDYT? *** /build/emacs/lisp/ls-lisp.el.~1.49.~ Thu May 1 15:46:13 2003 --- /build/emacs/lisp/ls-lisp.el Tue May 13 14:21:44 2003 *************** *** 216,221 **** --- 216,224 ---- (if handler (funcall handler 'insert-directory file switches wildcard full-directory-p) + ;; remove --dired switch + (if (string-match "--dired " switches) + (setq switches (replace-match "" nil nil switches))) ;; Convert SWITCHES to a list of characters. (setq switches (delete ?- (append switches nil))) (if wildcard