From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Apropos scoring Date: 12 Jul 2003 03:23:43 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5x8yr4o7vk.fsf@kfs2.cua.dk> References: <84znkk1jcl.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1057966122 25669 80.91.224.249 (11 Jul 2003 23:28:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 11 Jul 2003 23:28:42 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jul 12 01:28:40 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19b7Jg-0006fs-00 for ; Sat, 12 Jul 2003 01:28:40 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19b7Vh-00069h-00 for ; Sat, 12 Jul 2003 01:41:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19b7KH-0008Bn-66 for emacs-devel@quimby.gnus.org; Fri, 11 Jul 2003 19:29:17 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19b7Jp-0007vb-8x for emacs-devel@gnu.org; Fri, 11 Jul 2003 19:28:49 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19b7Ib-0005Wm-Dz for emacs-devel@gnu.org; Fri, 11 Jul 2003 19:28:04 -0400 Original-Received: from pfepa.post.tele.dk ([193.162.153.2]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19b7Gu-0004Wb-FY for emacs-devel@gnu.org; Fri, 11 Jul 2003 19:25:48 -0400 Original-Received: from kfs2.cua.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 7E8B047FF4F; Sat, 12 Jul 2003 01:25:47 +0200 (CEST) Original-To: kai.grossjohann@gmx.net In-Reply-To: <84znkk1jcl.fsf@lucy.is.informatik.uni-duisburg.de> Original-Lines: 71 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15553 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15553 kai.grossjohann@gmx.net (Kai Gro=DFjohann) writes: > I just invoked (apropos "gnus group name allow char" nil), and all > scores were zero. Is this supposed to be so? >=20 > /----[ first few matches of apropos command ] > | ad-Orig-gnus-group-get-new-news (0)=20 > | Command: Get newly arrived articles. > | ad-Orig-gnus-group-list-groups (0)=20 > | Command: List newsgroups with level LEVEL or lower that have unread a= rticles. > \---- >=20 > I noticed that I get scoring for some apropos searches but not for > others. I haven't been able to find a pattern. Sorry for not looking into this sooner. The "pattern" is simple: C-h C-a gives you genuine scores (and hits sorted accordingly). M-x apropos-documentation also does scoring. M-x apropos doesn't do any scoring (so the list of matching symbols is sorted alphabetically). The "fix" to `apropos' is simple (see patch below), but I'm not sure I like it, as just scoring on the symbol name itself really doesn't give you a lot... IMO, the lexical ordering is better for this purpose... WDYT? of course, the simplest thing is to reset apropos-show-scores to nil - then you don't see the scores anymore :-) Index: apropos.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/emacs/emacs/lisp/apropos.el,v retrieving revision 1.92 diff -c -r1.92 apropos.el *** apropos.el 4 Feb 2003 11:00:25 -0000 1.92 --- apropos.el 11 Jul 2003 23:16:32 -0000 *************** *** 466,474 **** (let ((p apropos-accumulator) symbol doc properties) (while p (setcar p (list ! (setq symbol (car p)) ! 0 (when (fboundp symbol) (if (setq doc (condition-case nil (documentation symbol t) --- 466,475 ---- (let ((p apropos-accumulator) symbol doc properties) (while p + (setq symbol (car p)) (setcar p (list ! symbol ! (apropos-score-symbol symbol) ;; score (when (fboundp symbol) (if (setq doc (condition-case nil (documentation symbol t) --=20 Kim F. Storm http://www.cua.dk