Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Context

In relation to the desktop-save-mode: https://org-roam.discourse.group/t/help-for-installation-of-org-roam-in-windows/192/15

I suspect this is Windows only. I test this with manually source-compiled emacsql-sqlite.exe as well as emacsql-sqlite3.el that uses pre-compiled one. Not verified, but macOS and Linux do not seem to have the error of "Selected deleted buffer" or occasional time-out error.

System Environment

  • Windows.
  • Emacs 26.3.
  • 2020-06-29.
  • Start with .emacs.
  • Add use-package via package-install.
  • Add this config
(use-package desktop
  :init
  (add-hook 'after-init-hook 'desktop-read)
  :config
  (desktop-save-mode t))

Repro

  • Open Org-roam file, open OR buffer.
  • Quit
  • Come back intending to go back to the same state via desktop-read.
Debugger entered--Lisp error: (emacsql-timeout "Query timed out" 30)
  signal(emacsql-timeout ("Query timed out" 30))
  #f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #<bytecode 0x1ff93cd>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection>)
  apply(#f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #<bytecode 0x1ff93cd>) #<emacsql-sqlite3-connection emacsql-sqlite3-connection> nil)
  emacsql-wait(#<emacsql-sqlite3-connection emacsql-sqlite3-connection>)
  #f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #<bytecode 0x1ffb805>)(#<emacsql-sqlite3-connection emacsql-sqlite3-connection> [:select * :from files])
  apply(#f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #<bytecode 0x1ffb805>) #<emacsql-sqlite3-connection emacsql-sqlite3-connection> [:select * :from files])
  emacsql(#<emacsql-sqlite3-connection emacsql-sqlite3-connection> [:select * :from files])
  apply(emacsql #<emacsql-sqlite3-connection emacsql-sqlite3-connection> [:select * :from files] nil)
  org-roam-db-query([:select * :from files])
  org-roam-db--get-current-files()
  org-roam-db-build-cache()
  org-roam-mode(1)
  desktop-create-buffer(208 "c:/Users/nobiot/org-roam/Intro.org" "Intro.org" org-mode (visual-line-mode ivy-mode org-roam-mode pandoc-mode olivetti-mode buffer-face-mode) 1 (nil nil) nil nil ((buffer-display-time 24314 11725 976181 0) (buffer-file-coding-system . utf-8-dos) (truncate-lines)) ((mark-ring nil)))
  eval-buffer(#<buffer  *load*> nil "c:/Users/nobiot/.emacs.d/.emacs.desktop" nil t)  ; Reading at buffer position 3269
  load-with-code-conversion("c:/Users/nobiot/.emacs.d/.emacs.desktop" "c:/Users/nobiot/.emacs.d/.emacs.desktop" t t)
  load("c:/Users/nobiot/.emacs.d/.emacs.desktop" t t t)
  desktop-read()
  #f(compiled-function () #<bytecode 0x22608e1>)()
  run-hooks(after-init-hook delayed-warnings-hook)
  command-line()
  normal-top-level()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.