From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Apropos commands and regexps Date: Fri, 17 May 2002 13:28:32 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200205171928.g4HJSWM20375@aztec.santafe.edu> References: <5xg00y41zj.fsf@kfs2.cua.dk> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1021663832 26754 127.0.0.1 (17 May 2002 19:30:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 17 May 2002 19:30:32 +0000 (UTC) Cc: storm@cua.dk, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 178nQu-0006xP-00 for ; Fri, 17 May 2002 21:30:32 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 178ndX-0001qT-00 for ; Fri, 17 May 2002 21:43:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 178nQp-0003Ht-00; Fri, 17 May 2002 15:30:27 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 178nP0-0002zz-00; Fri, 17 May 2002 15:28:34 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.9.3) with ESMTP id g4HJSWk10292; Fri, 17 May 2002 13:28:32 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g4HJSWM20375; Fri, 17 May 2002 13:28:32 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4063 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4063 For the query language, I see these possibilities: * List of words. Here, items containing all words will come out first, followed by items with all but one word, and so on. The presence or absence of a very common word has less effect on the score than the presence or absence of an unusual word. I think that is the best way to handle the argument. But the search for these words should allow them to be substrings of words. It should not require an exact match against an entire word in the command name. * If the word occurs in a command/function/variable name, then the score should be higher than a match in the docstring (or other explanatory text) only. I am not sure it is worth distinguishing. If the user says to look at the doc string, treat it as equally important. * If the word does not occur at all, but a synonym of the word does, the item should match (perhaps with a lowered score). The synonym may as well have the same score. We don't need a feature to make it different. * Instead of just synonyms, also consider more general terms, more specific terms, related terms. That would match too much, so I recommend against writing it. * If the word does not occur, but a derived form does, then the item should match (perhaps with a lowered score). So "mouse" should find "mice" and so on. The Porter stemming algorithm appears to be a useful thing here. These plurals can be defined as synonyms, so this is not needed as a separate feature. * I guess that "igrep" should be considered a "derived form" of "grep" in the context of the Emacs documentation. Do we do this with an explicit synonym list? Or perhaps with a metric of similarity between terms which is based on editing distance or suchlike? Substring matching will handle this with no extra features.