[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: locate-library, the NOSUFFIX arg and a [PATCH]
From: |
Stefan Monnier |
Subject: |
Re: locate-library, the NOSUFFIX arg and a [PATCH] |
Date: |
Wed, 27 Jan 2010 21:46:41 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
>>> It would be really great to ask with:
>>> (locate-library "libary" t '("/home/mon/fnd-lib") t)
>>
>>> and get:
>>> => "/home/mon/fnd-lib/library.el.gz"
>>
>> I don't follow you. If you want that, then why do you specify a non-nil
>> value for NOSUFFIX??
> Look closely. The fourth arg of the second example is using the proposed
> SHOW-COMPRESSED.
That was definitely too subtle for me: Emacs-CVS's locate-library
already has a 4th argument, used for a completely different purpose.
> Which says, "Show me the file name sans extension unless library name
> is a compressed file in which case let me know by showing me
> the extension.
This said, I'm really lost as to why/when you'd want this kind of behavior.
> How exactly should one specify a library name for the LIBRARY arg to
> locate-library if this is not the same object(s) as a file name?
The argument provided to locate-library is the library name, so the
difference is pretty clear: "subr" is a library name and "/bar/subr.el"
is a file name.
>>> I asked to kill a library,
>> No, you didn't. Check the docstring of locate-library:
>> "Show the precise file name of Emacs library LIBRARY."
>> I.e. it returns a file name, so you asked to "kill" a file name.
> Hrmmm. Precisely what is, "the precise file name of an Emacs library"?
You lost me here.
>> I have no idea what kind of "specification" you'd expect other than the
>> one you currently get from locate-library's docstring.
> Agreed. Hence the conundrum.
Even more lost.
>> although I'm not 100% positive it's the case because I don't really
>> know what it is you want (kill-new (locate-library "subr")) to do.
> This was provided as an example where I found the expected
> behavior surprising.
Unless you explain what other behavior you expect, that doesn't help us.
> A better example use-case for the proposed patch might be where one would
> like to generate a list from which one could inform/extend/override
> `emacs-lisp-file-regexp', `byte-compile-dest-file', `declare-function',
> `check-declare-directory', `byte-compiler-base-file-name', etc. to
> select/operate on a library per case based conditionals of the list elements.
I have no idea how you suggested change would help do any of this.
>> Depending on this question, we may be able to determine things like
>> whether you'd like (your-locate-library "foo.el" t) to return "/bar/foo"
>> or "/bar/foo.el".
> Exactly.
Now that was helpful. I'm just wasting my time here.
Stefan
- Re: locate-library, the NOSUFFIX arg and a [PATCH], (continued)
- Re: locate-library, the NOSUFFIX arg and a [PATCH], Stefan Monnier, 2010/01/21
- Re: locate-library, the NOSUFFIX arg and a [PATCH], MON KEY, 2010/01/21
- Re: locate-library, the NOSUFFIX arg and a [PATCH], Stefan Monnier, 2010/01/22
- Re: locate-library, the NOSUFFIX arg and a [PATCH], MON KEY, 2010/01/22
- Re: locate-library, the NOSUFFIX arg and a [PATCH], Stefan Monnier, 2010/01/23
- Re: locate-library, the NOSUFFIX arg and a [PATCH], MON KEY, 2010/01/23
- Re: locate-library, the NOSUFFIX arg and a [PATCH], Stefan Monnier, 2010/01/24
- Re: locate-library, the NOSUFFIX arg and a [PATCH], MON KEY, 2010/01/26
- Re: locate-library, the NOSUFFIX arg and a [PATCH], Stefan Monnier, 2010/01/27
- Re: locate-library, the NOSUFFIX arg and a [PATCH], MON KEY, 2010/01/27
- Re: locate-library, the NOSUFFIX arg and a [PATCH],
Stefan Monnier <=
- Re: locate-library, the NOSUFFIX arg and a [PATCH], MON KEY, 2010/01/28