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 18:35:54 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0112c5d20d2eb004f929f972 X-Trace: ger.gmane.org 1399859085 8568 80.91.229.3 (12 May 2014 01:44:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 May 2014 01:44:45 +0000 (UTC) Cc: 17467 <17467@debbugs.gnu.org> To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 12 03:44:38 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 1WjfIE-00044X-7A for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 May 2014 03:44:38 +0200 Original-Received: from localhost ([::1]:34997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjfID-00006Z-RK for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 May 2014 21:44:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjfAx-0004Jq-Ia for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 21:37:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjfAs-0001WT-Nm for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 21:37:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjfAs-0001WP-KE for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 21:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WjfAs-0001NC-1N for bug-gnu-emacs@gnu.org; Sun, 11 May 2014 21:37: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: Mon, 12 May 2014 01:37:01 +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.13998585835215 (code B ref 17467); Mon, 12 May 2014 01:37:01 +0000 Original-Received: (at 17467) by debbugs.gnu.org; 12 May 2014 01:36:23 +0000 Original-Received: from localhost ([127.0.0.1]:59893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjfAE-0001M2-Ny for submit@debbugs.gnu.org; Sun, 11 May 2014 21:36:23 -0400 Original-Received: from mail-oa0-f43.google.com ([209.85.219.43]:51906) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjfAB-0001Lk-TA for 17467@debbugs.gnu.org; Sun, 11 May 2014 21:36:20 -0400 Original-Received: by mail-oa0-f43.google.com with SMTP id l6so7453406oag.2 for <17467@debbugs.gnu.org>; Sun, 11 May 2014 18:36:14 -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=KKbcRAiyPiGcRnFUKBSpob7aY1mooXq/+QaLEkixE78=; b=ySzYxRBB309YecSTAbyqRrY+xcUSC/Lzxoc0U5MZa2jaoWYT5N8XoLJ91W/aaKfvt+ JBrj+tMjX0unrelu9ViCwsL63qfWx+5V+nl9lcd53dcs3s0G6pOtnBhXbOc72a1OprAY UTOPQ6Quiz405WLvgjOm7mk0D4C2F38zekxmd1adx/GF4ogf09Wnro0LrQmcHx6yNnT4 zpNA2//2iGL8dOORyk88GxzS3Dmr1INbTMP+079Sq17PgGyReis4NgiyvayncJAGhitW mnty+ZOd9a77UhQD71Dxw/Bf7mvDRNp16B5pkrbccUzVngsiMvQaYQSpVxJhAbXFObm1 liFg== X-Received: by 10.182.135.228 with SMTP id pv4mr1754obb.62.1399858574207; Sun, 11 May 2014 18:36:14 -0700 (PDT) Original-Received: by 10.182.240.131 with HTTP; Sun, 11 May 2014 18:35:54 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: ptqvxXk5Jj1UDEODJwj34Vk_egY 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:88948 Archived-At: --089e0112c5d20d2eb004f929f972 Content-Type: text/plain; charset=UTF-8 Thank you for the example. You are right, gnus-start.el is using locate-library to check existence of its init files and uses load to search for them again right after. Given how that code is written, we probably should keep locate-library as is since at least some people people are relying on its ability to locate arbitrary files that are not libraries. On Sun, May 11, 2014 at 5:32 PM, Glenn Morris wrote: > Alex Kosorukoff wrote: > > > I think these file names are more appropriate for data files, not > > executable ones. It is undesirable that a name "tramp.gz" will shadow a > > valid library file "tramp.elc" that won't be found as a result. When you > > say those names aren't spurious, do you have a particular example of an > > emacs elisp library in mind which file name ends with a suffix other than > > .el .elc .el.gz .elc.gz? I think the main difference is that I assume > that > > this list is exhaustive and you imply that it is not. You can prove me > > wrong by a single example. > > I've somewhat lost track of exactly what you want an example of, but: > > When Gnus starts, it will read the `gnus-site-init-file' > (`.../site-lisp/gnus-init' by default) and `gnus-init-file' (`~/.gnus' > by default) files. These are normal Emacs Lisp files and can be used > to avoid cluttering your `~/.emacs' and `site-init' files with Gnus > stuff. Gnus will also check for files with the same names as these, > but with `.elc' and `.el' suffixes. In other words, if you have set > `gnus-init-file' to `~/.gnus', it will look for `~/.gnus.elc', > `~/.gnus.el', and finally `~/.gnus' (in this order). > > and it uses locate-library to do that. > --089e0112c5d20d2eb004f929f972 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you for the example. You are right, gnus-start.el is= using locate-library to check existence of its init files and uses load to= search for them again right after. Given how that code is written, we prob= ably should keep locate-library as is since at least some people people are= relying on its ability to locate arbitrary files that are not libraries.


On Sun, May 1= 1, 2014 at 5:32 PM, Glenn Morris <rgm@gnu.org> wrote:
Alex Kosorukoff wrote:

> I think these file names are more appropriate for data files, not
> executable ones. It is undesirable that a name "tramp.gz" wi= ll shadow a
> valid library file "tramp.elc" that won't be found as a = result. When you
> say those names aren't spurious, do you have a particular =C2=A0ex= ample of an
> emacs elisp library in mind which file name ends with a suffix other t= han
> .el .elc .el.gz .elc.gz? I think the main difference is that I assume = that
> this list is exhaustive and you imply that it is not. You can prove me=
> wrong by a single example.

I've somewhat lost track of exactly what you want an example of, = but:

=C2=A0 =C2=A0 =C2=A0 =C2=A0When Gnus starts, it will read the `gnus-site-in= it-file'
=C2=A0 =C2=A0 (`.../site-lisp/gnus-init' by default) and `gnus-init-fil= e' (`~/.gnus'
=C2=A0 =C2=A0 by default) files. =C2=A0These are normal Emacs Lisp files an= d can be used
=C2=A0 =C2=A0 to avoid cluttering your `~/.emacs' and `site-init' f= iles with Gnus
=C2=A0 =C2=A0 stuff. =C2=A0Gnus will also check for files with the same nam= es as these,
=C2=A0 =C2=A0 but with `.elc' and `.el' suffixes. =C2=A0In other wo= rds, if you have set
=C2=A0 =C2=A0 `gnus-init-file' to `~/.gnus', it will look for `~/.g= nus.elc',
=C2=A0 =C2=A0 `~/.gnus.el', and finally `~/.gnus' (in this order).<= br>
and it uses locate-library to do that.

--089e0112c5d20d2eb004f929f972--