unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58314: 29.0.50; C-h k with native compilation not conclusive
@ 2022-10-05 19:26 Jean Louis
  2022-10-05 19:45 ` Eli Zaretskii
  2022-10-05 19:55 ` Jean Louis
  0 siblings, 2 replies; 8+ messages in thread
From: Jean Louis @ 2022-10-05 19:26 UTC (permalink / raw)
  To: 58314


I remember with byte compiling I was never lead to go into byte compiled
file when I was inspecting commands with C-h k

With native compilation, I do: C-h k and I get this:

v n runs the command cf-people-view-notes (found in
rcd-db-people-mode-map), which is an interactive native-compiled Lisp
function in
‘../eln-cache/29.0.50-44cd31c8/rcd-cf-a9476332-a313d4ff.eln’.

It is bound to v n.

(cf-people-view-notes &optional ID)

View notes for people ID.

However, what I really expect is that instead of byte compiled file,
that I am shown the source file, and that I become able to click on the
link to come to the function.

Instead if I click on the link:

‘../eln-cache/29.0.50-44cd31c8/rcd-cf-a9476332-a313d4ff.eln’.

I can just see error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  locate-file(nil ("/home/data1/protected/.emacs.d/elpa/hyperbole-8.0...." "/home/data1/protected/.emacs.d/elpa/hyperbole-8.0...." "~/Programming/git/emacs-libpq/" "~/Programming/git/emacs-libvterm" "/usr/locals/share/emacs/site-lisp" "/home/data1/protected/Programming/git/ledger-mode" "/home/data1/protected/Programming/emacs-lisp/my-sy..." "/home/data1/protected/Programming/emacs-lisp" "/home/data1/protected/.emacs.d/packages" "/home/data1/protected/Programming/git/racket-mode" "/home/data1/protected/.emacs.d/Drew Adams" "/usr/share/festival" "/home/data1/protected/.emacs.d/elpa/2048-game-2020..." "/home/data1/protected/.emacs.d/elpa/a-20210929.151..." "/home/data1/protected/.emacs.d/elpa/adoc-mode-2016..." "/home/data1/protected/.emacs.d/elpa/afternoon-them..." "/home/data1/protected/.emacs.d/elpa/aggressive-com..." "/home/data1/protected/.emacs.d/elpa/aggressive-ind..." "/home/data1/protected/.emacs.d/elpa/ahungry-theme-..." "/home/data1/protected/.emacs.d/elpa/aircon-theme-0..." "/home/data1/protected/.emacs.d/elpa/alect-themes-0..." "/home/data1/protected/.emacs.d/elpa/ample-theme-0...." "/home/data1/protected/.emacs.d/elpa/anaphora-20180..." "/home/data1/protected/.emacs.d/elpa/annotate-20210..." "/home/data1/protected/.emacs.d/elpa/annotation-202..." "/home/data1/protected/.emacs.d/elpa/apropospriate-..." "/home/data1/protected/.emacs.d/elpa/ascii-art-to-u..." "/home/data1/protected/.emacs.d/elpa/auctex-13.1.3/" "/home/data1/protected/.emacs.d/elpa/auctex-13.1.3" "/home/data1/protected/.emacs.d/elpa/bbdb-20200928...." "/home/data1/protected/.emacs.d/elpa/blimp-20180903..." "/home/data1/protected/.emacs.d/elpa/boxquote-2.2" "/home/data1/protected/.emacs.d/elpa/boxy-1.1.1" "/home/data1/protected/.emacs.d/elpa/buc-2.0.0" "/home/data1/protected/.emacs.d/elpa/captain-1.0.3" "/home/data1/protected/.emacs.d/elpa/company-0.9.13" "/home/data1/protected/.emacs.d/elpa/context-colori..." "/home/data1/protected/.emacs.d/elpa/corfu-0.26" "/home/data1/protected/.emacs.d/elpa/cpupower-1.0.5" "/home/data1/protected/.emacs.d/elpa/crdt-0.3.0" "/home/data1/protected/.emacs.d/elpa/csv-mode-1.21" "/home/data1/protected/.emacs.d/elpa/cyberpunk-them..." "/home/data1/protected/.emacs.d/elpa/dash-functiona..." "/home/data1/protected/.emacs.d/elpa/dictionary-202..." "/home/data1/protected/.emacs.d/elpa/connection-201..." "/home/data1/protected/.emacs.d/elpa/dired-du-0.5.2" "/home/data1/protected/.emacs.d/elpa/dired-launch-2..." "/home/data1/protected/.emacs.d/elpa/dired-rsync-20..." "/home/data1/protected/.emacs.d/elpa/dmenu-20190908..." "/home/data1/protected/.emacs.d/elpa/double-opt-in-..." ...) (".so" ".so.gz" ".el" ".el.gz"))
  find-library-name("/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...")
  find-function-search-for-symbol(cf-people-view-notes nil "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...")
  help-function-def--button-function(cf-people-view-notes "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4..." nil)
  help-do-xref(nil help-function-def--button-function (cf-people-view-notes "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4..."))
  help-button-action(#<marker (moves after insertion) at 137 in *Help*>)
  button-activate(#<marker (moves after insertion) at 137 in *Help*> nil)
  push-button(137)
  funcall-interactively(push-button 137)
  command-execute(push-button)
  recursive-edit()
  (unwind-protect (recursive-edit) (if (get-buffer-window read-buffer) (progn (setq new-value (buffer-substring (point-min) (point-max))) (kill-buffer read-buffer))))
  (save-excursion (switch-to-buffer read-buffer) (erase-buffer) (set-buffer read-buffer) (if mode (if (fboundp mode) (funcall mode) (rcd-message "You need `%s' mode" (symbol-name mode))) (text-mode)) (while minor-modes (let ((minor-mode (car-safe (prog1 minor-modes (setq minor-modes ...))))) (if minor-mode (if (fboundp (intern minor-mode)) (funcall (intern minor-mode)) (rcd-message "You need `%s' minor mode" (symbol-name minor-mode)))))) (setq rcd-current-table table) (setq rcd-current-column column) (setq rcd-current-table-id table-id) (local-set-key (kbd "<f8>") 'exit-recursive-edit) (if keymap (progn (use-local-map keymap))) (if input-method (progn (set-input-method input-method))) (if rcd-word-processing (progn (rcd-word-processing))) (setq header-line-format (format "%s ➜ Finish editing with or C-M-c or F8" title)) (if (stringp value) (insert value)) (rcd-highlight-list highlight-list) (goto-char (or point (point-min))) (rcd-speak "You may quit the buffer with Meta Control C") (message "When you're done editing press C-M-c or F8 to cont...") (setq eval-expression-debug-on-error nil) (unwind-protect (recursive-edit) (if (get-buffer-window read-buffer) (progn (setq new-value (buffer-substring (point-min) (point-max))) (kill-buffer read-buffer)))) (setq eval-expression-debug-on-error t) (switch-to-buffer this-buffer) new-value)
  (let ((this-buffer (buffer-name)) (title (or title "")) (value (or value "")) (new-value value) (point (cond ((numberp place) place) ((listp place) (cdr (assoc "place" place))))) (table (if (listp place) (progn (cdr (assoc "table" place))))) (column (if (listp place) (progn (cdr (assoc "column" place))))) (table-id (if (listp place) (progn (cdr (assoc "table-id" place))))) (_ (message "EDIT %s" place)) (_ (message "%s" place)) (read-buffer (if buffer-name (generate-new-buffer buffer-name) (generate-new-buffer "*edit-string*")))) (save-excursion (switch-to-buffer read-buffer) (erase-buffer) (set-buffer read-buffer) (if mode (if (fboundp mode) (funcall mode) (rcd-message "You need `%s' mode" (symbol-name mode))) (text-mode)) (while minor-modes (let ((minor-mode (car-safe (prog1 minor-modes ...)))) (if minor-mode (if (fboundp (intern minor-mode)) (funcall (intern minor-mode)) (rcd-message "You need `%s' minor mode" (symbol-name minor-mode)))))) (setq rcd-current-table table) (setq rcd-current-column column) (setq rcd-current-table-id table-id) (local-set-key (kbd "<f8>") 'exit-recursive-edit) (if keymap (progn (use-local-map keymap))) (if input-method (progn (set-input-method input-method))) (if rcd-word-processing (progn (rcd-word-processing))) (setq header-line-format (format "%s ➜ Finish editing with or C-M-c or F8" title)) (if (stringp value) (insert value)) (rcd-highlight-list highlight-list) (goto-char (or point (point-min))) (rcd-speak "You may quit the buffer with Meta Control C") (message "When you're done editing press C-M-c or F8 to cont...") (setq eval-expression-debug-on-error nil) (unwind-protect (recursive-edit) (if (get-buffer-window read-buffer) (progn (setq new-value (buffer-substring (point-min) (point-max))) (kill-buffer read-buffer)))) (setq eval-expression-debug-on-error t) (switch-to-buffer this-buffer) new-value))
  read-from-buffer(";;; rcd-cf.el --- CF or Central Files functions fo..." "vc_value ID 37799" text-mode nil nil (("table" . "vc") ("column" . "vc_value") ("table-id" . 37799) ("place" . 0)))
  rcd-db-edit-entry("vc" "vc_value" 37799)
  rcd-db-tabulated-edit-value()
  funcall-interactively(rcd-db-tabulated-edit-value)
  command-execute(rcd-db-tabulated-edit-value)
  recursive-edit()
  (unwind-protect (recursive-edit) (if (get-buffer-window read-buffer) (progn (setq new-value (buffer-substring (point-min) (point-max))) (kill-buffer read-buffer))))
  (save-excursion (switch-to-buffer read-buffer) (erase-buffer) (set-buffer read-buffer) (if mode (if (fboundp mode) (funcall mode) (rcd-message "You need `%s' mode" (symbol-name mode))) (text-mode)) (while minor-modes (let ((minor-mode (car-safe (prog1 minor-modes (setq minor-modes ...))))) (if minor-mode (if (fboundp (intern minor-mode)) (funcall (intern minor-mode)) (rcd-message "You need `%s' minor mode" (symbol-name minor-mode)))))) (setq rcd-current-table table) (setq rcd-current-column column) (setq rcd-current-table-id table-id) (local-set-key (kbd "<f8>") 'exit-recursive-edit) (if keymap (progn (use-local-map keymap))) (if input-method (progn (set-input-method input-method))) (if rcd-word-processing (progn (rcd-word-processing))) (setq header-line-format (format "%s ➜ Finish editing with or C-M-c or F8" title)) (if (stringp value) (insert value)) (rcd-highlight-list highlight-list) (goto-char (or point (point-min))) (rcd-speak "You may quit the buffer with Meta Control C") (message "When you're done editing press C-M-c or F8 to cont...") (setq eval-expression-debug-on-error nil) (unwind-protect (recursive-edit) (if (get-buffer-window read-buffer) (progn (setq new-value (buffer-substring (point-min) (point-max))) (kill-buffer read-buffer)))) (setq eval-expression-debug-on-error t) (switch-to-buffer this-buffer) new-value)
  (let ((this-buffer (buffer-name)) (title (or title "")) (value (or value "")) (new-value value) (point (cond ((numberp place) place) ((listp place) (cdr (assoc "place" place))))) (table (if (listp place) (progn (cdr (assoc "table" place))))) (column (if (listp place) (progn (cdr (assoc "column" place))))) (table-id (if (listp place) (progn (cdr (assoc "table-id" place))))) (_ (message "EDIT %s" place)) (_ (message "%s" place)) (read-buffer (if buffer-name (generate-new-buffer buffer-name) (generate-new-buffer "*edit-string*")))) (save-excursion (switch-to-buffer read-buffer) (erase-buffer) (set-buffer read-buffer) (if mode (if (fboundp mode) (funcall mode) (rcd-message "You need `%s' mode" (symbol-name mode))) (text-mode)) (while minor-modes (let ((minor-mode (car-safe (prog1 minor-modes ...)))) (if minor-mode (if (fboundp (intern minor-mode)) (funcall (intern minor-mode)) (rcd-message "You need `%s' minor mode" (symbol-name minor-mode)))))) (setq rcd-current-table table) (setq rcd-current-column column) (setq rcd-current-table-id table-id) (local-set-key (kbd "<f8>") 'exit-recursive-edit) (if keymap (progn (use-local-map keymap))) (if input-method (progn (set-input-method input-method))) (if rcd-word-processing (progn (rcd-word-processing))) (setq header-line-format (format "%s ➜ Finish editing with or C-M-c or F8" title)) (if (stringp value) (insert value)) (rcd-highlight-list highlight-list) (goto-char (or point (point-min))) (rcd-speak "You may quit the buffer with Meta Control C") (message "When you're done editing press C-M-c or F8 to cont...") (setq eval-expression-debug-on-error nil) (unwind-protect (recursive-edit) (if (get-buffer-window read-buffer) (progn (setq new-value (buffer-substring (point-min) (point-max))) (kill-buffer read-buffer)))) (setq eval-expression-debug-on-error t) (switch-to-buffer this-buffer) new-value))
  read-from-buffer(";;; rcd-cf.el --- CF or Central Files functions fo..." "vc_value ID 81784" text-mode nil nil (("table" . "vc") ("column" . "vc_value") ("table-id" . 81784) ("place" . 0)))
  rcd-db-edit-entry("vc" "vc_value" 81784)
  rcd-db-tabulated-edit-value()
  funcall-interactively(rcd-db-tabulated-edit-value)
  command-execute(rcd-db-tabulated-edit-value)





In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.17.6, Xaw3d scroll bars) of 2022-10-05 built on
 protected.rcdrun.com
Repository revision: 9449e0740cd97bbcdbaeb4713dc2dd51e65994fd
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Parabola GNU/Linux-libre

Configured using:
 'configure --with-x-toolkit=lucid --with-native-compilation'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=exwm-xim
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra
help-mode bytecomp byte-compile cconv cl-lib sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
faces cus-face macroexp files window text-properties overlay sha1 md5
base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
xinput2 x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 79577 9313)
 (symbols 48 7181 0)
 (strings 32 20692 1256)
 (string-bytes 1 616498)
 (vectors 16 16108)
 (vector-slots 8 280250 10874)
 (floats 8 29 30)
 (intervals 56 257 0)
 (buffers 1000 12))

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#58314: 29.0.50; C-h k with native compilation not conclusive
  2022-10-05 19:26 bug#58314: 29.0.50; C-h k with native compilation not conclusive Jean Louis
@ 2022-10-05 19:45 ` Eli Zaretskii
  2022-10-05 19:50   ` Jean Louis
  2022-10-05 19:55 ` Jean Louis
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-10-05 19:45 UTC (permalink / raw)
  To: Jean Louis, Stefan Monnier; +Cc: 58314

> From: Jean Louis <bugs@gnu.support>
> Date: Wed, 05 Oct 2022 22:26:20 +0300
> 
> 
> I remember with byte compiling I was never lead to go into byte compiled
> file when I was inspecting commands with C-h k
> 
> With native compilation, I do: C-h k and I get this:
> 
> v n runs the command cf-people-view-notes (found in
> rcd-db-people-mode-map), which is an interactive native-compiled Lisp
> function in
> ‘../eln-cache/29.0.50-44cd31c8/rcd-cf-a9476332-a313d4ff.eln’.
> 
> It is bound to v n.

I cannot reproduce this.  I don't have rcd-cf.el here, of course, but
I tested with "C-h k n" in Help mode, and I see the expected:

  n runs the command help-goto-next-page (found in help-mode-map), which
  is an interactive native-compiled Lisp function in ‘help-mode.el’.

So this is somehow related to your own files.  Maybe it's because how
we store the doc strings or something?  Stefan, any ideas?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#58314: 29.0.50; C-h k with native compilation not conclusive
  2022-10-05 19:45 ` Eli Zaretskii
@ 2022-10-05 19:50   ` Jean Louis
  2022-10-06 12:29     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Jean Louis @ 2022-10-05 19:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 58314, Stefan Monnier

* Eli Zaretskii <eliz@gnu.org> [2022-10-05 22:47]:
> > From: Jean Louis <bugs@gnu.support>
> > Date: Wed, 05 Oct 2022 22:26:20 +0300
> > 
> > 
> > I remember with byte compiling I was never lead to go into byte compiled
> > file when I was inspecting commands with C-h k
> > 
> > With native compilation, I do: C-h k and I get this:
> > 
> > v n runs the command cf-people-view-notes (found in
> > rcd-db-people-mode-map), which is an interactive native-compiled Lisp
> > function in
> > ‘../eln-cache/29.0.50-44cd31c8/rcd-cf-a9476332-a313d4ff.eln’.
> > 
> > It is bound to v n.
> 
> I cannot reproduce this.  I don't have rcd-cf.el here, of course, but
> I tested with "C-h k n" in Help mode, and I see the expected:
> 
>   n runs the command help-goto-next-page (found in help-mode-map), which
>   is an interactive native-compiled Lisp function in ‘help-mode.el’.
> 
> So this is somehow related to your own files.  Maybe it's because how
> we store the doc strings or something?  Stefan, any ideas?

1. emacs -Q

2. {C-x C-f my-file.el RET}

3. write in my-file.el:

  (defun my-function ()
  (message "Hello"))

4. {M-x emacs-lisp-native-compile-and-load RET}

5. {C-h f my-function RET}

6. Then I see:

my-function is a native-compiled Lisp function in
‘~/.emacs.d/eln-cache/29.0.50-44cd31c8/my-file-fb862712-14785989.eln’.

(my-function)

Not documented.

But I am expecting to see link to my-file.el and not to compiled file.

And if I click on the link:

‘~/.emacs.d/eln-cache/29.0.50-44cd31c8/my-file-fb862712-14785989.eln’.

then I get:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  locate-file(nil ("/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l...") (".so" ".so.gz" ".el" ".el.gz"))
  find-library-name("/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...")
  find-function-search-for-symbol(my-function nil "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...")
  help-function-def--button-function(my-function "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4..." nil)
  help-do-xref(nil help-function-def--button-function (my-function "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4..."))
  help-button-action(#<marker (moves after insertion) at 54 in *Help*>)
  button-activate(#<marker (moves after insertion) at 54 in *Help*> nil)
  push-button(54)
  funcall-interactively(push-button 54)
  command-execute(push-button)


--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#58314: 29.0.50; C-h k with native compilation not conclusive
  2022-10-05 19:26 bug#58314: 29.0.50; C-h k with native compilation not conclusive Jean Louis
  2022-10-05 19:45 ` Eli Zaretskii
@ 2022-10-05 19:55 ` Jean Louis
  1 sibling, 0 replies; 8+ messages in thread
From: Jean Louis @ 2022-10-05 19:55 UTC (permalink / raw)
  To: 58314

I think that xref get broken related to this.

How to reproduce:

1. emacs -Q

2. open my-file.el

3. Write:

(defun my-function ()
  (my-other-function)
  (message "Hello"))

(defun my-other-function ()
  (message "I am other function"))

4. M-x emacs-lisp-native-compile-and-load

5. Put cursor or (my-other-function)

6. M-. for xref-find-definition

6. Error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  locate-file(nil ("/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l..." "/home/data1/protected/Programming/Software/emacs/l...") (".so" ".so.gz" ".el" ".el.gz"))
  find-library-name("/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...")
  find-function-search-for-symbol(my-other-function nil "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...")
  #f(compiled-function (l) #<bytecode -0xbc662d16a1ea5df>)(#s(xref-elisp-location :symbol my-other-function :type nil :file "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4..."))
  apply(#f(compiled-function (l) #<bytecode -0xbc662d16a1ea5df>) #s(xref-elisp-location :symbol my-other-function :type nil :file "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...") nil)
  xref-location-marker(#s(xref-elisp-location :symbol my-other-function :type nil :file "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4..."))
  xref-pop-to-location(#s(xref-item :summary #("(defun my-other-function)" 1 6 (face font-lock-keyword-face) 7 24 (face font-lock-function-name-face)) :location #s(xref-elisp-location :symbol my-other-function :type nil :file "/home/data1/protected/.emacs.d/eln-cache/29.0.50-4...")) nil)
  xref-show-definitions-buffer(#f(compiled-function () #<bytecode -0x7ba4afd07ebc79a>) ((window . #<window 3 on my-file.el>) (display-action) (auto-jump)))
  xref--show-defs(#f(compiled-function () #<bytecode -0x7ba4afd07ebc79a>) nil)
  xref--find-definitions(#("my-other-function" 0 17 (pos 26)) nil)
  xref-find-definitions(#("my-other-function" 0 17 (pos 26)))
  funcall-interactively(xref-find-definitions #("my-other-function" 0 17 (pos 26)))
  command-execute(xref-find-definitions)
  read-from-minibuffer("M-x " nil (keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (M-down . minibuffer-next-completion) (M-up . minibuffer-previous-completion) (27 keymap (13 . minibuffer-choose-completion) (103 keymap (27 keymap (99 . switch-to-completions))) (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (backtab . minibuffer-complete) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (24 keymap (down . minibuffer-complete-defaults) (up . minibuffer-complete-history)) (13 . exit-minibuffer) (10 . exit-minibuffer) (7 . abort-minibuffers) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil extended-command-history nil nil)
  completing-read-default("M-x " #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_56> #f(compiled-function (sym) #<bytecode 0x10f297e0d9d6a153>) t nil extended-command-history nil nil)
  read-extended-command-1("M-x " nil)
  read-extended-command()
  byte-code("\302\30\11\303 \10)E\207" [execute-extended-command--last-typed current-prefix-arg nil read-extended-command] 3)
  command-execute(execute-extended-command)








--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#58314: 29.0.50; C-h k with native compilation not conclusive
  2022-10-05 19:50   ` Jean Louis
@ 2022-10-06 12:29     ` Lars Ingebrigtsen
  2022-10-06 14:28       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-10-06 12:29 UTC (permalink / raw)
  To: Jean Louis; +Cc: Eli Zaretskii, Andrea Corallo, 58314, Stefan Monnier

Jean Louis <bugs@gnu.support> writes:

> 1. emacs -Q
>
> 2. {C-x C-f my-file.el RET}
>
> 3. write in my-file.el:
>
>   (defun my-function ()
>   (message "Hello"))
>
> 4. {M-x emacs-lisp-native-compile-and-load RET}
>
> 5. {C-h f my-function RET}
>
> 6. Then I see:
>
> my-function is a native-compiled Lisp function in
> ‘~/.emacs.d/eln-cache/29.0.50-44cd31c8/my-file-fb862712-14785989.eln’.

Thanks for the recipe -- I can reproduce this issue, too.

We could fix this in help-fns, but I wonder whether there's something
that should be fixed on the nativecomp side -- in this case, it appears
to not set up...  something...  that allows you to find my-file.el.
I.e., `symbol-file' isn't able to find my-file.el, and it probably
should be?

I've added Andrea to the CCs; perhaps he has a comment.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#58314: 29.0.50; C-h k with native compilation not conclusive
  2022-10-06 12:29     ` Lars Ingebrigtsen
@ 2022-10-06 14:28       ` Eli Zaretskii
  2023-06-05 22:49         ` Andrea Corallo
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-10-06 14:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 58314, monnier, bugs, akrl

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  58314@debbugs.gnu.org,  Stefan Monnier
>  <monnier@iro.umontreal.ca>, Andrea Corallo <akrl@sdf.org>
> Date: Thu, 06 Oct 2022 14:29:56 +0200
> 
> Jean Louis <bugs@gnu.support> writes:
> 
> > 1. emacs -Q
> >
> > 2. {C-x C-f my-file.el RET}
> >
> > 3. write in my-file.el:
> >
> >   (defun my-function ()
> >   (message "Hello"))
> >
> > 4. {M-x emacs-lisp-native-compile-and-load RET}
> >
> > 5. {C-h f my-function RET}
> >
> > 6. Then I see:
> >
> > my-function is a native-compiled Lisp function in
> > ‘~/.emacs.d/eln-cache/29.0.50-44cd31c8/my-file-fb862712-14785989.eln’.
> 
> Thanks for the recipe -- I can reproduce this issue, too.
> 
> We could fix this in help-fns, but I wonder whether there's something
> that should be fixed on the nativecomp side -- in this case, it appears
> to not set up...  something...  that allows you to find my-file.el.
> I.e., `symbol-file' isn't able to find my-file.el, and it probably
> should be?

It is also interesting that help-fns does find the .el file for the
files that are part of Emacs.  So something works differently when the
compiled file is not part of the Emacs build.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#58314: 29.0.50; C-h k with native compilation not conclusive
  2022-10-06 14:28       ` Eli Zaretskii
@ 2023-06-05 22:49         ` Andrea Corallo
  2023-06-06 10:24           ` Andrea Corallo
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Corallo @ 2023-06-05 22:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, akrl, 58314, bugs, monnier

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  58314@debbugs.gnu.org,  Stefan Monnier
>>  <monnier@iro.umontreal.ca>, Andrea Corallo <akrl@sdf.org>
>> Date: Thu, 06 Oct 2022 14:29:56 +0200
>> 
>> Jean Louis <bugs@gnu.support> writes:
>> 
>> > 1. emacs -Q
>> >
>> > 2. {C-x C-f my-file.el RET}
>> >
>> > 3. write in my-file.el:
>> >
>> >   (defun my-function ()
>> >   (message "Hello"))
>> >
>> > 4. {M-x emacs-lisp-native-compile-and-load RET}
>> >
>> > 5. {C-h f my-function RET}
>> >
>> > 6. Then I see:
>> >
>> > my-function is a native-compiled Lisp function in
>> > ‘~/.emacs.d/eln-cache/29.0.50-44cd31c8/my-file-fb862712-14785989.eln’.
>> 
>> Thanks for the recipe -- I can reproduce this issue, too.
>> 
>> We could fix this in help-fns, but I wonder whether there's something
>> that should be fixed on the nativecomp side -- in this case, it appears
>> to not set up...  something...  that allows you to find my-file.el.
>> I.e., `symbol-file' isn't able to find my-file.el, and it probably
>> should be?
>
> It is also interesting that help-fns does find the .el file for the
> files that are part of Emacs.  So something works differently when the
> compiled file is not part of the Emacs build.

I think this a bug in `emacs-lisp-native-compile-and-load'.  I'll come
up with a fix.

  Andrea





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#58314: 29.0.50; C-h k with native compilation not conclusive
  2023-06-05 22:49         ` Andrea Corallo
@ 2023-06-06 10:24           ` Andrea Corallo
  0 siblings, 0 replies; 8+ messages in thread
From: Andrea Corallo @ 2023-06-06 10:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, monnier, 58314-done, bugs, akrl

Andrea Corallo <acorallo@gnu.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Lars Ingebrigtsen <larsi@gnus.org>
>>> Cc: Eli Zaretskii <eliz@gnu.org>,  58314@debbugs.gnu.org,  Stefan Monnier
>>>  <monnier@iro.umontreal.ca>, Andrea Corallo <akrl@sdf.org>
>>> Date: Thu, 06 Oct 2022 14:29:56 +0200
>>> 
>>> Jean Louis <bugs@gnu.support> writes:
>>> 
>>> > 1. emacs -Q
>>> >
>>> > 2. {C-x C-f my-file.el RET}
>>> >
>>> > 3. write in my-file.el:
>>> >
>>> >   (defun my-function ()
>>> >   (message "Hello"))
>>> >
>>> > 4. {M-x emacs-lisp-native-compile-and-load RET}
>>> >
>>> > 5. {C-h f my-function RET}
>>> >
>>> > 6. Then I see:
>>> >
>>> > my-function is a native-compiled Lisp function in
>>> > ‘~/.emacs.d/eln-cache/29.0.50-44cd31c8/my-file-fb862712-14785989.eln’.
>>> 
>>> Thanks for the recipe -- I can reproduce this issue, too.
>>> 
>>> We could fix this in help-fns, but I wonder whether there's something
>>> that should be fixed on the nativecomp side -- in this case, it appears
>>> to not set up...  something...  that allows you to find my-file.el.
>>> I.e., `symbol-file' isn't able to find my-file.el, and it probably
>>> should be?
>>
>> It is also interesting that help-fns does find the .el file for the
>> files that are part of Emacs.  So something works differently when the
>> compiled file is not part of the Emacs build.
>
> I think this a bug in `emacs-lisp-native-compile-and-load'.  I'll come
> up with a fix.

Hi all,

bcc222251e1 now into emacs-29 fixes this bug.  I'm closing this report,
happy to repoen if necessary.

Thanks

  Andrea





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-06 10:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-05 19:26 bug#58314: 29.0.50; C-h k with native compilation not conclusive Jean Louis
2022-10-05 19:45 ` Eli Zaretskii
2022-10-05 19:50   ` Jean Louis
2022-10-06 12:29     ` Lars Ingebrigtsen
2022-10-06 14:28       ` Eli Zaretskii
2023-06-05 22:49         ` Andrea Corallo
2023-06-06 10:24           ` Andrea Corallo
2022-10-05 19:55 ` Jean Louis

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).