From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Holger Sparr Newsgroups: gmane.emacs.help Subject: Re: Underscore in filenames and M-x locate Date: Thu, 03 May 2007 09:48:20 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1178181360 1930 80.91.229.12 (3 May 2007 08:36:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 May 2007 08:36:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 03 10:35:59 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HjWn8-0005s9-SC for geh-help-gnu-emacs@m.gmane.org; Thu, 03 May 2007 10:35:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HjWtd-0005gC-Mj for geh-help-gnu-emacs@m.gmane.org; Thu, 03 May 2007 04:42:41 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-X-Trace: news.dfncis.de jAcmhKlDJfe9sbF+SJmOWQ6MFSJ8XFNQr++d0Mujkpo7tt Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) Cancel-Lock: sha1:/P7WcI47/r1NoihJyXw9Ng8Ff9E= Original-Xref: shelby.stanford.edu gnu.emacs.help:147977 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:43578 Archived-At: 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 --