GNU bug report logs - #6716
23.2; Setting `find-function-source-path' has no effect.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Štěpán Němec <stepnem@HIDDEN>; dated Sat, 24 Jul 2010 11:58:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 28 Jul 2010 01:38:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 27 21:38:36 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdvbP-0002mC-NB
	for submit <at> debbugs.gnu.org; Tue, 27 Jul 2010 21:38:36 -0400
Received: from mail-wy0-f172.google.com ([74.125.82.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stan@HIDDEN>) id 1OdvbN-0002m7-VT
	for 6716 <at> debbugs.gnu.org; Tue, 27 Jul 2010 21:38:34 -0400
Received: by wyb40 with SMTP id 40so3561658wyb.3
	for <6716 <at> debbugs.gnu.org>; Tue, 27 Jul 2010 18:38:42 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.227.137.193 with SMTP id x1mr7981727wbt.80.1280281122698; Tue, 
	27 Jul 2010 18:38:42 -0700 (PDT)
Received: by 10.216.137.67 with HTTP; Tue, 27 Jul 2010 18:38:42 -0700 (PDT)
In-Reply-To: <87eiepe022.fsf@HIDDEN>
References: <874ofpqeiu.fsf@HIDDEN>
	<AANLkTi=82qfcFyBhZDGLMmhALn36nzC71X44qqVKuPPa@HIDDEN>
	<87eiepe022.fsf@HIDDEN>
Date: Tue, 27 Jul 2010 21:38:42 -0400
X-Google-Sender-Auth: p54tPfKNGhweLQkgPR0WTjhIjUk
Message-ID: <AANLkTi=h+eiQsxwkFfdk2Nt3ZT8Lkza-OtrqvyhXctgo@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no 
	effect.
From: MON KEY <monkey@HIDDEN>
To: =?UTF-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -1.8 (-)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

On Tue, Jul 27, 2010 at 5:39 AM, =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec <stepnem@=
gmail.com> wrote:
,----
| As I wrote in the mail you quote above, `find-library-name' passes an
| absolute pathname to `locate-file', which makes no sense.
`----

Maybe, but but only if/when viewed out of the context of other closely
related (and often tightly coupled) features.

Sorry, but you can't "fix" find-library-name w/out tweaking
`locate-file' and that _can not_ happen without accounting for Emacs'
reliance on the `*-suffixes' vars/fncs.

,----
| basic symptom of what needs to be cured (although as Stefan points out,
| simply removing the path component is probably not the right solution);
`----

Damn Skippy. This is because the problem is also elsewhere (-:

,----
| it has nothing to do with {find-library,get-load,load-file-rep}-suffixes
| or file name completion.
`----

Well, assuming there can be a portable and non-backward-incompatible
fix for the symptoms you describe, I seriously doubt you will find it
w/out careful consideration of how the fix will affect these things.

Its not a simple matter of changing _only_ how pathnames (absolute or
otherwise) are handled.

here's an overview of the affected callers:

 find-library-name -> locate-file -> locate-file-internal

Profile these for a bit.

These are fundamental procedures. They do a fair degree of the primary
heavy lifting for a number of reliant satellite routines. Sooner or
later you'll find snags and weird corner cases where dependent
features will fail if they frob file namestrings in `load-history'
having extensions which rely on the return values of one or more of
the following:

`load-file-rep-suffixes'
`jka-compr-load-suffixes'
`load-suffixes'
`get-load-suffixes'
`load-history-regexp'

Of itself this isn't a problem _BUT_ it invariably becomes one as
soon as one attempts a meta-view towards fixing Emacs' approach to
file/dir traversal/searches. This is esp. so when one considers that
in the wild Emacsen are running on multiple different platforms.

Hence my reference to CL's file-system abstractions for filenames,
pathnames, namestrings, etc. for both logical and physical pathnames
as these were formulated with these types of problems in mind.

Right now Emacs is storing/accessing file "types" and "names" as well
as directories and pathnames (both logical and physical) across a
bewildering number of variables, constancts, custom-forms, functions,
subrs, and C primitives. A good majority of these objects are either
duplicate (and/or replicate with minor adaptation) an existing return
value or were otherwise implemented as a kludge to accommodate a
platform dependent file-system issue.

Many of these redundancies could/should be abstracted away by
establishing a more object-centric approach which +specifically+
address file-system frobbing and which relies less on string splitting
and regexps to manipulate file-system data-structures. Or, we could
just keep piling on more and more AWKish duct-tape...


>> Stefan, how reasaonable/welcome would it be to dovetail the EIEIO featur=
es
>> with C primitives to accomplish something like what CL offers ITR?

,----
|  Wouldn't it be better to discuss this on emacs-devel or file another bug
`----

Nah, they're too busy over there discussing how to improve Emacs'
learning curve.

,----
| I really don't see any relation here.
`----

There is one and it is more than tangential.

FWIW A good deal of Emacs' file-system fncns are Unix'ized versions
of CLTLv1 given a non-CLTLv1 name.

That no one really seems to acknowledge (or remember this) doesn't
mean it isn't so.

This is too bad because it blinds many to the reality of Greenspun's 10th:

 "Any sufficiently complicated C or Fortran program contains an ad hoc,
  informally-specified, bug-ridden, slow implementation of half of
  Common Lisp."

:SEE (URL `http://en.wikipedia.org/wiki/Greenspun%27s_Tenth_Rule')

>  =C5=A0t=C4=9Bp=C3=A1n

--
/s_P\




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 27 Jul 2010 11:57:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 27 07:57:30 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Odimo-0004tR-KP
	for submit <at> debbugs.gnu.org; Tue, 27 Jul 2010 07:57:30 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1Odiml-0004tK-DB
	for 6716 <at> debbugs.gnu.org; Tue, 27 Jul 2010 07:57:28 -0400
Received: from ceviche.home (vpn-132-204-232-74.acd.umontreal.ca
	[132.204.232.74])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o6RBvV4S005041; 
	Tue, 27 Jul 2010 07:57:32 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 9DDB16611D; Tue, 27 Jul 2010 13:57:30 +0200 (CEST)
From: Stefan Monnier <monnier@HIDDEN>
To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
Message-ID: <jwvbp9tkuol.fsf-monnier+emacs@HIDDEN>
References: <874ofpqeiu.fsf@HIDDEN> <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
	<87zkxeev1d.fsf@HIDDEN> <jwv6302czvq.fsf-monnier+emacs@HIDDEN>
	<87mxteebg8.fsf@HIDDEN> <jwv39v6ncxp.fsf-monnier+emacs@HIDDEN>
	<87aapddyq6.fsf@HIDDEN>
Date: Tue, 27 Jul 2010 13:57:30 +0200
In-Reply-To: <87aapddyq6.fsf@HIDDEN> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?=
	=?utf-8?B?ZWMiJ3M=?= message of "Tue, 27 Jul 2010 12:07:45 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3586=0
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.0 (--)

>> But your patch also affects the case where find-function-source-path is nil.

> Yes. (And the current code ignores it even when it is non-nil. Actually,
> the current code ignores everything -- it simply tries the one single
> file name it guesses is right and either finds it or errors out.)

Indeed, the current code's exclusive use of absolute file names is not
correct either.  It's just the result of uncoordinated changes.

> OK, I think I get it, thank you very much for the explanation. Honestly,
> this kind of loading seems pathologic to me -- it never crossed my mind
> to load/require "path/file" instead of first adding "path" to
> `load-path' and then `load'ing "file". What use does this have? Or
> rather, is it necessary (I imagine people might be trying to use this as
> a poor man's module system)?

Given the fact that we need to make sure every file name's first 8 chars
are unique (for the MSDOS build), it can be sometimes very convenient.
Semantic uses it extensively.  It's not used as a module system, tho
it's somewhat used as a way to specify "packages" of modules.
It also has the advantage of limiting the growth of the load-path
directory, which might improve performance somewhat (probably
negligible, tho, on current machines).

> In any case, I'm obviously still missing a lot (such as how the case
> with symbols defined outside load-path is handled or how the Help cross
> references come into play -- they still don't work even with my "fix");
> I'll try to look at the code some more.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 27 Jul 2010 10:08:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 27 06:08:56 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Odh5j-0003X3-Em
	for submit <at> debbugs.gnu.org; Tue, 27 Jul 2010 06:08:55 -0400
Received: from mail-px0-f172.google.com ([209.85.212.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1Odh5h-0003Wx-Oz
	for 6716 <at> debbugs.gnu.org; Tue, 27 Jul 2010 06:08:54 -0400
Received: by pxi20 with SMTP id 20so359430pxi.3
	for <6716 <at> debbugs.gnu.org>; Tue, 27 Jul 2010 03:09:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:cc:subject
	:in-reply-to:references:user-agent:date:message-id:mime-version
	:content-type:content-transfer-encoding;
	bh=kMnXYqKxwwYcBKtKFGTfb6lTJXrUCQJl7rcvA6mwTyI=;
	b=JutvilOK2yVqXQGH2VYg16qbW4YNRw2srcBV6KZgMzPd5pT2zOYmXqtf/uTn+UqXf7
	21ATLL2E+TSOWs+6q+7yEqgXROJsDjz4dIavwBYhTFrg2VjcHjnYcOpKNRo3FPhQ65Yw
	giABbdPF/2DbRvWoy/g+I0CpptPLY07LhK60s=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:cc:subject:in-reply-to:references:user-agent:date
	:message-id:mime-version:content-type:content-transfer-encoding;
	b=ChwW7x6SAibiExj16q0Ln1QLbzmWfU7kv8psyXXghluVwZEga7VfdYuGvkE31OE2aK
	3LDhooyG7EfinSubyrZv3eoh7CZo6dzHVp9xsOQo3fdNdouEz4IR3bXQbAVCidcPzcPu
	5IpmKHSwEksdZhxYjLs6ruouA9zVrNZt9WXZI=
Received: by 10.142.199.20 with SMTP id w20mr3335844wff.291.1280225340792;
	Tue, 27 Jul 2010 03:09:00 -0700 (PDT)
Received: from localhost ([88.103.132.186])
	by mx.google.com with ESMTPS id z1sm5419188wfd.15.2010.07.27.03.08.57
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 27 Jul 2010 03:08:59 -0700 (PDT)
From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
In-Reply-To: <jwv39v6ncxp.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Mon, 26 Jul 2010 23:44:20 +0200")
References: <874ofpqeiu.fsf@HIDDEN> <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
	<87zkxeev1d.fsf@HIDDEN> <jwv6302czvq.fsf-monnier+emacs@HIDDEN>
	<87mxteebg8.fsf@HIDDEN> <jwv39v6ncxp.fsf-monnier+emacs@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
Date: Tue, 27 Jul 2010 12:07:45 +0200
Message-ID: <87aapddyq6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.1 (---)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

Stefan Monnier <monnier@HIDDEN> writes:

>>> There lies the problem.  Other people do.  So the fix to your problem
>>> will need to satisfy both cases.
>> But if you care about that, you don't need `find-function-source-path'
>> at all, no?
>
> But your patch also affects the case where find-function-source-path is n=
il.

Yes. (And the current code ignores it even when it is non-nil. Actually,
the current code ignores everything -- it simply tries the one single
file name it guesses is right and either finds it or errors out.)

>> (And actually, I don't see a reliable way to jump to the
>> "right" source of a byte-compiled function in general (as I already
>> pointed out in the previous mail).)
>
> It doesn't have to work right when it's not possible.  But in the normal
> case where the .el and the .elc files are in the same directory and the
> .elc is the byte-compiled version of the .el file, it should work right.
>
>> Also, you replied to none of my other questions, notably -- do you
>> really (_really_) plan to reimplement `load-history', or was that just a
>> "would be nice to have"?
>
> I didn't say "reimplement".  Just that it needs to be tweaked with more
> info.  We've changed it several times in the past, there's nothing
> particularly tricky about that.
>
>> If the latter, could you propose a better solution that would improve
>> the current situation? (I'm sorry, but as I also already wrote,
>> I didn't really understand the point(s) you were making.)
>
> Some directories are not in the load-path, because the files therein are
> expected to be loaded via something like (require 'semantic/sort) or
> (load "term/vt100"), so if you see /blib/blob/semantic/sort.elc in the
> load-history, you can't just take "sort.elc" and look for "sort.el" on
> load-path because you'll find a completely unrelated file.

OK, I think I get it, thank you very much for the explanation. Honestly,
this kind of loading seems pathologic to me -- it never crossed my mind
to load/require "path/file" instead of first adding "path" to
`load-path' and then `load'ing "file". What use does this have? Or
rather, is it necessary (I imagine people might be trying to use this as
a poor man's module system)?

In any case, I'm obviously still missing a lot (such as how the case
with symbols defined outside load-path is handled or how the Help cross
references come into play -- they still don't work even with my "fix");
I'll try to look at the code some more.

  =C5=A0t=C4=9Bp=C3=A1n




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 27 Jul 2010 09:40:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 27 05:40:12 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Odgdw-0003MK-57
	for submit <at> debbugs.gnu.org; Tue, 27 Jul 2010 05:40:12 -0400
Received: from mail-pw0-f44.google.com ([209.85.160.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1Odgdu-0003MF-5T
	for 6716 <at> debbugs.gnu.org; Tue, 27 Jul 2010 05:40:10 -0400
Received: by pwj1 with SMTP id 1so355482pwj.3
	for <6716 <at> debbugs.gnu.org>; Tue, 27 Jul 2010 02:40:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:cc:subject
	:in-reply-to:references:user-agent:date:message-id:mime-version
	:content-type:content-transfer-encoding;
	bh=r8r3d+6NBljStyRTy71H5Gv52YGBsPNlByeiniIaGy4=;
	b=vdrDfMM4D+zQobpO5/q1WVT+rqWmBLiyckAlei+p2cQCvfbpm0s0gBXH4bCW8LqXwR
	yS9yNAGcnGkXalTN+qr4kHxO8zSrkv3BN50MVxlh0BqlZCEbdmrT1bEa4Ar7MdBIwgFG
	BCC+oZ6A31GLLdJrU+CG1ifNUDXI6eAHPQ1eM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:cc:subject:in-reply-to:references:user-agent:date
	:message-id:mime-version:content-type:content-transfer-encoding;
	b=Y0xUp+yB4W3HymsVRfAiXoR4IvQjKMa6gTeRjyjSDU71iLnb3XUth9vPPlSxttiawI
	ppG+4UEImuKzMd9GzBpgjrNRj5QxHXyRUzHodIvzXT9qYjEmwMLDbfT8GW7wvwB/Rkya
	mvfULzWMWIM+2M3l3h+zCnegBJU522X5XCGBQ=
Received: by 10.114.13.8 with SMTP id 8mr13011926wam.53.1280223616736;
	Tue, 27 Jul 2010 02:40:16 -0700 (PDT)
Received: from localhost ([88.103.132.186])
	by mx.google.com with ESMTPS id d39sm8481770wam.16.2010.07.27.02.40.13
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 27 Jul 2010 02:40:15 -0700 (PDT)
From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
To: MON KEY <monkey@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
In-Reply-To: <AANLkTi=82qfcFyBhZDGLMmhALn36nzC71X44qqVKuPPa@HIDDEN>
	(MON KEY's message of "Mon, 26 Jul 2010 17:40:28 -0400")
References: <874ofpqeiu.fsf@HIDDEN>
	<AANLkTi=82qfcFyBhZDGLMmhALn36nzC71X44qqVKuPPa@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
Date: Tue, 27 Jul 2010 11:39:01 +0200
Message-ID: <87eiepe022.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.1 (---)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

MON KEY <monkey@HIDDEN> writes:

> bug#6716: 23.2; Setting `find-function-source-path' has no effect.
>
> ,---- SM worte:
> | Also, it may not work for files that were loaded as "foo/bar".  I
> | think the load-history needs to be changed to keep track of both the
> | absolute file name and the name used to load the file
> | (i.e. "/bla/bla/foo/bar.elc" and "foo/bar").
> |
> | Then in find-function-source-path we will first try for
> | /bla/bla/foo/bar.el and when that fails we can fall back on searching
> | for foo/bar.el.
> `----
>
> ,---- SN wrote:
> | When you look at the current `find-library-name' definition, it's
> | _obviously_ wrong to pass an absolute file name to it. It just makes no
> | sense.
> `----
>
> IMHO this type of problem has less to do w/ the path handling of
> `find-library-name' and `locate-file's and more to do w/ how these
> (and related procedures) find/frob file-name suffixes on a given path
> e.g. the +real+ problem is with how Emacs plays with these:
>
> `find-library-suffixes', `get-load-suffixes', `load-file-rep-suffixes'
>
> FWIW =C5=A0t=C4=9Bp=C3=A1n it may be useful to look at this thread here:
>
> :SEE
> (URL `http://lists.gnu.org/archive/html/emacs-devel/2010-01/msg01060.html=
')

Thank you, but I think you misunderstood. The problem at hand (in this
bug report) _is_ the problem with how `find-library-name' handles paths;
I don't see any problem with the suffixes as in your bug report.

As I wrote in the mail you quote above, `find-library-name' passes an
absolute pathname to `locate-file', which makes no sense. That's the
basic symptom of what needs to be cured (although as Stefan points out,
simply removing the path component is probably not the right solution);
it has nothing to do with {find-library,get-load,load-file-rep}-suffixes
or file name completion.

> My impression is that Stefan's file completion regime is brittle w/re
> this type of stuff... hence his (understandable) hesitancy to make any
> dramatic changes/modifications/tweaks.
>
> WIBN if Emacs lisp could treat namestrings as "Lisp Type" objects as
> opposed to "Unix/C Type" objects? I.e. something like Common Lisp's more
> CLOS centric handlers:
>
> `namestring'
> `directory-namestring'
> `host-namestring'
> `parse-namestring'
> `file-namestring'
> `pathname'
> `pathname-name'
> `pathname-type'
> `pathname-directory'
> `truename'
> `make-pathname'
> `merge-pathnames'
> `enough-namestring'
>
> :SEE (URL `http://www.lispworks.com/documentation/lw50/CLHS/Body/19_ab.ht=
m')
>
> Stefan, how reasaonable/welcome would it be to dovetail the EIEIO features
> with C primitives to accomplish something like what CL offers ITR?

Wouldn't it be better to discuss this on emacs-devel or file another bug
report? I really don't see any relation here.

  =C5=A0t=C4=9Bp=C3=A1n




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 26 Jul 2010 21:44:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 26 17:44:24 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdVTE-0006xl-LK
	for submit <at> debbugs.gnu.org; Mon, 26 Jul 2010 17:44:24 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OdVTC-0006xg-KY
	for 6716 <at> debbugs.gnu.org; Mon, 26 Jul 2010 17:44:23 -0400
Received: from ceviche.home (vpn-132-204-232-132.acd.umontreal.ca
	[132.204.232.132])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o6QLiPJB014531;
	Mon, 26 Jul 2010 17:44:25 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 74D44660BB; Mon, 26 Jul 2010 23:44:20 +0200 (CEST)
From: Stefan Monnier <monnier@HIDDEN>
To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
Message-ID: <jwv39v6ncxp.fsf-monnier+emacs@HIDDEN>
References: <874ofpqeiu.fsf@HIDDEN> <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
	<87zkxeev1d.fsf@HIDDEN> <jwv6302czvq.fsf-monnier+emacs@HIDDEN>
	<87mxteebg8.fsf@HIDDEN>
Date: Mon, 26 Jul 2010 23:44:20 +0200
In-Reply-To: <87mxteebg8.fsf@HIDDEN> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?=
	=?utf-8?B?ZWMiJ3M=?= message of "Mon, 26 Jul 2010 13:20:39 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3586=0
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.0 (--)

>> There lies the problem.  Other people do.  So the fix to your problem
>> will need to satisfy both cases.
> But if you care about that, you don't need `find-function-source-path'
> at all, no?

But your patch also affects the case where find-function-source-path is nil.

> (And actually, I don't see a reliable way to jump to the
> "right" source of a byte-compiled function in general (as I already
> pointed out in the previous mail).)

It doesn't have to work right when it's not possible.  But in the normal
case where the .el and the .elc files are in the same directory and the
.elc is the byte-compiled version of the .el file, it should work right.

> Also, you replied to none of my other questions, notably -- do you
> really (_really_) plan to reimplement `load-history', or was that just a
> "would be nice to have"?

I didn't say "reimplement".  Just that it needs to be tweaked with more
info.  We've changed it several times in the past, there's nothing
particularly tricky about that.

> If the latter, could you propose a better solution that would improve
> the current situation? (I'm sorry, but as I also already wrote,
> I didn't really understand the point(s) you were making.)

Some directories are not in the load-path, because the files therein are
expected to be loaded via something like (require 'semantic/sort) or
(load "term/vt100"), so if you see /blib/blob/semantic/sort.elc in the
load-history, you can't just take "sort.elc" and look for "sort.el" on
load-path because you'll find a completely unrelated file.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 26 Jul 2010 21:40:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 26 17:40:29 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdVPP-0006w1-Uj
	for submit <at> debbugs.gnu.org; Mon, 26 Jul 2010 17:40:28 -0400
Received: from mail-ww0-f46.google.com ([74.125.82.46])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stan@HIDDEN>) id 1OdVPO-0006vw-Cs
	for 6716 <at> debbugs.gnu.org; Mon, 26 Jul 2010 17:40:27 -0400
Received: by wwb18 with SMTP id 18so760897wwb.15
	for <6716 <at> debbugs.gnu.org>; Mon, 26 Jul 2010 14:40:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.227.157.4 with SMTP id z4mr3129161wbw.15.1280180428165; Mon, 
	26 Jul 2010 14:40:28 -0700 (PDT)
Received: by 10.216.137.67 with HTTP; Mon, 26 Jul 2010 14:40:28 -0700 (PDT)
Date: Mon, 26 Jul 2010 17:40:28 -0400
X-Google-Sender-Auth: BwLmlR-SqLSJqYvPK0vhXHh2JL4
Message-ID: <AANLkTi=82qfcFyBhZDGLMmhALn36nzC71X44qqVKuPPa@HIDDEN>
Subject: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
From: MON KEY <monkey@HIDDEN>
To: 6716 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 6716
Cc: =?UTF-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>,
	Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

bug#6716: 23.2; Setting `find-function-source-path' has no effect.

,---- SM worte:
| Also, it may not work for files that were loaded as "foo/bar".  I
| think the load-history needs to be changed to keep track of both the
| absolute file name and the name used to load the file
| (i.e. "/bla/bla/foo/bar.elc" and "foo/bar").
|
| Then in find-function-source-path we will first try for
| /bla/bla/foo/bar.el and when that fails we can fall back on searching
| for foo/bar.el.
`----

,---- SN wrote:
| When you look at the current `find-library-name' definition, it's
| _obviously_ wrong to pass an absolute file name to it. It just makes no
| sense.
`----

IMHO this type of problem has less to do w/ the path handling of
`find-library-name' and `locate-file's and more to do w/ how these
(and related procedures) find/frob file-name suffixes on a given path
e.g. the +real+ problem is with how Emacs plays with these:

`find-library-suffixes', `get-load-suffixes', `load-file-rep-suffixes'

FWIW =C5=A0t=C4=9Bp=C3=A1n it may be useful to look at this thread here:

:SEE (URL `http://lists.gnu.org/archive/html/emacs-devel/2010-01/msg01060.h=
tml')

My impression is that Stefan's file completion regime is brittle w/re
this type of stuff... hence his (understandable) hesitancy to make any
dramatic changes/modifications/tweaks.

WIBN if Emacs lisp could treat namestrings as "Lisp Type" objects as
opposed to "Unix/C Type" objects? I.e. something like Common Lisp's more
CLOS centric handlers:

`namestring'
`directory-namestring'
`host-namestring'
`parse-namestring'
`file-namestring'
`pathname'
`pathname-name'
`pathname-type'
`pathname-directory'
`truename'
`make-pathname'
`merge-pathnames'
`enough-namestring'

:SEE (URL `http://www.lispworks.com/documentation/lw50/CLHS/Body/19_ab.htm'=
)

Stefan, how reasaonable/welcome would it be to dovetail the EIEIO features
with C primitives to accomplish something like what CL offers ITR?

--
/s_P\




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 26 Jul 2010 11:21:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 26 07:21:51 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdLkk-0001vZ-EZ
	for submit <at> debbugs.gnu.org; Mon, 26 Jul 2010 07:21:50 -0400
Received: from mail-pv0-f172.google.com ([74.125.83.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1OdLkj-0001vU-5o
	for 6716 <at> debbugs.gnu.org; Mon, 26 Jul 2010 07:21:49 -0400
Received: by pvd12 with SMTP id 12so7234pvd.3
	for <6716 <at> debbugs.gnu.org>; Mon, 26 Jul 2010 04:21:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:cc:subject
	:in-reply-to:references:user-agent:date:message-id:mime-version
	:content-type:content-transfer-encoding;
	bh=hX6SqAlNHCLaVwoybnZktH5evA64x//kLkTqZOw1CHU=;
	b=q0V8Ziff1F3TSMwucdh82EirDENc/R4NyaFn5ReJv0zxb/ZkjHFbettsFxpbgwwcYP
	rxH4HKFlPhKe2cZ+ZciQ2W4kzOYSxEWAL/jsw1jRScnHyLZfMHe4OkAdxP6jB2Kahjf+
	KAcETwyJ7jgn5OCDCdkvCB+1LWCfpPB5Yzlxo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:cc:subject:in-reply-to:references:user-agent:date
	:message-id:mime-version:content-type:content-transfer-encoding;
	b=b8AijlZGn7fw1iQRTkya0uQq6YAIS2kayCBtk4mAQb9jK1n3bbAXpOpLQPk16oMU2r
	wduqZkT04MpbtR1O/KKlDpe++eebvjCZww2s1Rm3Dv1R51AA/LvmmlK0IWcXbOfofrEx
	fDLvtRY3yzwcwK/zfbH5QD2pzyU8q8trGWGvI=
Received: by 10.114.38.6 with SMTP id l6mr10874442wal.47.1280143313574;
	Mon, 26 Jul 2010 04:21:53 -0700 (PDT)
Received: from localhost ([88.103.132.186])
	by mx.google.com with ESMTPS id 33sm6467547wad.6.2010.07.26.04.21.51
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Mon, 26 Jul 2010 04:21:52 -0700 (PDT)
From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
In-Reply-To: <jwv6302czvq.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Mon, 26 Jul 2010 12:23:06 +0200")
References: <874ofpqeiu.fsf@HIDDEN> <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
	<87zkxeev1d.fsf@HIDDEN> <jwv6302czvq.fsf-monnier+emacs@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
Date: Mon, 26 Jul 2010 13:20:39 +0200
Message-ID: <87mxteebg8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.1 (---)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

Stefan Monnier <monnier@HIDDEN> writes:

>> I don't care if the source I jump to is really "equivalent" to the
>> version I have loaded
>
> There lies the problem.  Other people do.  So the fix to your problem
> will need to satisfy both cases.

But if you care about that, you don't need `find-function-source-path'
at all, no? (And actually, I don't see a reliable way to jump to the
"right" source of a byte-compiled function in general (as I already
pointed out in the previous mail).)

Also, you replied to none of my other questions, notably -- do you
really (_really_) plan to reimplement `load-history', or was that just a
"would be nice to have"? If the latter, could you propose a better
solution that would improve the current situation? (I'm sorry, but as I
also already wrote, I didn't really understand the point(s) you were
making.)

=C5=A0t=C4=9Bp=C3=A1n




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 26 Jul 2010 10:23:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 26 06:23:07 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdKpv-0001Un-H5
	for submit <at> debbugs.gnu.org; Mon, 26 Jul 2010 06:23:07 -0400
Received: from chene.dit.umontreal.ca ([132.204.246.20])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OdKpu-0001UR-Bz
	for 6716 <at> debbugs.gnu.org; Mon, 26 Jul 2010 06:23:06 -0400
Received: from ceviche.home (vpn-132-204-232-33.acd.umontreal.ca
	[132.204.232.33])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o6QAN7bc013314; 
	Mon, 26 Jul 2010 06:23:08 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 54A49660B6; Mon, 26 Jul 2010 12:23:06 +0200 (CEST)
From: Stefan Monnier <monnier@HIDDEN>
To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
Message-ID: <jwv6302czvq.fsf-monnier+emacs@HIDDEN>
References: <874ofpqeiu.fsf@HIDDEN> <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
	<87zkxeev1d.fsf@HIDDEN>
Date: Mon, 26 Jul 2010 12:23:06 +0200
In-Reply-To: <87zkxeev1d.fsf@HIDDEN> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?=
	=?utf-8?B?ZWMiJ3M=?= message of "Mon, 26 Jul 2010 06:17:34 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3585=0
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.0 (--)

> I don't care if the source I jump to is really "equivalent" to the
> version I have loaded

There lies the problem.  Other people do.  So the fix to your problem
will need to satisfy both cases.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 26 Jul 2010 04:52:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 26 00:52:15 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdFfi-0006vR-FT
	for submit <at> debbugs.gnu.org; Mon, 26 Jul 2010 00:52:14 -0400
Received: from mail-pz0-f44.google.com ([209.85.210.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1OdFff-0006vL-8y
	for 6716 <at> debbugs.gnu.org; Mon, 26 Jul 2010 00:52:11 -0400
Received: by pzk6 with SMTP id 6so896429pzk.3
	for <6716 <at> debbugs.gnu.org>; Sun, 25 Jul 2010 21:52:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:cc:subject
	:in-reply-to:references:user-agent:date:message-id:mime-version
	:content-type:content-transfer-encoding;
	bh=vmUoRXx+JPc5Iz7Z24kFEYXu96yh6JjIN6mym5siqbM=;
	b=iCtErnJdIwT85OeNmibwb1jcCvEMD0cWX6FMaEZbMlUExzijJTMN2n0xWvoUasm4Rb
	qgBiiDmGEFPZOlQMGEQzroUP06wx69J4AN27zWa3vFZZVXIFpwK2Pay3jl66jHf+T2GT
	fwjfS9VP57i7w5rb7A3WBHp1+bSE26IPocP1M=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:cc:subject:in-reply-to:references:user-agent:date
	:message-id:mime-version:content-type:content-transfer-encoding;
	b=U57Q82uc3bOpO7SH4XBAbr0Se8wzLhs62Y+RyHn7maq0hAvOhHVqNlZ83Ut71yG0Nm
	+m+uEfrWxa92rMHHtpyoj3T/vOBAL8ghtfLNDGU9kqm6FpkpZ/MOG4snNtp6CQr7wGX7
	b+hGqUxasPQfe/v2X1SsE13/ZfYbtfBa37794=
Received: by 10.142.142.15 with SMTP id p15mr2598655wfd.249.1280119934899;
	Sun, 25 Jul 2010 21:52:14 -0700 (PDT)
Received: from localhost ([88.103.132.186])
	by mx.google.com with ESMTPS id w8sm3650502wfd.7.2010.07.25.21.52.12
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 25 Jul 2010 21:52:14 -0700 (PDT)
From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
In-Reply-To: <87zkxeev1d.fsf@HIDDEN> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?=
	=?utf-8?B?ZWMiJ3M=?= message of "Mon, 26 Jul 2010 06:17:34 +0200")
References: <874ofpqeiu.fsf@HIDDEN> <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
	<87zkxeev1d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
Date: Mon, 26 Jul 2010 06:51:01 +0200
Message-ID: <87vd82ethm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.1 (---)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

=C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec <stepnem@HIDDEN> writes:

> I don't know if my fix is the best way to do it, but it fixes the bug
> for me now and from your reply I'm not able to understand why it should
> not be installed (for now, at least) [...]

One problem I stumbled upon just now is that my "fix" appears to break
finding symbols in loaded files not in `f-f-s-p' or `load-path', such as
the init file.

=C5=A0t=C4=9Bp=C3=A1n




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 26 Jul 2010 04:18:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 26 00:18:47 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdF9L-0006f9-Al
	for submit <at> debbugs.gnu.org; Mon, 26 Jul 2010 00:18:47 -0400
Received: from mail-pz0-f44.google.com ([209.85.210.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1OdF9J-0006f3-5P
	for 6716 <at> debbugs.gnu.org; Mon, 26 Jul 2010 00:18:45 -0400
Received: by pzk6 with SMTP id 6so889120pzk.3
	for <6716 <at> debbugs.gnu.org>; Sun, 25 Jul 2010 21:18:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:cc:subject
	:in-reply-to:references:user-agent:date:message-id:mime-version
	:content-type:content-transfer-encoding;
	bh=BZBoO9KNlKdit9hs45qFkvmE4UlAl5UEyNH0hHZGzRo=;
	b=ANfKjnoEkYDOGlpK/v1VCF/GVrXPArwXLnOqTcqmXrifasBKH94keP9Bpxv3FCQnE/
	SceU3Ql0p04oh6vrI36Uvi5SR5QzeZ+6X1kRMTwIvu5+LIj3UbhUCf+UCk5oQc93+k5o
	pA5Xs+Avs78uaIbm6v1RGnBuZpSBk14YIYQOg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:cc:subject:in-reply-to:references:user-agent:date
	:message-id:mime-version:content-type:content-transfer-encoding;
	b=HuDqjoo7DHPvKBoapx90o9e0DlI7Mp6srBX7/zV2UT//1cXeKgcHWBZXX88QiA+5bC
	1Jrl9Egyo2nOq/5F6EyujSExHpkm43UlwhTSiggD01ZfwxN0QA1oFvbvNpjcQ+GRRCMz
	6iqbw5VbsyDl5y6NG/HsD3Y98mIuL0tKhIoh0=
Received: by 10.142.229.13 with SMTP id b13mr8383173wfh.166.1280117928639;
	Sun, 25 Jul 2010 21:18:48 -0700 (PDT)
Received: from localhost ([88.103.132.186])
	by mx.google.com with ESMTPS id l36sm1593978rvb.18.2010.07.25.21.18.45
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 25 Jul 2010 21:18:47 -0700 (PDT)
From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
In-Reply-To: <jwvy6czceoq.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Mon, 26 Jul 2010 01:45:13 +0200")
References: <874ofpqeiu.fsf@HIDDEN> <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
Date: Mon, 26 Jul 2010 06:17:34 +0200
Message-ID: <87zkxeev1d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.1 (---)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.1 (---)

Stefan Monnier <monnier@HIDDEN> writes:

>> Because `find-library-name' receives as its LIBRARY argument the full
>> path, but doesn't strip the directory part, setting
>> `find-function-source-path' has no effect on symbol finding -- Emacs
>> still tries the path guessed according to load path (which is not
>> correct in case you have the Elisp sources in directory different from
>> the compiled files).
>
> The file name has been changed to a full absolute name to avoid showing
> the wrong file when there's some shadowing going on.  So your patch
> would re-introduce this problem.

I don't think I understand -- setting `f-f-s-p' should provide means to
override the normal load-path search. I don't care if the source I jump
to is really "equivalent" to the version I have loaded (it might not be
anyway -- the symbol definition is often loaded from a byte-compiled file,
whereas the equivalent source file could have been changed since then).
The only thing I care about is to jump to the/a source *I want* (that's
why I set `f-f-s-p') for a symbol I search for. The current behaviour
is broken for any purpose I can think of (other than when the absolute
path is right, which is normally never the case with `f-f-s-p' set).

When you look at the current `find-library-name' definition, it's
_obviously_ wrong to pass an absolute file name to it. It just makes no
sense.

> Also, it may not work for files that were loaded as "foo/bar".  I think
> the load-history needs to be changed to keep track of both the absolute
> file name and the name used to load the file
> (i.e. "/bla/bla/foo/bar.elc" and "foo/bar").  Then in
> find-function-source-path we will first try for /bla/bla/foo/bar.el and
> when that fails we can fall back on searching for foo/bar.el.

I assume you meant `find-library-name', not `find-function-source-path'
in the last sentence.

I don't know if my fix is the best way to do it, but it fixes the bug
for me now and from your reply I'm not able to understand why it should
not be installed (for now, at least) or what concrete alternatives you
suggest (changing `load-history' implementation does not sound like
something that would be done any time soon -- or are you (or anybody)
going to do it?).


  =C5=A0t=C4=9Bp=C3=A1n

>
>
>         Stefan
>
>
>> This simple change seems to fix it for me:
>
>> diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
>> index 216d91b..f704c63 100644
>> --- a/lisp/emacs-lisp/find-func.el
>> +++ b/lisp/emacs-lisp/find-func.el
>> @@ -150,10 +150,10 @@ (defun find-library-name (library)
>>    (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
>>        (setq library (replace-match "" t t library)))
>>    (or=20
>> -   (locate-file library
>> +   (locate-file (file-name-nondirectory library)
>>  		(or find-function-source-path load-path)
>>  		(find-library-suffixes))
>> -   (locate-file library
>> +   (locate-file (file-name-nondirectory library)
>>  		(or find-function-source-path load-path)
>>  		load-file-rep-suffixes)
>>     (error "Can't find library %s" library)))
>
>
>> Regards,
>
>>   =C5=A0t=C4=9Bp=C3=A1n




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at 6716 <at> debbugs.gnu.org:


Received: (at 6716) by debbugs.gnu.org; 25 Jul 2010 23:45:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 19:45:16 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdAse-0004i6-MY
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2010 19:45:16 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OdAsc-0004i0-I2
	for 6716 <at> debbugs.gnu.org; Sun, 25 Jul 2010 19:45:14 -0400
Received: from ceviche.home (vpn-132-204-232-49.acd.umontreal.ca
	[132.204.232.49])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o6PNjEFd031008;
	Sun, 25 Jul 2010 19:45:15 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id 41A5A660B6; Mon, 26 Jul 2010 01:45:13 +0200 (CEST)
From: Stefan Monnier <monnier@HIDDEN>
To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
Subject: Re: bug#6716: 23.2; Setting `find-function-source-path' has no effect.
Message-ID: <jwvy6czceoq.fsf-monnier+emacs@HIDDEN>
References: <874ofpqeiu.fsf@HIDDEN>
Date: Mon, 26 Jul 2010 01:45:13 +0200
In-Reply-To: <874ofpqeiu.fsf@HIDDEN> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?=
	=?utf-8?B?ZWMiJ3M=?= message of "Sat, 24 Jul 2010 13:56:41 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3585=0
X-Spam-Score: -1.2 (-)
X-Debbugs-Envelope-To: 6716
Cc: 6716 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.2 (-)

> Because `find-library-name' receives as its LIBRARY argument the full
> path, but doesn't strip the directory part, setting
> `find-function-source-path' has no effect on symbol finding -- Emacs
> still tries the path guessed according to load path (which is not
> correct in case you have the Elisp sources in directory different from
> the compiled files).

The file name has been changed to a full absolute name to avoid showing
the wrong file when there's some shadowing going on.  So your patch
would re-introduce this problem.

Also, it may not work for files that were loaded as "foo/bar".  I think
the load-history needs to be changed to keep track of both the absolute
file name and the name used to load the file
(i.e. "/bla/bla/foo/bar.elc" and "foo/bar").  Then in
find-function-source-path we will first try for /bla/bla/foo/bar.el and
when that fails we can fall back on searching for foo/bar.el.


        Stefan


> This simple change seems to fix it for me:

> diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
> index 216d91b..f704c63 100644
> --- a/lisp/emacs-lisp/find-func.el
> +++ b/lisp/emacs-lisp/find-func.el
> @@ -150,10 +150,10 @@ (defun find-library-name (library)
>    (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
>        (setq library (replace-match "" t t library)))
>    (or=20
> -   (locate-file library
> +   (locate-file (file-name-nondirectory library)
>  		(or find-function-source-path load-path)
>  		(find-library-suffixes))
> -   (locate-file library
> +   (locate-file (file-name-nondirectory library)
>  		(or find-function-source-path load-path)
>  		load-file-rep-suffixes)
>     (error "Can't find library %s" library)))


> Regards,

>   =C5=A0t=C4=9Bp=C3=A1n






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Jul 2010 11:58:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 24 07:57:59 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcdMd-0005ey-Jx
	for submit <at> debbugs.gnu.org; Sat, 24 Jul 2010 07:57:59 -0400
Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1OcdMb-0005ep-UU
	for submit <at> debbugs.gnu.org; Sat, 24 Jul 2010 07:57:58 -0400
Received: from lists.gnu.org ([199.232.76.165]:53148)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <stepnem@HIDDEN>) id 1OcdMb-0003z6-Rf
	for submit <at> debbugs.gnu.org; Sat, 24 Jul 2010 07:57:57 -0400
Received: from [140.186.70.92] (port=39571 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1OcdMa-00007g-MM
	for bug-gnu-emacs@HIDDEN; Sat, 24 Jul 2010 07:57:57 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL
	autolearn=unavailable version=3.3.1
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1OcdMZ-0004Or-LI
	for bug-gnu-emacs@HIDDEN; Sat, 24 Jul 2010 07:57:56 -0400
Received: from mail-pz0-f41.google.com ([209.85.210.41]:38208)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <stepnem@HIDDEN>) id 1OcdMZ-0004Ol-Dt
	for bug-gnu-emacs@HIDDEN; Sat, 24 Jul 2010 07:57:55 -0400
Received: by pzk33 with SMTP id 33so987023pzk.0
	for <bug-gnu-emacs@HIDDEN>; Sat, 24 Jul 2010 04:57:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:to:subject:date
	:message-id:mime-version:content-type:content-transfer-encoding;
	bh=2K0wDMdv1zd82csrCzy8Yw+ew5DBmdNWSEiUFw4vHKk=;
	b=XyGpNgsUca2wCG5YcW/7ENyRhWtGjiz6dyN/JLDYRjbBE+HNWKYMu7uwIRbU5xlcVf
	NuZyGK6a/xG/78DMPQ4Z8WlrWUL8uq1vKtRc7I39rScihhN2bMI2PGfJM4pMemQMd/7l
	lQ29E6P654VyOdxxhXwZqr4xkjb2SaitR8EGY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:to:subject:date:message-id:mime-version:content-type
	:content-transfer-encoding;
	b=tEtt6Tf+ybvr4/cuTp6ke2TZMDC024+hzgE17syldcV7eWI6bGDuVdkrecgZbu4ZpG
	cYr2A22Hdc4zXl2GiFYRkf+bTfjKXs+4m7QWtf9/98xjmFHBYg6EAY/lBtlaJMr9Ku6K
	hfDKuIIpxP/56yuB24e0P4aUy4d3rlvif/cEQ=
Received: by 10.114.111.15 with SMTP id j15mr7476339wac.187.1279972674161;
	Sat, 24 Jul 2010 04:57:54 -0700 (PDT)
Received: from localhost ([88.103.132.186])
	by mx.google.com with ESMTPS id d39sm2339989wam.4.2010.07.24.04.57.51
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sat, 24 Jul 2010 04:57:53 -0700 (PDT)
From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= <stepnem@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 23.2; Setting `find-function-source-path' has no effect.
Date: Sat, 24 Jul 2010 13:56:41 +0200
Message-ID: <874ofpqeiu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.8 (----)


Because `find-library-name' receives as its LIBRARY argument the full
path, but doesn't strip the directory part, setting
`find-function-source-path' has no effect on symbol finding -- Emacs
still tries the path guessed according to load path (which is not
correct in case you have the Elisp sources in directory different from
the compiled files).

This simple change seems to fix it for me:

diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 216d91b..f704c63 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -150,10 +150,10 @@ (defun find-library-name (library)
   (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
       (setq library (replace-match "" t t library)))
   (or=20
-   (locate-file library
+   (locate-file (file-name-nondirectory library)
 		(or find-function-source-path load-path)
 		(find-library-suffixes))
-   (locate-file library
+   (locate-file (file-name-nondirectory library)
 		(or find-function-source-path load-path)
 		load-file-rep-suffixes)
    (error "Can't find library %s" library)))


Regards,

  =C5=A0t=C4=9Bp=C3=A1n




Acknowledgement sent to Štěpán Němec <stepnem@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6716; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.