Katsumi Yamaoka | 5 Sep 02:53
X-Face
Favicon

`C-h f' doesn't show file where function comes from

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.
(Continue reading)

Francis Litterio | 5 Sep 03:04

Re: `C-h f' doesn't show file where function comes from

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

martin rudalics | 5 Sep 09:23

Re: `C-h f' doesn't show file where function comes from

 > 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.

(Continue reading)

Katsumi Yamaoka | 5 Sep 10:02
X-Face
Favicon

Re: `C-h f' doesn't show file where function comes from

>>>>> 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.
(Continue reading)

martin rudalics | 5 Sep 10:17

Re: `C-h f' doesn't show file where function comes from

 > 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

Katsumi Yamaoka | 5 Sep 14:25
X-Face
Favicon

Re: `C-h f' doesn't show file where function comes from

>>>>> 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:

(Continue reading)

martin rudalics | 6 Sep 14:22

Re: `C-h f' doesn't show file where function comes from

 > 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/).
(Continue reading)

Katsumi Yamaoka | 8 Sep 02:13
X-Face
Favicon

Re: `C-h f' doesn't show file where function comes from

>>>>> 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:

(Continue reading)

Katsumi Yamaoka | 8 Sep 02:31
X-Face
Favicon

Re: `C-h f' doesn't show file where function comes from

>>>>> 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

martin rudalics | 8 Sep 08:55

Re: `C-h f' doesn't show file where function comes from

> 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.

martin rudalics | 8 Sep 08:55

Re: `C-h f' doesn't show file where function comes from

> The newlines under the file name seem to be too many, though.

I tried to fix that.  Thanks for noting.

martin

Katsumi Yamaoka | 8 Sep 10:39
X-Face
Favicon

Re: `C-h f' doesn't show file where function comes from

>>>>> 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!


Gmane