From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: locate-library, the NOSUFFIX arg and a [PATCH] Date: Sat, 23 Jan 2010 06:23:05 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264246002 29486 80.91.229.12 (23 Jan 2010 11:26:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2010 11:26:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: MON KEY Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 23 12:26:35 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NYe8Q-0000wU-N8 for ged-emacs-devel@m.gmane.org; Sat, 23 Jan 2010 12:26:35 +0100 Original-Received: from localhost ([127.0.0.1]:40346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYe8R-0006Ca-B4 for ged-emacs-devel@m.gmane.org; Sat, 23 Jan 2010 06:26:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYe8M-0006CV-Gw for emacs-devel@gnu.org; Sat, 23 Jan 2010 06:26:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYe8I-0006Bm-0R for emacs-devel@gnu.org; Sat, 23 Jan 2010 06:26:29 -0500 Original-Received: from [199.232.76.173] (port=36732 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYe8H-0006Bj-OL for emacs-devel@gnu.org; Sat, 23 Jan 2010 06:26:25 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:54553) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NYe8H-0004NJ-9s for emacs-devel@gnu.org; Sat, 23 Jan 2010 06:26:25 -0500 Original-Received: from ceviche.home (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o0NBQKqv004645; Sat, 23 Jan 2010 06:26:22 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id F3BDC700E7; Sat, 23 Jan 2010 06:23:05 -0500 (EST) In-Reply-To: (MON KEY's message of "Fri, 22 Jan 2010 21:10:13 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3454=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120305 Archived-At: > I make the same request: > (locate-library "subr" t '("/home/mon/fnd-sbr")) > locate-library returns > => "/home/mon/fnd-sbr/subr.gz" Thanks! Yes, this is a good example of a problematic case. I wish you had started with it. Indeed, the docstring would need adjustment for it. Not sure how best to do it. Basically the compression extensions like ".gz" are treated as "non-suffixes". Or maybe the code should be changed to not add the compression suffixes in this case. I can't remember enough of why the code is doing it now: maybe it's simple accidental consequence of the implementation, or maybe there's an actual use case for which it matters. >> Again, no, because this argument describes which extensions might be >> added to the provided string in order to find a file name. None of the >> file name's suffixes are ever removed by locate-library. > Except ".el.gz" right? Again, please give me a relevant example. Stefan