unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>,
	Magiel Bruntink <magiel.bruntink@icloud.com>
Cc: 70329-done@debbugs.gnu.org
Subject: bug#70329: 29.3; etags-regen-mode fails in projects that have spaces in their root path elements
Date: Thu, 11 Apr 2024 20:10:55 +0300	[thread overview]
Message-ID: <c3319705-24cd-4b02-840f-31eca18f18c2@gutov.dev> (raw)
In-Reply-To: <861q7cuzko.fsf@gnu.org>

Hi Eli and Magiel,

On 11/04/2024 10:29, Eli Zaretskii wrote:
>> 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@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"))

Thank you, looks good, pushed to master.





      parent reply	other threads:[~2024-04-11 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 19:32 bug#70329: 29.3; etags-regen-mode fails in projects that have spaces in their root path elements Magiel Bruntink via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-11  7:29 ` Eli Zaretskii
     [not found]   ` <7ysezsc6q6.fsf@icloud.com>
2024-04-11 14:48     ` Eli Zaretskii
     [not found]       ` <7yh6g7dhw7.fsf@icloud.com>
2024-04-11 16:17         ` Eli Zaretskii
2024-04-11 17:10   ` Dmitry Gutov [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=c3319705-24cd-4b02-840f-31eca18f18c2@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=70329-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=magiel.bruntink@icloud.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).