From unknown Fri Sep 05 11:52:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#38511 <38511@debbugs.gnu.org> To: bug#38511 <38511@debbugs.gnu.org> Subject: Status: etags seems to be confused by macros Reply-To: bug#38511 <38511@debbugs.gnu.org> Date: Fri, 05 Sep 2025 18:52:04 +0000 retitle 38511 etags seems to be confused by macros reassign 38511 emacs submitter 38511 Skip Montanaro severity 38511 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 06 15:30:12 2019 Received: (at submit) by debbugs.gnu.org; 6 Dec 2019 20:30:12 +0000 Received: from localhost ([127.0.0.1]:47093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idKEt-0007vj-Ps for submit@debbugs.gnu.org; Fri, 06 Dec 2019 15:30:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:56276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idK5l-0007U5-5r for submit@debbugs.gnu.org; Fri, 06 Dec 2019 15:20:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42576) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idK5k-0005Vj-25 for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:20:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idK5i-0002MB-VM for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:20:43 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:33986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1idK5i-0002G1-N0 for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2019 15:20:42 -0500 Received: by mail-pf1-x42d.google.com with SMTP id n13so3912029pff.1 for ; Fri, 06 Dec 2019 12:20:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=UC/TOiMYrIyz5sQYKIv04yVXNujICC52R+Ho63TCf+M=; b=pQpspbW3zNrKx19IyqTaJMMOOxOXiPOKw8ZN12pTbglrKVOfX+iyIOYumWRi/gle7x EX3C2ITkYpJC2FOXIy6vhGEosu9oI8fC0xoGPdLxwPFRez3ifBflV58LFCBXSxgwz1Ny FWvzv8g2gAMA4unXpeXFtryCsSg4j5gqm3n4/JhEgaDEJFfs5/jp/UNsSvUTeejfNqCu 31TTYxBDUbVRjc+xKAIsyv8xy0rbq3u2K4gHirqwzD0Dsgs+emToCN7u8rxk3XnuLavy Q/qSmZGCOPOx4TMpti/VooTNYBp8OHg0sG3EJXWPaBljSPdNaP3+PganX+FQK5K6rCTO jcSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=UC/TOiMYrIyz5sQYKIv04yVXNujICC52R+Ho63TCf+M=; b=DO56SRivRAfgiIn/T4Hum4ESbb9mnokUxAiLiun3Qb/uoCcrpi83tIGVGaV+QhOZQo JRrB1UIPKrfVxjcIe3RcEMNfaxBjyyfqMtGsC5RyCiyugUuH95IqaQgpnkAHDIepUd3Y 5svZo0pP/QZ66GwEdeGF/dw8ArrpUsMggZ+6lMtlPKgw3FsuBkbonuSAaAskLlVqptk0 cQzh95HOQESEamMNlAnIIIifzmGKtqGBUYeffIvrwdyWHePJ0pJg9rnVu7MGFxF0Qqvi xVrys2QjBsNm3Ibni3+6nenB+xV6zrgcS5kZMM04R31/heLnlV3i2FRyI7a+udHuZvGx CMzQ== X-Gm-Message-State: APjAAAVQYSzQTiS5c2w6ggW9KjIOUhUsVT92nluxQ8MJ1aOSCClrtTvy kzcp+S3tFoYJXJCUaAUDcE4oC9ADPI69Kb5x2BXJrsMYO0+Fag0= X-Google-Smtp-Source: APXvYqwS4hfzSGeOXyScXNcTWllD1yE4AaZM6Eye0MBmJpNYiGywiNOm0MrDsBGdG0ngxx1sXtwH9jmfUmLr5MR7m5g= X-Received: by 2002:a63:dd16:: with SMTP id t22mr5711875pgg.307.1575663640683; Fri, 06 Dec 2019 12:20:40 -0800 (PST) MIME-Version: 1.0 From: Skip Montanaro Date: Fri, 6 Dec 2019 14:20:14 -0600 Message-ID: Subject: etags seems to be confused by macros To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42d X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 06 Dec 2019 15:30:10 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) I use speedbar in Emacs, which relies on etags to generate tag files. The Python source defines a macro named Py_LOCAL_INLINE, which is used to select the appropriate spelling of "static inline": #if defined(_MSC_VER) ... # define Py_LOCAL_INLINE(type) static __inline type __fastcall #else ... # define Py_LOCAL_INLINE(type) static inline type #endif It's used like so: Py_LOCAL_INLINE(void) stackdepth_push(basicblock ***sp, basicblock *b, int depth) { assert(b->b_startdepth < 0 || b->b_startdepth == depth); if (b->b_startdepth < depth && b->b_startdepth < 100) { assert(b->b_startdepth < 0); b->b_startdepth = depth; *(*sp)++ = b; } } It all works well. Etags though, thinks the file contains a function named "Py_LOCAL_INLINE" and completely misses the actual function, "stackdepth_push". Seems like a bug to me, but it's not obvious if there is a trivial fix. As a workaround, I think I can write a little shell script which effectively expands the Py_LOCAL_INLINE macro, then pumps the result to etags. Still, would be kind of nice if this could be fixed. Thanks, Skip Montanaro From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 08 01:08:30 2019 Received: (at 38511) by debbugs.gnu.org; 8 Dec 2019 06:08:30 +0000 Received: from localhost ([127.0.0.1]:50365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idpk6-0000V5-9K for submit@debbugs.gnu.org; Sun, 08 Dec 2019 01:08:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idpk4-0000Up-SO for 38511@debbugs.gnu.org; Sun, 08 Dec 2019 01:08:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1idUIh-00005V-Qw; Sat, 07 Dec 2019 02:14:47 -0500 Received: from [176.228.60.248] (port=3047 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1idUIh-0000WU-9L; Sat, 07 Dec 2019 02:14:47 -0500 Date: Sat, 07 Dec 2019 09:14:39 +0200 Message-Id: <83sglwfvz4.fsf@gnu.org> From: Eli Zaretskii To: Skip Montanaro In-reply-to: (message from Skip Montanaro on Fri, 6 Dec 2019 14:20:14 -0600) Subject: Re: bug#38511: etags seems to be confused by macros References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38511 Cc: 38511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Skip Montanaro > Date: Fri, 6 Dec 2019 14:20:14 -0600 > > I use speedbar in Emacs, which relies on etags to generate tag files. > The Python source defines a macro named Py_LOCAL_INLINE, which is used > to select the appropriate spelling of "static inline": > > #if defined(_MSC_VER) > ... > # define Py_LOCAL_INLINE(type) static __inline type __fastcall > #else > ... > # define Py_LOCAL_INLINE(type) static inline type > #endif > > It's used like so: > > Py_LOCAL_INLINE(void) > stackdepth_push(basicblock ***sp, basicblock *b, int depth) > { > assert(b->b_startdepth < 0 || b->b_startdepth == depth); > if (b->b_startdepth < depth && b->b_startdepth < 100) { > assert(b->b_startdepth < 0); > b->b_startdepth = depth; > *(*sp)++ = b; > } > } > > It all works well. Etags though, thinks the file contains a function > named "Py_LOCAL_INLINE" and completely misses the actual function, > "stackdepth_push". Etags works by looking at the source at face value, and it doesn't expand macros as a C compiler would. So this: Py_LOCAL_INLINE(void) stackdepth_push(basicblock ***sp, basicblock *b, int depth) looks to its naïve lexical analysis very much like a K&R definition of a function and declaration of its arguments: Py_LOCAL_INLINE(foo) int foo(bar) > Seems like a bug to me, but it's not obvious if there is a trivial > fix. Patches are welcome, if someone has an idea for how to fix that. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 09 05:59:19 2019 Received: (at 38511) by debbugs.gnu.org; 9 Dec 2019 10:59:19 +0000 Received: from localhost ([127.0.0.1]:52661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieGl5-0004Or-4c for submit@debbugs.gnu.org; Mon, 09 Dec 2019 05:59:19 -0500 Received: from blade3.isti.cnr.it ([194.119.192.3]:21601 helo=mx-all.isti.cnr.it) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieGl3-0004Of-3O for 38511@debbugs.gnu.org; Mon, 09 Dec 2019 05:59:17 -0500 Received: from savesent-daemon.mx-all.isti.cnr.it by mx-all.isti.cnr.it (PMDF V6.7-x04 #1884) id <01RERO4QIGKWQ96LP4@mx-all.isti.cnr.it> for 38511@debbugs.gnu.org; Mon, 09 Dec 2019 11:59:11 +0100 (MET) Received: from tucano.isti.cnr.it ([146.48.81.102]) by mx-all.isti.cnr.it (PMDF V6.7-x04 #1884) with ESMTPSA id <01RERO4N11KWQ7XQGD@mx-all.isti.cnr.it>; Mon, 09 Dec 2019 11:59:08 +0100 (MET) Received: from pot by tucano.isti.cnr.it with local (Exim 4.92.3) (envelope-from ) id 1ieGks-005fc5-RE; Mon, 09 Dec 2019 11:59:06 +0100 Date: Mon, 09 Dec 2019 11:59:06 +0100 From: =?utf-8?Q?Francesco_Potort=C3=AC?= Subject: Re: bug#38511: etags seems to be confused by macros In-reply-to: <83sglwfvz4.fsf@gnu.org> To: Eli Zaretskii Message-id: Organization: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 References: <83sglwfvz4.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 38511 Cc: Skip Montanaro , 38511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >> From: Skip Montanaro >> Date: Fri, 6 Dec 2019 14:20:14 -0600 >> >> I use speedbar in Emacs, which relies on etags to generate tag files. >> The Python source defines a macro named Py_LOCAL_INLINE, which is used >> to select the appropriate spelling of "static inline": >> >> #if defined(_MSC_VER) >> ... >> # define Py_LOCAL_INLINE(type) static __inline type __fastcall >> #else >> ... >> # define Py_LOCAL_INLINE(type) static inline type >> #endif >> >> It's used like so: >> >> Py_LOCAL_INLINE(void) >> stackdepth_push(basicblock ***sp, basicblock *b, int depth) >> { >> assert(b->b_startdepth < 0 || b->b_startdepth == depth); >> if (b->b_startdepth < depth && b->b_startdepth < 100) { >> assert(b->b_startdepth < 0); >> b->b_startdepth = depth; >> *(*sp)++ = b; >> } >> } >> >> It all works well. Etags though, thinks the file contains a function >> named "Py_LOCAL_INLINE" and completely misses the actual function, >> "stackdepth_push". Eli Zaretskii: >Etags works by looking at the source at face value, and it doesn't >expand macros as a C compiler would. So this: > > Py_LOCAL_INLINE(void) stackdepth_push(basicblock ***sp, basicblock *b, int depth) > >looks to its naïve lexical analysis very much like a K&R definition of >a function and declaration of its arguments: > > Py_LOCAL_INLINE(foo) int foo(bar) > >> Seems like a bug to me, but it's not obvious if there is a trivial >> fix. > >Patches are welcome, if someone has an idea for how to fix that. Unless some C code wizard steps up and contradicts me, I'd say that it is in principle impossible for Etags to detect such macros. This is a work for the --regex feature of Etags, which is thought just for this sort of situations. The Etags man page explains it with examples, as does the info page. -- fp From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 09 07:40:06 2019 Received: (at 38511) by debbugs.gnu.org; 9 Dec 2019 12:40:06 +0000 Received: from localhost ([127.0.0.1]:52740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieIKc-0000co-HY for submit@debbugs.gnu.org; Mon, 09 Dec 2019 07:40:06 -0500 Received: from mail-pf1-f175.google.com ([209.85.210.175]:36607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieIKb-0000c9-OC for 38511@debbugs.gnu.org; Mon, 09 Dec 2019 07:40:06 -0500 Received: by mail-pf1-f175.google.com with SMTP id x184so5740973pfb.3 for <38511@debbugs.gnu.org>; Mon, 09 Dec 2019 04:40:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=CJc+jhXVNXpStFNMxyp9X74cRqmKhOEjAGlzVmCQYY4=; b=qafY/w9k2aaRFQlRatZc+VqKyArwcVfPIBK/cMLH7KGhYDKkKcyQYqnH1nhHjk2xVy d4NLjwDCJn+ncjwCQrI0ac+ywMdeH7jsqx1obIG0wA+X1cncE6KT/A5iqSrQRPrjOuia CfxuiHasfqLUsK1kI8ygU3vJ8/krMJfuP4QSeyMSEyIT+14bNVxz6nsqPIdPstQfhJQF EPcbPCWBFuU/nSf231vNf6FXsVwPiiyTPhc+QgtOtWqO8UGHgY5ebfsV9Vl9+n4naIQJ WE5mzMXAac5QL5CeMdXZWtx5tR4GMpr7SvrPLRONdMVALSm0g8weGnvjr5KSWBv3aPra JHRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=CJc+jhXVNXpStFNMxyp9X74cRqmKhOEjAGlzVmCQYY4=; b=N4Gg93VnIGfUcBcQIKCbAI1E432jOk7K68/bJqIIPpRPLb/QpLGoEZymFLQ/xtb3fJ FedGSMsfyUULuIK9m5PNjAG85C2ZlrTLnU6oFVUEiJ1TzE+RqcHwDsDqe0yFE1QyCq1s ej9wj44nEkMabrEEW+OlvO/G8PdsV1H3oGZ0ywmCSqDgM19sfQRPKI9hNcDzaMpPcW0+ o8XW8qvsl359Crpx2g9EkKetyleJhO3g51Zn/DYrWLvKeV0UdkVbieJPDIky5yg3cOCL tQi2xsuvQmzaLYW2TACyBazIzBPoJ/wtvtMANpJ13KY2dlcWhYZOEB/UuAo6+bAcuAZO t48Q== X-Gm-Message-State: APjAAAXYX05Uk3T5xANyzwbYc2/zuP5CcZ2TSv9J5GN7sIfhzYj/fosp pw4IHSgShtl1MlDxHz9tEOvSsY8oP38wb+0KOG3RXWAJv81PfIA= X-Google-Smtp-Source: APXvYqx/cUgjL03dD0ow3IgY3ECRjYO391WHUoF6ET5WYQe29aASItTNtdqGSPwJ+RNqgLYB1ef29D9o2b1Vg2NGjaU= X-Received: by 2002:a65:4506:: with SMTP id n6mr18623783pgq.105.1575895199615; Mon, 09 Dec 2019 04:39:59 -0800 (PST) MIME-Version: 1.0 References: <83sglwfvz4.fsf@gnu.org> In-Reply-To: From: Skip Montanaro Date: Mon, 9 Dec 2019 06:39:33 -0600 Message-ID: Subject: Re: bug#38511: etags seems to be confused by macros To: =?UTF-8?Q?Francesco_Potort=C3=AC?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38511 Cc: Eli Zaretskii , 38511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Eli Zaretskii: > Etags works by looking at the source at face value, and it doesn't > expand macros as a C compiler would. So this: > > Py_LOCAL_INLINE(void) stackdepth_push(basicblock ***sp, basicblock *b, i= nt depth) > > looks to its na=C3=AFve lexical analysis very much like a K&R definition = of > a function and declaration of its arguments: ... > Patches are welcome, if someone has an idea for how to fix that. > Franceso: > Unless some C code wizard steps up and contradicts me, I'd say that it > is in principle impossible for Etags to detect such macros. This is a > work for the --regex feature of Etags, which is thought just for this > sort of situations. > > The Etags man page explains it with examples, as does the info page. I read the documentation and didn't understand how the regex feature would help. It seems to be useful to identify other constructs which you'd like tagged (such as the DEFVAR macro in the Emacs source), not transform the source in some way. Put another way, I need a "find/replace" sort of feature, not just a "find" feature. FWIW, here's the simple shell script I came up with: #!/bin/bash # etags gets confused by Python's use of the Py_LOCAL and Py_LOCAL_INLINE # macros to select compiler-dependent static storage syntax. This script is # a stand-in for etags which performs the macro expansion manually, then # pipes the result to etags. $@ are the args to pass to etags. sed -E -e 's/Py_LOCAL_INLINE *\(([^(]+)\)/static inline \1/' \ -e 's/Py_LOCAL *\(([^(]+)\)/static \1/' \ | etags "$@" I set speedbar-fetch-etags-command to that script. Seems to work well enough for my needs. It clearly isn't a general solution though. I suppose I could try to run the source through cpp, though I don't know if etags is smart enough to use the "# " output of cpp. I'll take a look at etags.c, but don't hold your breath waiting for a miracle. :-) Skip From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 09 08:30:22 2019 Received: (at 38511) by debbugs.gnu.org; 9 Dec 2019 13:30:22 +0000 Received: from localhost ([127.0.0.1]:52771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieJ7G-00029l-DN for submit@debbugs.gnu.org; Mon, 09 Dec 2019 08:30:22 -0500 Received: from blade3.isti.cnr.it ([194.119.192.3]:46138 helo=mx-all.isti.cnr.it) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieJ7E-00029d-Qp for 38511@debbugs.gnu.org; Mon, 09 Dec 2019 08:30:21 -0500 Received: from savesent-daemon.mx-all.isti.cnr.it by mx-all.isti.cnr.it (PMDF V6.7-x04 #1884) id <01RERTE1MX3KQ96LP4@mx-all.isti.cnr.it> for 38511@debbugs.gnu.org; Mon, 09 Dec 2019 14:30:15 +0100 (MET) Received: from tucano.isti.cnr.it ([146.48.81.102]) by mx-all.isti.cnr.it (PMDF V6.7-x04 #1884) with ESMTPSA id <01RERTDY0CVOQ7XS3B@mx-all.isti.cnr.it>; Mon, 09 Dec 2019 14:30:12 +0100 (MET) Received: from pot by tucano.isti.cnr.it with local (Exim 4.92.3) (envelope-from ) id 1ieJ74-005xdp-C5; Mon, 09 Dec 2019 14:30:10 +0100 Date: Mon, 09 Dec 2019 14:30:10 +0100 From: =?utf-8?Q?Francesco_Potort=C3=AC?= Subject: Re: bug#38511: etags seems to be confused by macros In-reply-to: To: Skip Montanaro Message-id: Organization: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 References: <83sglwfvz4.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 38511 Cc: Eli Zaretskii , 38511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >I read the documentation and didn't understand how the regex feature >would help. It seems to be useful to identify other constructs which >you'd like tagged (such as the DEFVAR macro in the Emacs source), not >transform the source in some way. Put another way, I need a >"find/replace" sort of feature, not just a "find" feature. Try this one, and let us know if it satisfies your needs: etags --regex='/Py_LOCAL_INLINE[ \t]*(.*)\n[^(]+(\([^)]+\)/m' It assumes that Py_LOCAL_INLINE and its arguments all stay on a single line, but it can be easily changed to waive this assumption. -- Francesco Potortì (ricercatore) Voice: +39.050.621.3058 ISTI - Area della ricerca CNR Mobile: +39.348.8283.107 via G. Moruzzi 1, I-56124 Pisa Skype: wnlabisti (gate 20, 1st floor, room C71) Web: http://fly.isti.cnr.it From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 22:05:51 2021 Received: (at 38511) by debbugs.gnu.org; 31 Aug 2021 02:05:51 +0000 Received: from localhost ([127.0.0.1]:60713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKt9q-0003AO-R5 for submit@debbugs.gnu.org; Mon, 30 Aug 2021 22:05:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKt9p-0003A5-4L for 38511@debbugs.gnu.org; Mon, 30 Aug 2021 22:05:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=enmZ+za2m9Ey38EYz8AM1nKsPNDfic1aMqPaDv6dhTM=; b=rrVOIdIP5xzGhUnuCBcfQ/AtWh s3HGivkZ2b/6W2bYxNxx2gMoBBwZ9O3ZuDB0Tw70pIiG59es/PiGrtRfcwovn/28urV0kFtrFKBk1 d0KeiiJxOsCv25bapG3Gn5KlNcYMoTrSiqBfP5C5elwaLNr/C0yiv7WlSt0KxCg1r5OM=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKt9e-0005Z6-5X; Tue, 31 Aug 2021 04:05:42 +0200 From: Lars Ingebrigtsen To: Francesco =?utf-8?Q?Potort=C3=AC?= Subject: Re: bug#38511: etags seems to be confused by macros References: <83sglwfvz4.fsf@gnu.org> Date: Tue, 31 Aug 2021 04:05:37 +0200 In-Reply-To: ("Francesco =?utf-8?Q?Potort=C3=AC=22's?= message of "Mon, 09 Dec 2019 11:59:06 +0100") Message-ID: <87lf4i5pxq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Francesco Potortì writes: > Unless some C code wizard steps up and contradicts me, I'd say that it > is in principle impossible for Etags to detect such macros. Yeah, so I think this is a bit out of the remit for etags. So I'm closing this bug report. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38511 Cc: Skip Montanaro , Eli Zaretskii , 38511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Francesco Potort=C3=AC writes: > Unless some C code wizard steps up and contradicts me, I'd say that it > is in principle impossible for Etags to detect such macros. Yeah, so I think this is a bit out of the remit for etags. So I'm closing this bug report. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 22:05:56 2021 Received: (at control) by debbugs.gnu.org; 31 Aug 2021 02:05:56 +0000 Received: from localhost ([127.0.0.1]:60716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKt9w-0003Ad-18 for submit@debbugs.gnu.org; Mon, 30 Aug 2021 22:05:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKt9t-0003AB-6N for control@debbugs.gnu.org; Mon, 30 Aug 2021 22:05:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OXCOtFGGPVv2YoQMOu9rYoxKoVRbYoRZ7pufvT3dSL8=; b=F8F37/H0EHpWNUbDcs+suedfG0 cKJvzBOEWTQ0MGoUqFkpmrub47ugqQBCx6itlwwd0LGsT2KN+VNo7QCX4mlCTBBBKJMTQOm9aR5bq alhl8NlTSA7IXXvLVzRzn4wPt0rdH0GzQrDXDOws+Tx7bXATFbf6NC12CJqsJL+xTxHs=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKt9k-0005ZH-Qe for control@debbugs.gnu.org; Tue, 31 Aug 2021 04:05:47 +0200 Date: Tue, 31 Aug 2021 04:05:44 +0200 Message-Id: <87k0k25pxj.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #38511 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 38511 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 38511 quit From unknown Fri Sep 05 11:52:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 28 Sep 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator