Skip to content

Instantly share code, notes, and snippets.

@jethrokuan
Last active July 19, 2021 10:18
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jethrokuan/02f41028fb4a6f81787dc420fb99b6e4 to your computer and use it in GitHub Desktop.
Save jethrokuan/02f41028fb4a6f81787dc420fb99b6e4 to your computer and use it in GitHub Desktop.
Migration script
;;; THIS MIGRATION SCRIPT IS NOW DEPRECATED.
;;; PLEASE USE M-x org-roam-migrate-wizard, FOUND WITHIN THE ORG-ROAM REPO ITSELF.
@failable
Copy link

When I eval step 1, I got user-error: Before first headline at position 1 in buffer conditional_random_fields.org. Any idea?

@japhir
Copy link

japhir commented Jul 19, 2021

I get some errors with titles that use entities, such as \delta or \endash.

Here's the error message I get:

Debugger entered--Lisp error: (error "Invalid use of ‘\\’ in replacement text")
  vulpea-buffer-prop-set("title" "dosSantos2010: Glacial\\textendash interglacial var...")
  vulpea-buffer-title-set("dosSantos2010: Glacial\\textendash interglacial var...")
  vulpea-migrate-buffer()
  (save-current-buffer (set-buffer (find-file f)) (message "migrating %s" f) (vulpea-migrate-buffer))
  (with-current-buffer (find-file f) (message "migrating %s" f) (vulpea-migrate-buffer))
  (while --dolist-tail-- (setq f (car --dolist-tail--)) (with-current-buffer (find-file f) (message "migrating %s" f) (vulpea-migrate-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- (org-roam--list-all-files)) f) (while --dolist-tail-- (setq f (car --dolist-tail--)) (with-current-buffer (find-file f) (message "migrating %s" f) (vulpea-migrate-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (dolist (f (org-roam--list-all-files)) (with-current-buffer (find-file f) (message "migrating %s" f) (vulpea-migrate-buffer)))
  vulpea-migrate-db()
  eval-expression((vulpea-migrate-db) nil nil 127)
  funcall-interactively(eval-expression (vulpea-migrate-db) nil nil 127)
  command-execute(eval-expression)

@japhir
Copy link

japhir commented Jul 19, 2021

(if I just replace the offending entity with the corresponding utf-8 symbol and run it again, it appears to continue nicely).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment