Subject: Case sensitivity in etags

From: Dave Strauss <[email-masked]>
Date: Fri, 6 Sep 1996 13:00:56 -0400 (EDT)

I'm having a problem with setting up tags files for use on
multiple-level sources trees.  For reference, I'm currently
using emacs 19.34 on NT 4.00 Beta 2 (build 1314), but the
problem (if that's what it is) has existed at least at least
in some form as far back as emacs 19.30.  I recently upgraded
from emacs 19.31.

Under Unix, I would do something like this, if I knew the depth
of the source tree:

       etags *.[ch] */*.[ch] */*/*.[ch] ...

Or I might use "find" and pipe the results into etags.

Under NT, I've been doing the following from a DOS (cmd.exe) box:

      dir /s /b *.c *.h *.cpp | etags -

This gives me file names in the tags file like the following:

     C:/dir1/Files/File1.c

The problem occurs because NT (and win95?) preserve case in filenames;
most utilities ignore filename case, but emacs doesn't.  So, for
example, I might open the file c:/foobar/foobar/foobar.txt by typing
in the file name, but if I use filename completion I might end up opening
c:/FooBar/FOOBAR/fooBar.txt.  Emacs sees these as different files, even
though they are the same.

In emacs 19.31, the drive letters were upper-cased; I would get (via
filename completion) names like C:/file1 and C:/File2.  Because of this,
if I was careful in setting up my current directory in DOS, the file names
in the tags file would match the file names I would get via filename
completion.

But in emacs 19.34, the drive letters are now lower-cased.  So now there
is no way I can get the file names in the tags file to match the
filename-completion names.  As a result, I sometimes have two, and
even three or four, copies of the same file open at the same time.  It
gets very confusing trying to remember which copy I'm editing!

I would like to be able to do one of the following (in order of preference):

1)  Convince emacs to ignore case (like other NT/Win95 utilities) when
    opening files.

2)  Make emacs force driver letters to be upper-cased, as before.  [Less
    desirable that (1), but at least I had learned to live with it!].

3)  Find another way of creating tags files for multiple-level source
    trees so the file names match what emacs expects.  But note that
    I don't always know the depth of the source trees!

4)  Other ???

Does anyone know how to do any of these things?  Preferably through
modifications of the elisp code?

Thanks.

---------------------------------------------------------------------------
"The best ideas do not | David Strauss           [email-masked]  
 necessarily come from | Principal Engineer      http://www.systemsoft.com
 the loudest voices"   | SystemSoft Corp.        Phone: 508-647-2873
                       | 2 Vision Drive          Fax:   508-651-8188
                       | Natick, MA  01760-2059
---------------------------------------------------------------------------

---

From: Robert Brodersen <[email-masked]>
Date: Fri, 6 Sep 1996 11:52:12 -0700

>> Dave Strauss writes::

>gets very confusing trying to remember which copy I'm editing!

I used to have filename case problems all the time, and I solved it with
this beauty:

Add the following to your .emacs file

; Don't visit two buffers of the same file (solves some filename case
problems)
>(setq find-file-existing-other-name t)

Bob Brodersen  -- [email-masked]