* `C-h f' doesn't show file where function comes from
@ 2008-09-05 0:57 Katsumi Yamaoka
2008-09-05 1:04 ` Francis Litterio
2008-09-05 7:23 ` martin rudalics
0 siblings, 2 replies; 12+ messages in thread
From: Katsumi Yamaoka @ 2008-09-05 0:57 UTC (permalink / raw
To: emacs-devel
Hi,
When I start Emacs with
emacs -Q -l wid-edit
and type
C-h f widget-button-press RET
Emacs 22.2.92 shows:
--8<---------------cut here---------------start------------->8---
widget-button-press is an interactive compiled Lisp function in `/local/share/emacs/22.2.92/lisp/wid-edit.elc'.
(widget-button-press pos &optional event)
Invoke button at pos.
--8<---------------cut here---------------end--------------->8---
However, Emacs 23.0.60 shows:
--8<---------------cut here---------------start------------->8---
widget-button-press is an interactive compiled Lisp function.
(widget-button-press pos &optional event)
Invoke button at pos.
--8<---------------cut here---------------end--------------->8---
Why do those results differ? The way of Emacs 23.0.60 is
inconvenient to me. I need to evaluate (symbol-file 'FN) when I
want to know where the file providing the function definition is.
Regards,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-05 0:57 `C-h f' doesn't show file where function comes from Katsumi Yamaoka
@ 2008-09-05 1:04 ` Francis Litterio
2008-09-05 7:23 ` martin rudalics
1 sibling, 0 replies; 12+ messages in thread
From: Francis Litterio @ 2008-09-05 1:04 UTC (permalink / raw
To: emacs-devel
Katsumi Yamaoka wrote:
> When I start Emacs with
>
> emacs -Q -l wid-edit
>
> and type
>
> C-h f widget-button-press RET
>
> Emacs 22.2.92 shows:
> widget-button-press is an interactive compiled Lisp function in `/local/share/emacs/22.2.92/lisp/wid-edit.elc'.
> (widget-button-press pos &optional event)
>
> Invoke button at pos.
When I try that using Emacs built on Windows from sources checked out of
CVS yesterday, I see this:
widget-button-press is an interactive compiled Lisp function in
`c:/apps/emacs-cvs/lisp/wid-edit.el'.
(widget-button-press pos &optional event)
Invoke button at pos.
--
Fran
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-05 0:57 `C-h f' doesn't show file where function comes from Katsumi Yamaoka
2008-09-05 1:04 ` Francis Litterio
@ 2008-09-05 7:23 ` martin rudalics
2008-09-05 8:02 ` Katsumi Yamaoka
1 sibling, 1 reply; 12+ messages in thread
From: martin rudalics @ 2008-09-05 7:23 UTC (permalink / raw
To: Katsumi Yamaoka; +Cc: emacs-devel
> When I start Emacs with
>
> emacs -Q -l wid-edit
>
> and type
>
> C-h f widget-button-press RET
[...]
> However, Emacs 23.0.60 shows:
> --8<---------------cut here---------------start------------->8---
> widget-button-press is an interactive compiled Lisp function.
>
>
> (widget-button-press pos &optional event)
>
> Invoke button at pos.
> --8<---------------cut here---------------end--------------->8---
>
[...]
> The way of Emacs 23.0.60 is
> inconvenient to me. I need to evaluate (symbol-file 'FN) when I
> want to know where the file providing the function definition is.
Please try with the most recent CVS. If the behavior you observe
persists, please send a bug report with the following additional
information: Your checkout directory, the directory where you built
Emacs, and the directory where your Emacs is installed.
Maybe I missed something here.
Thanks, martin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-05 7:23 ` martin rudalics
@ 2008-09-05 8:02 ` Katsumi Yamaoka
2008-09-05 8:17 ` martin rudalics
0 siblings, 1 reply; 12+ messages in thread
From: Katsumi Yamaoka @ 2008-09-05 8:02 UTC (permalink / raw
To: martin rudalics; +Cc: emacs-devel
>>>>> martin rudalics wrote:
>> When I start Emacs with
>>
>> emacs -Q -l wid-edit
>>
>> and type
>>
>> C-h f widget-button-press RET
> [...]
>> However, Emacs 23.0.60 shows:
>> --8<---------------cut here---------------start------------->8---
>> widget-button-press is an interactive compiled Lisp function.
>>
>>
>> (widget-button-press pos &optional event)
>>
>> Invoke button at pos.
>> --8<---------------cut here---------------end--------------->8---
>>
> [...]
>> The way of Emacs 23.0.60 is
>> inconvenient to me. I need to evaluate (symbol-file 'FN) when I
>> want to know where the file providing the function definition is.
> Please try with the most recent CVS. If the behavior you observe
> persists, please send a bug report with the following additional
> information: Your checkout directory, the directory where you built
> Emacs, and the directory where your Emacs is installed.
> Maybe I missed something here.
Thank you for the followup. I tested it with Emacs that was
checked out from the CVS trunk this early morning (in Japan,
i.e., about 10 hours ago) and built with `make bootstrap'. Are
the other informations necessary? BTW, does the file name that
provides the `widget-button-press' function appear in the *Help*
buffer for the `C-h f' command in your system?
Regards,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-05 8:02 ` Katsumi Yamaoka
@ 2008-09-05 8:17 ` martin rudalics
2008-09-05 12:25 ` Katsumi Yamaoka
0 siblings, 1 reply; 12+ messages in thread
From: martin rudalics @ 2008-09-05 8:17 UTC (permalink / raw
To: Katsumi Yamaoka; +Cc: emacs-devel
> Thank you for the followup. I tested it with Emacs that was
> checked out from the CVS trunk this early morning (in Japan,
> i.e., about 10 hours ago) and built with `make bootstrap'. Are
> the other informations necessary?
Yes, if you still see the bug.
> BTW, does the file name that
> provides the `widget-button-press' function appear in the *Help*
> buffer for the `C-h f' command in your system?
It does so here - I get the same results (on Windows) as Francis
Litterio.
martin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-05 8:17 ` martin rudalics
@ 2008-09-05 12:25 ` Katsumi Yamaoka
2008-09-06 12:22 ` martin rudalics
0 siblings, 1 reply; 12+ messages in thread
From: Katsumi Yamaoka @ 2008-09-05 12:25 UTC (permalink / raw
To: martin rudalics; +Cc: emacs-devel
>>>>> martin rudalics wrote:
>> Thank you for the followup. I tested it with Emacs that was
>> checked out from the CVS trunk this early morning (in Japan,
>> i.e., about 10 hours ago) and built with `make bootstrap'. Are
>> the other informations necessary?
> Yes, if you still see the bug.
>> BTW, does the file name that
>> provides the `widget-button-press' function appear in the *Help*
>> buffer for the `C-h f' command in your system?
> It does so here - I get the same results (on Windows) as Francis
> Litterio.
Hm, it relates to where to install Emacs? Ok, I checked out
the trunk in a certain directory, copied it to /tmp/yamaoka by
performing
tar cf - emacs| (cd /tmp/yamaoka; tar xf -)
and did `make bootstrap' there. (I.e., I made no changes in
the files and directories that were checked out.) The configure
options for building Emacs were:
--verbose --with-x-toolkit=lucid --without-xim
And then `make install' installed Emacs to the directories:
/usr/local/bin/
/usr/local/share/emacs/23.0.60/
/usr/local/libexec/emacs/23.0.60/
/usr/local/info/
Note that /usr/local/ and /local/ are identical in my system
(/usr/local/ is a symlink to /local/).
Regards,
P.S. I'll be absent till Monday. Sorry.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-05 12:25 ` Katsumi Yamaoka
@ 2008-09-06 12:22 ` martin rudalics
2008-09-08 0:13 ` Katsumi Yamaoka
0 siblings, 1 reply; 12+ messages in thread
From: martin rudalics @ 2008-09-06 12:22 UTC (permalink / raw
To: Katsumi Yamaoka; +Cc: emacs-devel
> Hm, it relates to where to install Emacs?
It _may_ relate to where you install Emacs.
> Ok, I checked out
> the trunk in a certain directory, copied it to /tmp/yamaoka by
> performing
>
> tar cf - emacs| (cd /tmp/yamaoka; tar xf -)
>
> and did `make bootstrap' there. (I.e., I made no changes in
> the files and directories that were checked out.) The configure
> options for building Emacs were:
>
> --verbose --with-x-toolkit=lucid --without-xim
>
> And then `make install' installed Emacs to the directories:
>
> /usr/local/bin/
> /usr/local/share/emacs/23.0.60/
> /usr/local/libexec/emacs/23.0.60/
> /usr/local/info/
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.
> Note that /usr/local/ and /local/ are identical in my system
> (/usr/local/ is a symlink to /local/).
If symbolic links are the cause of the problem I would have to chase
them in a number of cases. In that case it might be simpler to find out
why this worked before my fix.
Thanks in advance, martin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-06 12:22 ` martin rudalics
@ 2008-09-08 0:13 ` Katsumi Yamaoka
2008-09-08 0:31 ` Katsumi Yamaoka
2008-09-08 6:55 ` martin rudalics
0 siblings, 2 replies; 12+ messages in thread
From: Katsumi Yamaoka @ 2008-09-08 0:13 UTC (permalink / raw
To: martin rudalics; +Cc: emacs-devel
>>>>> 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,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-08 0:13 ` Katsumi Yamaoka
@ 2008-09-08 0:31 ` Katsumi Yamaoka
2008-09-08 6:55 ` martin rudalics
2008-09-08 6:55 ` martin rudalics
1 sibling, 1 reply; 12+ messages in thread
From: Katsumi Yamaoka @ 2008-09-08 0:31 UTC (permalink / raw
To: martin rudalics; +Cc: emacs-devel
>>>>> Katsumi Yamaoka wrote:
> It relates to whether Emacs is installed or not.
[...]
> Here is a patch:
I think displaying the ".gz" extension in file names is needless
because of `auto-compression-mode'. Please replace the last patch
with this:
--- help-fns.el~ 2008-09-01 21:41:33 +0000
+++ help-fns.el 2008-09-08 00:30:41 +0000
@@ -295,7 +295,8 @@
;; 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")) lib-name))))
((let* ((lib-name (file-name-nondirectory file-name))
;; The next form is from `describe-simplify-lib-file-name'.
(file-name
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-08 0:31 ` Katsumi Yamaoka
@ 2008-09-08 6:55 ` martin rudalics
0 siblings, 0 replies; 12+ messages in thread
From: martin rudalics @ 2008-09-08 6:55 UTC (permalink / raw
To: Katsumi Yamaoka; +Cc: emacs-devel
> I think displaying the ".gz" extension in file names is needless
> because of `auto-compression-mode'. Please replace the last patch
> with this:
I hope I successfully checked that in. Please have a look.
Thanks for fixing this, martin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-08 0:13 ` Katsumi Yamaoka
2008-09-08 0:31 ` Katsumi Yamaoka
@ 2008-09-08 6:55 ` martin rudalics
2008-09-08 8:39 ` Katsumi Yamaoka
1 sibling, 1 reply; 12+ messages in thread
From: martin rudalics @ 2008-09-08 6:55 UTC (permalink / raw
To: Katsumi Yamaoka; +Cc: emacs-devel
> The newlines under the file name seem to be too many, though.
I tried to fix that. Thanks for noting.
martin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: `C-h f' doesn't show file where function comes from
2008-09-08 6:55 ` martin rudalics
@ 2008-09-08 8:39 ` Katsumi Yamaoka
0 siblings, 0 replies; 12+ messages in thread
From: Katsumi Yamaoka @ 2008-09-08 8:39 UTC (permalink / raw
To: martin rudalics; +Cc: emacs-devel
>>>>> martin rudalics wrote:
> I hope I successfully checked that in. Please have a look.
>>>>> martin rudalics wrote:
>> The newlines under the file name seem to be too many, though.
> I tried to fix that. Thanks for noting.
All is going well now. Thank you very much!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-09-08 8:39 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-05 0:57 `C-h f' doesn't show file where function comes from Katsumi Yamaoka
2008-09-05 1:04 ` Francis Litterio
2008-09-05 7:23 ` martin rudalics
2008-09-05 8:02 ` Katsumi Yamaoka
2008-09-05 8:17 ` martin rudalics
2008-09-05 12:25 ` Katsumi Yamaoka
2008-09-06 12:22 ` martin rudalics
2008-09-08 0:13 ` Katsumi Yamaoka
2008-09-08 0:31 ` Katsumi Yamaoka
2008-09-08 6:55 ` martin rudalics
2008-09-08 6:55 ` martin rudalics
2008-09-08 8:39 ` Katsumi Yamaoka
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.