GNU bug report logs - #50732
28.0.50; project-find-dir: blank line in fido-vertical-mode

Previous Next

Package: emacs;

Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>

Date: Wed, 22 Sep 2021 08:24:01 UTC

Severity: normal

Found in version 28.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 50732 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Manuel Uberti <manuel.uberti <at> inventati.org>, 50732 <at> debbugs.gnu.org
Subject: Re: bug#50732: 28.0.50; project-find-dir: blank line in
 fido-vertical-mode
Date: Wed, 22 Sep 2021 15:01:54 +0300
Hi!

On 22.09.2021 11:23, Manuel Uberti wrote:
> This is a quick recipe:
> 
> - emacs -Q
> - M-x fido-vertical-mode RET
> - C-x p d
> - choose a project (I picked my .emacs.d directory)
> - there is a blank line between the prompt and the list of candidates
> - see attached screenshot for details

First of all, it's easy to fix:

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index ebd21d4b60..028de4bbdf 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -943,7 +943,8 @@ project-find-dir
          ;; `project-files-filtered', and see
          ;; https://stackoverflow.com/a/50685235/615245 for possible
          ;; implementation.
-         (all-dirs (mapcar #'file-name-directory all-files))
+         (all-dirs (delete (expand-file-name (project-root project))
+                           (mapcar #'file-name-directory all-files)))
          (dir (funcall project-read-file-name-function
                        "Dired"
                        ;; Some completion UIs show duplicates.


But should it be changed? It seems, while "" is a valid choice (which 
leads to visiting the root directory), without it in the completions set 
fido-vertical-mode doesn't easily allow you to select such option. 
Whereas the default completion UI does.

(Ivy has the same problem, except it never shows "", without or without 
the patch, so I'm fine with either).




This bug report was last modified 3 years and 236 days ago.

Previous Next


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