unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: 43925@debbugs.gnu.org
Subject: bug#43925: 28.0.50; fido-mode can't find-file further back than ~/
Date: Sat, 12 Jun 2021 00:07:10 +0100	[thread overview]
Message-ID: <87eed8uhk1.fsf@gmail.com> (raw)
In-Reply-To: <87r1q43hma.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 11 Oct 2020 17:30:21 +0200")

Rasmus <rasmus@gmx.us> writes:

> Hi,
>
> I am trying to replace ido with fido.
>
> One heuristic that I miss from ido is the ability to easily get to
> root via find(ing)-file.
>
> In particular, from emacs -q, I might do something like this
>
>    (let ((default-directory "~/"))       (fido-mode)
>    (call-interactively 'find-file) ;; click
>    <backspace><backspace> to get to root )
>
> Being an ido-user, I would expect to be able to go to /home/ by
> clicking backspace and then to root.  But I doesn’t work with fido.
>
> I don’t know if I have missed some obvious configuration-step here?  I
> looked through the customization groups of both icomplete and
> minibuffer.
>
> The attached patch expand the file-name if it is “~/”.
>
> I am not really familiar with this part of Emacs so I am not sure it’s
> the right way to go about it.  In particular, I am really not sure
> whether the internal functions (e.g. ‘icomplete--field-beg’) are used
> correctly.
>
>
> Aside: Another annoyance with fido is that $HOME isn’t being
> abbreviated
> to “~” when browsing from root.  E.g.
>
>    (let ((default-directory "/home/"))       (fido-mode)
>    (call-interactively 'find-file) ;; now select       your username )
>    I would like “/home/$USER” to be abbreviated to “~” (like ido) to
>    conserve space.
>
> Any ideas as to where such a change migh be injected to fido?  I
> didn’t see an obvious place.
>
> Thanks in advance,
> Rasmus

Thanks for the report and sorry for the long delay.  Indeed it would be
nice to have this in fido.  I remember this behaviour in ido, too.  I've
tried your patch and I don't have anything against it, so feel free to
push it if you want.  The second idea is also welcome, but I don't know
where to put it either.  Maybe in a fido-specific post-command hook that
adds the string "~/" to the input.  Then the current "rfn-shadow"
behaviour in icomplete.el would do the rest.

João






  reply	other threads:[~2021-06-11 23:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-11 15:30 bug#43925: 28.0.50; fido-mode can't find-file further back than ~/ Rasmus
2021-06-11 23:07 ` João Távora [this message]
2021-11-12  8:03   ` Lars Ingebrigtsen
2021-11-13 11:08     ` bug#43925: " Rasmus

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=87eed8uhk1.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=43925@debbugs.gnu.org \
    --cc=rasmus@gmx.us \
    /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).