Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 151390 - etags fails to generate tags under some conditions
etags fails to generate tags under some conditions
Product: Fedora
Classification: Fedora
Component: emacs (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
: MoveUpstream
Depends On:
  Show dependency treegraph
Reported: 2005-03-17 10:27 EST by David L.
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-03 04:24:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David L. 2005-03-17 10:27:48 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0

Description of problem:
etags doesn't create a tag for main in the following program:

#define TCL_DONT_WAIT		(1<<1)

int Tcl_DoOneEvent(int a)
  return 0;

void MainLoop()
  while (Tcl_DoOneEvent(TCL_DONT_WAIT)!=0) {

int main(int argc, char *argv[])


Version-Release number of selected component (if applicable):
emacs 21.3

How reproducible:

Steps to Reproduce:
1. Paste the example code above into a file named foo.cc
2. execute "etags foo.cc"
3. execute "grep main TAGS" and see no tag for main

Actual Results:  No tag generated for main.

Expected Results:  A tag should be generated for main.

Additional info:

It also didn't work in redhat9.  It does work if the while (Tcl...) loop is removed.
Comment 1 Jens Petersen 2005-04-08 03:14:52 EDT
Happens with etags in current cvs emacs also.
Comment 2 David L. 2005-04-08 09:21:44 EDT
I also reported the problem to the emacs bug report email... here's what they
had to say:

Dear David, the etags distributed with Emacs 21.3 is more than three
years old, and has some bugs that are corrected in the newest version,
which is not officially released with Emacs yet.

In the example that you report you are even lucky, because on the same
test case the 21.3 etags dumps core on my box :-)

I suggest you download
<ftp://fly.isti.cnr.it/pub/software/unix/etags.tar.gz>, where you will
find the latest etags.c and man page together with a precompiled static
binary for Linux.
Comment 3 Jens Petersen 2005-05-17 22:52:40 EDT
Latest etags was added in emacs-21.4-2.

Is it any better now?
Comment 4 David L. 2005-05-22 10:50:31 EDT
How do I get that version?  I'm "up2date" on FC3 and I still get:
emacs --version
GNU Emacs 21.3.1

I've done a search of the redhat web site and of rpmfind for emacs-21.4-2 and
haven't found anything.
Comment 5 Jens Petersen 2005-05-22 20:35:17 EDT
You can find it in a local "rawhide" (Fedora Core development) mirror,
or is you have to from:

Alternatively you could just download the latest etags yourself,
build it and test it: it is a small program.

Note You need to log in before you can comment on or make changes to this bug.