From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel Subject: Re: `C-h f' doesn't show file where function comes from Date: Mon, 08 Sep 2008 09:13:30 +0900 Organization: Emacsen advocacy group Message-ID: References: <48C0DE54.9030201@gmx.at> <48C0EB00.3020908@gmx.at> <48C275F3.2050201@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220832950 23387 80.91.229.12 (8 Sep 2008 00:15:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2008 00:15:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 08 02:16:45 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KcUQk-0005Kz-Pe for ged-emacs-devel@m.gmane.org; Mon, 08 Sep 2008 02:16:35 +0200 Original-Received: from localhost ([127.0.0.1]:48494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcUPk-0007Fv-0K for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 20:15:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcUOf-000777-VQ for emacs-devel@gnu.org; Sun, 07 Sep 2008 20:14:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcUOa-00075i-Ac for emacs-devel@gnu.org; Sun, 07 Sep 2008 20:14:25 -0400 Original-Received: from [199.232.76.173] (port=46577 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcUOa-00075d-6c for emacs-devel@gnu.org; Sun, 07 Sep 2008 20:14:20 -0400 Original-Received: from orlando.hostforweb.net ([216.246.45.90]:57909) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcUOY-0000k0-1f for emacs-devel@gnu.org; Sun, 07 Sep 2008 20:14:20 -0400 Original-Received: from localhost ([127.0.0.1]:36909) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1KcUNs-00023L-IV; Sun, 07 Sep 2008 19:13:37 -0500 X-Hashcash: 1:20:080908:rudalics@gmx.at::SlK1MA02YmVedV4t:000z4I X-Hashcash: 1:20:080908:emacs-devel@gnu.org::gFm4kIVwBowoQZjT:0000000000000000000000000000000000000000003JNs X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:SEWHueAy/BbW9fiBo1Pdj9j05vk= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:103661 Archived-At: >>>>> martin rudalics wrote: > It _may_ relate to where you install Emacs. I found out the cause of the problem. It relates to whether Emacs is installed or not. That `Emacs is *not* installed' means that a user built Emacs in the source tree and uses it there. In that case all the .el files are not gzipped. > The behavior you observe might be related to my recent changes. Could > you please try to edebug the function `find-lisp-object-file-name' in > help-fns.el and find out why it fails to return an absolute filename for > your settings. With Emacs that is started with `emacs -Q -l wid-edit', the form (find-lisp-object-file-name 'widget-button-press (symbol-function 'widget-button-press)) returns nil, even though the result of the form (symbol-function 'widget-button-press) contains the real .elc file name: #[(pos &optional event) ("/usr/local/share/emacs/23.0.60/lisp/wid-edit.elc" . 29635) nil 4 ("/usr/local/share/emacs/23.0.60/lisp/wid-edit.elc" . 29551) "@d"] In my case the source file is: /usr/local/share/emacs/23.0.60/lisp/wid-edit.el.gz Gzipping .el files is done by default when installing Emacs. However, `find-lisp-object-file-name' looks for only wid-edit.el. Here is a patch: --8<---------------cut here---------------start------------->8--- --- help-fns.el~ 2008-09-01 21:41:33 +0000 +++ help-fns.el 2008-09-08 00:01:27 +0000 @@ -295,7 +295,9 @@ ;; When the Elisp source file can be found in the install ;; directory return the name of that file - `file-name' should ;; have become an absolute file name ny now. - (and (file-readable-p lib-name) lib-name))) + (or (and (file-readable-p lib-name) lib-name) + (and (file-readable-p (concat lib-name ".gz")) + (concat lib-name ".gz"))))) ((let* ((lib-name (file-name-nondirectory file-name)) ;; The next form is from `describe-simplify-lib-file-name'. (file-name --8<---------------cut here---------------end--------------->8--- With this patch `C-h f widget-button-press RET' shows the file name properly as follows: --8<---------------cut here---------------start------------->8--- widget-button-press is an interactive compiled Lisp function in `/local/share/emacs/23.0.60/lisp/wid-edit.el.gz'. (widget-button-press pos &optional event) Invoke button at pos. [back] --8<---------------cut here---------------end--------------->8--- The newlines under the file name seem to be too many, though. Regards,