From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: new apropos feature in Emacs-22 Date: Sun, 06 Nov 2005 23:54:57 +0100 Message-ID: References: <200511060157.jA61vca26394@raven.dms.auburn.edu> <200511060536.jA65aHY28505@raven.dms.auburn.edu> <200511062016.jA6KG1902313@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131317855 16924 80.91.229.2 (6 Nov 2005 22:57:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2005 22:57:35 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 06 23:57:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EYtQn-0004xK-5q for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2005 23:56:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYtQm-0007Tn-Md for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2005 17:56:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EYtQd-0007TY-TT for emacs-devel@gnu.org; Sun, 06 Nov 2005 17:55:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EYtQd-0007TM-F4 for emacs-devel@gnu.org; Sun, 06 Nov 2005 17:55:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYtQd-0007TJ-Ak for emacs-devel@gnu.org; Sun, 06 Nov 2005 17:55:59 -0500 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EYtQc-0004XA-RQ; Sun, 06 Nov 2005 17:55:59 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id E87B05EE05C; Sun, 6 Nov 2005 23:55:56 +0100 (CET) Original-To: Luc Teirlinck In-Reply-To: <200511062016.jA6KG1902313@raven.dms.auburn.edu> (Luc Teirlinck's message of "Sun, 6 Nov 2005 14:16:01 -0600 (CST)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:45527 Archived-At: Luc Teirlinck writes: > Eli Zaretskii wrote: > > That's your ``always use quotes'' rule again; see above for why it > might not be useful for someone (like a newbie) who does not know the > exact phrase she is looking for. > > Phrases like "global font lock mode" or "text only terminal" are > conceptually single items, even though, without quoting, to the > computer they look like four or three unrelated keywords. That is > exactly why one _needs_ quoting in searches. With apropos-sort-by-scores turned on, apropos-documentation returns the following entries for "global font lock mode" (in this sequence): global-font-lock-mode Command: Toggle Font-Lock mode in every buffer. font-lock-mode Command: Toggle Font Lock mode. font-lock-global-modes Variable: *Modes for which Font Lock mode is automagically turned on. hi-lock-mode Command: Toggle minor mode for interactively adding font-lock highlighting patterns. font-lock-support-mode Variable: *Support mode for Font Lock mode. jit-lock-mode Function: Toggle Just-in-time Lock mode. {the list is much longer, but most entries have some relevance} On the other hand, if you search for the regexp "global font lock mode", you get just two entries (not including the obvious "global-font-lock-mode"): font-lock-global-modes Variable: *Modes for which Font Lock mode is automagically turned on. font-lock-mode Command: Toggle Font Lock mode. BTW, I strongly doubt that any novice user will search for anything remotely similar to "font lock". Instead they will search for "syntax highlighting" -- where regexp and keyword search produces similar results -- or they will search for "highlight syntax" where regexp shows nothing, while keywords show that same result as before. To me it is a bit strange that someone who favours regexp search is so worried about the potential pitfalls of the novice, while those of us who advocate keyword searches don't see the big problem... > A newbie using apropos can not be assumed to be 100% ignorant: one way > or the other he managed to find out about the apropos commands. So he > should be familiar with at least some multi-word phrases that are > conceptually a single item. And keyword search will find then -- and place them high on the list with sort-by-score enabled. In any case, I'll try to make some corrections to the scoring algorithm to make it behave better when the search string/regexp matches literally as well as a regexp (e.g. for .emacs or *scratch*). It's almost there, but there are a few rough edges... -- Kim F. Storm http://www.cua.dk