From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#50508: 27.2; find-function ignore find-function-source-path Date: Mon, 13 Sep 2021 15:24:24 +0000 Message-ID: <87bl4wze9h.fsf@posteo.net> References: <87zgskmxhe.fsf@posteo.net> <87ee9vkzln.fsf@gnus.org> <87fsubax48.fsf@posteo.net> <87ilz4j4qk.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23171"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50508@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 13 17:29:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPntR-0005np-Ne for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 17:29:13 +0200 Original-Received: from localhost ([::1]:50834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPntP-0007hU-He for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 11:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPntG-0007es-Ra for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 11:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPntG-000315-KU for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPntG-0001kC-CA for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 11:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2021 15:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50508 X-GNU-PR-Package: emacs Original-Received: via spool by 50508-submit@debbugs.gnu.org id=B50508.16315469046657 (code B ref 50508); Mon, 13 Sep 2021 15:29:02 +0000 Original-Received: (at 50508) by debbugs.gnu.org; 13 Sep 2021 15:28:24 +0000 Original-Received: from localhost ([127.0.0.1]:46630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPnse-0001jJ-FM for submit@debbugs.gnu.org; Mon, 13 Sep 2021 11:28:24 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:37713) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPnsc-0001j4-00 for 50508@debbugs.gnu.org; Mon, 13 Sep 2021 11:28:23 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id A8D6D240028 for <50508@debbugs.gnu.org>; Mon, 13 Sep 2021 17:28:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1631546895; bh=OU2w8nh5tVHR255AcG/lqXC+l93hUmk6cLsKehMRjoE=; h=From:To:Cc:Subject:Date:Autocrypt:From; b=SBBNd0ktT5Djs4wEyBCIDYl1CvmRvLNA/aL0c6a7cnPR5m7DnMjFif2qkx59RE1CJ e5Pspdr51vHK3C/u8cSFfdCqUIykVuLziOvjmphR7Fe+i1+QY9pJetP8U3CqwB1tR5 aBHlOVWJGmf+ZINh/zG9vg+baktMDcBCTGPeqFvjhrL6ldCVP59VDDZ1y05rPe7yLh ffSjwA2/oks+6BHFP1FICS2GFnaXELGK0uTtodv4OsDalNwrqboNhO55LrwXJXx1q9 EoA8821mFsPUA7c8A4h3WwDzdpvwr+ID1UiPmWCWm5KZeGySv6CkMsMLcg9dKwabf0 86IA6lMruVvjw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H7Vjp2H4hz9rxB; Mon, 13 Sep 2021 17:28:13 +0200 (CEST) In-reply-to: <87ilz4j4qk.fsf@gnus.org> Autocrypt: addr=thievol@posteo.net; prefer-encrypt=mutual; keydata= mQGNBF8ylcIBDADG+hy+zR6L4/vbdDDZuSaMmSrU3A5QZJpeBCvxTr7MpzzruZbhLPW1K3R6N2MA edi8Y+C8o27FVRIjpdbaKMGu9je7JV/TbUQYo3SOwCK1vM4LUn4V6ZLzSYkuiEt4eyMoiDdyvN0p kcK6P9x9DCetcEVszXzQg+yzCVrQ2hXWDXWT4M18EC3wtO7RHPouMqGiwBFhBAYErCqFWFxQHkfb tG/4yGyJ58rglb65O3qijjMWvYwcWZun9/7qm8Z4/4mHopmo2zgU+OrptnLSZfkZGz3Y7Uf452xQ GVq0Fv75NPvQru7y+DYVhuVXXyAmGxt+vf4rIiixMBbhKEPjcxEPAa2LTzex2IsTZR+QVG9uDnqC WcgaOEQ58fzXNvNhtwwF/Rgio2XWAJVdmFWS59/k9W58CIUSNKBMZh2XeGdEmtHvDtCxW3z6FJha 36RzOM3fMNNiAGdFZJA84gcdloJR+sHCDTTPT3784fjr+V8An7sI581NGFzkRQqPvEQCZbUAEQEA AbQSdGhpZXZvbEBwb3N0ZW8ubmV0iQHUBBMBCgA+FiEEI9twfRN7r3nig/xwDsVtFB0W75MFAl8y lcICGwMFCQPCZwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQDsVtFB0W75MB3QwAlTsVzFmr +S/tMKwwwOibjhNPi/OZiUC2AYfaqfVAiIHDT3RbzDe03sAJoomJkJnYVjGzQZwibCMO2+ITkMPV 2wvrd4CbgS1KCVbrltwcuK/nxPCBaHytOCZUIInnhJo5PE/h03K X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:214237 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: > Thierry Volpiatto writes: > >> Lars Ingebrigtsen writes: >> >>> 2) If the function was defined in a .el file (as this bug report >>> describes), then Emacs knows the name of the library. But it doesn't >>> then use `find-library-name' to locate the library, but just uses >>> load-history. Fixing this is pretty easy -- just use >>> `find-library-name' and use that instead of the value from >>> `load-history'. >> >> Yes, this is working fine, it is what I am using actually. >> https://github.com/emacs-helm/helm/blob/master/helm-lib.el#L1230 > > I'm just wondering whether it makes sense to fix 2) if we're not fixing > 1), and I don't think fixing 1) is a good idea (it'd make the function > massively slower). > > Instead I'm wondering whether we should just fix the doc strings here to > not mention `find-function-source-path' in `find-function' (etc), so > that the doc string matches the implementation, and instead mention > `find-library-name' (in the doc string) for your use case. Yes sure, that's ok for me, I was just surprized to not be able to let-bound `find-function-source-path` and run find-function just after with the expected effect described in docstring, once you know it, you can just write a function using `find-library-name` like I did. Thanks. =2D-=20 Thierry --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmE/bgoTHHRoaWV2b2xA cG9zdGVvLm5ldAAKCRAOxW0UHRbvk+y1C/9zIwlJoRITzfjxx5W3AT+fRUb+peuy 94CCmeJRFf4/2Go2vRHUYY+FlfnaRmM5n5BFmEdNBEzy6xcP61TLtkAc7fZ7Vage kUdeQhaPj6DzTgkt/70KuH/k/tNuRsIPGx6xGThrL4CcD/VaCnIkKD5RkTPuA0ep cQAYBnY0sKsMx99k5wSdPZC+KOFMbU0zFwAWP8OGLgKdIZ48FklM/0Y4pawacoen WyJG/0zLeZipEj8Ithw9Rk2FeluHn1V8vsB9EbpP5dbHkG3cb+TUgE15MAbi0YTg lPhePHdwWgTkUMhr7tlOmUrjNJpSoQ8ZnxPPS8Odg4xepXWbuLrDxN5jOl2Ji5cC L2tD/54KfaUR08FGgUu2B0vwz5uO3KHDq3ohuSyCjwvDD1gWFzSk78KXBfakTRwJ zC4jgDI2jLOswiAHrAd94NOGP48cyN1JRcxnj6ZayP5/nHMU6h1Ggy9c8IqBcbdu sX/LZCkJ7IU6R2XiMHe51++hqGttNwtqxZo= =1cfs -----END PGP SIGNATURE----- --=-=-=--