On Monday 01 December 2008 23:32, Meikel Brandmeyer wrote: > Hi, > > On 2 Dez., 00:49, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > Trying to make me look bad, eh? Well, it's not really a challenge, > > you know... > > o.O Do I?
You do now... > ... > > Concerning the filename issue, one maybe can do > a heuristic: > > - Filename is identical to the last component of the > namespace: > => some/name/space.clj > > - Filename is different form the last component of the > namespace. Try the following: > * some/name/file.clj exists? => Use it. > * some/name/space/file.clj exists? => Use it > * recursing here into some/name/space/*? > > I think the first two cases should cover most of the > cases. I would pefer to exchange the first two checks, > since I think, the "normal" layout would be, that there > is some subdirectory containing "include" files. Clojure > itself on the other hand has a flat structure... Hmmm... Don't forget the fact that hyphens in namespace symbols are transliterated to underscores in the corresponding file name when you (use ...) or (require ...) or otherwise refer to a namespace in a manner that requires a file to be located. > > ... > > > And don't forget that the tags file must be sorted in simple > > lexicographic order, which does not seem to be what you get if you > > just dump symbol names into a sorted set or map. (So far, I've just > > been sorting the files afterward from the command line using the > > Gnu "sort" utility with the environment variable LC_ALL set to > > "C".) > > Hmmm... At least for vim this seems to be not necessary. However > you are right. In the specification of the format it is stated, that > the entries must be sorted. I missed that. Check it out. The names enclosed in *asterisks* will sort improperly, e.g. In version 6 Vim, an unsorted (or improperly sorted) tags file will yield an error, at least for some symbols (binary search might never encounter a subsequence deemed out-of-order if the file is mostly sorted). Apparently in later versions of Vim, a fall-back linear search is used when the file is deemed unsorted. That could become a performance (responsiveness) issue for large unsorted tags files. > I already noticed some issues with Windows and Namespaces > containing -, eg. clojure.contrib.duck-streams. Will post an update > later on, today. > > Sincerely > Meikel Randall Schulz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---