bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63829: 29.0.90; project-find-file's future history breaks with commo


From: Dmitry Gutov
Subject: bug#63829: 29.0.90; project-find-file's future history breaks with common-parent-directory
Date: Mon, 21 Aug 2023 04:15:56 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 20/08/2023 20:16, Juri Linkov wrote:
+  (if-let (filename-proj (and project-current-directory-override
+                            (project-current nil default-directory)))
+      ;; file-name-concat requires Emacs 28+
+      (concat (file-name-as-directory (project-root project))
+              (file-relative-name filename (project-root filename-proj)))
+    filename))

I wonder why you prepend (file-name-as-directory (project-root project))?
This is unnecessary because the project root is already displayed
in the prompt, so only a relative file name is sufficient in the minibuffer:

   Find file in /project/root/: relative/file.name

The absolute name is required down in the callee because that distinguishes it from a file name fragment picked up by things-at-point.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]