Subject: bug#70329: 29.3; etags-regen-mode fails in projects that have spaces in their root path elements

From: Eli Zaretskii <[email-masked]>
Date: Thu, 11 Apr 2024 19:17:32 +0300

[Please use Reply All to reply, to keep the bug tracker CC'ed.]

> From: Magiel Bruntink <[email-masked]>
> Date: Thu, 11 Apr 2024 17:43:36 +0200
> 
> No problem, thanks for the fix.
> 
> While applying your patch I found a similar issue with ediff-ptch.el though. It
> won't find the to-be-patched file if there are spaces involved in the path.
> 
> Here is the patch for it :-)

Thanks.  I installed a slightly more radical change instead:

diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el
index f8d4c1c..2d5d460 100644
--- a/lisp/vc/ediff-ptch.el
+++ b/lisp/vc/ediff-ptch.el
@@ -721,10 +721,11 @@ ediff-patch-file-internal
 	     nil ; don't redisplay
 	     shell-command-switch   ; usually -c
 	     (format "%s %s %s %s"
-		     ediff-patch-program
+		     (shell-quote-argument ediff-patch-program)
 		     ediff-patch-options
 		     ediff-backup-specs
-		     (ediff--buffer-file-name buf-to-patch))
+                     (shell-quote-argument
+		      (ediff--buffer-file-name buf-to-patch)))
 	     ))
 
       ;; restore environment for gnu patch