emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new apropos feature in Emacs-22


From: Luc Teirlinck
Subject: Re: new apropos feature in Emacs-22
Date: Sat, 5 Nov 2005 19:57:38 -0600 (CST)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]