GNU bug report logs - #76322
Make ctags a thin wrapper around etags

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sun, 16 Feb 2025 05:22:02 UTC

Severity: wishlist

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76322 <at> debbugs.gnu.org
Subject: Re: bug#76322: Make ctags a thin wrapper around etags
Date: Mon, 17 Feb 2025 00:16:58 -0800
[Message part 1 (text/plain, inline)]
On 2025-02-16 01:31, Eli Zaretskii wrote:
>> Date: Sun, 16 Feb 2025 00:26:02 -0800
>> From: Paul Eggert <eggert <at> cs.ucla.edu>
>> How about if we compile a little .exe file that merely execs etags with
>> the --ctags option? That would be the equivalent of the script.
> 
> That'd be fine, thanks.  But we will need to invoke etags via
> w32_execvp because of the problems explained in emacsclient.c where
> that function is defined (which will need to be moved to ntlib.c).

I took at shot at doing something along those lines; see revised patch 
(attached).

Since I don't use MS-Windows or compile or test anything on that 
platform, I quailed a bit at doing nontrivial surgery on ntlib.c. Also, 
emacsclient.c's w32_execvp has some alternate-editor code specific to 
emacsclient, and it uses alloca in a potentially-unsafe way, and it 
mishandles strings longer than INT_MAX bytes, and it appears to 
mishandle '\t', '\\' and '"' if Microsoft's documentation is to be 
believed. So the attached patch defines its own w32_execvp_arg_repr 
function that attempts to be standalone and free of these issues. If 
needed later, someone with MS-Windows expertise could merge this into 
ntlib.c and combine it with what's in emacsclient.c.
[0001-Make-ctags-a-thin-wrapper-around-etags.patch (text/x-patch, attachment)]

This bug report was last modified 58 days ago.

Previous Next


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