From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: simon254--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#48782: 28.0.50; fido-mode: shell variables distort find-file behaviour Date: Sun, 6 Jun 2021 09:01:27 +0100 (BST) Message-ID: <70440271.17915.1622966488055@office.mailbox.org> References: <855373175.142584.1622568557185@office.mailbox.org> <874kecxiiz.fsf@gmail.com> <87k0n8vxus.fsf@gmail.com> Reply-To: simon254@mailbox.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2093"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48782-done@debbugs.gnu.org To: joaotavora@gmail.com, 48782@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 06 10:43:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpoNG-0000Qa-Kg for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 10:43:14 +0200 Original-Received: from localhost ([::1]:36684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpoNF-0000Bg-LH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 04:43:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpoN6-000076-Hg for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 04:43:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpoN6-0006xd-4H for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 04:43:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpoN6-0002Tm-2X for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 04:43:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: simon254@mailbox.org Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jun 2021 08:43:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48782 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed X-Debbugs-Original-To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , "simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors" Original-Received: via spool by submit@debbugs.gnu.org id=B.16229689469435 (code B ref -1); Sun, 06 Jun 2021 08:43:04 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Jun 2021 08:42:26 +0000 Original-Received: from localhost ([127.0.0.1]:50593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpoMT-0002S1-HP for submit@debbugs.gnu.org; Sun, 06 Jun 2021 04:42:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpnj4-0001Vd-CY for submit@debbugs.gnu.org; Sun, 06 Jun 2021 04:01:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpnj4-0002jH-0f for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 04:01:42 -0400 Original-Received: from mout-p-103.mailbox.org ([80.241.56.161]:56970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lpniz-0006Vb-6A for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 04:01:41 -0400 Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4FyTV33ppZzQk4K; Sun, 6 Jun 2021 10:01:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-transfer-encoding:content-type:content-type:mime-version :subject:subject:references:in-reply-to:message-id:from:from :date:date:received; s=mail20150812; t=1622966488; bh=/xmCKOwKSn PzbOwjnlW+zJQirsCEIyGq7u3EL8Zu44c=; b=aNBCmNanA1CxtXTFv6+MQmmf8/ bgEZ7x9T7xZV1lgTY+ijXEK1L3a1eA+KDf3Wn8o70dFURomZl+6zQC5skXxslwjY GYLFwITwKMPMDUZ5GsFlVnOWARNVPNDhqHlWbioGnLvInWWg2lzBaR5mcLL7nE8o kZidSrqtYpYRRhxAkulndQ8uI5HCIhBqaGmbUC4boGcdx41luBDqgA+zQKiSylKF TVRirZQ5gZX+bCC/pN/TwcEbYdQpejhHvepQILuokTil1jm8oHSYKBMNqox7rJvK Z9sttMkIUvHh51Pd9ch1cj4wu4kNPS32+X/8BJuqT2xIVOOvDmw5QVV9GyLw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1622966489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YehXmFq83eZnpyy5xSaAyr4hfb2udz/+2p11buoncMw=; b=MMh+DG8gDzziqJK26hAFNy3ANlLYzb6r7rham0blEn9fhyqvT8ldT+oAdMfPrvSgnsRwHI ps5n0sE0f6N/JIbF2HywEC7P/TxJ0L2UWnx4pJIy8U57JmFSM28wNImIQZWB6361517U26 kObxj78mfwDOclkBO7jXC3flZqr2j34qEZYIWNFXu5RbGJz5yONBm3Lo/Q2Gv5JxC3koFg asAp5QW99LSWeATIMfRhCwNqvzqWx8RlvMTV7ty2Z1F0+1aJoCoS59U1eUBSvR3RYKxoNB aafQ9mvWdFADM8tVORYk3sYZOn7pmLTeuvfEviD8XPDgh2jC2VYboz3z8OUr/g== X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id 5WorSO2BwIUK; Sun, 6 Jun 2021 10:01:28 +0200 (CEST) In-Reply-To: <87k0n8vxus.fsf@gmail.com> X-Priority: 3 Importance: Normal X-Rspamd-Score: -5.24 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8C61817FC X-Rspamd-UID: 7144a2 Received-SPF: pass client-ip=80.241.56.161; envelope-from=simon254@mailbox.org; helo=mout-p-103.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 06 Jun 2021 04:42:21 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208093 Archived-At: Thank you very much for looking at this!=20 Now, if I type $HOM I get candidate $HOME, then I have to M-Tab to insert t= he candidate and type "/" to continue find-file in the directory, and then = everything works as expected. This makes it now definitely usable for me!= =20 It might still be a bit confusing that in case of an environment variable w= hich value is a directory, Enter does open dired instead of transversing in= to the directory with find-file (typing $HOM followed by Enter opens dired = in home). But I don't know if changing this would be better or worse than t= he current behaviour after your fix - or possible at all. Simon > On 05/06/2021 21:51 Jo=C3=A3o T=C3=A1vora wrote: >=20 > =20 > Jo=C3=A3o T=C3=A1vora writes: >=20 > > tag 48782 important > > thanks > > > > simon254--- via "Bug reports for GNU Emacs, the Swiss army knife of tex= t > > editors" writes: > > > >> with emacs -Q > >> > >> 1)=20 > >> M-x -> fido-mode > >> C-x C-f -> type "$HOME" -> enter opens dired buffer in $HOME directory > >> instead of continuing find-file $HOME to select a file to open > > > > Thanks, I reproduced this and will try to fix it. Doesn't seem very > > hard, but we'll see. >=20 > I pushed a commit to master that should fix it. It's > 45d711a356b4c5e75d0b6e4391313ca34f57b4bb, a very simple patch: >=20 > diff --git a/lisp/icomplete.el b/lisp/icomplete.el > index 03a191cb0b..08b4ef2030 100644 > --- a/lisp/icomplete.el > +++ b/lisp/icomplete.el > @@ -331,7 +331,8 @@ icomplete-fido-ret > (file-name-directory (icomplete--field-string)))) > (current (car completion-all-sorted-completions)) > (probe (and dir current > - (expand-file-name (directory-file-name current) dir= )))) > + (expand-file-name (directory-file-name current) > + (substitute-env-vars dir))))) > (cond ((and probe (file-directory-p probe) (not (string=3D current "= ./"))) > (icomplete-force-complete)) > (t >=20 >=20 > Closing this bug, but I'll reopen if it ends up not doing what you > wanted. >=20 > Jo=C3=A3o