GNU bug report logs - #31495
26.1; filename completion -vs- "*"

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Tom Tromey <tom@HIDDEN>; dated Fri, 18 May 2018 15:34:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 31495 <at> debbugs.gnu.org:


Received: (at 31495) by debbugs.gnu.org; 20 Jun 2018 12:48:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 20 08:48:52 2018
Received: from localhost ([127.0.0.1]:57162 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fVcXb-00056V-OJ
	for submit <at> debbugs.gnu.org; Wed, 20 Jun 2018 08:48:51 -0400
Received: from mail-pl0-f47.google.com ([209.85.160.47]:35069)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tino.calancha@HIDDEN>) id 1fVcXa-00056J-Kc
 for 31495 <at> debbugs.gnu.org; Wed, 20 Jun 2018 08:48:50 -0400
Received: by mail-pl0-f47.google.com with SMTP id k1-v6so1722535plt.2
 for <31495 <at> debbugs.gnu.org>; Wed, 20 Jun 2018 05:48:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:date:to:cc:subject:in-reply-to:message-id:references
 :user-agent:mime-version;
 bh=HRm8/J4Ff8IRM69ziOWN22RQVwJgu/AflGMuSnHOCK0=;
 b=NgUHueZUaVQP1Jd2DfJoVPjwi66/5MrR6B4ZkEDnArk0vzo3agices396H0QsFIiB6
 ZcS9Of8uzp8DJaCSzk5eI2pobGiqZIEtw1OyY5nVR4Xnc7KQ1fcbN/Py+f3SCKVOdrr6
 7go7AubFzVsCLkagfN7t9WGh7GXtBJxbVX40rw6WqgntnX0EgeRF6ZAUH2fSoH1wR4AE
 7zjjFp/tPGFi2K5sKrXVF/I5KJxtb37+Y13K24mybtoCdJkKlEAwRw1/QPFT2mctKK5i
 D99QH7K7gvaoceH0Pc5zFaqOsMSL7mV+AsoaaM6rG81m8fxUKIeRGnjB9EGRrsVVrSQ6
 uHpw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id
 :references:user-agent:mime-version;
 bh=HRm8/J4Ff8IRM69ziOWN22RQVwJgu/AflGMuSnHOCK0=;
 b=Q0Y2DAsm4D9uEhzsxlYRaqTRLBty/J2MwYMwG5zjgvRT9S+pNlMPw0sUR6y7E1fKko
 9dv+7GvuEha4rn349VyfLc0FXWiTbaLSn3xUTPvLRHEWdC6MT0yCGji1oovxKX6SOIsU
 69rKSCTV7nJ4yOsk1Km926dBc6+FNdIjOLCg/JeuMPonANKWmQ54wpxCV4XfhdvNej6e
 9YgTC7ODWJUmDDb0UatoHsc1Xzs3ZW1ULTumr4aZriyExRUbAmsVaqF2D2VPAfooxdZC
 ZB1ZwUyJigmVlcxGTJqwjfpIoiOXi4k1Pb4WV2DPzIi27Rhm+AfwSWQTXcdqOxc9xpTo
 kQRg==
X-Gm-Message-State: APt69E2xNYD1vH2kZdc4gh829VqsChq3pVx8Q2qIAiZ2JeG+dlkw+Ctn
 /J2bvBKeUJVxsBd5Ilt+4gc=
X-Google-Smtp-Source: ADUXVKKPn8e6cy5xGv4Usl3v1nGm66Rk/2z9AZNnvLgmHdTRh84LAdZ9jpOq7t2KIl4kHO9Y/1mvPQ==
X-Received: by 2002:a17:902:778e:: with SMTP id
 o14-v6mr23416153pll.214.1529498924751; 
 Wed, 20 Jun 2018 05:48:44 -0700 (PDT)
Received: from calancha-pc.dy.bbexcite.jp (228.225.128.101.dy.bbexcite.jp.
 [101.128.225.228])
 by smtp.gmail.com with ESMTPSA id j127-v6sm2847831pgc.10.2018.06.20.05.48.42
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 20 Jun 2018 05:48:44 -0700 (PDT)
From: Tino Calancha <tino.calancha@HIDDEN>
X-Google-Original-From: Tino Calancha <calancha@HIDDEN>
Date: Wed, 20 Jun 2018 21:48:40 +0900 (JST)
X-X-Sender: calancha@HIDDEN
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#31495: 26.1; filename completion -vs- "*"
In-Reply-To: <87d0wlskh8.fsf@HIDDEN>
Message-ID: <alpine.DEB.2.20.1806202140070.2032@HIDDEN>
References: <877eo1gern.fsf@HIDDEN> <87wovzzs8c.fsf@HIDDEN>
 <87d0wlskh8.fsf@HIDDEN>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=US-ASCII
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31495
Cc: Eli Zaretskii <eliz@HIDDEN>, Tom Tromey <tom@HIDDEN>,
 Michael Albinus <michael.albinus@HIDDEN>, 31495 <at> debbugs.gnu.org,
 Tino Calancha <tino.calancha@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



>> +(defconst dired-enable-globstar-in-shell
>> +  '(("ksh" . "set -G")
>> +    ("bash" . "shopt -s globstar"))
>> +  "Alist of (SHELL . COMMAND), where COMMAND enables globstar in SHELL.
>> +If `dired-maybe-use-globstar' is non-nil, then `dired-insert-directory'
>> +checks this alist to enable globstar in the shell subprocess.")
>
> Shouldn't this be a defvar or a defcustom?  Using defconst makes it seem
> like the code wouldn't handle it being changed.
To indicate what shells Emacs is supporting for 
this feature.  Of course it might be a defvar, and users might change that adding other 
shells; but then, those shells might not been heavily tested by Emacs 
developers, and other features can break.
I just wanted to be conservative.

I think that is a cheap and useful addition.  I like it.
I set '/bin/sh' to '/bin/zsh' mainly to have globstar in dired; often,
I find that I reset it to 'bash' and globstar stop working with Dired :-(




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31495; Package emacs. Full text available.
Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 31495 <at> debbugs.gnu.org:


Received: (at 31495) by debbugs.gnu.org; 20 Jun 2018 12:36:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 20 08:36:48 2018
Received: from localhost ([127.0.0.1]:57150 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fVcLu-0002ph-Gc
	for submit <at> debbugs.gnu.org; Wed, 20 Jun 2018 08:36:46 -0400
Received: from mail-io0-f171.google.com ([209.85.223.171]:38053)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1fVcLs-0002pP-Mb; Wed, 20 Jun 2018 08:36:44 -0400
Received: by mail-io0-f171.google.com with SMTP id l19-v6so3294714ioj.5;
 Wed, 20 Jun 2018 05:36:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=huzaM4gUThgr96bYs52MYjn1URXouJ3z2ze7LDBh1BQ=;
 b=suJjrdyIbt+LSdrSc8m839PlQOIUk/S8Kxp30X0zKkKGraD2dPhiWAhshfDCOFQhVG
 akx+W8r9G/SUnG4uQ8iDI1NaR2iXXmSS2IkQiC/QCt1n+zeKADqUtTfMYIthebmw3eUT
 w7h0oOZoqEva+nY4ePlo9lpPTRffUZ7IK7Utr1YYSMycW2mgBjAHpAmnTNE3a6e+3SdM
 9zLuVKnMdK2mgF8/W8TO2XuvMDSSq1K1QH5fJRiSlW2JjdIe9tTCd5JvefCe/Zx2+Mna
 3YrCi2oxZmRhSJqSZpKoombAvztOMOO+CaphxqiBjR8TN4o/T0/UR87kmxBEWlL1OEwA
 x/Wg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=huzaM4gUThgr96bYs52MYjn1URXouJ3z2ze7LDBh1BQ=;
 b=gRhSX/lCTtASX1lRphjfE/zxkWFiVfbsiCGQfK5pJb0wPeMOMWs1V1TppXxpE2kQzJ
 y8u9be71dhxEEdGm4LUBIpoElqLLPzxQl5+9yMrzNhNJqMPILY+SYWgAySjv9XBw00ny
 1XnAVuI7sZigIMIiUwJPqKdIGAzidNqlMHvpi5dEp0oLN1n44IWraYuGM1iUeEkAzLvG
 bcMpvHgKyqZsrtdHAclrp1RoD+zPVgqHGbrGumvjyrfbVXfU6hFZQyLhG5/wxmSkyr1A
 BmWUjpIxEkSA/NGsZVD0ApPFhSHVy/G5B6LPzVjwU+DGjRzqwcOX0OqdDajlyVUeqYYs
 ChPg==
X-Gm-Message-State: APt69E3+SAMJ1PrDlWqqU2wlO7hokmlr60fDJntTaVLRiWZgcDRb1GTL
 /GyHJyhNmpFb0TSaEwubmHpGHw==
X-Google-Smtp-Source: ADUXVKJeuu6edzQA2fMqk4ZgjaNwJUpMTyXokgWlUtsd4otCELHrGLlI/xbOCsfWxbtic8BXcjJWng==
X-Received: by 2002:a6b:a155:: with SMTP id
 k82-v6mr17132237ioe.46.1529498198953; 
 Wed, 20 Jun 2018 05:36:38 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 h81-v6sm7272965ith.2.2018.06.20.05.36.37
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 20 Jun 2018 05:36:37 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Tino Calancha <tino.calancha@HIDDEN>
Subject: Re: bug#31495: 26.1; filename completion -vs- "*"
References: <877eo1gern.fsf@HIDDEN> <87wovzzs8c.fsf@HIDDEN>
Date: Wed, 20 Jun 2018 08:36:35 -0400
In-Reply-To: <87wovzzs8c.fsf@HIDDEN> (Tino Calancha's message of "Sat, 19
 May 2018 22:32:03 +0900")
Message-ID: <87d0wlskh8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31495
Cc: Eli Zaretskii <eliz@HIDDEN>, Tom Tromey <tom@HIDDEN>,
 Michael Albinus <michael.albinus@HIDDEN>, 31495 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

severity 31495 minor
quit

Tino Calancha <tino.calancha@HIDDEN> writes:

> Tom Tromey <tom@HIDDEN> writes:
>
>> Now in Emacs, C-x C-f /tmp/a/*/c TAB
>>
>> On the first TAB, a "/" is appended, and then point moves to the "/"
>> before "c".
> Yeah, it's broken.
> In this example adding a '/' makes the completion works
> C-x C-f /tmp/a/*/c/ TAB

Hmm, that makes it seem like the different behaviour without the
trailing slash is on purpose (though I can't see what that would be).

> +(defconst dired-enable-globstar-in-shell
> +  '(("ksh" . "set -G")
> +    ("bash" . "shopt -s globstar"))
> +  "Alist of (SHELL . COMMAND), where COMMAND enables globstar in SHELL.
> +If `dired-maybe-use-globstar' is non-nil, then `dired-insert-directory'
> +checks this alist to enable globstar in the shell subprocess.")

Shouldn't this be a defvar or a defcustom?  Using defconst makes it seem
like the code wouldn't handle it being changed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31495; Package emacs. Full text available.

Message received at 31495 <at> debbugs.gnu.org:


Received: (at 31495) by debbugs.gnu.org; 20 May 2018 02:19:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 19 22:19:53 2018
Received: from localhost ([127.0.0.1]:41519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fKDwu-00020m-UP
	for submit <at> debbugs.gnu.org; Sat, 19 May 2018 22:19:53 -0400
Received: from mail-pl0-f54.google.com ([209.85.160.54]:36935)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tino.calancha@HIDDEN>) id 1fKDws-00020Y-Hc
 for 31495 <at> debbugs.gnu.org; Sat, 19 May 2018 22:19:50 -0400
Received: by mail-pl0-f54.google.com with SMTP id w19-v6so6748936plq.4
 for <31495 <at> debbugs.gnu.org>; Sat, 19 May 2018 19:19:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=VFb/mbU785+cYntWKL1GRPJh5c2CAYFePIOfwkiXRmA=;
 b=TH0d/Z0N2bSsSr9miNEcSXvWSx/3L9otqJeiihjyBPBN4ittQQAIngdQLZVc84W+MZ
 rOI4MOyYrTbYkNt+0b8nwX6uVZ7O5mQpM8W1LH7Jnd1prhJi7nWQkcCrNRe7nAdRn9rg
 tE2XxpS7+sBmBLM4gRDq6m03mnhB1/D42ewY7QVUVwDhhWKsvs8PtaqIDhS8NGdjl9MT
 Bk/9Th5JJZffplh8tL6C5rpCTDwIDyMShzjvLgucpRX3+uC9hVaU0Zyg0xl5eIzvEIMD
 jld3ahFoJYcC9wVbdiu14aOMtsqeX9FkLEKVVuxNdb4gQA6svt6+28g/xiSWzM902b8T
 nsmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=VFb/mbU785+cYntWKL1GRPJh5c2CAYFePIOfwkiXRmA=;
 b=SAB4H7QoX9ZN7JDpVL2s91dgbOQKbX7AmWrZ2g0UXiCEjnK50ZYuSSgyiIl+WtJV9d
 r/z9nMCXYZo9gDqzYM8c0KEedNwKPCT3E+/JSZBT6QZcFl8c03JhQH+iErpZUJGn0lfg
 EY8VtC+iGZILEcqeUpZBW0fh3x9zV3haf5XUO/FVjlHsaoRm6ldHzynQT98xnYO40hbD
 M+RPjXstco3QWP0L3TuHtqmpfgkxlw//xDuCDNiZZAqRc5fmWoqaByc5FLDg5q+oirPp
 Q74EBv9H8ibkZD20Srcy6iexuM3FrSprk+8Nj3PG9g3ukZOw8FtHNWdCRxIZn71KMNqW
 N0Sw==
X-Gm-Message-State: ALKqPweZ36Jjm6nHN+ZWDDtWTrXOs0dz+qdxsSdLwal5uPKljU6AGXTg
 mCwyPQS3muatM4TlbsMS+tBJRw==
X-Google-Smtp-Source: AB8JxZpLhVHcljuFosqHfRWzKSvLQl3OGZgMNEWVQLGIC+HSbeP55PMo+ZKDvugD3J5uBwUhHiUyQw==
X-Received: by 2002:a17:902:7844:: with SMTP id
 e4-v6mr15134262pln.296.1526782784606; 
 Sat, 19 May 2018 19:19:44 -0700 (PDT)
Received: from calancha-pc (228.225.128.101.dy.bbexcite.jp. [101.128.225.228])
 by smtp.gmail.com with ESMTPSA id
 c20-v6sm25463019pfk.63.2018.05.19.19.19.42
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 19 May 2018 19:19:43 -0700 (PDT)
From: Tino Calancha <tino.calancha@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
Subject: Re: bug#31495: 26.1; filename completion -vs- "*"
References: <877eo1gern.fsf@HIDDEN> <87wovzzs8c.fsf@HIDDEN>
 <87tvr3mrwh.fsf@HIDDEN>
Date: Sun, 20 May 2018 11:19:37 +0900
In-Reply-To: <87tvr3mrwh.fsf@HIDDEN> (Michael Albinus's message of "Sat, 19
 May 2018 20:17:34 +0200")
Message-ID: <871se7hxvq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31495
Cc: Eli Zaretskii <eliz@HIDDEN>, Tom Tromey <tom@HIDDEN>,
 31495 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Albinus <michael.albinus@HIDDEN> writes:

> Tino Calancha <tino.calancha@HIDDEN> writes:
>
> Hi Tino,
>
>> We could even let the user enable globstar in those shells supporting
>> it but having it disable by default (e.g. bash).
>
> What about ls-lisp?
It would be great to have there but it's out of the
scope of the patch yet.   This is not about add a new dired
feature.  Instead, the target is to turn on a
feature from your shell that is disabled by default.

If you use em-ls you have this feature.  Same as if you use
external program `ls' from zsh or fish shells.
The idea is to let users if they want to enable globstar
in their shell when its disabled by default.

>> +(defconst dired-enable-globstar-in-shell
>> +  '(("ksh" . "set -G")
>> +    ("bash" . "shopt -s globstar"))
>> +  "Alist of (SHELL . COMMAND), where COMMAND enables globstar in SHELL.
>> +If `dired-maybe-use-globstar' is non-nil, then `dired-insert-directory'
>> +checks this alist to enable globstar in the shell subprocess.")
>
> This works only if the shell name like bash or ksh is used. Often, just
> /bin/sh is used, and you don't know which real shell this file is linked to.
My patch use `file-truename' to get the actual shell
used by `dired-insert-directory'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31495; Package emacs. Full text available.

Message received at 31495 <at> debbugs.gnu.org:


Received: (at 31495) by debbugs.gnu.org; 19 May 2018 18:18:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 19 14:18:02 2018
Received: from localhost ([127.0.0.1]:41241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fK6Qc-0005x7-GQ
	for submit <at> debbugs.gnu.org; Sat, 19 May 2018 14:18:02 -0400
Received: from mout.gmx.net ([212.227.17.22]:39679)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1fK6Qa-0005wc-U7
 for 31495 <at> debbugs.gnu.org; Sat, 19 May 2018 14:18:01 -0400
Received: from detlef.gmx.de ([212.91.249.45]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LuP19-1gLf4o42Kd-011jMV; Sat, 19
 May 2018 20:17:38 +0200
From: Michael Albinus <michael.albinus@HIDDEN>
To: Tino Calancha <tino.calancha@HIDDEN>
Subject: Re: bug#31495: 26.1; filename completion -vs- "*"
References: <877eo1gern.fsf@HIDDEN> <87wovzzs8c.fsf@HIDDEN>
Date: Sat, 19 May 2018 20:17:34 +0200
In-Reply-To: <87wovzzs8c.fsf@HIDDEN> (Tino Calancha's message of "Sat, 19
 May 2018 22:32:03 +0900")
Message-ID: <87tvr3mrwh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:gRA3HMtSxlQT0S4Olk2pyQNBWuylC2s+g4oDU+Zr/5mv70Puu6D
 9jyp2OruFuw/GSmyAnJsQIMYbsmL+BG1uKo+vkHW1U9TSEpM7v9FcQ+v++LCwSDZ0rTpwy4
 Mbope5FfOyAZCZUrgoiQ2bVChRWe+QqnxhJnedraVwmCNH9pmdhlY+njda/5YS/oM/COulV
 +ih0sRxcAOVXPS++VvPbQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:0uAotoRH7H4=:zjARj+l0TKP7ISp1M7arMU
 eW4Yeov3t5YAqXBOxTwucMLiDbWeGINHgS89q7Yr0uZh0uK058M++vsuhpd7FukfWhgqkcOHU
 28C06J4C3EPSmfeLodOPW5nBb8VKnclVWDJDZNlXP0pO/VQFdX7Fq0vz7y45IbeDF4AvEJ3my
 sM+TZJMHxRMuto1HTTInuaV7wSC6sksYT9bhLtqNR/UxOOUSRqCowlK7oAq9IYm1O56FWyzgs
 jS1OOCGyKfMXBGd70gysFqSfHIMcN5XwiZrlgTZ0FI5ellyftIXlAij5IJb5JVMqda77Ybu81
 rSMF0SUIhzxp1VtZpW5v0PH5I43Q4lVjx/RP+4eAjYd54HE0VCpgQiD9rk9vRubHW/JB8EvJ5
 eE/08lzcLAG5W0GSEDNb7LdASUJrj0bwt/HUkRG+3rWDbJUk+n3K80mKmppUBf1rkI+lL2Uk3
 uisTajUDPDC+rvBSPaPgW5xc5nHYog3r1iBVUnq3ApfZrzrAHY1SGuJbTdsxacZGWxi6Ih1sT
 RsFgUpdPg2yZ0kIZ7vcUo+bJU3sq2YvbQcdNWk25xt46QYpS2+LrJ5TEm2DPmJFQWbJmbgKI7
 GZaKqBxTI+4TPbASWjRzpgPp2F4H+zjPVV178HPLE04A8ennUOzZibMMxtRFVil70tSjUplOL
 7WcghKVFxBHGpbq+0WkaY+5wIWLABf3L4+s3Y3KyaxCsqmgakgJJVOWmPt5GlfAhMDbjPY8ZL
 i1YdDQxC7024URNw359WqhnNdchZvCpY2nmemN1//teI295lutJqcBsCg/CCOBPSR/oFmhawR
 TlJA1Qg
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31495
Cc: Eli Zaretskii <eliz@HIDDEN>, Tom Tromey <tom@HIDDEN>,
 31495 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Tino Calancha <tino.calancha@HIDDEN> writes:

Hi Tino,

> We could even let the user enable globstar in those shells supporting
> it but having it disable by default (e.g. bash).

What about ls-lisp?

> +(defconst dired-enable-globstar-in-shell
> +  '(("ksh" . "set -G")
> +    ("bash" . "shopt -s globstar"))
> +  "Alist of (SHELL . COMMAND), where COMMAND enables globstar in SHELL.
> +If `dired-maybe-use-globstar' is non-nil, then `dired-insert-directory'
> +checks this alist to enable globstar in the shell subprocess.")

This works only if the shell name like bash or ksh is used. Often, just
/bin/sh is used, and you don't know which real shell this file is linked to.

Best regards, Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31495; Package emacs. Full text available.

Message received at 31495 <at> debbugs.gnu.org:


Received: (at 31495) by debbugs.gnu.org; 19 May 2018 13:32:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 19 09:32:20 2018
Received: from localhost ([127.0.0.1]:40569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fK1y8-0007p1-H0
	for submit <at> debbugs.gnu.org; Sat, 19 May 2018 09:32:20 -0400
Received: from mail-pf0-f196.google.com ([209.85.192.196]:36338)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tino.calancha@HIDDEN>) id 1fK1y6-0007om-5w
 for 31495 <at> debbugs.gnu.org; Sat, 19 May 2018 09:32:18 -0400
Received: by mail-pf0-f196.google.com with SMTP id w129-v6so5032783pfd.3
 for <31495 <at> debbugs.gnu.org>; Sat, 19 May 2018 06:32:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=DTpIxsmb4dI/oRHNTH8KWSjOYWnjRWhzJSjVbuy7raU=;
 b=sKyXvfPuT5+fTV76xk189XHg3HNSpFKNF5SpRxp/8yfiUHfwgk2IkxQ80e1SdHHSC8
 Npkd/AEMASHnJocqHAZCCGE/JqZ1FwnWqaSDI8aVAdUMiE7D47M6DmkG4M9t8l/F9h5D
 G4gxSFRZ4mrjgwppydR6j8xHuAVuzw5YZ3ftwkzeJmWsuIcayB/gji1AlyV+HhfWlDJK
 4kquxHU/K9nptwXW/JUW76lPDhxCfw25XDM64vdHWTN8wOknyaGaWtbhvDKSiCOjmRSi
 tlZ22EwapPp4uY62jPFks9IJvLgvXHTKyBLiv8GKwV8TNM1n5Ep3Xj1RyXA8H7AGwJrh
 gZFg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=DTpIxsmb4dI/oRHNTH8KWSjOYWnjRWhzJSjVbuy7raU=;
 b=mCwCKSfujflQRR6oVHZsS3rH7KuJQzVEujeFKBIgl0aeuuiisKWTumPxID+wvBSt9X
 Fqa9zZPco2oBiTSYozVSzXQ8+W747w+Lj75Lz6xe1vw/ifOGXGrJ4JtqJ0+sLZ+hklM0
 uwGfsnIViWvNjO9/coB7+RepUFAgNHKxlIZhPlp64Sau0BA3tiLkDutDcT9Ev6MiPGNc
 D7lBjRwjhpk/HIbIrFxQwTLZ/0qlnxrta02LVMMHtVk39MKVGoC0TE66Ks8/oOkGr/fs
 LVIYA5N4f2S0czs3yNBX6saS59gbPzc7p3zmbmhbbWvJpxOOwvWzgWyVZVMV1dmT230e
 UDkQ==
X-Gm-Message-State: ALKqPwcIYWh2FPa4igmqEfheTsAFaTOZuol1dT0NOYlE6ZDFCiz0KuH4
 3eMIuaNaQcngpSPCVSy9HCs=
X-Google-Smtp-Source: AB8JxZqjf4uKuAFpYA/CBgj67uQad4P9JqWVJPwnP3eJBXQbW7UJ+/kH0OPIJoOkDd/Mvd43Dl37WA==
X-Received: by 2002:a63:6185:: with SMTP id
 v127-v6mr10507442pgb.441.1526736732195; 
 Sat, 19 May 2018 06:32:12 -0700 (PDT)
Received: from calancha-pc (228.225.128.101.dy.bbexcite.jp. [101.128.225.228])
 by smtp.gmail.com with ESMTPSA id
 e18-v6sm14898979pfi.100.2018.05.19.06.32.09
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 19 May 2018 06:32:11 -0700 (PDT)
From: Tino Calancha <tino.calancha@HIDDEN>
To: Tom Tromey <tom@HIDDEN>
Subject: Re: bug#31495: 26.1; filename completion -vs- "*"
References: <877eo1gern.fsf@HIDDEN>
Date: Sat, 19 May 2018 22:32:03 +0900
In-Reply-To: <877eo1gern.fsf@HIDDEN> (Tom Tromey's message of "Fri, 18 May
 2018 09:33:16 -0600")
Message-ID: <87wovzzs8c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.6 (/)
X-Debbugs-Envelope-To: 31495
Cc: Eli Zaretskii <eliz@HIDDEN>, Michael Albinus <michael.albinus@HIDDEN>,
 31495 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.6 (-)

Tom Tromey <tom@HIDDEN> writes:

> I found a situation where using "*" globbing in filename completion acts
> strangely.
>
> Here is how to set up to see the bug:
>
> $ cd /tmp
> $ mkdir -p a/b/c a/d/c
> $ touch a/b/c/q
>
> Now in Emacs, C-x C-f /tmp/a/*/c TAB
>
> On the first TAB, a "/" is appended, and then point moves to the "/"
> before "c".
Yeah, it's broken.
In this example adding a '/' makes the completion works
C-x C-f /tmp/a/*/c/ TAB

> Now type TAB again.
> At this point, the "/tmp/a" is greyed out and the minibuffer shows:
>
> Find file: /tmp/a//c/
>
> ... so now only completions for "/c" are available.
>
> I think instead the "*" should be preserved.  Often I'm using this
> feature to try to find a specific file where I don't know the exact
> subdirectory it is in.
Since Emacs 26.1 dired supports wildcards in the directory part.
You can use
C-x d /tmp/a/*/c/q RET

If you shell in '/bin/sh' supports globstar (and have it enabled by
default) then you can do just:
C-x d /tmp/**/q RET

We could even let the user enable globstar in those shells supporting
it but having it disable by default (e.g. bash).
For instance, following patch:
--8<-----------------------------cut here---------------start------------->8---
commit 1c1116e6a6ed369db63ddf00865f04f687579e71
Author: Tino Calancha <tino.calancha@HIDDEN>
Date:   Sat May 19 21:57:42 2018 +0900

    Handle globstar in dired
    
    Allow user to enable globstar when the shell support
    it and disable it by default (e.g. bash).
    * lisp/dired.el (dired-maybe-use-globstar): New user option.
    (dired-enable-globstar-in-shell): New variable.
    (dired-insert-directory): if `dired-maybe-use-globstar' is
    non-nil and the shell supports globstar, then enable it.
    
    * doc/emacs/dired.texi: Document feature.
    ; * etc/NEWS: Add entry.

diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index fbb3030c2a..ad63c2f6a5 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -79,6 +79,24 @@ Dired Enter
 @samp{foo}.  The latter lists the files with extension @samp{.el}
 in all the subdirectories of @samp{foo}.
 
+When the system shell supports globstar and it's enabled, then you
+can use recursive globbing:
+
+@example
+C-x d  ~/foo/**/*.el  @key{RET}
+@end example
+
+This command lists all the files with extension @samp{.el} descending
+recursively in all the subdirectories of @samp{foo}.  Note that there
+are small differences in the implementation of globstar between shells.
+Check your shell manual to know the expected behavior.
+
+@vindex dired-maybe-use-globstar
+@vindex dired-enable-globstar-in-shell
+If the shell supports globstar and disables it by default, you
+can still enable this feature with @code{dired-maybe-use-globstar} if
+the shell is included in @code{dired-enable-globstar-in-shell}.
+
 The usual history and completion commands can be used in the minibuffer;
 in particular, @kbd{M-n} puts the name of the visited file (if any) in
 the minibuffer (@pxref{Minibuffer History}).
diff --git a/etc/NEWS b/etc/NEWS
index c7ffb17ad3..931289f0af 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -266,6 +266,12 @@ unescaping text.
 ** Dired
 
 +++
+*** The new user option 'dired-maybe-use-globstar' enables globstar
+in shells that support this feature.  The new variable
+'dired-enable-globstar-in-shell' lists which shells can have enabled
+globstar.
+
++++
 *** The new user option 'dired-create-destination-dirs' controls whether
 'dired-do-copy' and 'dired-rename-file' should create non-existent
 directories in the destination.
diff --git a/lisp/dired.el b/lisp/dired.el
index 1348df6934..0adffdbd3f 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -77,6 +77,26 @@ dired-subdir-switches
    :type '(choice (const :tag "Use dired-listing-switches" nil)
                   (string :tag "Switches")))
 
+(defcustom dired-maybe-use-globstar nil
+  "If non-nil, enable globstar if the shell support it.
+Some shells enable this feature by default (e.g. zsh or fish).
+
+See `dired-enable-globstar-in-shell' for a list of shells
+that support globstar and disable it by default.
+
+Note that the implementation of globstar have small differences
+between shells.  You must check your shell documentation to see
+what to expect."
+  :type 'boolean
+  :group 'dired)
+
+(defconst dired-enable-globstar-in-shell
+  '(("ksh" . "set -G")
+    ("bash" . "shopt -s globstar"))
+  "Alist of (SHELL . COMMAND), where COMMAND enables globstar in SHELL.
+If `dired-maybe-use-globstar' is non-nil, then `dired-insert-directory'
+checks this alist to enable globstar in the shell subprocess.")
+
 (defcustom dired-chown-program
   (purecopy (cond ((executable-find "chown") "chown")
                   ((file-executable-p "/usr/sbin/chown") "/usr/sbin/chown")
@@ -1297,6 +1317,13 @@ dired-insert-directory
                                  (executable-find explicit-shell-file-name))
                             (executable-find "sh")))
                     (switch (if remotep "-c" shell-command-switch)))
+               ;; Enable globstar
+               (when-let ((globstar dired-maybe-use-globstar)
+                          (enable-it
+                           (assoc-default
+                            (file-truename sh) dired-enable-globstar-in-shell
+                            (lambda (reg shell) (string-match reg shell)))))
+                 (setq script (format "%s; %s" enable-it script)))
                (unless
                    (zerop
                     (process-file sh nil (current-buffer) nil switch script))
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 27.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2018-05-17 built on calancha-pc
Repository revision: 593c367b0727affc739832ab4f4bdb9d7dd1ddd7




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31495; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 May 2018 15:33:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 18 11:33:47 2018
Received: from localhost ([127.0.0.1]:39948 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fJhO7-0005D8-8x
	for submit <at> debbugs.gnu.org; Fri, 18 May 2018 11:33:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46399)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tom@HIDDEN>) id 1fJhO6-0005Cw-5j
 for submit <at> debbugs.gnu.org; Fri, 18 May 2018 11:33:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <tom@HIDDEN>) id 1fJhNz-0006me-G0
 for submit <at> debbugs.gnu.org; Fri, 18 May 2018 11:33:41 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:53015)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <tom@HIDDEN>) id 1fJhNz-0006mX-Bx
 for submit <at> debbugs.gnu.org; Fri, 18 May 2018 11:33:39 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37335)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <tom@HIDDEN>) id 1fJhNu-0004a0-Di
 for bug-gnu-emacs@HIDDEN; Fri, 18 May 2018 11:33:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <tom@HIDDEN>) id 1fJhNq-0006fA-AD
 for bug-gnu-emacs@HIDDEN; Fri, 18 May 2018 11:33:34 -0400
Received: from gateway23.websitewelcome.com ([192.185.49.180]:33303)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <tom@HIDDEN>) id 1fJhNp-0006X0-Vq
 for bug-gnu-emacs@HIDDEN; Fri, 18 May 2018 11:33:30 -0400
Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4])
 by gateway23.websitewelcome.com (Postfix) with ESMTP id D3BC11312F
 for <bug-gnu-emacs@HIDDEN>; Fri, 18 May 2018 10:33:17 -0500 (CDT)
Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP
 id JhNdfrvVGBcCXJhNdfnaDS; Fri, 18 May 2018 10:33:17 -0500
X-Authority-Reason: nr=8
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; 
 s=default;
 h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:
 Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=Xn8Csn+l/lLkW22o/pieCWMqao6kM2MdtFRE+D0guIk=; b=Gfid4zghb6siWq3kligw/AtPFr
 2nHhC+hkVU1LFudhnJtNBkYgGb12ptINAxLPXQGwjc3K10RCmicU/hQ3hkk0G98ACLxw2JxFV6nav
 rH78R2Rw+MMSmGPShqFSYy3lj;
Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:51328 helo=pokyo)
 by box5379.bluehost.com with esmtpsa
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1)
 (envelope-from <tom@HIDDEN>)
 id 1fJhNd-002f6H-Jc; Fri, 18 May 2018 10:33:17 -0500
From: Tom Tromey <tom@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.1; filename completion -vs- "*"
X-Attribution: Tom
Date: Fri, 18 May 2018 09:33:16 -0600
Message-ID: <877eo1gern.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - box5379.bluehost.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - tromey.com
X-BWhitelist: no
X-Source-IP: 174.29.44.154
X-Source-L: No
X-Exim-ID: 1fJhNd-002f6H-Jc
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: 174-29-44-154.hlrn.qwest.net (pokyo) [174.29.44.154]:51328
X-Source-Auth: tom+tromey.com
X-Email-Count: 1
X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20=
X-Local-Domain: yes
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)


I found a situation where using "*" globbing in filename completion acts
strangely.

Here is how to set up to see the bug:

$ cd /tmp
$ mkdir -p a/b/c a/d/c
$ touch a/b/c/q

Now in Emacs, C-x C-f /tmp/a/*/c TAB

On the first TAB, a "/" is appended, and then point moves to the "/"
before "c".

Now type TAB again.
At this point, the "/tmp/a" is greyed out and the minibuffer shows:

Find file: /tmp/a//c/

... so now only completions for "/c" are available.

I think instead the "*" should be preserved.  Often I'm using this
feature to try to find a specific file where I don't know the exact
subdirectory it is in.





In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-05-11 built on pokyo
Repository revision: c9c0e40d673a5fc0d24d30ff67ccb7c7f2fb482a
Windowing system distributor 'Fedora Project', version 11.0.11906000
System Description:	Fedora release 27 (Twenty Seven)

Recent messages:
Mark set
Saving file /home/tromey/rust-debug.org...
Wrote /home/tromey/rust-debug.org
Saving file /home/tromey/rust-debug.org...
Wrote /home/tromey/rust-debug.org
Mark saved where search started [2 times]
Quit
Making completion list... [2 times]
Quit [3 times]
Invalid module name "flycheck_TestRustNames" [invalid-name] [2 times]

Configured using:
 'configure --prefix=/home/tromey/Emacs/install --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
  ggtags-mode: t
  ggtags-navigation-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-netsplit-mode: t
  erc-spelling-mode: t
  erc-truncate-mode: t
  diff-auto-refine-mode: t
  flyspell-mode: t
  shell-dirtrack-mode: t
  which-function-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-notify-mode: t
  erc-notifications-mode: t
  erc-match-mode: t
  erc-services-mode: t
  erc-networks-mode: t
  erc-hl-nicks-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  flycheck-mode: t
  savehist-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  transient-mark-mode: t

Load-path shadows:
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/26.1/lisp/play/bubbles

Features:
(shadow emacsbug python tramp-sh js sgml-mode gud mailalias bbdb-sc
supercite regi mail-hist iso-transl eieio-opt speedbar sb-image ezimage
dframe pulse compare-w org-rmail org-mhe org-irc org-info org-gnus nnir
org-docview doc-view image-mode org-bibtex bibtex org-bbdb org-w3m
org-element avl-tree generator org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs novice eww
webjump url-http url-auth url-gw log-view pcvs-util wgrep find-dired
grep tcl pcmpl-unix shr-color smerge-mode term/xterm xterm goto-addr
find-file dabbrev copyright idutils pcase add-log ggtags etags xref
project compile bug-reference whitespace cc-mode cc-fonts cc-guess
cc-menus cc-cmds shr svg dom jka-compr gnus-html url-queue help-fns
radix-tree browse-url url-cache mm-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf bbdb-gui
bbdb-hooks bbdb-rmail rmailsum sort smiley gnus-cite flow-fill
mm-archive gnus-bcklg erc-list erc-menu erc-join erc-ring erc-pcomplete
erc-netsplit erc-spelling erc-truncate qp gnus-async gnus-ml disp-table
misearch multi-isearch vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs gnus-topic nndraft nnmh nnfolder utf-7
bbdb-gnus bbdb-snarf mail-extr bbdb-com network-stream nsm starttls
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache gnus-registry registry eieio-base gnus-art mm-uu mml2015
mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo
smtpmail sendmail gnus-start gnus-cloud nnimap nnmail mail-source tls
gnutls utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny
rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils mm-util mail-prsvr elec-pair flyspell ispell diminish appt
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time which-func imenu autorevert filenotify desktop frameset
cus-start cus-load git-link url-util erc-track erc-notify
erc-desktop-notifications erc-match erc-services erc-networks
notifications dbus xml erc-hl-nicks easy-mmode color erc-button erc-fill
erc-stamp wid-edit erc-goodies erc erc-backend erc-compat format-spec
thingatpt pp dired-aux dired-x dired dired-loaddefs warnings advice
vc-dir ewoc vc vc-dispatcher flycheck cl-extra json map find-func
help-mode rx subr-x dash cc-styles cc-align cc-engine cc-vars cc-defs
bbdb cl timezone ange-ftp comint ansi-color ring server savehist
finder-inf bbdb-autoloads lisppaste-autoloads pydoc-info-autoloads
info-look info package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 2783408 275648)
 (symbols 48 120787 15)
 (miscs 40 37433 11144)
 (strings 32 465564 61374)
 (string-bytes 1 12103968)
 (vectors 16 162401)
 (vector-slots 8 3066382 196672)
 (floats 8 608 703)
 (intervals 56 263860 7322)
 (buffers 992 263))




Acknowledgement sent to Tom Tromey <tom@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#31495; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 20 Jun 2018 13:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.