[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#48782: 28.0.50; fido-mode: shell variables distort find-file behavio
From: |
João Távora |
Subject: |
bug#48782: 28.0.50; fido-mode: shell variables distort find-file behaviour |
Date: |
Sat, 05 Jun 2021 21:51:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
João Távora <joaotavora@gmail.com> writes:
> tag 48782 important
> thanks
>
> simon254--- via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <bug-gnu-emacs@gnu.org> writes:
>
>> with emacs -Q
>>
>> 1)
>> 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.
I pushed a commit to master that should fix it. It's
45d711a356b4c5e75d0b6e4391313ca34f57b4bb, a very simple patch:
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= current "./")))
(icomplete-force-complete))
(t
Closing this bug, but I'll reopen if it ends up not doing what you
wanted.
João