unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: eliz@gnu.org, emacs-devel@gnu.org
Subject: Re: new apropos feature in Emacs-22
Date: Sun, 06 Nov 2005 23:54:57 +0100	[thread overview]
Message-ID: <m3irv5wfni.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <200511062016.jA6KG1902313@raven.dms.auburn.edu> (Luc Teirlinck's message of "Sun, 6 Nov 2005 14:16:01 -0600 (CST)")

Luc Teirlinck <teirllm@dms.auburn.edu> 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 <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2005-11-06 22:54 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-05  3:15 new apropos feature in Emacs-22 Luc Teirlinck
2005-11-05 10:26 ` Eli Zaretskii
2005-11-05 15:52   ` Luc Teirlinck
2005-11-05 16:43     ` Eli Zaretskii
2005-11-05 17:33       ` Drew Adams
2005-11-05 19:46         ` Eli Zaretskii
2005-11-05 20:38           ` Drew Adams
2005-11-05 22:10             ` Luc Teirlinck
2005-11-05 23:00             ` Kim F. Storm
2005-11-05 23:18               ` Lennart Borgman
2005-11-05 23:28                 ` Luc Teirlinck
2005-11-05 23:37                   ` Lennart Borgman
2005-11-05 23:31                 ` Drew Adams
2005-11-05 23:36                   ` Drew Adams
2005-11-05 23:39                   ` Lennart Borgman
2005-11-05 23:21               ` Drew Adams
2005-11-06  1:57               ` Luc Teirlinck
2005-11-06  4:32                 ` Eli Zaretskii
2005-11-06  5:36                   ` Luc Teirlinck
2005-11-06 17:05                     ` Eli Zaretskii
2005-11-06 17:22                       ` David Kastrup
2005-11-06 18:43                         ` Eli Zaretskii
2005-11-06 18:31                       ` Luc Teirlinck
2005-11-06 18:46                         ` Eli Zaretskii
2005-11-07  9:45                           ` Alan Mackenzie
2005-11-07 20:43                             ` Eli Zaretskii
2005-11-07 20:58                             ` Eli Zaretskii
2005-11-07 21:54                         ` Richard M. Stallman
2005-11-06 20:16                       ` Luc Teirlinck
2005-11-06 22:54                         ` Kim F. Storm [this message]
2005-11-06 18:47                     ` Kim F. Storm
2005-11-06 19:19                       ` Luc Teirlinck
2005-11-07  7:04                       ` Luc Teirlinck
2005-11-07 21:55                       ` Richard M. Stallman
2005-11-06  9:19                   ` David Kastrup
2005-11-05 17:39       ` Luc Teirlinck
2005-11-06 17:02     ` Stefan Monnier
2005-11-06 17:08       ` Eli Zaretskii
2005-11-06 19:55       ` Luc Teirlinck
2005-11-05 23:43 ` Richard M. Stallman
2005-11-06  0:27   ` Luc Teirlinck
2005-11-07 15:34     ` Richard M. Stallman
2005-11-07 17:54       ` Drew Adams
2005-11-07 18:56         ` Stefan Monnier
2005-11-07 19:25           ` Drew Adams
2005-11-07 22:39           ` Lennart Borgman
2005-11-07 20:52         ` Eli Zaretskii
2005-11-07 22:59           ` Drew Adams
2005-11-08  4:47             ` Eli Zaretskii
2005-11-08  4:58       ` Luc Teirlinck
2005-11-08 12:48         ` Kim F. Storm
2005-11-08 23:53           ` Miles Bader
2005-11-09  0:21             ` Lennart Borgman
2005-11-11  7:42         ` Richard M. Stallman
2005-11-11  9:29           ` Kim F. Storm
2005-11-11 10:57             ` Miles Bader
2005-11-11 16:16               ` Kim F. Storm
2005-11-12  3:38               ` Richard M. Stallman
2005-11-12  3:15           ` Luc Teirlinck
2005-11-12 17:49             ` Richard M. Stallman
2005-11-12  3:36           ` Luc Teirlinck
2005-11-12 21:19             ` Juri Linkov
2005-11-14  4:55               ` Richard M. Stallman
2005-11-15  0:52                 ` Juri Linkov
2005-11-15 23:22                   ` Richard M. Stallman
2005-11-17  7:38                     ` Juri Linkov
2005-11-17 10:06                       ` Kim F. Storm
2005-11-09 23:25       ` Kim F. Storm
2005-11-10  5:44         ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3irv5wfni.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).