Edgewall Software

Opened 18 years ago

Last modified 14 years ago

#2532 closed defect

Search for Camelcase ends upwith newpage (ex. search for WikiFormatter) — at Version 4

Reported by: anonymous Owned by: Jonas Borgström
Priority: low Milestone:
Component: search system Version: 0.9.2
Severity: trivial Keywords: Camelcase Search
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

When you search for a Word in CamelCase you get redirected to create a"new Page".Please don't do that!(or at least provide a solution to remove it from the core-code manualy) 1. It makes problems with JavaClasses, WinAPI-Functions, … 2. It's neither professional nor elegant 3. …

Change History (5)

comment:1 by Matthew Good, 18 years ago

Milestone: 0.9.3
Priority: highnormal
Resolution: invalid
Severity: blockernormal
Status: newclosed

If you feel like dealing with this professionally you can search for the related existing tickets or ask on the MailingList or IrcChannel about this, however I don't intend to dignify this flamebait with a response.

comment:2 by anonymous, 18 years ago

Patch for no_camelcase (no more camel_sh*) As discussed in: #425 #476 #1490 #1604 #2526

--- wiki/api.py (Original)
+++ wiki/api.py (Patch)
@@ -185,7 +185,10 @@
     # IWikiSyntaxProvider methods
     def get_wiki_syntax(self):
-        ignore_missing = self.config.get('wiki', 'ignore_missing_pages')
+        no_camelcase = self.config.get('wiki', 'no_camelcase')
+       if no_camelcase in TRUE:
+           return
+       ignore_missing = self.config.get('wiki', 'ignore_missing_pages')
         ignore_missing = ignore_missing in TRUE
         yield (r"!?(?<!/)\b[A-Z][a-z]+(?:[A-Z][a-z]*[a-z/])+"
                 "(?:#[A-Za-z0-9]+)?(?=\Z|\s|[.,;:!?\)}\]])",

in your trac.ini do

    [wiki]
    no_camelcase = true

There should be a Script which converts all CamelCase (if there is a page to it) to [wiki:link] and leave all others basicaly (Class Names etc.) alone…

comment:3 by anonymous, 18 years ago

Resolution: invalid
Status: closedreopened

by anonymous, 18 years ago

Attachment: no_camelcase.patch added

No more Camel Case

comment:4 by Christian Boos, 18 years ago

Description: modified (diff)
Summary: Search for Camelcase fails with newpage (ex. search forWikiFormatter)Search for Camelcase ends upwith newpage (ex. search for WikiFormatter)

Well, ignoring the offending tone of our anonymous reporter, this "feature" seems to be requested often enough (even in more polite manner) to be at least considered. While I'm not at all in this school of thought (to me, a wiki without CamelCase doesn't even look like a Wiki :) ), I think we could keep the discussion opened. That discussion is actually two fold:

  • disable CamelCase entirely in the wiki (like the patch suggests)
  • disable the quick jump to a Wiki page when a CamelCase word is entered. This is even considered as a feature by some, in order to be able to quickly create a new page (and of course, this is the best way to

end

up with orphaned pages…)

(/me cleaning up the description a bit…)

Note: See TracTickets for help on using tickets.