GNU bug report logs - #70329
29.3; etags-regen-mode fails in projects that have spaces in their root path elements

Previous Next

Package: emacs;

Reported by: Magiel Bruntink <magiel.bruntink <at> icloud.com>

Date: Thu, 11 Apr 2024 04:54:02 UTC

Severity: normal

Found in version 29.3

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Magiel Bruntink <magiel.bruntink <at> icloud.com>
Cc: 70329 <at> debbugs.gnu.org
Subject: Re: bug#70329: 29.3;
 etags-regen-mode fails in projects that have spaces in their root
 path elements
Date: Thu, 11 Apr 2024 10:29:43 +0300
> Date: Wed, 10 Apr 2024 21:32:57 +0200
> From:  Magiel Bruntink via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> I wanted to try to the new etags-regen-mode and loaded its lisp manually.
> 
> There is an issue with how the new mode deals with paths containing spaces,
> however.
> 
> Running the etags--xref-backend through eg. xref-find-definitions
> within a file in a project that has spaces in its path elements,
> eg. "c:/temp/test project/test.c" will cause an error.
> 
> Messages seen are:
> Generating new tags table...
> (Shell command failed with code 1 and some error output)
> visit-tags-table-buffer: File c:/temp/test project/TAGS does not exist
> 
> Error message in the etags-regen-tags-errors* buffer:
> c:/temp/test: Permission denied

Stab in the dark: does the patch below fix the problem?

If not, please repeat your recipe with debug-on-error non-nil, and
post the backtrace here.

diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
index 6cd78d3..02d666c 100644
--- a/lisp/progmodes/etags-regen.el
+++ b/lisp/progmodes/etags-regen.el
@@ -279,7 +279,7 @@ etags-regen--tags-generate
                                      " ")
                           ;; ctags's etags requires '-L' for stdin input.
                           (if ctags-p "-L" "")
-                          tags-file)))
+                          (shell-quote-argument tags-file))))
     (with-temp-buffer
       (mapc (lambda (f)
               (insert f "\n"))




This bug report was last modified 1 year and 132 days ago.

Previous Next


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