From: sable <zxcv_890@hotmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: apropos search
Date: Fri, 4 Jun 2010 06:13:14 -0700 (PDT) [thread overview]
Message-ID: <16f0aeff-090e-45d8-aabc-046f6529c72e@i28g2000yqa.googlegroups.com> (raw)
In-Reply-To: 87mxvdz1c8.fsf@fh-trier.de
On Jun 2, 3:22 pm, Andreas Politz <poli...@fh-trier.de> wrote:
> sable <zxcv_...@hotmail.com> writes:
> > On Jun 2, 11:15 am, David Kastrup <d...@gnu.org> wrote:
> >> sable <zxcv_...@hotmail.com> writes:
> >> > Hi,
> >> > When you're doing an apropos search, is there a way to tell Emacs to
> >> > search for "whole words only". E.g, if you use the keyword "change"
> >> > and you only want command names that contain the word change, and not
> >> > "changes" or "exchange".
>
> >> C-h a \<change\> RET
>
> >> --
> >> David Kastrup
>
> > Interesting, thanks. Is there a way (variable) to change the default
> > search to "whole words only"?
>
> I don't think so, but we can try to create it.
>
> (defcustom apropos-whole-words t
> "Whether the apropos commands should search for whole words."
> :group 'apropos
> :type 'boolean)
>
> (defadvice apropos-parse-pattern (before rewrite-pattern-ad activate)
> (when (and apropos-whole-words
> (consp (ad-get-arg 0)))
> (ad-set-arg 0 (mapcar (lambda (p)
> (format "\\<%s\\>" p))
> (ad-get-arg 0)))))
>
> -ap- Hide quoted text -
>
> - Show quoted text -
Whoa, that's a little over my head at this point, but I'll keep that
for future reference, thanks! I assume you would put this code in
the .emacs file or something...
prev parent reply other threads:[~2010-06-04 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 15:00 apropos search sable
2010-06-02 15:15 ` David Kastrup
2010-06-02 15:23 ` sable
2010-06-02 19:22 ` Andreas Politz
2010-06-04 13:13 ` sable [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16f0aeff-090e-45d8-aabc-046f6529c72e@i28g2000yqa.googlegroups.com \
--to=zxcv_890@hotmail.com \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.