From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: new apropos feature in Emacs-22 Date: Sat, 5 Nov 2005 19:57:38 -0600 (CST) Message-ID: <200511060157.jA61vca26394@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1131242334 15254 80.91.229.2 (6 Nov 2005 01:58:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2005 01:58:54 +0000 (UTC) Cc: drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 06 02:58:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EYZnH-0000Sm-ET for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2005 02:58:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYZnG-0004lM-UD for ged-emacs-devel@m.gmane.org; Sat, 05 Nov 2005 20:58:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EYZn8-0004lH-6m for emacs-devel@gnu.org; Sat, 05 Nov 2005 20:57:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EYZn7-0004l4-Lo for emacs-devel@gnu.org; Sat, 05 Nov 2005 20:57:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYZn7-0004kw-IQ for emacs-devel@gnu.org; Sat, 05 Nov 2005 20:57:53 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EYZn7-0000TJ-PS for emacs-devel@gnu.org; Sat, 05 Nov 2005 20:57:53 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id jA61viBW024843; Sat, 5 Nov 2005 19:57:44 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id jA61vca26394; Sat, 5 Nov 2005 19:57:38 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: storm@cua.dk In-reply-to: (storm@cua.dk) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Sat, 05 Nov 2005 19:57:44 -0600 (CST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45492 Archived-At: Kim Storm wrote: Personally, I would have preferred to let apropos use keywords only (and I haven't used regexps in apropos since this change was made), but as a compromise, One more example that compromises can be way worse than any of the alternatives they compromise between. In order of preference, I would distinguish between regexps and keyword lists (or individual keywords) by (1) an unambiguous notational convention, (2) by a user option, or (3) by a combination of user option and separate functions. The separate functions would call the regular functions while binding the user option. we retained regexp matching if the search pattern looks like a regexp You are trying to do the impossible. "*scratch*" is clearly intended as a literal keyword and "home directory" is likely to be meant as a regexp, but your code concludes exactly the opposite. No code can decide whether something "looks like a regexp". I doubt this is a real problem. Do you have any evidence (actual user complaints) to prove your case? The current code has only been tested in CVS, by people familiar with regexps. Such people are aware that specifying *scratch*, .emacs or ses+ as keywords is not going to work and know how to write the proper regexps to get around that. The assumption is that most users will be accustomed to use keyword search, and only the experts will use regular expressions. Are you sure that most newbies are accustomed to _your brand of_ keyword search: at least two alternatives in any order, with no way to specify other requirements, _and_ with plenty of forbidden characters, that are natural in an Emacs context, like `*', `.' `+'? I never encountered that before. In the keyword searches that I am familiar with you can enclose the keywords in quotation marks to force sequential in order occurrence. When doing web searches I nearly invariably use quotation marks. Moreover, in all keyword searches that I am familiar with, it is perfectly possible to specify keywords like *scratch*, .emacs or ses+. I believe that after your change, newbies _still_ will have to learn about regexps to accomplish what they are used to in search engines. The only difference is that extra complexity and confusion is added on top of the normal regexp rules. Sincerely, Luc.