From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Kosorukoff Newsgroups: gmane.emacs.bugs Subject: bug#17467: 24.3; locate-library returning spurious path Date: Sun, 11 May 2014 10:53:34 -0700 Message-ID: References: <8361lcuu1f.fsf@gnu.org> <8338ggus2g.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd76950a8093504f92383de X-Trace: ger.gmane.org 1399830924 19971 80.91.229.3 (11 May 2014 17:55:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 May 2014 17:55:24 +0000 (UTC) Cc: 17467@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 11 19:55:16 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WjXxy-0004Vf-FW for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 May 2014 19:55:14 +0200 Original-Received: from localhost ([::1]:33849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjXxy-0005pF-52 for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 May 2014 13:55:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjXxr-0005mz-Ij for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 13:55:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjXxn-0008GL-19 for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 13:55:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjXxm-0008Fq-Tl for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 13:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WjXxm-00029r-3h for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 13:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Kosorukoff Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 May 2014 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17467 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17467-submit@debbugs.gnu.org id=B17467.13998308468210 (code B ref 17467); Sun, 11 May 2014 17:55:02 +0000 Original-Received: (at 17467) by debbugs.gnu.org; 11 May 2014 17:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:59523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjXwp-00028I-HW for submit@debbugs.gnu.org; Sun, 11 May 2014 13:54:05 -0400 Original-Received: from mail-ob0-f178.google.com ([209.85.214.178]:60616) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjXwm-00027j-IA for 17467@debbugs.gnu.org; Sun, 11 May 2014 13:54:01 -0400 Original-Received: by mail-ob0-f178.google.com with SMTP id va2so7178668obc.9 for <17467@debbugs.gnu.org>; Sun, 11 May 2014 10:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=wqJ39VLkppOI0PrTnxwGJY98KVY+ic+7V4gcjE5hNqw=; b=Q3HRRKDbWxpAtmmJyuyzOnHNfdv4OdeY3MfdxzkonM4djB8djPrBHo8DZpw0F4yjyi lKlQ1OWF7WeETBOSwNaYZ+PZqZlO1HtzlgJ/tY9abyjFWagYmEwW8jF0m4oQxpLnRjzf EzEhD9+nKA5L76FGHPkzVmpoGIyRGWz+w6QXoaNRm5pxleOY4qy8UEQam0PPKvF2cJ0a guqd/v/+STg7WYrkl5uqe48TsGjm30UhQnMUUMhbljvW420xI3G3qpiLt1mduSf/gRk1 813ITV2KGizUwYEU3b1mvHfR1wqyaTGkJqV5yRbz2OR1CA+FhcqHJmSsp304j/LsHHji cDpQ== X-Received: by 10.60.174.164 with SMTP id bt4mr28330817oec.54.1399830834839; Sun, 11 May 2014 10:53:54 -0700 (PDT) Original-Received: by 10.182.240.131 with HTTP; Sun, 11 May 2014 10:53:34 -0700 (PDT) In-Reply-To: <8338ggus2g.fsf@gnu.org> X-Google-Sender-Auth: 9ZJcQL6T9bFvk1E68z8ywYWadEc X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88911 Archived-At: --047d7bd76950a8093504f92383de Content-Type: text/plain; charset=UTF-8 I am not sure what use case did you mean exactly. (locate-library "tramp.el.gz" 'nosuffix) will return the path to tramp.el.gz as expected did you mean the following (locate-library "tramp.el") returning the path to tramp.el.gz? On Sun, May 11, 2014 at 10:46 AM, Eli Zaretskii wrote: > > From: Alex Kosorukoff > > Date: Sun, 11 May 2014 10:38:39 -0700 > > Cc: 17467@debbugs.gnu.org > > > > I think locate-library has an extra parameter nosuffix, so > (locate-library > > "tramp.el" 'nosuffix) will find "tramp.el." I guess for backward > > compatibility we can set nosuffix to t whenever the name has a valid > suffix > > already. > > But what about adding ".gz" to it? > > In any case, it is very convenient to not have to worry whether > there's already a suffix there. You cannot always know that when user > input is involved. > --047d7bd76950a8093504f92383de Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I am not sure what use case did you mean exactl= y.

(locate-library "tramp.el.gz" 'no= suffix) =C2=A0will return the path to tramp.el.gz as expected

did you mean the following

(locate-library "tramp.el") returning the path to tramp.el.= gz?


On Sun, May 11, 2014 at 10:46 AM, Eli Zaretskii <eliz@gnu.org> wr= ote:
> From: Alex Kosorukoff <alex@3form= .com>
> Date: Sun, 11 May 2014 10:38:39 -0700
> Cc: 17467@debbugs.gnu.org=
>
> I think locate-library has an extra parameter nosuffix, so (locate-lib= rary
> "tramp.el" 'nosuffix) will find "tramp.el." I = guess for backward
> compatibility we can set nosuffix to t whenever the name has a valid s= uffix
> already.

But what about adding ".gz" to it?

In any case, it is very convenient to not have to worry whether
there's already a suffix there. =C2=A0You cannot always know that when = user
input is involved.

--047d7bd76950a8093504f92383de--