From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: A Modest Proposal Date: Sun, 1 May 2016 08:46:35 -0800 (GMT-08:00) Message-ID: <11cdc19b-7c30-4403-9a89-264a05ae4ee6@default> References: <<874mai4qhz.fsf@gnus.org>> < <83a8kao624.fsf@gnu.org>> < <270c962c-11c4-4b0c-9d62-211cbc6f9f47@default>> <<834mahollh.fsf@gnu.org>> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1462121296 5349 80.91.229.3 (1 May 2016 16:48:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 May 2016 16:48:16 +0000 (UTC) Cc: jwiegley@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii , Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 01 18:48:03 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awuXK-0006un-El for ged-emacs-devel@m.gmane.org; Sun, 01 May 2016 18:48:02 +0200 Original-Received: from localhost ([::1]:33632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awuXF-0008Sk-US for ged-emacs-devel@m.gmane.org; Sun, 01 May 2016 12:47:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awuWw-0008Es-8w for emacs-devel@gnu.org; Sun, 01 May 2016 12:47:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awuWk-0004Dl-GJ for emacs-devel@gnu.org; Sun, 01 May 2016 12:47:32 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:51949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awuWY-00045c-Kz; Sun, 01 May 2016 12:47:14 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u41Gkbde016781 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 1 May 2016 16:46:38 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u41Gkbwm023366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 1 May 2016 16:46:37 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u41GkbYa028336; Sun, 1 May 2016 16:46:37 GMT In-Reply-To: <<834mahollh.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:203492 Archived-At: > > For example, `ls-lisp.el' advises `insert-directory' so that > > it uses `ls-lisp--insert-directory', and that lets you do > > things like insert "/foo/*", meaning insert all of the files > > (and subdirs) in directory foo, that is, its contents and not > > just a single line for the directory. Without using ls-lisp, > > trying to do that results in: > > > > insert-directory: Reading directory: no such file or > > directory, /foo/* >=20 > Not for me, it doesn't; not if I set the 3rd arg non-nil, as the doc > string says I should. That's true - if you set the 3rd arg, FULL-DIRECTORY-P non-nil. In fact, my use case was accepting arbitrary file and dir names, including glob patterns, at a `read-file-name' prompt, and adding the indicated files and dirs to an existing Dired buffer. So I wanted the code to automatically interpret the input "/foo/*" as the contents of dir foo and just "/foo" (or "/foo/") as a single listing line for the directory. No indication needed by the user for each input as to whether to use FULL-DIRECTORY-P or not. Without ls-lisp, `insert-directory' apparently does not do the job (at least as reported by one user - http://emacs.stackexchange.com/a/21799/105). (My function that does this is `diredp-dired-union-1'. Passing it, as arg EXTRA, a list of files and dirs, where each could be a glob pattern, adds those to a Dired buffer.)