Open ouboub opened 3 days ago
org-buffer-text-pixel-width
is right there in org-compat
.
So, your init file is loading org-compat
from elsewhere.
Do an M-x find-library RET org-compat RET
to see the path from where the wrongorg-compat
is getting loaded.
Use the snippet in https://github.com/kjambunathan/org-mode-ox-odt/issues/276#issuecomment-2414161462 to find out where the wrong org-compat
is located and how it gets loaded.
FWIW,
commit 11ce194dcf060782f1457c77a44f791389ed32f0
Author: Ihor Radchenko <yantar92@posteo.net>
Date: Fri Aug 4 10:53:17 2023 +0300
org-string-width: Fix Emacs <29 compatibility
* lisp/org-compat.el (org-buffer-text-pixel-width): New function using
`buffer-text-pixel-size' in Emacs >=29 and falling back to
`window-text-pixel-size' in older Emacs.
* lisp/org-macs.el (org-string-width): Use the new function.
org-buffer-text-pixel-width is a byte-code-function in
`org-compat.el'.
(org-buffer-text-pixel-width)
Return pixel width of text in current buffer.
This function uses `buffer-text-pixel-size', when available, and falls
back to `window-text-pixel-size' otherwise.
Hm, I tried out this snippet which you also posted (saved in temp2.el)
(require 'find-func)
(add-to-list 'after-load-functions
(lambda (file-name)
(message "\nLoading %s because %s" (file-name-nondirectory file-name) load-file-name)
;; (message "Loaded %s" (file-name-nondirectory file-name))
))
(defmacro debug-on--load (feature)
`(with-eval-after-load ',feature
(message "\nLoaded `%s': %s" ',feature
(find-library-name (symbol-name ',feature)))
(debug)))
(defmacro debug-on-load (feature-or-features)
(let* ((features (or (unless (consp feature-or-features)
(list feature-or-features))
feature-or-features)))
`(progn
,@(seq-map
(lambda (it)
`(debug-on--load ,it))
features))))
(debug-on-load
(
org-compat
org-macs
org
))
(custom-set-variables
'(package-archive-priorities
'(("gnu" . 100) ("nongnu" . 90) ("gnu-devel" . 80) ("melpa" . 70)
("ox-odt" . 60)))
'(package-archives
'(
;; ("gnu-devel" . "https://elpa.gnu.org/devel/")
("gnu" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")
("melpa" . "https://melpa.org/packages/")
;; ("ox-odt" . "https://kjambunathan.github.io/elpa/")
))
'(package-directory-list '("/home/oub/.emacs.d/elpa/")))
(package-initialize 'no-activate)
(package-activate 'citeproc)
;; emacs -Q -batch
;; --eval '(setq vc-handled-backends nil org-startup-folded nil org-element-cache-persistent nil)'
;; --eval '(add-to-list `load-path ".")'
;; --eval '(load (expand-file-name "../mk/org-setup-elpa-dir.el"))'
;; --eval '(load "org-compat.el")'
;; --eval '(load "../mk/org-fixup.el")'
;; --eval '(org-make-org-version "9.7.7" "release_9.2.2-6587-g01f922.dirty")'
;; The lines below are a line-to-line reproduction of what happens
;; during batch compilation of `org-mode-ox-odt' repo.
(defvar org-mode-ox-odt
"/home/oub/ALLES/src/org-mode-ox-odt-hg/lisp"
"`.' in the build process points to `lisp' subdir of `org-mode-ox-odt'.")
(setq vc-handled-backends nil org-startup-folded nil org-element-cache-persistent nil)
;; (add-to-list `load-path ".")
(add-to-list 'load-path org-mode-ox-odt)
;; (load (expand-file-name "../mk/org-setup-elpa-dir.el"))
(load (expand-file-name "../mk/org-setup-elpa-dir.el" org-mode-ox-odt))
(load "org-compat.el")
;; (load "../mk/org-fixup.el")
(load (expand-file-name "../mk/org-fixup.el" org-mode-ox-odt) )
(org-make-org-version "9.7.7" "release_9.2.2-6587-g01f922.dirty")
run `emacs -Q --debug-init load-file temp.el
here is the backtrace
Debugger entered: nil
(lambda nil (message "\nLoaded `%s': %s" 'org-macs (find-library-name (symbol-name 'org-macs))) (debug))()
eval-after-load-helper("/home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-ma...")
run-hook-with-args(eval-after-load-helper "/home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-ma...")
do-after-load-evaluation("/home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-ma...")
require(org-macs)
eval-buffer(#<buffer *load*-323804> nil "/home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-co..." nil t) ; Reading at buffer position 1244
load-with-code-conversion("/home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-co..." "/home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-co..." nil nil)
load("org-compat.el")
eval-buffer(#<buffer *load*> nil "/home/oub/temp.el" nil t) ; Reading at buffer position 2310
load-with-code-conversion("/home/oub/temp.el" "/home/oub/temp.el" nil nil)
load("/home/oub/temp.el" nil nil t)
load-file("~/temp.el")
funcall-interactively(load-file "~/temp.el")
call-interactively(load-file record nil)
command-execute(load-file record)
execute-extended-command(nil "load-file" "load-fil")
funcall-interactively(execute-extended-command nil "load-file" "load-fil")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
and here the message buffer
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading /home/oub/temp.el (source)...
Loading cl-loaddefs.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/cl-lib.elc
Loading cl-lib.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/package.elc
Loading url-vars.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-parse.elc
Loading bytecomp.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/map.elc
Loading gv.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/map.elc
Loading byte-opt.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/map.elc
Loading map.elc because /opt/emacs29.4/share/emacs/29.4/lisp/json.elc
Loading subr-x.elc because /opt/emacs29.4/share/emacs/29.4/lisp/json.elc
Loading json.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading password-cache.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading cl-macs.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/eieio-core.elc
Loading eieio-core.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/eieio.elc
Loading eieio.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading cl-seq.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading auth-source.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-parse.elc
Loading url-parse.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-handlers.elc
Loading url-handlers.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/package.elc
Loading mailcap.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-util.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-cookie.elc
Loading url-domsuf.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-cookie.elc
Loading generate-lisp-file.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-cookie.elc
Loading url-cookie.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-history.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-methods.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-expand.elc
Loading url-expand.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-privacy.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-proxy.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url.elc because /opt/emacs29.4/share/emacs/29.4/lisp/net/browse-url.elc
Loading browse-url.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/package.elc
Loading package.elc because /home/oub/temp.el
Loading finder-inf.el because /home/oub/temp.el
Loading dash-autoloads.el because /home/oub/temp.el
Loading info.elc because /home/oub/temp.el
Loading s-autoloads.el because /home/oub/temp.el
Loading f-autoloads.el because /home/oub/temp.el
Loading queue-autoloads.el because /home/oub/temp.el
Loading string-inflection-autoloads.el because /home/oub/temp.el
Loading parsebib-autoloads.el because /home/oub/temp.el
Loading citeproc-autoloads.el because /home/oub/temp.el
Loading /home/oub/ALLES/src/org-mode-ox-odt-hg/mk/org-setup-elpa-dir.el (source)...
Loading peg-autoloads.el because /home/oub/ALLES/src/org-mode-ox-odt-hg/mk/org-setup-elpa-dir.el
Loading rnc-mode-autoloads.el because /home/oub/ALLES/src/org-mode-ox-odt-hg/mk/org-setup-elpa-dir.el
Loading org-setup-elpa-dir.el because /home/oub/temp.el
Loading /home/oub/ALLES/src/org-mode-ox-odt-hg/mk/org-setup-elpa-dir.el (source)...done
Loading /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el (source)...
Loading format-spec.elc because /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-macs.elc
Loading org-macs.elc because /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el
Loaded ‘org-macs’: /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-macs.el
Loading help-mode.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/backtrace.elc
Loading backtrace.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/debug.elc
Loading debug.elc because /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el
Entering debugger...
Loading cl-print.elc because /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el
Loading radix-tree.elc because /opt/emacs29.4/share/emacs/29.4/lisp/help-fns.elc
Loading help-fns.elc because /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el
Continuing.
Loading pcase.elc because /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el
Loading org-compat.el because /home/oub/temp.el
Loaded ‘org-compat’: /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el
Entering debugger...
Continuing.
Loading /home/oub/ALLES/src/org-mode-ox-odt-hg/lisp/org-compat.el (source)...done
Loading /home/oub/ALLES/src/org-mode-ox-odt-hg/mk/org-fixup.el (source)...
Loading org-fixup.el because /home/oub/temp.el
Loading /home/oub/ALLES/src/org-mode-ox-odt-hg/mk/org-fixup.el (source)...done
Saving file /home/oub/org-version.el...
Wrote /home/oub/org-version.el
Loading temp.el because nil
Loading /home/oub/temp.el (source)...done
Loading display-line-numbers.elc because nil
scroll-down-command: Beginning of buffer [15 times]
Loading misearch.elc because nil
Mark saved where search started
Loading time-date.elc because nil
C-> is undefined
Mark set
next-line: End of buffer [3 times]
Making completion list...
C-> is undefined
Mark set
next-line: End of buffer
Beginning of buffer [11 times]
Mark set
Quit
so it seems to use the right file. I will continue tomorrow
Ok
I have two clones,
one with git
one with hg
I switched now back to the git repository, am on commit 3f86a7c543aaf945a
I run
make clean
make I also have these lines in my Emacs
(setq load-path (cons (expand-file-name "~/ALLES/src/org-mode-ox-odt/lisp") load-path)) (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc") (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/odt.elc") (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc") (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-ods.elc")
I restarted Emacs, I tried again to export, and I obtain the same error, I swear it worked with
commit `8242670d7192`
I created ~/disabled/.emacs
as below, and do emacs -Q
and M-x load-file RET ~/disabled/.emacs
followed with C-c C-e o S
on your table, I get the ods
file just as expected.
There is something else wrong in your init file ...
If the init file is just the following content with no additional content and with -Q
on emacs -Q
things work for me. It should for you too.
(require 'find-func)
(add-to-list 'after-load-functions
(lambda (file-name)
(message "\nLoading %s because %s" (file-name-nondirectory file-name) load-file-name)
;; (message "Loaded %s" (file-name-nondirectory file-name))
))
(defmacro debug-on--load (feature)
`(with-eval-after-load ',feature
(message "\nLoaded `%s': %s" ',feature
(find-library-name (symbol-name ',feature)))
(debug)))
(defmacro debug-on-load (feature-or-features)
(let* ((features (or (unless (consp feature-or-features)
(list feature-or-features))
feature-or-features)))
`(progn
,@(seq-map
(lambda (it)
`(debug-on--load ,it))
features))))
(debug-on-load
(
org-compat
org-macs
org
))
(setq my-org-mode-ox-odt-path "~/src/emacs-extras/org-mode-ox-odt/lisp"
;; "~/ALLES/src/org-mode-ox-odt/lisp"
)
(setq load-path (cons (expand-file-name my-org-mode-ox-odt-path)
load-path))
(mapc (lambda (feature)
(load-file
(format "%s/%s.elc" my-org-mode-ox-odt-path feature))
)
'(
org-macs
odt
ox-odt
ox-ods
))
(setq load-path (cons (expand-file-name "~/ALLES/src/org-mode-ox-odt/lisp") load-path)) (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc") (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/odt.elc") (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc") (load-file "/home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-ods.elc")
Loading odt
will load org-compat
.
Considering that org-buffer-text-pixel-width
is defined in org-compat
, I wonder why org-compat
is missing from that list.
If I am extra paranoid, I will go with
(defvar my-org-mode-ox-odt-path
"~/ALLES/src/org-mode-ox-odt/lisp"
)
(setq load-path (cons (expand-file-name my-org-mode-ox-odt-path)
load-path))
(mapc (lambda (feature)
(load-file
(format "%s/%s.elc" my-org-mode-ox-odt-path feature))
)
'(
org-macs
org-compat
odt
ox-odt
ox-ods
))
Sorry I had only time now to check, you first proposal:
emacs -Q --init-debug
M-x load-file
(lambda nil (message "\nLoaded `%s': %s" 'org-macs (find-library-name (symbol-name 'org-macs))) (debug))()
eval-after-load-helper("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
run-hook-with-args(eval-after-load-helper "/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
do-after-load-evaluation("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
load("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs...." nil nil t)
load-file("~/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc")
(lambda (feature) (load-file (format "%s/%s.elc" my-org-mode-ox-odt-path feature)))(org-macs)
mapc((lambda (feature) (load-file (format "%s/%s.elc" my-org-mode-ox-odt-path feature))) (org-macs odt ox-odt ox-ods))
eval-buffer(#<buffer *load*> nil "/home/oub/emacs/my-org.el" nil t) ; Reading at buffer position 1103
load-with-code-conversion("/home/oub/emacs/my-org.el" "/home/oub/emacs/my-org.el" nil nil)
load("/home/oub/emacs/my-org.el" nil nil t)
load-file("~/emacs/my-org.el")
funcall-interactively(load-file "~/emacs/my-org.el")
call-interactively(load-file record nil)
command-execute(load-file record)
execute-extended-command(nil "load-file" "load-fi")
funcall-interactively(execute-extended-command nil "load-file" "load-fi")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
the second paranoid method 😉 resulted in a backtrace of the form
Debugger entered: nil
(lambda nil (message "\nLoaded `%s': %s" 'org-macs (find-library-name (symbol-name 'org-macs))) (debug))()
eval-after-load-helper("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
run-hook-with-args(eval-after-load-helper "/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
do-after-load-evaluation("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
load("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs...." nil nil t)
load-file("~/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc")
(lambda (feature) (load-file (format "%s/%s.elc" my-org-mode-ox-odt-path feature)))(org-macs)
mapc((lambda (feature) (load-file (format "%s/%s.elc" my-org-mode-ox-odt-path feature))) (org-macs org-compat odt ox-odt ox-ods))
eval-buffer(#<buffer *load*> nil "/home/oub/emacs/my-org2.el" nil t) ; Reading at buffer position 1073
load-with-code-conversion("/home/oub/emacs/my-org2.el" "/home/oub/emacs/my-org2.el" nil nil)
load("/home/oub/emacs/my-org2.el" nil nil t)
load-file("~/emacs/my-org2.el")
funcall-interactively(load-file "~/emacs/my-org2.el")
call-interactively(load-file record nil)
command-execute(load-file record)
execute-extended-command(nil "load-file" "load-fil")
funcall-interactively(execute-extended-command nil "load-file" "load-fil")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
the second paranoid method 😉 resulted in a backtrace of the form
Debugger entered: nil (lambda nil (message "\nLoaded `%s': %s" 'org-macs (find-library-name (symbol-name 'org-macs))) (debug))() eval-after-load-helper("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....") run-hook-with-args(eval-after-load-helper "/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....") do-after-load-evaluation("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....") load("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs...." nil nil t)
Just press c
to continue.
Look at the snipppet I added.
There is an intentional debug
statement whenever a library of interest is passed as a arg to debug-on-load
call.
You can see that org-macs
, org-compat
and org
are mentioned in the below call. And you will most likely see Emacs entering debugger thrice, and you may be pressing c
thrice.
(debug-on-load
(
org-compat
org-macs
org
))
If you find the debug
statement annoying (to being with), you can replace the above portion with
(debug-on-load
(
;; org-compat
;; org-macs
;; org
))
Just press
c
to continue. Look at the snipppet I added. There is an intentionaldebug
statement whenever a library of interest is mentioned indebug-on-load
call is loaded.
I did that. It continued to spit out the same message, till I reached the line
byte-code: Cannot open load file: No such file or directory, peg
Just press
c
to continue. Look at the snipppet I added. There is an intentionaldebug
statement whenever a library of interest is mentioned indebug-on-load
call is loaded.I did that. It continued to spit out the same message, till I reached the line
byte-code: Cannot open load file: No such file or directory, peg
You could have figured out yourself. Just add wherever peg
is in to load-path
.
(I use Emacs from master branch, and peg
is a builting package)
You need to change the package directory paths in below snippet.
Note that this snippet explicitly sets package-load-list
, and ONLY those packages from ELPA will be available to you.
This is essentially creates a sandbox (that contains only the essentials and nothing else) for you to use the ODT exporter.
Use this snippet
(require 'find-func)
(add-to-list 'after-load-functions
(lambda (file-name)
(message "\nLoading %s because %s" (file-name-nondirectory file-name) load-file-name)
;; (message "Loaded %s" (file-name-nondirectory file-name))
))
(defmacro debug-on--load (feature)
`(with-eval-after-load ',feature
(message "\nLoaded `%s': %s" ',feature
(find-library-name (symbol-name ',feature)))
(debug)))
(defmacro debug-on-load (feature-or-features)
(let* ((features (or (unless (consp feature-or-features)
(list feature-or-features))
feature-or-features)))
`(progn
,@(seq-map
(lambda (it)
`(debug-on--load ,it))
features))))
(debug-on-load
(
org-compat
org-macs
org
))
(custom-set-variables
;; '(package-archive-priorities
;; '(("gnu" . 100) ("nongnu" . 90) ("gnu-devel" . 80) ("melpa" . 70)
;; ("ox-odt" . 60)))
'(package-archives
'(
;; ("gnu-devel" . "https://elpa.gnu.org/devel/")
("gnu" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")
("melpa" . "https://melpa.org/packages/")
;; ("ox-odt" . "https://kjambunathan.github.io/elpa/")
))
'(package-directory-list '("/home/kjambunathan/src/emacs-init/package.el/"))
'(package-user-dir "/home/kjambunathan/src/emacs-init/package.el")
'(package-load-list '((org nil) (peg t) (rnc-mode t))))
(package-initialize)
(setq my-org-mode-ox-odt-path "~/src/emacs-extras/org-mode-ox-odt/lisp"
;; "~/ALLES/src/org-mode-ox-odt/lisp"
)
(setq load-path (cons (expand-file-name my-org-mode-ox-odt-path)
load-path))
(mapc (lambda (feature)
(load-file
(format "%s/%s.elc" my-org-mode-ox-odt-path feature))
)
'(
org-macs
odt
ox-odt
ox-ods
))
After changing the relevant path I run
1) emacs -Q 2) and load that file
I again obtain a bunch of backtrace, I continue with c
and then nothing.
Here is the output of the backtrace buffer
Debugger entered: nil
(lambda nil (message "\nLoaded `%s': %s" 'org-macs (find-library-name (symbol-name 'org-macs))) (debug))()
eval-after-load-helper("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
run-hook-with-args(eval-after-load-helper "/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
do-after-load-evaluation("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs....")
load("/home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs...." nil nil t)
load-file("~/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc")
(lambda (feature) (load-file (format "%s/%s.elc" my-org-mode-ox-odt-path feature)))(org-macs)
mapc((lambda (feature) (load-file (format "%s/%s.elc" my-org-mode-ox-odt-path feature))) (org-macs odt ox-odt ox-ods))
eval-buffer(#<buffer *load*> nil "/home/oub/emacs/my-org3.el" nil t) ; Reading at buffer position 1735
load-with-code-conversion("/home/oub/emacs/my-org3.el" "/home/oub/emacs/my-org3.el" nil nil)
load("/home/oub/emacs/my-org3.el" nil nil t)
load-file("~/emacs/my-org3.el")
funcall-interactively(load-file "~/emacs/my-org3.el")
call-interactively(load-file record nil)
command-execute(load-file record)
execute-extended-command(nil "load-file" "load-fi")
funcall-interactively(execute-extended-command nil "load-file" "load-fi")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
and here of the message buffer
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading /home/oub/emacs/my-org3.el (source)...
Loading cl-loaddefs.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/cl-lib.elc
Loading cl-lib.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/package.elc
Loading url-vars.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-parse.elc
Loading bytecomp.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/map.elc
Loading gv.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/map.elc
Loading byte-opt.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/map.elc
Loading map.elc because /opt/emacs29.4/share/emacs/29.4/lisp/json.elc
Loading subr-x.elc because /opt/emacs29.4/share/emacs/29.4/lisp/json.elc
Loading json.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading password-cache.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading cl-macs.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/eieio-core.elc
Loading eieio-core.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/eieio.elc
Loading eieio.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading cl-seq.elc because /opt/emacs29.4/share/emacs/29.4/lisp/auth-source.elc
Loading auth-source.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-parse.elc
Loading url-parse.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-handlers.elc
Loading url-handlers.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/package.elc
Loading mailcap.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-util.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-cookie.elc
Loading url-domsuf.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-cookie.elc
Loading generate-lisp-file.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-cookie.elc
Loading url-cookie.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-history.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-methods.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url-expand.elc
Loading url-expand.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-privacy.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url-proxy.elc because /opt/emacs29.4/share/emacs/29.4/lisp/url/url.elc
Loading url.elc because /opt/emacs29.4/share/emacs/29.4/lisp/net/browse-url.elc
Loading browse-url.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/package.elc
Loading package.elc because /home/oub/emacs/my-org3.el
Loading finder-inf.el because /home/oub/emacs/my-org3.el
Loading rnc-mode-autoloads.el because /home/oub/emacs/my-org3.el
Loading peg-autoloads.el because /home/oub/emacs/my-org3.el
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc...
Loading format-spec.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc
Loading org-macs.elc because /home/oub/emacs/my-org3.el
Loaded ‘org-macs’: /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs.el
Loading help-mode.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/backtrace.elc
Loading backtrace.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/debug.elc
Loading debug.elc because /home/oub/emacs/my-org3.el
Entering debugger...
Loading cl-print.elc because /home/oub/emacs/my-org3.el
Loading radix-tree.elc because /opt/emacs29.4/share/emacs/29.4/lisp/help-fns.elc
Loading help-fns.elc because /home/oub/emacs/my-org3.el
Continuing.
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-macs.elc...done
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/odt.elc...
Loading pcase.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/odt.elc
Loading org-compat.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/odt.elc
Loaded ‘org-compat’: /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-compat.el
Entering debugger...
Continuing.
Loading dom.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/odt.elc
Loading odt.elc because /home/oub/emacs/my-org3.el
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/odt.elc...done
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc...
Loading xml.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading org-version.el because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox.elc
Loading ob-eval.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob-core.elc
Loading org-fold-core.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-fold.elc
Loading org-fold.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob-core.elc
Loading org-cycle.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob-core.elc
Loading ob-core.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob-exp.elc
Loading ob-exp.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox.elc
Loading oc.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox.elc
Loading rx.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ol.elc
Loading ol.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox.elc
Loading generator.elc because /opt/emacs29.4/share/emacs/29.4/lisp/emacs-lisp/avl-tree.elc
Loading avl-tree.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-element.elc
Loading ring.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-element.elc
Loading cal-loaddefs.elc because /opt/emacs29.4/share/emacs/29.4/lisp/calendar/calendar.elc
Loading cal-menu.elc because /opt/emacs29.4/share/emacs/29.4/lisp/calendar/calendar.elc
Loading calendar.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading thingatpt.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org-loaddefs.el because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org-keys.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org-table.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading ob-emacs-lisp.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading icons.elc because /opt/emacs29.4/share/emacs/29.4/lisp/outline.elc
Loading outline.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading time-date.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org-entities.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org-faces.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org-footnote.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-list.elc
Loading org-list.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading ansi-color.elc because /opt/emacs29.4/share/emacs/29.4/lisp/comint.elc
Loading ansi-osc.elc because /opt/emacs29.4/share/emacs/29.4/lisp/comint.elc
Loading comint.elc because /opt/emacs29.4/share/emacs/29.4/lisp/pcomplete.elc
Loading pcomplete.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-pcomplete.elc
Loading org-pcomplete.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading ob-comint.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-src.elc
Loading executable.elc because /opt/emacs29.4/share/emacs/29.4/lisp/progmodes/sh-script.elc
Loading treesit.elc because /opt/emacs29.4/share/emacs/29.4/lisp/progmodes/sh-script.elc
Loading smie.elc because /opt/emacs29.4/share/emacs/29.4/lisp/progmodes/sh-script.elc
Loading sh-script.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-src.elc
Loading org-src.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org-macro.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading ob-table.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob.elc
Loading ob-lob.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob.elc
Loading ob-ref.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob.elc
Loading ob-tangle.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ob.elc
Loading ob.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.elc
Loading org.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-element.elc
Loaded ‘org’: /home/oub/ALLES/src/org-mode-ox-odt/lisp/org.el
Entering debugger...
Continuing.
Loading inline.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-element-ast.elc
Loading org-element-ast.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-id.elc
Loading org-refile.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-id.elc
Loading org-id.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-persist.elc
Loading xdg.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-persist.elc
Loading org-persist.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/org-element.elc
Loading org-element.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox.elc
Loading ox.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading ox-publish.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-ascii.elc
Loading ox-ascii.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading table.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-html.elc
Loading ox-html.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading org-agenda.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-icalendar.elc
Loading ox-icalendar.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading ox-latex.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading cl-extra.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading nxml-util.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-loc.elc
Loading xmltok.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/nxml-parse.elc
Loading nxml-enc.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/nxml-parse.elc
Loading nxml-ns.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/nxml-parse.elc
Loading nxml-parse.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-loc.elc
Loading rng-pttrn.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-match.elc
Loading rng-util.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-match.elc
Loading rng-dt.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-match.elc
Loading rng-match.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-parse.elc
Loading rng-parse.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-loc.elc
Loading rng-uri.elc because /opt/emacs29.4/share/emacs/29.4/lisp/nxml/rng-loc.elc
Loading rng-loc.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading pp.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
ox-odt: Soffice executable is ‘soffice’
ox-odt: Refusing to create / overwrite custom desktop file during load.
To create custom desktop file, do M-x customize-variable RET org-odt-soffice-executable or
do M-x org-odt-create-custom-desktop-file
Loading iso8601.elc because /opt/emacs29.4/share/emacs/29.4/lisp/textmodes/bibtex.elc
Loading bibtex.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/oc-csl.elc
Loading oc-csl.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
Loading ox-odt.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc
ox-odt: Soffice executable is ‘soffice’
ox-odt: Refusing to create / overwrite custom desktop file during load.
To create custom desktop file, do M-x customize-variable RET org-odt-soffice-executable or
do M-x org-odt-create-custom-desktop-file
Loading ox-odt.elc because /home/oub/emacs/my-org3.el
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-odt.elc...done
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-ods.elc...
Loading peg.elc because /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-ods.elc
Loading ox-ods.elc because /home/oub/emacs/my-org3.el
Loading /home/oub/ALLES/src/org-mode-ox-odt/lisp/ox-ods.elc...done
Loading my-org3.el because nil
Loading /home/oub/emacs/my-org3.el (source)...done
Loading display-line-numbers.elc because nil
Now: I can export to ods. So I conclude I have to somehow merge this setting into my init file, and we can close the issue.
Now: I can export to ods. So I conclude I have to somehow merge this setting into my init file, and we can close the issue.
Good.
Now: I can export to ods. So I conclude I have to somehow merge this setting into my init file, and we can close the issue.
Good.
I just used these in my init file, and the conversion failed with the same error, I started with. So I have to debug my init file (in the afternoon).
Something interesting:
Warning (package): Unnecessary call to ‘package-initialize’ in init file
⛔ Warning (emacs): Org version mismatch.
This warning usually appears when a built-in Org version is loaded
prior to the more recent Org version.
Version mismatch is commonly encountered in the following situations:
1. Emacs is loaded using literate Org config and more recent Org
version is loaded inside the file loaded by ‘org-babel-load-file’.
‘org-babel-load-file’ triggers the built-in Org version clashing
the newer Org version attempt to be loaded later.
It is recommended to move the Org loading code before the
‘org-babel-load-file’ call.
The problem is squarely at your end.
Nevertheless here is a suggestion.
I don't know if you use early-init.el
file. Add the following to the very beginning of early-init
file ...
(advice-add 'org-release :around
(defun org-release--around (orig-fun &rest orig-args)
(pcase-let* ((`nil orig-args))
(let (frames frame (index 0))
(while (setq frame (backtrace-frame index))
(push frame frames)
(cl-incf index))
(message "%S" (list (format "org-release check @ %s" load-file-name)
(thread-last frames
(seq-keep (lambda (f)
(when (eq (nth 1 f) 'require)
(nth 2 f)))))))
;;(debug)
)
(apply orig-fun orig-args))))
(setq package-enable-at-startup nil)
and report what you see in *Messages*
buffer.
The messages buffer will have messages like
("org-release check @ /home/kjambunathan/src/emacs-extras/org-mode-ox-odt/lisp/ol-bibtex.elc" (org ox-odt ox ox-odt oc-csl citeproc citeproc-cite citeproc-biblatex citeproc-bibtex ol-bibtex))
It means that ol-bibtex
is getting loaded, and is doing an org-assert-version
. And the load sequence is something like org
->ox
->ox-odt
->oc-csl
etc -> citeproc-bibtex
->ol-bibtex
.
You may want to experiment with package-enable-at-startup
set to nil
or t
.
THIS together with debug-on-load
infrastructure will help you find out what is causing the problem. FWIW, you can put the debug-on-load
infrastructure to early-init.el
.
The problem is squarely at your end.
I can go a step further and say it is the package.el
infrastructure (specifically package-initialize
and package-activate
together with package-enable-at-startup
etc) which is causing you the problem.
So, addressing the problem you see will depend on much if and how you use the package.el
infrastructure. Obviously, I don't have access to your init files. Yeah, you are on your own here.
FWIW, since last year or so, I have stopped using package.el
for my Emacs, and started using straight.el
instead. I am VERY HAPPY that I made this switch.
package.el
is headache ... and it is a BIG HEADACHE (for me atleast).
You can also add the following advice
to early-init.el
.
It will tell you the sequence in which packages are getting activated.
(advice-add 'package-activate-1 :around
(defun package-activate-1--around (orig-fun &rest orig-args)
(pcase-let* ((`(,pkg-desc ,reload ,deps) orig-args))
(let* ((name (package-desc-name pkg-desc))
(pkg-dir (package-desc-dir pkg-desc)))
(message "\n\nActivating %s @ %s" name pkg-dir))
(apply orig-fun orig-args))))
;; (advice-remove 'package-activate-1 'package-activate-1--around)
hello
sorry, after sucessfully upgrading org-mode-ox-odt, I tried to export the following table as an ods file (as I did successfully before)
however the export command return error
org-buffer-text-pixel-width
not found. but I moved my old org installation out of the way.