From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Kanis Newsgroups: gmane.emacs.devel Subject: Source file not shown in help next to symbol Date: Tue, 14 Jul 2015 17:12:04 +0200 Message-ID: <87egkaojsr.fsf@kanis.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436886797 32182 80.91.229.3 (14 Jul 2015 15:13:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jul 2015 15:13:17 +0000 (UTC) To: Emacs Development List Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 14 17:13:07 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZF1tJ-0002wB-Vy for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2015 17:13:06 +0200 Original-Received: from localhost ([::1]:59971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF1tJ-0003NC-7v for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2015 11:13:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF1t4-0003N4-62 for emacs-devel@gnu.org; Tue, 14 Jul 2015 11:12:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZF1sz-0002Wb-7R for emacs-devel@gnu.org; Tue, 14 Jul 2015 11:12:50 -0400 Original-Received: from kanis.fr ([46.19.35.252]:35331 helo=srv2.kanis.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF1sy-0002SI-JU for emacs-devel@gnu.org; Tue, 14 Jul 2015 11:12:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kanis.fr; s=alpha; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=bFNMUIofin+x2Z/SfSM70Z576rmNKxV7rHxLmD4rCCQ=; b=m0w6cLdvvtc0JOUh7C6KV0gML7r20SGp1oggNwrZSELl66dHVafPmY7fRhYfmldivviBAXJ79d71ZnddEewot176o1o6+HdWLaESeIumFBVedCpbaJc3nKmwzh9Jfsy6; Original-Received: from smtp.comencini.fr ([164.138.25.8]) by smtp.comencini.fr with esmtpsa (TLS1.1:RSA_AES_128_CBC_SHA1:128) (Exim 4.80.1) (envelope-from ) id 1ZF1ss-0002gt-1m for emacs-devel@gnu.org; Tue, 14 Jul 2015 17:12:38 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAAB5QTFRF IBkXUxMTOCwoTC4qcUY8iFxQmmper31txpaJ/v/8aKZ1oAAAAcVJREFUOMt100tu2zAQAFDCXnUZ oAcIqG68LZULVLQBbwuSiffm6AIRRyeotAySJoVu2+FPpJWWC3/4NKOZocSW/yxWfnJ2+Bdwzhj7 8gleWVy7DXC2rkMNr2V/zRbghXIwthf3VbIA9Ffc71vZCSFyCEsBggtNS8ludwvfmhYA0Vn9o4DP zMWxR7+cPWzAYFzwM0ModtdmcDbDS6i/hT7L+RZof5yCXGrYe5jn2YO6BYMjgY+51tCIAqHgBLwR pwLnGuRjAKyBJkuN4yd4U92uCY1vUr2D/c5b8DuxyQwfOHUeaLqDJhnkkuGXbB56h2C1IVBdgncc bBi6feroa9B6jUDojnQPQKupbyXyeeCE1oT7Oqrt+SnfY3mkiyGA/3AmD3H5g32CcBx6hY8pRkwJ 9PpcjRGobUfprFnhAa1vepwcgMOhwG+pdSgKHFU9HAvoAH6XUl7lDUCCq5Qb6GMbVm3Aj++qDYCt wdBc/YHgOFCmS3mjDMRcSE2qY4E3Q3PVIQRQmeodNH4QEbRUFZzW+VotzwX4yTcRTySOML1qjcE5 hTirVqDHkMAP0PjAywp3d18JZtqzvr9zDYD+GaSKtE6Zlr/DLPNFmOcvBAAAAABJRU5ErkJggg== User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 46.19.35.252 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187869 Archived-At: Hi, I have noticed this problem 2 years ago. When I C-h f on one of my compiled function I do not get a link to the source code anymore. My emacs compiled file are not on the same directory as my source file. I do this so that I can run different version of emacs. find-lisp-object-file-name is now returning nil. In the function the variable file-name is correct. The last condition is looking in the compiled file for the source file. I haven't seen anything in the byte compiler that generates the string ";;; from file" that it uses to indicate the source. It seems like dead code to me. I just removed the last bit so that it works for me. Let me know if you want me to commit this to master. Ivan diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 1c7a68a..c1bcab6 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -275,19 +275,7 @@ suitable file is found, return nil." lib-name) file-name)) ;; The next three forms are from `find-source-lisp-file'. - (elc-file (locate-file - (concat file-name - (if (string-match "\\.el\\'" file-name) - "c" - ".elc")) - load-path nil 'readable)) - (str (when elc-file - (with-temp-buffer - (insert-file-contents-literally elc-file nil 0 256) - (buffer-string)))) - (src-file (and str - (string-match ";;; from file \\(.*\\.el\\)" str) - (match-string 1 str)))) + (src-file (locate-library file-name load-path nil 'readable))) (and src-file (file-readable-p src-file) src-file)))))) (defun help-fns--key-bindings (function)