all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Siyuan Chen <chansey97@gmail.com>
To: 71762@debbugs.gnu.org
Subject: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows.
Date: Tue, 25 Jun 2024 05:35:54 +0800	[thread overview]
Message-ID: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

Reproduces steps:

I have the following directory

```

\---myproject
    |  .project
    |
    +---subproject1
    |   \---.git
    |   |   Makefile
    |
    \---subproject2
        \---.git
        |   Makefile

```

1. Open Emacs -Q

2. M-x eval-expression `(setq debug-on-error t)`

3. M-x eval-expression `(setq project-vc-extra-root-markers '(".project"))`

4. Open the .project file in Emacs

5. M-x eval-expression `(project-current)`

    Result: `(vc nil "e:/work/myproject/")` OK

6. M-x eval-expression `(project-files (project-current))`

    Result: Debugger entered--Lisp error: (error "File listing failed:
FIND: Parameter format not co...")
  error("File listing failed: %s" "FIND: Parameter format not correct\n")

The root cause is that `project--files-in-directory` in project.el is using
`find-program` ("find") which does not exist on Windows.

Is it possible to use more portable code? For example,
`directory-files-recursively`? Otherwise NTEmacs users will have to install
CYGWIN or MSYS2.

P.s. I have used Projectile before, which allows you to place a .projectile
file in `myproject` and everything was OK on Windows. Also if I focus on a
git folder e.g. `subproject1` in the example above, the `project-files`
also works well.

Emacs 29.3 on Windows 10.

Thanks.

Best Regards,
Siyuan Chen

[-- Attachment #2: Type: text/html, Size: 2199 bytes --]

             reply	other threads:[~2024-06-24 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 21:35 Siyuan Chen [this message]
2024-06-25  0:04 ` bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows Siyuan Chen
2024-06-25 12:45   ` Eli Zaretskii
2024-06-30  6:09     ` Stefan Kangas
2024-06-25 13:29 ` Dmitry Gutov

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@mail.gmail.com' \
    --to=chansey97@gmail.com \
    --cc=71762@debbugs.gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.