From: simon254--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: joaotavora@gmail.com, 48782@debbugs.gnu.org
Cc: 48782-done@debbugs.gnu.org
Subject: bug#48782: 28.0.50; fido-mode: shell variables distort find-file behaviour
Date: Sun, 6 Jun 2021 09:01:27 +0100 (BST) [thread overview]
Message-ID: <70440271.17915.1622966488055@office.mailbox.org> (raw)
In-Reply-To: <87k0n8vxus.fsf@gmail.com>
Thank you very much for looking at this!
Now, if I type $HOM I get candidate $HOME, then I have to M-Tab to insert the candidate and type "/" to continue find-file in the directory, and then everything works as expected. This makes it now definitely usable for me!
It might still be a bit confusing that in case of an environment variable which value is a directory, Enter does open dired instead of transversing into 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 the current behaviour after your fix - or possible at all.
Simon
> On 05/06/2021 21:51 João Távora <joaotavora@gmail.com> wrote:
>
>
> 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
next prev parent reply other threads:[~2021-06-06 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 17:29 bug#48782: 28.0.50; fido-mode: shell variables distort find-file behaviour simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-04 17:54 ` Dmitry Gutov
2021-06-05 18:39 ` João Távora
2021-06-05 20:51 ` João Távora
2021-06-06 8:01 ` simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-06-06 16:16 ` João Távora
2021-06-07 18:23 ` simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70440271.17915.1622966488055@office.mailbox.org \
--to=bug-gnu-emacs@gnu.org \
--cc=48782-done@debbugs.gnu.org \
--cc=48782@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
--cc=simon254@mailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).