help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Underscore in filenames and M-x locate


From: Holger Sparr
Subject: Re: Underscore in filenames and M-x locate
Date: Thu, 03 May 2007 09:48:20 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

Kevin Rodgers wrote:

> Holger Sparr wrote:
>> When using M-x locate the default pattern to use is evaluated by
>> `locate-word-at-point'. 
>>
>> Why isn't the Underscore included in the expression of characters to
>> skip for a sensible default value?
>
> Uh, because underscore is not a _word_ constituent character?
> Still, locate-word-at-point could be changed to use \sw instead
> of [-a-zA-Z0-9.]

Neither is [.]. 

>> Possibly the expression could be customized by the user or the active
>> region could be passed as the search-string.
>
> You could try:
>
> (require 'locate)
> (defalias 'locate-word-at-point 'word-at-point)
> (autoload 'word-at-point "thingatpt")
>
> or:
>
> (require 'locate)
> (defalias 'locate-word-at-point
>         (lambda () (symbol-name symbol-at-point)))

Of course I can do that. But if "_" is a proper character in filenames
then why not change the default.

Thanks for your answer.

Holger

-- 


reply via email to

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