tecosaur / emacs-config

My configuration for Doom Emacs. Mirror of https://git.tecosaur.net/tec/emacs-config.
MIT License
1.04k stars 117 forks source link

doom refactorings break html/pdf export #37

Closed neuhalje closed 1 year ago

neuhalje commented 2 years ago

I really enjoy your setup for html/pdf generation of the org-config. Recent refactoring (and probably others, see below) to the doom code break the export.

Changes to doom

E.g.

Errors remaining

Still export fails:

DEBUG=1 ./publish.sh 
[ 0.0s] Starting publish process
[ 0.2s] org-html process failed!

[ 0.2s] Config publishing aborted

The logfiles are empty (see below) and typescript seems like a script recording but fails to replay:

scriptreplay -t typescript 
scriptreplay: typescript: line 80: timing file error: No such file or directory

Running org-html.sh directly points to the refactorings (see below) in doom startup code:

DEBUG=1 ./org-html.sh 

[ 0.1s] Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "/home/jens/.emacs.d/init.el")
  load("/home/jens/.emacs.d/init.el")
  (if full (load (expand-file-name "~/.emacs.d/init.el")) (progn (setq gc-cons-threshold 16777216) (setq gcmh-high-cons-threshold 16777216)) (load (expand-file-name "lisp/doom.el" user-emacs-directory) nil t) (require 'doom-cli) (doom-initialize))
  initialise(t)
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_98>(#<buffer  *load*> "/home/jens/.doom.d/misc/config-publishing/org-html...")
  load-with-code-conversion("/home/jens/.doom.d/misc/config-publishing/org-html..." "/home/jens/.doom.d/misc/config-publishing/org-html..." nil t #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_98>)
  command-line--load-script("/home/jens/.doom.d/misc/config-publishing/org-html...")
  command-line-1(("-scriptload" "./org-html.sh" "--"))
  command-line()
  normal-top-level()

My attempt

diff --git a/misc/config-publishing/initialise.el b/misc/config-publishing/initialise.el
index d98329b..d068d8f 100644
--- a/misc/config-publishing/initialise.el
+++ b/misc/config-publishing/initialise.el
@@ -29,7 +29,7 @@
         (coding-system-for-write 'utf-8))
     (append-to-file str nil log-file)))

-(when log-messages
+(when (and log-messages (boundp 'logged-message))
   (advice-add 'send-string-to-terminal :after #'logged-message))

 (defvar message-colour t)
@@ -73,8 +73,8 @@
       (load (expand-file-name "~/.emacs.d/init.el"))
     (setq gc-cons-threshold 16777216
           gcmh-high-cons-threshold 16777216)
-    (load (expand-file-name "core/core.el" user-emacs-directory) nil t)
-    (require 'core-cli)
+    (load (expand-file-name "lisp/doom.el" user-emacs-directory) nil t)
+    (require 'doom-cli)
     (doom-initialize))

   (setq doom-cli-log-error-file log-file)

Attachments

Changes to doom

git lg --stat -S  core-start
  ... 
  * | b9933e663 - refactor!: restructure Doom core (6 days ago) <Henrik Lissner>| | 
  | |  early-init.el                            |  8 ++++----
  | |  {core => lisp}/cli/autoloads.el          | 10 +++++-----
  | |  {core => lisp}/cli/compile.el            |  8 ++++----
  | |  {core => lisp}/cli/doctor.el             |  6 +++---
  | |  core/core-start.el => lisp/doom-start.el | 12 ++++++------
  | |  {core/autoload => lisp/lib}/config.el    |  4 ++--
  | |  6 files changed, 24 insertions(+), 24 deletions(-)

  ... 
  * | fbc5fd7f8 - nit: revise comments in early-init.el (10 days ago) <Henrik Lissner>| | 
  | |  early-init.el | 38 +++++++++++++++++++++-----------------
  | |  1 file changed, 21 insertions(+), 17 deletions(-)

  ... 
  * | 837f404fb - fix(lib): update doom/reload & doom/reload-autoloads (7 weeks ago) <Henrik Lissner>| | 
  | |  core/autoload/config.el | 7 ++-----
  | |  1 file changed, 2 insertions(+), 5 deletions(-)

  ... 
  * | 74f3c1d11 - fix(cli): doom {compile,clean} errors (7 weeks ago) <Henrik Lissner>| | 
  | |  core/cli/compile.el | 2 +-
  | |  1 file changed, 1 insertion(+), 1 deletion(-)

  ... 
  * | 6c0b7e153 - refactor!(cli): rewrite CLI framework libraries (7 weeks ago) <Henrik Lissner>| | 
  | |  core/cli/autoloads.el | 33 +++++++++++++++++++--------------
  | |  core/cli/doctor.el    | 79 ++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
  | |  2 files changed, 65 insertions(+), 47 deletions(-)

  ... 
  * | 1402db512 - refactor: how Doom starts up (7 weeks ago) <Henrik Lissner>| | 
  | |  core/core-start.el | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  | |  early-init.el      |  56 +++++++++++++++++++++++++++++++++++------------------
  | |  2 files changed, 238 insertions(+), 19 deletions(-)

Logfiles

ls -latr|tail -n5
-rw-r--r-- 1 jens jens    0 2022-08-06 09:41 publish-log.txt
-rw-r--r-- 1 jens jens    0 2022-08-06 09:41 org-html-log.txt
-rw-r--r-- 1 jens jens    0 2022-08-06 09:41 htmlize-log.txt
drwxr-xr-x 2 jens jens 4096 2022-08-06 09:41 .
-rw-r--r-- 1 jens jens 1709 2022-08-06 09:41 typescript
tecosaur commented 2 years ago

Yea, the current export process is tad borked, unfortunately. Getting it working is on my todo list, but I'm not sure when I'm going to get to it.

neuhalje commented 2 years ago

@tecosaur sorry for the spam. Could you please post the doom commit you use?

tecosaur commented 2 years ago

I'm usually close to HEAD, I last updated a few hours ago.

neuhalje commented 2 years ago

Bummer. Do you know a working revision for the generation?

tecosaur commented 2 years ago

Something quite a few months ago :sweat_smile: look for a line of Green CI ticks in the commit history.

Seems like November 2021 was when it last worked.

tecosaur commented 1 year ago

FYI, I've recently started work on getting this going again.

tecosaur commented 1 year ago

I think it's all working again now :grinning:!

On the other hand, I didn't think the config page count would grow so much :sweat:.