all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kosorukoff <alex@3form.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 17467 <17467@debbugs.gnu.org>
Subject: bug#17467: 24.3; locate-library returning spurious path
Date: Sun, 11 May 2014 11:55:18 -0700	[thread overview]
Message-ID: <CAHD9_tQ_m7bVtWJ5GJvkUH2=J1ZX0mZZmHOaRAh9o6FfPfN+Aw@mail.gmail.com> (raw)
In-Reply-To: <831tw0uqyp.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3576 bytes --]

Yes, this makes sense. Here is a patch that the issues you mentioned.

(locate-library "tramp.el.gz")
(locate-library "tramp.el")
(locate-library "tramp")

all are working as expected

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: alex@3form.com-20140511184813-t6p0r8ac4em9kuyf
# target_branch: :parent
# testament_sha1: 66b596e6da58c1cb71dedd7fa9ba2fcf20e2964c
# timestamp: 2014-05-11 11:48:22 -0700
# base_revision_id: monnier@iro.umontreal.ca-20140511034953-\
#   1mzcrftziwhrw9hl
#
# Begin patch
=== modified file 'lisp/subr.el'
--- lisp/subr.el        2014-04-09 01:48:07 +0000
+++ lisp/subr.el        2014-05-11 18:48:13 +0000
@@ -1857,10 +1857,13 @@
                                        load-path (get-load-suffixes)))
                     nil nil
                     t))
-  (let ((file (locate-file library
-                          (or path load-path)
-                          (append (unless nosuffix (get-load-suffixes))
-                                  load-file-rep-suffixes))))
+  (let ((file
+         (locate-file library
+                      (or path load-path)
+                      (unless (or nosuffix (string-suffix-p ".el.gz"
library))
+                        (if (string-suffix-p ".el" library)
+                            load-file-rep-suffixes
+                          (get-load-suffixes))))))
     (if interactive-call
        (if file
            (message "Library is file %s" (abbreviate-file-name file))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWYwVAfIAAv3/gDIwFUBQY//3
cwgAAL////BQBZY8tZs1llc7udAaowkqTTQZAM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MEz8fnmTez3Vezk8RfdjclHhu/lYcE2HvSkl3dwczZ3vYsU2uZTmyC
pGCWvoxbFZxnDbiWK3R0F0VCmwaytPBnFWzFgJUHGY1GknHUEbBFk9XGUWvWGR5+nNydadRj5T5z
SnowbUU3afKKana/CUVL2vob4WG74SaMjF3Na1sH1PgNL0cJofdSTEu0o80cZsdsmpxk7pO8pDIM
io8ZPZ31VyN/3Y0OPNR8lnc8X3uvYVaHQNaGlKqxkd7SclywzFyp1l9wyLlklikzNRgWl7YmZFhi
qlE45zGmiSvR+fEjEPBrF82OsnFmkj2sT8NrVpYmr2TM27xjE6wFxhtqWFuEUb7RYB7BMIShLUFE
ZcHNnN0x+WDJCbytnYuXWukzWKFC1sUKSJLFaW3eWAZVe1p6CZcKqW44HeMqWXK1L8WfaquSxY+R
2LJVoYHitMnNlMJMaKKVWVTsc50S9NdIfFFr4mDau6p8kyptF8zTp3pnTC1eoUQpFEvkXI/dHRPP
Vt6zGnryeP4u5IpwoSEYKgPk



On Sun, May 11, 2014 at 11:10 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Alex Kosorukoff <alex@3form.com>
> > Date: Sun, 11 May 2014 10:53:34 -0700
> > Cc: 17467@debbugs.gnu.org
> >
> > did you mean the following
> >
> > (locate-library "tramp.el") returning the path to tramp.el.gz?
>
> Yes.  But also (locate-library "tramp.el") being able to find
> tramp.el.
>

[-- Attachment #2: Type: text/html, Size: 5028 bytes --]

  reply	other threads:[~2014-05-11 18:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-11 16:06 bug#17467: 24.3; locate-library returning spurious path Alex Kosorukoff
2014-05-11 17:03 ` Eli Zaretskii
2014-05-11 17:38   ` Alex Kosorukoff
2014-05-11 17:46     ` Eli Zaretskii
2014-05-11 17:53       ` Alex Kosorukoff
2014-05-11 18:10         ` Eli Zaretskii
2014-05-11 18:55           ` Alex Kosorukoff [this message]
2014-05-11 22:55             ` Stefan Monnier
2014-05-12  0:41               ` Alex Kosorukoff
2014-05-11 17:37 ` Glenn Morris
2014-05-11 17:43   ` Alex Kosorukoff
2014-05-11 19:50 ` Stefan Monnier
2014-05-11 20:45   ` Alex Kosorukoff
2014-05-11 21:00     ` Alex Kosorukoff
2014-05-11 21:19     ` Glenn Morris
2014-05-11 22:31       ` Alex Kosorukoff
2014-05-11 21:56     ` Stefan Monnier
2014-05-12  0:20       ` Alex Kosorukoff
2014-05-12  0:32         ` Glenn Morris
2014-05-12  1:35           ` Alex Kosorukoff
2014-05-12  2:02             ` Alex Kosorukoff
2014-05-12  2:18         ` Stefan Monnier
2014-05-12  4:36           ` Alex Kosorukoff
2014-05-12  6:39             ` Stefan Monnier
2014-05-12 17:46               ` Alex Kosorukoff
2020-08-25 10:39           ` Lars Ingebrigtsen
2020-08-25 14:22             ` Stefan Monnier
2020-08-25 14:25               ` Lars Ingebrigtsen
2020-10-13  1:41             ` Lars Ingebrigtsen
2014-05-15 19:39 ` Stefan Monnier
2014-05-15 23:57   ` Alex Kosorukoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHD9_tQ_m7bVtWJ5GJvkUH2=J1ZX0mZZmHOaRAh9o6FfPfN+Aw@mail.gmail.com' \
    --to=alex@3form.com \
    --cc=17467@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.