X-Loop: help-debbugs@HIDDEN Subject: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. Resent-From: Siyuan Chen <chansey97@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 24 Jun 2024 21:37:01 +0000 Resent-Message-ID: <handler.71762.B.171926497526785 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 71762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 71762 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.171926497526785 (code B ref -1); Mon, 24 Jun 2024 21:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jun 2024 21:36:15 +0000 Received: from localhost ([127.0.0.1]:35739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sLrME-0006xx-NS for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 17:36:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:52416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <chansey97@HIDDEN>) id 1sLrMC-0006xp-EC for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 17:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <chansey97@HIDDEN>) id 1sLrM9-0005JN-Nq for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2024 17:36:09 -0400 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <chansey97@HIDDEN>) id 1sLrM7-0008HE-Tu for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2024 17:36:09 -0400 Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-dff26b612a9so4170258276.1 for <bug-gnu-emacs@HIDDEN>; Mon, 24 Jun 2024 14:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719264965; x=1719869765; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=q+Cv7fGa0/yDjQQieH7C53qTB3yh9x7ALLUQK2mPum8=; b=LR9340XAVXIrBRRFvgnsq35eaV5XwsEdeyM4oFusjKJ7MCoM9jWzIeU93D8bbz1RxW KZrsJnrreL3i1Zk9vOa+PsUkx6vd1zMDMoul1ljn7pwFa3hlhJ9FCHcbWp8FLppMDj1k 3M/wqq6glpYINwKyGgeAGXIVDVXQ6n66ygBfFo1R/Sk4WShDi06wThuOA98SV9yd5c2d 765jC0YKaG3w+4M3b8qKpVEKwf1mTUcK8cFMo01neSPAwulb2g5p7XY2SYfAR0jMC+jY t7kspYgHLVZykgeVAjiK/mHofRMtT7stPR1KfOMkZ4RrUl3j6J6g1hGdTnTCrR7aTn4C Nq/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719264965; x=1719869765; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=q+Cv7fGa0/yDjQQieH7C53qTB3yh9x7ALLUQK2mPum8=; b=NPPL6D1LgTfZ35+Lxl1L83EBoBGFmtEVruNe30p+wFWwVQMurzzaLTxXlxh94GzEQ9 f52z4ayXAa9RoRX5UjwyCJOVXATbIt8WjXXk1EAu8lZIarRQR0lGZP+QojmPyjlTnJje 4e9yDTQLTIO7qrRZQAws8ne5o8wihXmmaE38gdzYC4CUlH50qWALX/2LltnzfxrcDhY8 jW13wPKtOZeU3AZEhKAhXeXbMdkErZ+ViB5l3sQtwoWv52OuGVKQlLz0TNdzv9vBuurH BRaGVhk+zBJlPF/Ay6wIJzY58tpxRedVe4hoj1On8bf4vE5f/aVW4zGrGHvxDJzIowEt l42g== X-Gm-Message-State: AOJu0Ywm6OI0EJnKIz59/OfWfwCzDKPd0KXa4BgrL0v5ltORwiNmKVRo mjPPx3CGHlgKLXG2gPx4ozAZSe1ULpe6L2pv1OIlRQ4PcTLS2PH63QKOy031yKZc3NM07ozaE15 qqIaYKp78wkY4j/M7750zu7GdScbnCLolBHIlgw== X-Google-Smtp-Source: AGHT+IHouyXHNZCPaJVHJY6i1sr4ftxafehqyFERrdN9rWnYTnsoTJHc477YyiBuYO6Fjr8LJ51E8OjzhhJqkoenA6s= X-Received: by 2002:a5b:852:0:b0:e02:4af1:de12 with SMTP id 3f1490d57ef6-e0303eb354cmr5206272276.11.1719264965061; Mon, 24 Jun 2024 14:36:05 -0700 (PDT) MIME-Version: 1.0 From: Siyuan Chen <chansey97@HIDDEN> Date: Tue, 25 Jun 2024 05:35:54 +0800 Message-ID: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000847591061ba99199" Received-SPF: pass client-ip=2607:f8b0:4864:20::b2d; envelope-from=chansey97@HIDDEN; helo=mail-yb1-xb2d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.1 (--) --000000000000847591061ba99199 Content-Type: text/plain; charset="UTF-8" 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 --000000000000847591061ba99199 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Reproduces steps:<br></div><div><br></div><div>I have= the following directory</div><div><br></div><div>```</div><div> <pre>\---myproject | .project | =20 +---subproject1 | \---.git | | Makefile | =20 \---subproject2 \---.git | Makefile</pre> </div><div>```</div><div><br></div><div>1. Open Emacs -Q</div><div><br></di= v><div>2. M-x eval-expression `(setq debug-on-error t)`</div><div><br></div= ><div> 3. M-x eval-expression `(setq project-vc-extra-root-markers '(".pr= oject"))` <br></div><div><br></div><div>4. Open the .project file in E= macs<br></div><div><br></div><div>5.=20 M-x eval-expression `(project-current)`=C2=A0</div><div><br></div><div>=C2= =A0=C2=A0=C2=A0 Result: `(vc nil "e:/work/myproject/")` OK</div><= div><br></div><div>6. M-x eval-expression `(project-files (project-current)= )`</div><div><br></div><div>=C2=A0=C2=A0=C2=A0 Result: Debugger entered--Li= sp error: (error "File listing failed: FIND: Parameter format not co..= .")<br>=C2=A0 error("File listing failed: %s" "FIND: Pa= rameter format not correct\n")</div><div><br></div><div>The root cause= is that `project--files-in-directory` in project.el is using `find-program= ` ("find") which<span class=3D"gmail-HwtZe" lang=3D"en"><span cla= ss=3D"gmail-jCAhz gmail-JxVs2d gmail-ChMk0b"><span class=3D"gmail-ryNqvb"> = does not exist on Windows</span></span></span>.=C2=A0</div><div><br></div><= div>Is it possible to use more portable code? For example, `directory-files= -recursively`? Otherwise NTEmacs users will <span class=3D"gmail-HwtZe" lan= g=3D"en"><span class=3D"gmail-jCAhz gmail-JxVs2d gmail-ChMk0b"><span class= =3D"gmail-ryNqvb">have to install CYGWIN or MSYS2.</span></span></span> </div><div><br></div><div>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 examp= le above, the=20 `project-files` also works well.<br></div><div><br></div><div>Emacs 29.3 on= Windows 10.</div><div><br></div><div>Thanks.</div><div><br></div><div>Best= Regards,</div><div>Siyuan Chen<br> </div><div><br></div></div> --000000000000847591061ba99199--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Siyuan Chen <chansey97@HIDDEN> Subject: bug#71762: Acknowledgement (`(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows.) Message-ID: <handler.71762.B.171926497526785.ack <at> debbugs.gnu.org> References: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> X-Gnu-PR-Message: ack 71762 X-Gnu-PR-Package: emacs Reply-To: 71762 <at> debbugs.gnu.org Date: Mon, 24 Jun 2024 21:37:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 71762 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 71762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71762 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. Resent-From: Siyuan Chen <chansey97@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 25 Jun 2024 00:07:02 +0000 Resent-Message-ID: <handler.71762.B71762.17192739718894 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 71762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 71762 <at> debbugs.gnu.org Received: via spool by 71762-submit <at> debbugs.gnu.org id=B71762.17192739718894 (code B ref 71762); Tue, 25 Jun 2024 00:07:02 +0000 Received: (at 71762) by debbugs.gnu.org; 25 Jun 2024 00:06:11 +0000 Received: from localhost ([127.0.0.1]:35828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sLthL-0002JO-7I for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 20:06:11 -0400 Received: from mail-yb1-f176.google.com ([209.85.219.176]:49273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <chansey97@HIDDEN>) id 1sLthH-0002Iz-MQ for 71762 <at> debbugs.gnu.org; Mon, 24 Jun 2024 20:06:10 -0400 Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-dfe81d54db9so4549187276.2 for <71762 <at> debbugs.gnu.org>; Mon, 24 Jun 2024 17:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273900; x=1719878700; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Cma+f39MvxLNG89+b2ABWYwH3Rh6deU+9qazN0nx8L0=; b=OFKacC1zemlsGUhAxSIf+Jnm+Y7rofwxyXxEWuQwLsk6QwUlpFpIA7AlYJ2Vsmkt8+ DrbkOv7XAYbaNHRp52pcqnLl1d87vG1tWXAoTBvgMwtht+ColoX8GYRIljcWCb7xg+Tc wVCDDFRG8Zy6u1x0wpEE0o98TjW2NHKrj0Xawirz371aXVdKAW7635tSwNtoC+9SgDlC T0vpUtC4V8vzwuLAoMNXEXSmnZNbuznGcYszeDOyKlSgORd4oZiBFfMz50uOJMrKtI+4 R5Rz6km6xlrY2V8udXup++wTo2jFgEw6YX78D5lL64MWxXfcluuXN7T0rPNbafvu3Nbu E/bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273900; x=1719878700; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Cma+f39MvxLNG89+b2ABWYwH3Rh6deU+9qazN0nx8L0=; b=LlVLCP2aHprwGHVEtr9rQagv3aaza+F9r0VTnXn71K22F9fK0Fh3sa6kR4eZbXOdhs 1oio+GdLB8X4uKpHKf7CrPmD9BAtW14Q4l5wf4//h9XNL70yN5mTKv3yV7gxORrPdlNc DQK6OrVFlglr17hGwpev0WhP6hMB5g54eUjQxvYPbSiaRZqkTinmdu1Ujb8f0iKXXub6 Ny4rRzi9ETDaFs2mip44SR8XSlL3Tc7OjusttY7nEXkA00AfQkWyvKiAlLmJGNOm3Fr2 NMzgiLll3kqxEBn0JdnewypZCewwY+poCMmHCDATozPKSg2HVnvA/nRrKG/ho/ZinzbI CYDw== X-Gm-Message-State: AOJu0YzG/B54IZ+SPUY5WveDpVaaD86dZaeLbQjEQjlNmLvrwOfcLfgV 1kaCxTGwIoH3H6y9z6QGpS/MbA0gDqbr/caFurhCOPnLF6AbCjBkmqIkwNlfDneDGk6gGVvbAsd lEJu06Bla5yn1gXIW9w30EAvvBAnRyMPcaqQyXw== X-Google-Smtp-Source: AGHT+IETDNz+q7FFz2EjRLjENXo76wi88nuVFgWaLEjtSNvHqiG5M/IytlWCwLC2tkQYqN1+phUGaFV+oP8NVY74+BU= X-Received: by 2002:a5b:78a:0:b0:dff:320f:edca with SMTP id 3f1490d57ef6-e0300f8828cmr5438818276.18.1719273899963; Mon, 24 Jun 2024 17:04:59 -0700 (PDT) MIME-Version: 1.0 References: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> In-Reply-To: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> From: Siyuan Chen <chansey97@HIDDEN> Date: Tue, 25 Jun 2024 08:04:48 +0800 Message-ID: <CAHWTsYni0Mg_B52wvnzvuThDm_shZozwA4W1ZiuWaMrQDb6jCg@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000014418b061baba615" X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.8 (/) --00000000000014418b061baba615 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Anyway, setting `(setq find-program (purecopy "C:/msys64/usr/bin/find.exe"))` makes the above example work at the moment. Perhaps all NTEmacs users should set the 3 options: grep-program, find-program, xargs-program. My only concern now is the potential issue with backslashes and encoding. Hence, I have to keep Projectile as the fallback solution because it has a native implementation. Best Regards, Siyuan Chen On Tue, Jun 25, 2024 at 5:37=E2=80=AFAM Siyuan Chen <chansey97@HIDDEN> w= rote: > 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 > > --00000000000014418b061baba615 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Anyway, setting `(setq find-program (purecopy "C:/msy= s64/usr/bin/find.exe"))` makes the above example work at the moment.= =C2=A0<div><br></div><div>Perhaps all NTEmacs users should set the 3 option= s: grep-program, find-program, xargs-program. My only concern now is the po= tential issue with backslashes and encoding. Hence, I have to keep Projecti= le as the fallback solution because it has a native implementation.<br></di= v><div><br></div><div dir=3D"ltr"><div> <div>Best Regards,</div><div>Siyuan Chen</div> </div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" = class=3D"gmail_attr">On Tue, Jun 25, 2024 at 5:37=E2=80=AFAM Siyuan Chen &l= t;<a href=3D"mailto:chansey97@HIDDEN">chansey97@HIDDEN</a>> wrote:= <br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8= ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr= "><div>Reproduces steps:<br></div><div><br></div><div>I have the following = directory</div><div><br></div><div>```</div><div> <pre>\---myproject | .project | =20 +---subproject1 | \---.git | | Makefile | =20 \---subproject2 \---.git | Makefile</pre> </div><div>```</div><div><br></div><div>1. Open Emacs -Q</div><div><br></di= v><div>2. M-x eval-expression `(setq debug-on-error t)`</div><div><br></div= ><div> 3. M-x eval-expression `(setq project-vc-extra-root-markers '(".pr= oject"))` <br></div><div><br></div><div>4. Open the .project file in E= macs<br></div><div><br></div><div>5.=20 M-x eval-expression `(project-current)`=C2=A0</div><div><br></div><div>=C2= =A0=C2=A0=C2=A0 Result: `(vc nil "e:/work/myproject/")` OK</div><= div><br></div><div>6. M-x eval-expression `(project-files (project-current)= )`</div><div><br></div><div>=C2=A0=C2=A0=C2=A0 Result: Debugger entered--Li= sp error: (error "File listing failed: FIND: Parameter format not co..= .")<br>=C2=A0 error("File listing failed: %s" "FIND: Pa= rameter format not correct\n")</div><div><br></div><div>The root cause= is that `project--files-in-directory` in project.el is using `find-program= ` ("find") which<span lang=3D"en"><span><span> does not exist on = Windows</span></span></span>.=C2=A0</div><div><br></div><div>Is it possible= to use more portable code? For example, `directory-files-recursively`? Oth= erwise NTEmacs users will <span lang=3D"en"><span><span>have to install CYG= WIN or MSYS2.</span></span></span> </div><div><br></div><div>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 examp= le above, the=20 `project-files` also works well.<br></div><div><br></div><div>Emacs 29.3 on= Windows 10.</div><div><br></div><div>Thanks.</div><div><br></div><div>Best= Regards,</div><div>Siyuan Chen<br> </div><div><br></div></div> </blockquote></div></div> --00000000000014418b061baba615--
X-Loop: help-debbugs@HIDDEN Subject: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 25 Jun 2024 12:46:02 +0000 Resent-Message-ID: <handler.71762.B71762.171931954920568 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 71762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Siyuan Chen <chansey97@HIDDEN> Cc: 71762 <at> debbugs.gnu.org Received: via spool by 71762-submit <at> debbugs.gnu.org id=B71762.171931954920568 (code B ref 71762); Tue, 25 Jun 2024 12:46:02 +0000 Received: (at 71762) by debbugs.gnu.org; 25 Jun 2024 12:45:49 +0000 Received: from localhost ([127.0.0.1]:36437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sM5YT-0005Le-AS for submit <at> debbugs.gnu.org; Tue, 25 Jun 2024 08:45:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1sM5YQ-0005LM-RJ; Tue, 25 Jun 2024 08:45:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1sM5YJ-0003Cu-OV; Tue, 25 Jun 2024 08:45:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+NO9onsQK4MrL7RWpDRl8hlJY7Zz1il8Zdztyfmfjr4=; b=UnoxLy5jsyZe FmmUy53E6r3H43e10R2Ry2gum2vXyWUMuFn7Mf99TwtL/ZYxNdXO16QqKp8mqN9AloXbrI/3mHS2E jBUD90I7yGBp81fackmRd3FUjM0IcRXSIRqqfApp6RotKIoYyf5HK0japPZrp1Qz/SecZ+C94Qfen 4rSoJYRwuWFcP/HAbd0GxOBvakrdcZbNMIaJ4SF0YtexWPSmteAcyFfOdHedGXAd/gK7J2FergVMp SqjWCfyTVo7f4KAvRaxsleSXxqbXe6KzSdL8rS33P2dz3D5M7qEwRzeWwQkRtNYTNnAbln6apAebZ 3yFwSCpAZWrmXCxdHLX83A==; Date: Tue, 25 Jun 2024 15:45:33 +0300 Message-Id: <86wmmd9onm.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <CAHWTsYni0Mg_B52wvnzvuThDm_shZozwA4W1ZiuWaMrQDb6jCg@HIDDEN> (message from Siyuan Chen on Tue, 25 Jun 2024 08:04:48 +0800) References: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> <CAHWTsYni0Mg_B52wvnzvuThDm_shZozwA4W1ZiuWaMrQDb6jCg@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 71762 notabug thanks > From: Siyuan Chen <chansey97@HIDDEN> > Date: Tue, 25 Jun 2024 08:04:48 +0800 > > Anyway, setting `(setq find-program (purecopy "C:/msys64/usr/bin/find.exe"))` makes the above example work > at the moment. That's one possible solution. Another is to rearrange your system's PATH so that the directory C:\msys64\usr\bin comes _before_ the C:\WINDOWS\system32, where you have the stock Windows find.exe (which is a program for a completely different purpose and with completely different command-line syntax). Byw, the "msys64" part of the directory where you have find.exe seems to hint that it is an MSYS port, not a native Windows/MinGW port. If that is indeed so, my recommendation is to install a native find.exe and use that instead, as MSYS ports could have subtle incompatibilities with a native Windows Emacs. > Perhaps all NTEmacs users should set the 3 options: grep-program, find-program, xargs-program. These variables already exist, so I'm not sure what you are suggesting here. In general, the only "problematic" program is find.exe, because Windows comes only with that. The other two programs must be installed, and so there's no danger of Emacs invoking the wrong one. I see no Emacs bug here, just an issue of configuring your system and/or Emacs correctly. > My only > concern now is the potential issue with backslashes and encoding. There should be no such issues, if you find one, please report that as a bug.
Received: (at control) by debbugs.gnu.org; 25 Jun 2024 12:45:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 25 08:45:50 2024 Received: from localhost ([127.0.0.1]:36439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sM5YT-0005Lh-LW for submit <at> debbugs.gnu.org; Tue, 25 Jun 2024 08:45:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1sM5YQ-0005LM-RJ; Tue, 25 Jun 2024 08:45:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1sM5YJ-0003Cu-OV; Tue, 25 Jun 2024 08:45:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+NO9onsQK4MrL7RWpDRl8hlJY7Zz1il8Zdztyfmfjr4=; b=UnoxLy5jsyZe FmmUy53E6r3H43e10R2Ry2gum2vXyWUMuFn7Mf99TwtL/ZYxNdXO16QqKp8mqN9AloXbrI/3mHS2E jBUD90I7yGBp81fackmRd3FUjM0IcRXSIRqqfApp6RotKIoYyf5HK0japPZrp1Qz/SecZ+C94Qfen 4rSoJYRwuWFcP/HAbd0GxOBvakrdcZbNMIaJ4SF0YtexWPSmteAcyFfOdHedGXAd/gK7J2FergVMp SqjWCfyTVo7f4KAvRaxsleSXxqbXe6KzSdL8rS33P2dz3D5M7qEwRzeWwQkRtNYTNnAbln6apAebZ 3yFwSCpAZWrmXCxdHLX83A==; Date: Tue, 25 Jun 2024 15:45:33 +0300 Message-Id: <86wmmd9onm.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Siyuan Chen <chansey97@HIDDEN> In-Reply-To: <CAHWTsYni0Mg_B52wvnzvuThDm_shZozwA4W1ZiuWaMrQDb6jCg@HIDDEN> (message from Siyuan Chen on Tue, 25 Jun 2024 08:04:48 +0800) Subject: Re: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. References: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> <CAHWTsYni0Mg_B52wvnzvuThDm_shZozwA4W1ZiuWaMrQDb6jCg@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control Cc: 71762 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 71762 notabug thanks > From: Siyuan Chen <chansey97@HIDDEN> > Date: Tue, 25 Jun 2024 08:04:48 +0800 > > Anyway, setting `(setq find-program (purecopy "C:/msys64/usr/bin/find.exe"))` makes the above example work > at the moment. That's one possible solution. Another is to rearrange your system's PATH so that the directory C:\msys64\usr\bin comes _before_ the C:\WINDOWS\system32, where you have the stock Windows find.exe (which is a program for a completely different purpose and with completely different command-line syntax). Byw, the "msys64" part of the directory where you have find.exe seems to hint that it is an MSYS port, not a native Windows/MinGW port. If that is indeed so, my recommendation is to install a native find.exe and use that instead, as MSYS ports could have subtle incompatibilities with a native Windows Emacs. > Perhaps all NTEmacs users should set the 3 options: grep-program, find-program, xargs-program. These variables already exist, so I'm not sure what you are suggesting here. In general, the only "problematic" program is find.exe, because Windows comes only with that. The other two programs must be installed, and so there's no danger of Emacs invoking the wrong one. I see no Emacs bug here, just an issue of configuring your system and/or Emacs correctly. > My only > concern now is the potential issue with backslashes and encoding. There should be no such issues, if you find one, please report that as a bug.
X-Loop: help-debbugs@HIDDEN Subject: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. Resent-From: Dmitry Gutov <dmitry@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 25 Jun 2024 13:31:01 +0000 Resent-Message-ID: <handler.71762.B71762.171932220315262 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 71762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Siyuan Chen <chansey97@HIDDEN>, 71762 <at> debbugs.gnu.org Received: via spool by 71762-submit <at> debbugs.gnu.org id=B71762.171932220315262 (code B ref 71762); Tue, 25 Jun 2024 13:31:01 +0000 Received: (at 71762) by debbugs.gnu.org; 25 Jun 2024 13:30:03 +0000 Received: from localhost ([127.0.0.1]:36493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sM6FH-0003y5-0T for submit <at> debbugs.gnu.org; Tue, 25 Jun 2024 09:30:03 -0400 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]:36773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1sM6FE-0003xA-7x for 71762 <at> debbugs.gnu.org; Tue, 25 Jun 2024 09:30:01 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 172671140161; Tue, 25 Jun 2024 09:29:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 25 Jun 2024 09:29:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1719322193; x=1719408593; bh=u8GhlsowGA7j/RurQSnwKzHKAVryyDCXYE9pUB8uvRY=; b= Rc4BGcDVbrBDulD/pdXiUEIvPz79oDqE1zyQnnsgXWi0StAeFWR4o69e/jVI9oWD 6dE956KHWPTVzscriL5dVjeS4NFU/0Qt7G5S/KZ+pFdYupMBDVkGfjsIUPcfNl4u srYqjtvZuGH1bwnstUP99b1nuJBJqgfkGZ0G8u2mfg89Eax7wCS8wd7Qm0pGXW7Q 2jHKK0brwpq0yXW6FKEMzBetezwPKTU6CAhTsLk9WpeeKdaXQWVVAalgQW43zrWT TE/pdutXXQBdnzqhWFX/QqCaLiHKg9Yz0PodkdtwYT/MqFgFU6gXBr/f/YY37gyN VbAs9npLSmfJ2CMG8pquNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719322193; x= 1719408593; bh=u8GhlsowGA7j/RurQSnwKzHKAVryyDCXYE9pUB8uvRY=; b=X ZHUSHcoOSkK2eBCDRbaJfz0ngut8wNhSR6hGki9oLOqqHW2Kj3VfpDAsGZ7zb0e1 b6ROD5kvkNibvGaR72XXrvlMECAszT/nCRNClOU+sLagS3NCj2rh7Kf9rsIbg9y6 0pr7G0jlvXJwEUCoa9OdFaEof2RmMNA1+lYmSqz7GByHEiMFX8VVbBVYrVcYmbUL BgAOULm1Zr9hqWI/8tJoBIgXV7T9dNB6/2oUFcRk1t4AbrGBPkiO1P9G+K9xMgOb QDwaNliqN7LFEHCAROow+ktj2dcJGOHz7kvUnKzSnyKU3YXKMwj1EZW5HrVPHMMA mXJ2u0MDk9Inh4noaoJ4g== X-ME-Sender: <xms:UMZ6ZiSH97f9OwuydIpLwftgofR4UBU_AjZLgVP6mXjaCpQMe8gYng> <xme:UMZ6Znz-9MwGiAD7bNXoHFOKcaanOZbS6lACPIqXxYcKHNMKOfpnLSyz7Fo_iju_d VAM-5NTbSZlJPOhSvQ> X-ME-Received: <xmr:UMZ6Zv0apHpESaI2eTLCY9-isSCtqZFK3wecyhzyb1_Ooz4wHu_3ktYLe3xWqObs0ZUp> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtddtgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejre dttddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhht ohhvrdguvghvqeenucggtffrrghtthgvrhhnpedthfeuvddtveelgeeuleevvdejveehff evveehvdeuffdtfefhvdeugefgtefgtdenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: <xmx:UMZ6ZuA3PjS68WWx9myezLG5LHnlaoqDTx2R28qHsFZd3D6v38qNCA> <xmx:UMZ6ZrjOdCOr8ii6MIU2y2-drPtL5cnpwAUVb2iHECVuFCzCuvfmSA> <xmx:UMZ6Zqrw-6xPtyuqdKLJgLGKsDs58_FyIiWMWkjQVnoAZbzvUqaliA> <xmx:UMZ6ZujF07xLsT8dDTPMxAUvIJsl-UXEwAg7rvkMIY1eYK7p4E4pIg> <xmx:UcZ6Zuv61QNvHmID1aiQLXDEmu-ljEuZOCQDsfgPGgGtz2f2p2GSstVd> Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Jun 2024 09:29:51 -0400 (EDT) Message-ID: <cf7e64db-5631-4145-af81-760131851075@HIDDEN> Date: Tue, 25 Jun 2024 16:29:50 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 25/06/2024 00:35, Siyuan Chen wrote: > > Is it possible to use more portable code? For example, > `directory-files-recursively`? Otherwise NTEmacs users will have to > install CYGWIN or MSYS2. There are also GNU tools available for download separately, e.g. see the ezwinports project. I'm wary of using directory-files-recursively - because the performance can be much different. While right now you see the error and are thus encouraged to fix it by installing an extra program or two, in the other case the user would just see poor performance (given a large enough project) and perhaps some reduced features wrt filtering. And might not realize that it's not how the feature is supposed to work. Also note that 'find.exe' is only required when you have a project that's outside of any Git repositories. > 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. Projectile has some different tradeoffs, e.g. you might have to reset the file cache manually in the above setup. It also has several indexing methods to choose from, each with pros and cons.
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Stefan Kangas <stefankangas@HIDDEN> Subject: bug#71762: closed (`(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows.) CC: tracker <at> debbugs.gnu.org Message-ID: <handler.71762.D71762.17197278219819.ackdone <at> debbugs.gnu.org> References: <CADwFkmnaXS-xhEeY+PQMf7uV93sdUT9=vi=3So3316-3HqPoMA@HIDDEN> <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> X-Gnu-PR-Message: closed 71762 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Date: Sun, 30 Jun 2024 06:11:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1719727863-9924-0" This is a multi-part message in MIME format... ------------=_1719727863-9924-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Sat, 29 Jun 2024 23:09:12 -0700 with message-id <CADwFkmnaXS-xhEeY+PQMf7uV93sdUT9=3Dvi=3D3So3316-3HqPoMA@ma= il.gmail.com> and subject line Re: bug#71762: `(project-files (project-current))` with `p= roject-vc-extra-root-markers` doesn't work on Windows. has caused the debbugs.gnu.org bug report #71762, regarding `(project-files (project-current))` with `project-vc-extra-root-m= arkers` doesn't work on Windows. to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@HIDDEN) --=20 71762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71762 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1719727863-9924-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 Jun 2024 21:36:15 +0000 Received: from localhost ([127.0.0.1]:35739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sLrME-0006xx-NS for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 17:36:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:52416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <chansey97@HIDDEN>) id 1sLrMC-0006xp-EC for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 17:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <chansey97@HIDDEN>) id 1sLrM9-0005JN-Nq for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2024 17:36:09 -0400 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <chansey97@HIDDEN>) id 1sLrM7-0008HE-Tu for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2024 17:36:09 -0400 Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-dff26b612a9so4170258276.1 for <bug-gnu-emacs@HIDDEN>; Mon, 24 Jun 2024 14:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719264965; x=1719869765; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=q+Cv7fGa0/yDjQQieH7C53qTB3yh9x7ALLUQK2mPum8=; b=LR9340XAVXIrBRRFvgnsq35eaV5XwsEdeyM4oFusjKJ7MCoM9jWzIeU93D8bbz1RxW KZrsJnrreL3i1Zk9vOa+PsUkx6vd1zMDMoul1ljn7pwFa3hlhJ9FCHcbWp8FLppMDj1k 3M/wqq6glpYINwKyGgeAGXIVDVXQ6n66ygBfFo1R/Sk4WShDi06wThuOA98SV9yd5c2d 765jC0YKaG3w+4M3b8qKpVEKwf1mTUcK8cFMo01neSPAwulb2g5p7XY2SYfAR0jMC+jY t7kspYgHLVZykgeVAjiK/mHofRMtT7stPR1KfOMkZ4RrUl3j6J6g1hGdTnTCrR7aTn4C Nq/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719264965; x=1719869765; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=q+Cv7fGa0/yDjQQieH7C53qTB3yh9x7ALLUQK2mPum8=; b=NPPL6D1LgTfZ35+Lxl1L83EBoBGFmtEVruNe30p+wFWwVQMurzzaLTxXlxh94GzEQ9 f52z4ayXAa9RoRX5UjwyCJOVXATbIt8WjXXk1EAu8lZIarRQR0lGZP+QojmPyjlTnJje 4e9yDTQLTIO7qrRZQAws8ne5o8wihXmmaE38gdzYC4CUlH50qWALX/2LltnzfxrcDhY8 jW13wPKtOZeU3AZEhKAhXeXbMdkErZ+ViB5l3sQtwoWv52OuGVKQlLz0TNdzv9vBuurH BRaGVhk+zBJlPF/Ay6wIJzY58tpxRedVe4hoj1On8bf4vE5f/aVW4zGrGHvxDJzIowEt l42g== X-Gm-Message-State: AOJu0Ywm6OI0EJnKIz59/OfWfwCzDKPd0KXa4BgrL0v5ltORwiNmKVRo mjPPx3CGHlgKLXG2gPx4ozAZSe1ULpe6L2pv1OIlRQ4PcTLS2PH63QKOy031yKZc3NM07ozaE15 qqIaYKp78wkY4j/M7750zu7GdScbnCLolBHIlgw== X-Google-Smtp-Source: AGHT+IHouyXHNZCPaJVHJY6i1sr4ftxafehqyFERrdN9rWnYTnsoTJHc477YyiBuYO6Fjr8LJ51E8OjzhhJqkoenA6s= X-Received: by 2002:a5b:852:0:b0:e02:4af1:de12 with SMTP id 3f1490d57ef6-e0303eb354cmr5206272276.11.1719264965061; Mon, 24 Jun 2024 14:36:05 -0700 (PDT) MIME-Version: 1.0 From: Siyuan Chen <chansey97@HIDDEN> Date: Tue, 25 Jun 2024 05:35:54 +0800 Message-ID: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> Subject: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. To: bug-gnu-emacs@HIDDEN Content-Type: multipart/alternative; boundary="000000000000847591061ba99199" Received-SPF: pass client-ip=2607:f8b0:4864:20::b2d; envelope-from=chansey97@HIDDEN; helo=mail-yb1-xb2d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.1 (--) --000000000000847591061ba99199 Content-Type: text/plain; charset="UTF-8" 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 --000000000000847591061ba99199 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Reproduces steps:<br></div><div><br></div><div>I have= the following directory</div><div><br></div><div>```</div><div> <pre>\---myproject | .project | =20 +---subproject1 | \---.git | | Makefile | =20 \---subproject2 \---.git | Makefile</pre> </div><div>```</div><div><br></div><div>1. Open Emacs -Q</div><div><br></di= v><div>2. M-x eval-expression `(setq debug-on-error t)`</div><div><br></div= ><div> 3. M-x eval-expression `(setq project-vc-extra-root-markers '(".pr= oject"))` <br></div><div><br></div><div>4. Open the .project file in E= macs<br></div><div><br></div><div>5.=20 M-x eval-expression `(project-current)`=C2=A0</div><div><br></div><div>=C2= =A0=C2=A0=C2=A0 Result: `(vc nil "e:/work/myproject/")` OK</div><= div><br></div><div>6. M-x eval-expression `(project-files (project-current)= )`</div><div><br></div><div>=C2=A0=C2=A0=C2=A0 Result: Debugger entered--Li= sp error: (error "File listing failed: FIND: Parameter format not co..= .")<br>=C2=A0 error("File listing failed: %s" "FIND: Pa= rameter format not correct\n")</div><div><br></div><div>The root cause= is that `project--files-in-directory` in project.el is using `find-program= ` ("find") which<span class=3D"gmail-HwtZe" lang=3D"en"><span cla= ss=3D"gmail-jCAhz gmail-JxVs2d gmail-ChMk0b"><span class=3D"gmail-ryNqvb"> = does not exist on Windows</span></span></span>.=C2=A0</div><div><br></div><= div>Is it possible to use more portable code? For example, `directory-files= -recursively`? Otherwise NTEmacs users will <span class=3D"gmail-HwtZe" lan= g=3D"en"><span class=3D"gmail-jCAhz gmail-JxVs2d gmail-ChMk0b"><span class= =3D"gmail-ryNqvb">have to install CYGWIN or MSYS2.</span></span></span> </div><div><br></div><div>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 examp= le above, the=20 `project-files` also works well.<br></div><div><br></div><div>Emacs 29.3 on= Windows 10.</div><div><br></div><div>Thanks.</div><div><br></div><div>Best= Regards,</div><div>Siyuan Chen<br> </div><div><br></div></div> --000000000000847591061ba99199-- ------------=_1719727863-9924-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 71762-done) by debbugs.gnu.org; 30 Jun 2024 06:10:21 +0000 Received: from localhost ([127.0.0.1]:54668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sNnlV-0002YJ-2x for submit <at> debbugs.gnu.org; Sun, 30 Jun 2024 02:10:21 -0400 Received: from mail-ed1-f52.google.com ([209.85.208.52]:57471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1sNnlS-0002Y3-CU for 71762-done <at> debbugs.gnu.org; Sun, 30 Jun 2024 02:10:18 -0400 Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-57d07464aa9so2136713a12.2 for <71762-done <at> debbugs.gnu.org>; Sat, 29 Jun 2024 23:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719727753; x=1720332553; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=uGeoSnPwlTczQGW3TtKPO2gvOQ95suFz8S8y6NO36Kk=; b=Q+4H/WtD3oIe4iFr5z7cxg5wbVZTg/463J/rJJXSz8YZx72YIAgUwyJbJLa1DXU1GJ qJ51Rqh5mHeQvM8eEIteOdq3RhIbz9+c4Ig8PtRTRKQ+vEdpwMyhogwJgB1RY3jeLbvQ 2sBBwzra+1z/IFLYgScspplPDT76gB3MASYQXiWwu/W7+4lzEVTy17f+rgEcbwJDGRbB FF5E1CKWZy8UCquaGMfu+h2hcztE8dKy7dYnoI42QJ/M6SzgSbZNtvixN3ZygSfWeRex pT5eRxILL0OPle3XsY0Citw7ECDq9vWKjdNSdyoHR+f3TuVFxghWvK5g+nPb+GPbV5mr e7mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719727753; x=1720332553; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uGeoSnPwlTczQGW3TtKPO2gvOQ95suFz8S8y6NO36Kk=; b=t9oHfhdWQxGR4EnBXHZTLWs6gxTEITp61xG/fIONy7jS8B7fJkK0OuVV71R7ejcDFe xz/snSdSiDfio1elt02GhUzU4X9ufULvFbbHPOxypN07j7Sfd0u0tqZFNMGKrm454xYq x/UnuiM75/RR9DSfu2AUctjaWN6ekyp2HCP95x2iABq2511qjoPPh30a7CE0oZVZ0KfQ zO/0ADUx0pGp+M/yFjKnvzTH1H3Zn46gjcqKI73BctgPfBwoK3V58W3IEbi/Mn/OsIT7 F1VEX0HTThsrhTZaLK7k2ljjKV9tK78RBzpItcQLSLPuOEAeQDbsbUCyJSRXB2yQsyZO magw== X-Forwarded-Encrypted: i=1; AJvYcCXOwZAlzOmFmgiX4gpT2z9lnTRxOCdWf23ghh9psER5H00Z1GcT96g+behXaHWDRIXrHGnJQdAgfPsSN2NKvVKMy01SQ4Pkm5wafg== X-Gm-Message-State: AOJu0YzxlYC0blSInkD2ZKU/gYCnHI7QLEoaAOGozFGyT8A4qvU8nS/K AKe3qA0V0ZOFXHgj47ewRFEyZogFUIjld99bZTWrT75Kq6dUnbYLu924/IPQupsAYThUG0TVcpC 7KnEnlDjvKPnn9NWVjBbOySQacMs= X-Google-Smtp-Source: AGHT+IG343JUzDr6qFCjBEp5QEnBNTFbelz9CzXVsMwY4DNol9pXpEQMDkChSsm3/Mgfm3nuiKRyGciOjSlC6iuPYl8= X-Received: by 2002:a05:6402:2554:b0:578:67db:7529 with SMTP id 4fb4d7f45d1cf-5879eaff6e9mr1759134a12.4.1719727752819; Sat, 29 Jun 2024 23:09:12 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 29 Jun 2024 23:09:12 -0700 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <86wmmd9onm.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 25 Jun 2024 15:45:33 +0300") References: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> <CAHWTsYni0Mg_B52wvnzvuThDm_shZozwA4W1ZiuWaMrQDb6jCg@HIDDEN> <86wmmd9onm.fsf@HIDDEN> MIME-Version: 1.0 Date: Sat, 29 Jun 2024 23:09:12 -0700 Message-ID: <CADwFkmnaXS-xhEeY+PQMf7uV93sdUT9=vi=3So3316-3HqPoMA@HIDDEN> Subject: Re: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. To: Eli Zaretskii <eliz@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71762-done Cc: 71762-done <at> debbugs.gnu.org, Siyuan Chen <chansey97@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii <eliz@HIDDEN> writes: > tags 71762 notabug > thanks > >> From: Siyuan Chen <chansey97@HIDDEN> >> Date: Tue, 25 Jun 2024 08:04:48 +0800 >> >> Anyway, setting `(setq find-program (purecopy "C:/msys64/usr/bin/find.exe"))` makes the above example work >> at the moment. > > That's one possible solution. Another is to rearrange your system's > PATH so that the directory C:\msys64\usr\bin comes _before_ the > C:\WINDOWS\system32, where you have the stock Windows find.exe (which > is a program for a completely different purpose and with completely > different command-line syntax). > > Byw, the "msys64" part of the directory where you have find.exe seems > to hint that it is an MSYS port, not a native Windows/MinGW port. If > that is indeed so, my recommendation is to install a native find.exe > and use that instead, as MSYS ports could have subtle > incompatibilities with a native Windows Emacs. > >> Perhaps all NTEmacs users should set the 3 options: grep-program, find-program, xargs-program. > > These variables already exist, so I'm not sure what you are suggesting > here. > > In general, the only "problematic" program is find.exe, because > Windows comes only with that. The other two programs must be > installed, and so there's no danger of Emacs invoking the wrong one. > > I see no Emacs bug here, just an issue of configuring your system > and/or Emacs correctly. I'm therefore closing this bug report. ------------=_1719727863-9924-0--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Siyuan Chen <chansey97@HIDDEN> Subject: bug#71762: closed (Re: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows.) Message-ID: <handler.71762.D71762.17197278219819.notifdone <at> debbugs.gnu.org> References: <CADwFkmnaXS-xhEeY+PQMf7uV93sdUT9=vi=3So3316-3HqPoMA@HIDDEN> <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> X-Gnu-PR-Message: they-closed 71762 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 71762 <at> debbugs.gnu.org Date: Sun, 30 Jun 2024 06:11:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1719727863-9924-1" This is a multi-part message in MIME format... ------------=_1719727863-9924-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #71762: `(project-files (project-current))` with `project-vc-extra-root-mar= kers` doesn't work on Windows. which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 71762 <at> debbugs.gnu.org. --=20 71762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71762 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1719727863-9924-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 71762-done) by debbugs.gnu.org; 30 Jun 2024 06:10:21 +0000 Received: from localhost ([127.0.0.1]:54668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sNnlV-0002YJ-2x for submit <at> debbugs.gnu.org; Sun, 30 Jun 2024 02:10:21 -0400 Received: from mail-ed1-f52.google.com ([209.85.208.52]:57471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1sNnlS-0002Y3-CU for 71762-done <at> debbugs.gnu.org; Sun, 30 Jun 2024 02:10:18 -0400 Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-57d07464aa9so2136713a12.2 for <71762-done <at> debbugs.gnu.org>; Sat, 29 Jun 2024 23:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719727753; x=1720332553; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=uGeoSnPwlTczQGW3TtKPO2gvOQ95suFz8S8y6NO36Kk=; b=Q+4H/WtD3oIe4iFr5z7cxg5wbVZTg/463J/rJJXSz8YZx72YIAgUwyJbJLa1DXU1GJ qJ51Rqh5mHeQvM8eEIteOdq3RhIbz9+c4Ig8PtRTRKQ+vEdpwMyhogwJgB1RY3jeLbvQ 2sBBwzra+1z/IFLYgScspplPDT76gB3MASYQXiWwu/W7+4lzEVTy17f+rgEcbwJDGRbB FF5E1CKWZy8UCquaGMfu+h2hcztE8dKy7dYnoI42QJ/M6SzgSbZNtvixN3ZygSfWeRex pT5eRxILL0OPle3XsY0Citw7ECDq9vWKjdNSdyoHR+f3TuVFxghWvK5g+nPb+GPbV5mr e7mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719727753; x=1720332553; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uGeoSnPwlTczQGW3TtKPO2gvOQ95suFz8S8y6NO36Kk=; b=t9oHfhdWQxGR4EnBXHZTLWs6gxTEITp61xG/fIONy7jS8B7fJkK0OuVV71R7ejcDFe xz/snSdSiDfio1elt02GhUzU4X9ufULvFbbHPOxypN07j7Sfd0u0tqZFNMGKrm454xYq x/UnuiM75/RR9DSfu2AUctjaWN6ekyp2HCP95x2iABq2511qjoPPh30a7CE0oZVZ0KfQ zO/0ADUx0pGp+M/yFjKnvzTH1H3Zn46gjcqKI73BctgPfBwoK3V58W3IEbi/Mn/OsIT7 F1VEX0HTThsrhTZaLK7k2ljjKV9tK78RBzpItcQLSLPuOEAeQDbsbUCyJSRXB2yQsyZO magw== X-Forwarded-Encrypted: i=1; AJvYcCXOwZAlzOmFmgiX4gpT2z9lnTRxOCdWf23ghh9psER5H00Z1GcT96g+behXaHWDRIXrHGnJQdAgfPsSN2NKvVKMy01SQ4Pkm5wafg== X-Gm-Message-State: AOJu0YzxlYC0blSInkD2ZKU/gYCnHI7QLEoaAOGozFGyT8A4qvU8nS/K AKe3qA0V0ZOFXHgj47ewRFEyZogFUIjld99bZTWrT75Kq6dUnbYLu924/IPQupsAYThUG0TVcpC 7KnEnlDjvKPnn9NWVjBbOySQacMs= X-Google-Smtp-Source: AGHT+IG343JUzDr6qFCjBEp5QEnBNTFbelz9CzXVsMwY4DNol9pXpEQMDkChSsm3/Mgfm3nuiKRyGciOjSlC6iuPYl8= X-Received: by 2002:a05:6402:2554:b0:578:67db:7529 with SMTP id 4fb4d7f45d1cf-5879eaff6e9mr1759134a12.4.1719727752819; Sat, 29 Jun 2024 23:09:12 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 29 Jun 2024 23:09:12 -0700 From: Stefan Kangas <stefankangas@HIDDEN> In-Reply-To: <86wmmd9onm.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 25 Jun 2024 15:45:33 +0300") References: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> <CAHWTsYni0Mg_B52wvnzvuThDm_shZozwA4W1ZiuWaMrQDb6jCg@HIDDEN> <86wmmd9onm.fsf@HIDDEN> MIME-Version: 1.0 Date: Sat, 29 Jun 2024 23:09:12 -0700 Message-ID: <CADwFkmnaXS-xhEeY+PQMf7uV93sdUT9=vi=3So3316-3HqPoMA@HIDDEN> Subject: Re: bug#71762: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. To: Eli Zaretskii <eliz@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71762-done Cc: 71762-done <at> debbugs.gnu.org, Siyuan Chen <chansey97@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii <eliz@HIDDEN> writes: > tags 71762 notabug > thanks > >> From: Siyuan Chen <chansey97@HIDDEN> >> Date: Tue, 25 Jun 2024 08:04:48 +0800 >> >> Anyway, setting `(setq find-program (purecopy "C:/msys64/usr/bin/find.exe"))` makes the above example work >> at the moment. > > That's one possible solution. Another is to rearrange your system's > PATH so that the directory C:\msys64\usr\bin comes _before_ the > C:\WINDOWS\system32, where you have the stock Windows find.exe (which > is a program for a completely different purpose and with completely > different command-line syntax). > > Byw, the "msys64" part of the directory where you have find.exe seems > to hint that it is an MSYS port, not a native Windows/MinGW port. If > that is indeed so, my recommendation is to install a native find.exe > and use that instead, as MSYS ports could have subtle > incompatibilities with a native Windows Emacs. > >> Perhaps all NTEmacs users should set the 3 options: grep-program, find-program, xargs-program. > > These variables already exist, so I'm not sure what you are suggesting > here. > > In general, the only "problematic" program is find.exe, because > Windows comes only with that. The other two programs must be > installed, and so there's no danger of Emacs invoking the wrong one. > > I see no Emacs bug here, just an issue of configuring your system > and/or Emacs correctly. I'm therefore closing this bug report. ------------=_1719727863-9924-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 Jun 2024 21:36:15 +0000 Received: from localhost ([127.0.0.1]:35739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sLrME-0006xx-NS for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 17:36:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:52416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <chansey97@HIDDEN>) id 1sLrMC-0006xp-EC for submit <at> debbugs.gnu.org; Mon, 24 Jun 2024 17:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <chansey97@HIDDEN>) id 1sLrM9-0005JN-Nq for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2024 17:36:09 -0400 Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <chansey97@HIDDEN>) id 1sLrM7-0008HE-Tu for bug-gnu-emacs@HIDDEN; Mon, 24 Jun 2024 17:36:09 -0400 Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-dff26b612a9so4170258276.1 for <bug-gnu-emacs@HIDDEN>; Mon, 24 Jun 2024 14:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719264965; x=1719869765; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=q+Cv7fGa0/yDjQQieH7C53qTB3yh9x7ALLUQK2mPum8=; b=LR9340XAVXIrBRRFvgnsq35eaV5XwsEdeyM4oFusjKJ7MCoM9jWzIeU93D8bbz1RxW KZrsJnrreL3i1Zk9vOa+PsUkx6vd1zMDMoul1ljn7pwFa3hlhJ9FCHcbWp8FLppMDj1k 3M/wqq6glpYINwKyGgeAGXIVDVXQ6n66ygBfFo1R/Sk4WShDi06wThuOA98SV9yd5c2d 765jC0YKaG3w+4M3b8qKpVEKwf1mTUcK8cFMo01neSPAwulb2g5p7XY2SYfAR0jMC+jY t7kspYgHLVZykgeVAjiK/mHofRMtT7stPR1KfOMkZ4RrUl3j6J6g1hGdTnTCrR7aTn4C Nq/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719264965; x=1719869765; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=q+Cv7fGa0/yDjQQieH7C53qTB3yh9x7ALLUQK2mPum8=; b=NPPL6D1LgTfZ35+Lxl1L83EBoBGFmtEVruNe30p+wFWwVQMurzzaLTxXlxh94GzEQ9 f52z4ayXAa9RoRX5UjwyCJOVXATbIt8WjXXk1EAu8lZIarRQR0lGZP+QojmPyjlTnJje 4e9yDTQLTIO7qrRZQAws8ne5o8wihXmmaE38gdzYC4CUlH50qWALX/2LltnzfxrcDhY8 jW13wPKtOZeU3AZEhKAhXeXbMdkErZ+ViB5l3sQtwoWv52OuGVKQlLz0TNdzv9vBuurH BRaGVhk+zBJlPF/Ay6wIJzY58tpxRedVe4hoj1On8bf4vE5f/aVW4zGrGHvxDJzIowEt l42g== X-Gm-Message-State: AOJu0Ywm6OI0EJnKIz59/OfWfwCzDKPd0KXa4BgrL0v5ltORwiNmKVRo mjPPx3CGHlgKLXG2gPx4ozAZSe1ULpe6L2pv1OIlRQ4PcTLS2PH63QKOy031yKZc3NM07ozaE15 qqIaYKp78wkY4j/M7750zu7GdScbnCLolBHIlgw== X-Google-Smtp-Source: AGHT+IHouyXHNZCPaJVHJY6i1sr4ftxafehqyFERrdN9rWnYTnsoTJHc477YyiBuYO6Fjr8LJ51E8OjzhhJqkoenA6s= X-Received: by 2002:a5b:852:0:b0:e02:4af1:de12 with SMTP id 3f1490d57ef6-e0303eb354cmr5206272276.11.1719264965061; Mon, 24 Jun 2024 14:36:05 -0700 (PDT) MIME-Version: 1.0 From: Siyuan Chen <chansey97@HIDDEN> Date: Tue, 25 Jun 2024 05:35:54 +0800 Message-ID: <CAHWTsY=tOjO3B3RLMxZu9OG7vVo4u3QTxj7CYV51tw-V+Hahrw@HIDDEN> Subject: `(project-files (project-current))` with `project-vc-extra-root-markers` doesn't work on Windows. To: bug-gnu-emacs@HIDDEN Content-Type: multipart/alternative; boundary="000000000000847591061ba99199" Received-SPF: pass client-ip=2607:f8b0:4864:20::b2d; envelope-from=chansey97@HIDDEN; helo=mail-yb1-xb2d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.1 (--) --000000000000847591061ba99199 Content-Type: text/plain; charset="UTF-8" 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 --000000000000847591061ba99199 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Reproduces steps:<br></div><div><br></div><div>I have= the following directory</div><div><br></div><div>```</div><div> <pre>\---myproject | .project | =20 +---subproject1 | \---.git | | Makefile | =20 \---subproject2 \---.git | Makefile</pre> </div><div>```</div><div><br></div><div>1. Open Emacs -Q</div><div><br></di= v><div>2. M-x eval-expression `(setq debug-on-error t)`</div><div><br></div= ><div> 3. M-x eval-expression `(setq project-vc-extra-root-markers '(".pr= oject"))` <br></div><div><br></div><div>4. Open the .project file in E= macs<br></div><div><br></div><div>5.=20 M-x eval-expression `(project-current)`=C2=A0</div><div><br></div><div>=C2= =A0=C2=A0=C2=A0 Result: `(vc nil "e:/work/myproject/")` OK</div><= div><br></div><div>6. M-x eval-expression `(project-files (project-current)= )`</div><div><br></div><div>=C2=A0=C2=A0=C2=A0 Result: Debugger entered--Li= sp error: (error "File listing failed: FIND: Parameter format not co..= .")<br>=C2=A0 error("File listing failed: %s" "FIND: Pa= rameter format not correct\n")</div><div><br></div><div>The root cause= is that `project--files-in-directory` in project.el is using `find-program= ` ("find") which<span class=3D"gmail-HwtZe" lang=3D"en"><span cla= ss=3D"gmail-jCAhz gmail-JxVs2d gmail-ChMk0b"><span class=3D"gmail-ryNqvb"> = does not exist on Windows</span></span></span>.=C2=A0</div><div><br></div><= div>Is it possible to use more portable code? For example, `directory-files= -recursively`? Otherwise NTEmacs users will <span class=3D"gmail-HwtZe" lan= g=3D"en"><span class=3D"gmail-jCAhz gmail-JxVs2d gmail-ChMk0b"><span class= =3D"gmail-ryNqvb">have to install CYGWIN or MSYS2.</span></span></span> </div><div><br></div><div>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 examp= le above, the=20 `project-files` also works well.<br></div><div><br></div><div>Emacs 29.3 on= Windows 10.</div><div><br></div><div>Thanks.</div><div><br></div><div>Best= Regards,</div><div>Siyuan Chen<br> </div><div><br></div></div> --000000000000847591061ba99199-- ------------=_1719727863-9924-1--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.