From: Rodrigo Morales <rodrigo-mailing-lists@morales.pe>
To: <help-guix@gnu.org>
Subject: [question] Why symbol defined in *.el file doesn't get defined when loading byte-compiled file *.elc?
Date: Sat, 3 Aug 2024 13:04:56 -0500 [thread overview]
Message-ID: <87y15dh48n.fsf@morales.pe> (raw)
I cloned a git repository.
#+BEGIN_SRC sh
git clone --depth 1 --branch main 'git://git.savannah.gnu.org/emacs/org-mode.git' /tmp/org-mode
#+END_SRC
I started Emacs by using the command shown in the code block below.
I tried to list the branches in the repository by pressing =b= while being in the magit buffer.
#+BEGIN_SRC sh
guix shell emacs emacs-magit -- emacs --quick --eval "(find-file \"/tmp/org-mode\")" --eval "(require 'magit)" --eval="(magit)"
#+END_SRC
The minibuffer showed the following message:
#+BEGIN_SRC text
Symbol’s function definition is void: transient-prefix-object
#+END_SRC
I wanted to debug this error.
I pressed =C-h v= (by default, bound to =describe-variable=) and I input =load-history=. While being in the =*Help*= buffer, I pressed =M-x occur RET= and I searched =transient=. I jumped to the line which showed =/gnu/store/5yrp3f79mnc68rhwjsr4z4zjajcdrm6z-emacs-transient-0.7.3/share/emacs/site-lisp/transient-0.7.3/transient.elc=. For those who are not familiar with =load-history=, it contains the definitions in each loaded Elisp file, I copied the definitions for the path =transient.elc= in the code block below. As we can see below, =transient-prefix-object= doesn't belong to the list of definitions. I think this is the reason why Emacs throws the error =Symbol’s function definition is void: transient-prefix-object=.
#+BEGIN_SRC text
("/gnu/store/5yrp3f79mnc68rhwjsr4z4zjajcdrm6z-emacs-transient-0.7.3/share/emacs/site-lisp/transient-0.7.3/transient.elc"
(require . cl-lib)
(require . eieio)
(require . edmacro)
(require . format-spec)
(require . seq)
(defun . transient--with-emergency-exit)
(defun . transient--exit-and-debug)
transient-show-popup transient-enable-popup-navigation transient-display-buffer-action transient-mode-line-format transient-show-common-commands transient-read-with-initial-input transient-highlight-mismatched-keys transient-highlight-higher-levels transient-substitute-key-function transient-semantic-coloring transient-detect-key-conflicts transient-align-variable-pitch transient-force-fixed-pitch transient-force-single-column transient-hide-during-minibuffer-read transient--default-child-level transient--default-prefix-level transient-default-level transient-levels-file transient-values-file transient-history-file transient-history-limit transient-save-history
(defface . transient-heading)
(defface . transient-key)
(defface . transient-argument)
(defface . transient-value)
(defface . transient-inactive-argument)
(defface . transient-inactive-value)
(defface . transient-unreachable)
(defface . transient-active-infix)
(defface . transient-unreachable-key)
(defface . transient-nonstandard-key)
(defface . transient-mismatched-key)
(defface . transient-inapt-suffix)
(defface . transient-enabled-suffix)
(defface . transient-disabled-suffix)
(defface . transient-higher-level)
(defface . transient-separator)
(defface . transient-red)
(defface . transient-blue)
(defface . transient-amaranth)
(defface . transient-pink)
(defface . transient-teal)
(defface . transient-purple)
(defun . transient--read-file-contents)
(defun . transient--pp-to-file)
transient-values
(defun . transient-save-values)
transient-levels
(defun . transient-save-levels)
transient-history
(defun . transient-save-history)
(defun . transient-maybe-save-history)
(defun . transient-prefix-p)
(defun . transient-prefix--eieio-childp)
(defun . transient-prefix-child-p)
(define-symbol-props
(cl-deftype-satisfies transient-lisp-variable transient-subgroups transient-columns transient-row transient-column transient-group transient-files transient-switches transient-variable transient-option transient-switch transient-argument transient-infix transient-suffix transient-child transient-prefix))
(defun . transient-prefix-list-p)
(define-type . transient-prefix)
(defun . transient-prefix)
(defun . transient-prefix--anon-cmacro)
(defun . transient-child-p)
(defun . transient-child--eieio-childp)
(defun . transient-child-child-p)
(defun . transient-child-list-p)
(define-type . transient-child)
(defun . transient-child)
(defun . transient-suffix-p)
(defun . transient-suffix--eieio-childp)
(defun . transient-suffix-child-p)
(defun . transient-suffix-list-p)
(define-type . transient-suffix)
(defun . transient-suffix)
(defun . transient-suffix--anon-cmacro)
(defun . transient-infix-p)
(defun . transient-infix--eieio-childp)
(defun . transient-infix-child-p)
(defun . transient-infix-list-p)
(define-type . transient-infix)
(defun . transient-infix)
(defun . transient-argument-p)
(defun . transient-argument--eieio-childp)
(defun . transient-argument-child-p)
(defun . transient-argument-list-p)
(define-type . transient-argument)
(defun . transient-argument)
(defun . transient-switch-p)
(defun . transient-switch--eieio-childp)
(defun . transient-switch-child-p)
(defun . transient-switch-list-p)
(define-type . transient-switch)
(defun . transient-switch)
(defun . transient-switch--anon-cmacro)
(defun . transient-option-p)
(defun . transient-option--eieio-childp)
(defun . transient-option-child-p)
(defun . transient-option-list-p)
(define-type . transient-option)
(defun . transient-option)
(defun . transient-option--anon-cmacro)
(defun . transient-variable-p)
(defun . transient-variable--eieio-childp)
(defun . transient-variable-child-p)
(defun . transient-variable-list-p)
(define-type . transient-variable)
(defun . transient-variable)
(defun . transient-switches-p)
(defun . transient-switches--eieio-childp)
(defun . transient-switches-child-p)
(defun . transient-switches-list-p)
(define-type . transient-switches)
(defun . transient-switches)
(defun . transient-switches--anon-cmacro)
(defun . transient-files-p)
(defun . transient-files--eieio-childp)
(defun . transient-files-child-p)
(defun . transient-files-list-p)
(define-type . transient-files)
(defun . transient-files)
(defun . transient-files--anon-cmacro)
(defun . transient-group-p)
(defun . transient-group--eieio-childp)
(defun . transient-group-child-p)
(defun . transient-group-list-p)
(define-type . transient-group)
(defun . transient-group)
(defun . transient-column-p)
(defun . transient-column--eieio-childp)
(defun . transient-column-child-p)
(defun . transient-column-list-p)
(define-type . transient-column)
(defun . transient-column)
(defun . transient-column--anon-cmacro)
(defun . transient-row-p)
(defun . transient-row--eieio-childp)
(defun . transient-row-child-p)
(defun . transient-row-list-p)
(define-type . transient-row)
(defun . transient-row)
(defun . transient-row--anon-cmacro)
(defun . transient-columns-p)
(defun . transient-columns--eieio-childp)
(defun . transient-columns-child-p)
(defun . transient-columns-list-p)
(define-type . transient-columns)
(defun . transient-columns)
(defun . transient-columns--anon-cmacro)
(defun . transient-subgroups-p)
(defun . transient-subgroups--eieio-childp)
(defun . transient-subgroups-child-p)
(defun . transient-subgroups-list-p)
(define-type . transient-subgroups)
(defun . transient-subgroups)
(defun . transient-subgroups--anon-cmacro)
(defun . transient-define-prefix)
(defun . transient-define-suffix)
(defun . transient-define-infix)
(defun . transient-define-argument)
(defun . transient--default-infix-command)
(defun . transient--expand-define-args)
(defun . transient--parse-child)
(defun . transient--parse-group)
(defun . transient--parse-suffix)
(defun . transient--derive-shortarg)
(defun . transient-parse-suffix)
(defun . transient-parse-suffixes)
(defun . transient--insert-suffix)
(defun . transient-insert-suffix)
(defun . transient-append-suffix)
(defun . transient-replace-suffix)
(defun . transient-remove-suffix)
(defun . transient-get-suffix)
(defun . transient-suffix-put)
(defun . transient--layout-member)
(defun . transient--layout-member-1)
(defun . transient--group-member)
(defun . transient--kbd)
(defun . transient--spec-key)
(defun . transient--command-key)
(defun . transient--nthcdr)
transient-current-prefix transient-current-command transient-current-suffixes transient-exit-hook transient--prefix transient--layout transient--suffixes transient--stay transient--exit transient--exitp transient--showp transient--helpp transient--editp transient--active-infix transient--timer transient--stack transient--minibuffer-depth transient--buffer-name transient--window transient--original-window transient--original-buffer transient--debug transient--history transient--scroll-commands
(defun . transient-suffix-object)
transient-base-map transient-map transient-edit-map transient-sticky-map transient--common-command-prefixes transient-popup-navigation-map transient-button-map transient-predicate-map transient--transient-map transient--predicate-map transient--redisplay-map transient--redisplay-key
(defun . transient--push-keymap)
(defun . transient--pop-keymap)
(defun . transient--make-transient-map)
(defun . transient--make-predicate-map)
(defun . transient--make-redisplay-map)
(defun . transient-setup)
(defun . transient-setup-children)
(cl-defmethod transient-setup-children nil t t)
(defun . transient--init-objects)
(defun . transient--init-prefix)
(defun . transient--init-suffixes)
(defun . transient--flatten-suffixes)
(defun . transient--init-child)
(defun . transient--init-group)
(defun . transient--init-suffix)
(defun . transient--init-suffix-key)
(cl-defmethod transient--init-suffix-key nil transient-suffix)
(cl-defmethod transient--init-suffix-key nil transient-argument)
(defun . transient--use-level-p)
(defun . transient--use-suffix-p)
(defun . transient--inapt-suffix-p)
(defun . transient--do-suffix-p)
(defun . transient--suffix-predicate)
(defun . transient--init-transient)
(defun . transient--pre-command)
(defun . transient--do-pre-command)
(defun . transient--get-predicate-for)
(defun . transient--pre-exit)
(defun . transient--delete-window)
(defun . transient--export)
(defun . transient--suspend-override)
(defun . transient--resume-override)
(defun . transient--recursive-edit)
(defun . transient--with-suspended-override)
(defun . transient--wrap-command)
(defun . transient--wrap-command-30)
(defun . transient--wrap-command-29)
(defun . transient--premature-post-command)
(defun . transient--post-command)
(defun . transient--post-exit)
(defun . transient--stack-push)
(defun . transient--stack-pop)
(defun . transient--stack-zap)
(defun . transient--redisplay)
(defun . transient--timer-start)
(defun . transient--timer-cancel)
(defun . transient--debug)
(defun . transient--emergency-exit)
(defun . transient--do-stay)
(defun . transient--do-noop)
(defun . transient--do-warn)
(defun . transient--do-warn-inapt)
(defun . transient--do-call)
(defun . transient--do-return)
(defun . transient--do-exit)
(defun . transient--do-leave)
(defun . transient--do-push-button)
(defun . transient--do-recurse)
(defun . transient--setup-recursion)
(defun . transient--do-replace)
(defun . transient--do-suspend)
(defun . transient--do-quit-one)
(defun . transient--do-quit-all)
(defun . transient--do-move)
(defun . transient--do-minus)
(defun . transient-noop)
(defun . transient-undefined)
(defun . transient-inapt)
(defun . transient--invalid)
(defun . transient-toggle-common)
(defun . transient-suspend)
(defun . transient-quit-all)
(defun . transient-quit-one)
(defun . transient-quit-seq)
(defun . transient-update)
(defun . transient-show)
transient--restore-winconf
(defun . transient-help)
(defun . transient-set-level)
(defun . transient-set)
(defun . transient-save)
(defun . transient-reset)
(defun . transient-history-next)
(defun . transient-history-prev)
(defun . transient-scroll-up)
(defun . transient-scroll-down)
(defun . transient-push-button)
(defun . transient-resume)
(defun . transient-init-scope)
(cl-defmethod transient-init-scope nil transient-suffix)
(defun . transient-init-value)
(cl-defmethod transient-init-value nil t)
(cl-defmethod transient-init-value
(:around)
transient-prefix)
(cl-defmethod transient-init-value
(:around)
transient-infix)
(cl-defmethod transient-init-value nil transient-prefix)
(cl-defmethod transient-init-value nil transient-argument)
(cl-defmethod transient-init-value nil transient-switch)
(defun . transient-default-value)
(cl-defmethod transient-default-value nil t)
(cl-defmethod transient-default-value nil transient-prefix)
(defun . transient-infix-read)
(cl-defmethod transient-infix-read
(:around)
transient-infix)
(cl-defmethod transient-infix-read nil transient-infix)
(cl-defmethod transient-infix-read nil transient-switch)
(cl-defmethod transient-infix-read nil transient-switches)
(cl-defmethod transient-infix-read nil symbol)
(defun . transient-read-file)
(defun . transient-read-existing-file)
(defun . transient-read-directory)
(defun . transient-read-existing-directory)
(defun . transient-read-number-N0)
(defun . transient-read-number-N+)
(defun . transient--read-number-N)
(defun . transient-read-date)
(defun . transient-prompt)
(cl-defmethod transient-prompt nil transient-infix)
transient--unset-incompatible
(defun . transient-infix-set)
(cl-defmethod transient-infix-set nil transient-infix t)
(cl-defmethod transient-infix-set
(:around)
transient-argument t)
(defun . transient-set-value)
(cl-defmethod transient-set-value nil transient-prefix)
(defun . transient-save-value)
(cl-defmethod transient-save-value nil transient-prefix)
(defun . transient-reset-value)
(cl-defmethod transient-reset-value nil transient-prefix)
(defun . transient-args)
(defun . transient-suffixes)
(defun . transient-get-value)
(defun . transient--get-wrapped-value)
(defun . transient-infix-value)
(cl-defmethod transient-infix-value nil transient-suffix)
(cl-defmethod transient-infix-value nil transient-infix)
(cl-defmethod transient-infix-value nil transient-option)
(cl-defmethod transient-infix-value nil transient-variable)
(defun . transient-arg-value)
(defun . transient--history-key)
(cl-defmethod transient--history-key nil t)
(defun . transient--history-push)
(cl-defmethod transient--history-push nil t)
(defun . transient--history-init)
(cl-defmethod transient--history-init nil transient-prefix)
(defun . transient--show-brief)
(defun . transient--show)
(defun . transient--fit-window-to-buffer)
(defun . transient--insert-groups)
transient--max-group-level
(defun . transient--insert-group)
(cl-defmethod transient--insert-group
(:around)
transient-group)
(cl-defmethod transient--insert-group nil transient-row)
(cl-defmethod transient--insert-group nil transient-column)
(cl-defmethod transient--insert-group nil transient-columns)
(defun . transient--pixel-width)
(cl-defmethod transient--insert-group nil transient-subgroups)
(defun . transient-format)
(cl-defmethod transient-format nil string)
(cl-defmethod transient-format nil null)
(cl-defmethod transient-format nil integer)
(cl-defmethod transient-format
(:around)
transient-infix)
(cl-defmethod transient-format
(:around)
transient-suffix)
(cl-defmethod transient-format nil transient-infix)
(cl-defmethod transient-format nil transient-suffix)
(defun . transient-format-key)
(cl-defmethod transient-format-key nil transient-suffix)
(defun . transient--colorize-key)
(cl-defmethod transient-format-key
(:around)
transient-argument)
(defun . transient-format-description)
(cl-defmethod transient-format-description nil transient-child)
(cl-defmethod transient-format-description nil transient-group)
(cl-defmethod transient-format-description
(:around)
transient-suffix)
(defun . transient-format-value)
(cl-defmethod transient-format-value nil transient-suffix)
(cl-defmethod transient-format-value nil transient-option)
(cl-defmethod transient-format-value nil transient-switches)
(defun . transient--key-unreachable-p)
(defun . transient--lookup-key)
(defun . transient--maybe-pad-keys)
(defun . transient-command-summary-or-name)
(defun . transient-show-help)
(cl-defmethod transient-show-help nil transient-prefix)
(cl-defmethod transient-show-help nil transient-suffix)
(cl-defmethod transient-show-help nil transient-infix)
(cl-defmethod transient-show-help nil t)
(defun . transient--describe-function)
(defun . transient--anonymous-infix-argument)
(defun . transient--show-manual)
(defun . transient--show-manpage)
(defun . transient--goto-argument-description)
(defun . transient--insert-help)
transient-resume-mode-map transient-resume-mode
(defun . transient-resume-mode)
transient-resume-mode-hook
(defun . transient-toggle-debug)
(defun . transient-popup-navigation-help)
(defun . transient-backward-button)
(defun . transient-forward-button)
(defun . transient--goto-button)
(defun . transient--heading-at-point)
transient--isearch-mode-map
(defun . transient-isearch-backward)
(defun . transient-isearch-forward)
(defun . transient-isearch-exit)
(defun . transient-isearch-cancel)
(defun . transient-isearch-abort)
(defun . transient--isearch-setup)
(defun . transient--isearch-exit)
(defun . transient--semantic-coloring-p)
(defun . transient--suffix-color)
(defun . transient--prefix-color)
(defun . transient--edebug-command-p)
(defun . transient--suspend-which-key-mode)
(defun . transient--resume-which-key-mode)
(defun . transient-bind-q-to-quit)
(defun . transient-rebind-quit-commands)
(defun . transient--force-fixed-pitch)
(defun . transient--seq-reductions-from)
(defun . transient-plist-to-alist)
transient-font-lock-keywords
(defun . transient-lisp-variable-p)
(defun . transient-lisp-variable--eieio-childp)
(defun . transient-lisp-variable-child-p)
(defun . transient-lisp-variable-list-p)
(define-type . transient-lisp-variable)
(defun . transient-lisp-variable)
(defun . transient-lisp-variable--anon-cmacro)
(cl-defmethod transient-init-value nil transient-lisp-variable)
(cl-defmethod transient-infix-set nil transient-lisp-variable t)
(cl-defmethod transient-format-description nil transient-lisp-variable)
(cl-defmethod transient-format-value nil transient-lisp-variable)
(cl-defmethod transient-prompt nil transient-lisp-variable)
(defun . transient-lisp-variable--reader)
(provide . transient))
#+END_SRC
The function =transient-prefix-object= is defined in the non-compiled file.
#+BEGIN_SRC sh
grep -C 2 '(defun transient-prefix-object' /gnu/store/5yrp3f79mnc68rhwjsr4z4zjajcdrm6z-emacs-transient-0.7.3/share/emacs/site-lisp/transient-0.7.3/transient.el
#+END_SRC
#+RESULTS:
#+begin_example
;;; Identities
(defun transient-prefix-object ()
"Return the current prefix as an object.
#+end_example
My question is: The function =transient-prefix-object= is defined in the file =/gnu/store/5yrp3f79mnc68rhwjsr4z4zjajcdrm6z-emacs-transient-0.7.3/share/emacs/site-lisp/transient-0.7.3/transient.el=, but when Emacs loads the byte-compiled version (i.e. =/gnu/store/5yrp3f79mnc68rhwjsr4z4zjajcdrm6z-emacs-transient-0.7.3/share/emacs/site-lisp/transient-0.7.3/transient.elc=) the function =transient-prefix-object= is not defined. Isn't it supposed that the byte-compiled Elisp file contains all the definitions from the non byte-compiled Elisp file?
* System information
:PROPERTIES:
:CREATED: [2024-08-03 13:04:27 -0500]
:END:
I'm using the latest commit as of time of writing
#+BEGIN_SRC sh
guix --version
#+END_SRC
#+RESULTS:
#+begin_example
guix (GNU Guix) b20956651a53a8f23828fdeb6945e1a31e6997a8
Copyright (C) 2024 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
#+end_example
reply other threads:[~2024-08-05 17:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y15dh48n.fsf@morales.pe \
--to=rodrigo-mailing-lists@morales.pe \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).