What did you expect to happen?
I expected to add the +roam tag to :lang (org) in init.el and use org-roam.
What actually happened?
I added +roam to :lang (org) and receive multiple errors upon loading Emacs:
Failed to load magit package incrementally, because: (error Selecting deleted buffer)
Failed to load org package incrementally, because: (error Selecting deleted buffer)
Failed to load org-agenda package incrementally, because: (error Selecting deleted buffer)
as well as when invoking the affected packages:
Failed to load deferred package forge: (error Selecting deleted buffer)
Additional details:
Relevant org-roam config change
(setq org-roam-directory "~/Dropbox/Chris/org/roam")
(setq org-roam-db-location "~/Dropbox/Chris/org/roam")
Messages
Open project (projectile-switch-project)
Recently opened files (recentf-open-files)
Open org-agenda (org-agenda)
Reload last session (doom/quickload-session)
Open org-agenda (org-agenda)
Recently opened files (recentf-open-files)
Open project (projectile-switch-project)
Jump to bookmark (bookmark-jump)
Open private configuration (doom/open-private-config)
Failed to load org package incrementally, because: (error Selecting deleted buffer) [2 times]
Quit
Jump to bookmark (bookmark-jump)
Open project (projectile-switch-project)
Recently opened files (recentf-open-files)
Open org-agenda (org-agenda)
Reload last session (doom/quickload-session)
Open org-agenda (org-agenda)
Recently opened files (recentf-open-files)
Open project (projectile-switch-project)
Jump to bookmark (bookmark-jump)
Open private configuration (doom/open-private-config)
Open documentation (doom/help)
Open private configuration (doom/open-private-config)
Loading /Users/clockard/.emacs.d/.local/cache/recentf...done
apply: Selecting deleted buffer
Failed to load deferred package forge: (error Selecting deleted buffer)
apply: Selecting deleted buffer
SPC g C-g is undefined
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
ibuffer-projectile: groups set
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Updating buffer list...done
ibuffer-projectile: groups set
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Quit
[1] main [2] SecOps | Switched to 'SecOps' in new workspace
Quit
apply: Selecting deleted buffer
Updating buffer list...done
ibuffer-projectile: groups set
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Updating buffer list...done
ibuffer-projectile: groups set
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set [4 times]
Backtrace
Debugger entered--Lisp error: (error "Selecting deleted buffer")
#f(compiled-function (conn) #
apply(#f(compiled-function (conn) #
emacsql-waiting-p(#
#f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #
apply(#f(compiled-function (connection &optional timeout) "Block until CONNECTION is waiting for further input." #
emacsql-wait(#
#f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #
apply(#f(compiled-function (connection sql &rest args) "Send SQL s-expression to CONNECTION and return the results." #
emacsql(#
#f(compiled-function (conn slots) #
apply(#f(compiled-function (conn slots) #
#f(compiled-function (&rest args) #
apply(#f(compiled-function (&rest args) #
initialize-instance(#
#f(compiled-function (class &rest slots) "Default constructor for CLASS eieio-default-superclass'.\nSLOTS are the initialization slots used byinitialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncalls initialize-instance' on that object." #<bytecode 0x1fef381b1d95>)(emacsql-sqlite3-connection :file "~/Dropbox/Chris/org/roam")
apply(#f(compiled-function (class &rest slots) "Default constructor for CLASSeieio-default-superclass'.\nSLOTS are the initialization slots used by initialize-instance'.\nThis static method is called when an object is constructed.\nIt allocates the vector used to represent an EIEIO object, and then\ncallsinitialize-instance' on that object." #
make-instance(emacsql-sqlite3-connection :file "~/Dropbox/Chris/org/roam")
emacsql-sqlite3("~/Dropbox/Chris/org/roam")
org-roam-db()
org-roam-db-build-cache()
(cond (org-roam-mode (if (or (file-executable-p emacsql-sqlite3-executable) (executable-find "sqlite3")) nil (lwarn '(org-roam) :error "Cannot find executable 'sqlite3'. Ensure it is ins...")) (add-to-list 'org-execute-file-search-functions 'org-roam--execute-file-row-col) (add-hook 'find-file-hook #'org-roam--find-file-hook-function) (add-hook 'kill-emacs-hook #'org-roam-db--close-all) (add-hook 'org-open-at-point-functions #'org-roam-open-id-at-point) (advice-add 'rename-file :after #'org-roam--rename-file-advice) (advice-add 'delete-file :before #'org-roam--delete-file-advice) (org-roam-db-build-cache)) (t (setq org-execute-file-search-functions (delete 'org-roam--execute-file-row-col org-execute-file-search-functions)) (remove-hook 'find-file-hook #'org-roam--find-file-hook-function) (remove-hook 'kill-emacs-hook #'org-roam-db--close-all) (remove-hook 'org-open-at-point-functions #'org-roam-open-id-at-point) (advice-remove 'rename-file #'org-roam--rename-file-advice) (advice-remove 'delete-file #'org-roam--delete-file-advice) (org-roam-db--close-all) (let ((--dolist-tail-- (org-roam--get-roam-buffers))) (while --dolist-tail-- (let ((buf (car --dolist-tail--))) (save-current-buffer (set-buffer buf) (org-link-set-parameters "file" :face 'org-link) (remove-hook 'post-command-hook #'org-roam-buffer--update-maybe t) (remove-hook 'after-save-hook #'org-roam-db--update-file t)) (setq --dolist-tail-- (cdr --dolist-tail--)))))))
(let ((last-message (current-message))) (progn (set-default 'org-roam-mode (if (eq arg 'toggle) (not (default-value 'org-roam-mode)) (> (prefix-numeric-value arg) 0)))) (cond (org-roam-mode (if (or (file-executable-p emacsql-sqlite3-executable) (executable-find "sqlite3")) nil (lwarn '(org-roam) :error "Cannot find executable 'sqlite3'. Ensure it is ins...")) (add-to-list 'org-execute-file-search-functions 'org-roam--execute-file-row-col) (add-hook 'find-file-hook #'org-roam--find-file-hook-function) (add-hook 'kill-emacs-hook #'org-roam-db--close-all) (add-hook 'org-open-at-point-functions #'org-roam-open-id-at-point) (advice-add 'rename-file :after #'org-roam--rename-file-advice) (advice-add 'delete-file :before #'org-roam--delete-file-advice) (org-roam-db-build-cache)) (t (setq org-execute-file-search-functions (delete 'org-roam--execute-file-row-col org-execute-file-search-functions)) (remove-hook 'find-file-hook #'org-roam--find-file-hook-function) (remove-hook 'kill-emacs-hook #'org-roam-db--close-all) (remove-hook 'org-open-at-point-functions #'org-roam-open-id-at-point) (advice-remove 'rename-file #'org-roam--rename-file-advice) (advice-remove 'delete-file #'org-roam--delete-file-advice) (org-roam-db--close-all) (let ((--dolist-tail-- (org-roam--get-roam-buffers))) (while --dolist-tail-- (let ((buf ...)) (save-current-buffer (set-buffer buf) (org-link-set-parameters "file" :face ...) (remove-hook ... ... t) (remove-hook ... ... t)) (setq --dolist-tail-- (cdr --dolist-tail--))))))) (run-hooks 'org-roam-mode-hook (if (default-value 'org-roam-mode) 'org-roam-mode-on-hook 'org-roam-mode-off-hook)) (if (called-interactively-p 'any) (progn (customize-mark-as-set 'org-roam-mode) (if (and (current-message) (not (equal last-message (current-message)))) nil (let ((local "")) (message "Org-Roam mode %sabled%s" (if (default-value ...) "en" "dis") local))))))
org-roam-mode()
run-hooks(org-load-hook)
eval-buffer(#
load-with-code-conversion("/Users/clockard/.emacs.d/.local/straight/build/org..." "/Users/clockard/.emacs.d/.local/straight/build/org..." nil t)
require(org)
eval-buffer(#
load-with-code-conversion("/Users/clockard/.emacs.d/.local/straight/build/mag..." "/Users/clockard/.emacs.d/.local/straight/build/mag..." nil t)
require(magit-todos nil nil)
(progn (use-package-statistics-gather :init 'magit-todos nil) (require 'magit-todos nil nil) (use-package-statistics-gather :config 'magit-todos nil) (setq magit-todos-keyword-suffix "\(?:([^)]+)\)?:?") (define-key magit-todos-section-map "j" nil) (advice-add #'magit-todos-mode :around #'doom-shut-up-a) t (use-package-statistics-gather :config 'magit-todos t) (use-package-statistics-gather :init 'magit-todos t))
(closure (t) nil (progn (use-package-statistics-gather :init 'magit-todos nil) (require 'magit-todos nil nil) (use-package-statistics-gather :config 'magit-todos nil) (setq magit-todos-keyword-suffix "\(?:([^)]+)\)?:?") (define-key magit-todos-section-map "j" nil) (advice-add #'magit-todos-mode :around #'doom-shut-up-a) t (use-package-statistics-gather :config 'magit-todos t) (use-package-statistics-gather :init 'magit-todos t)))()
eval-after-load-helper("/Users/clockard/.emacs.d/.local/straight/build/mag...")
run-hook-with-args(eval-after-load-helper "/Users/clockard/.emacs.d/.local/straight/build/mag...")
do-after-load-evaluation("/Users/clockard/.emacs.d/.local/straight/build/mag...")
require(magit)
eval-buffer(#
load-with-code-conversion("/Users/clockard/.emacs.d/.local/straight/build/mag..." "/Users/clockard/.emacs.d/.local/straight/build/mag..." nil t)
require(magit-bookmark)
#f(compiled-function () #
eval-after-load-helper("/usr/local/Cellar/emacs-plus/HEAD-e75f6be/share/em...")
run-hook-with-args(eval-after-load-helper "/usr/local/Cellar/emacs-plus/HEAD-e75f6be/share/em...")
do-after-load-evaluation("/usr/local/Cellar/emacs-plus/HEAD-e75f6be/share/em...")
require(bookmark)
(progn (require 'package) (require 'bookmark) (require 'project))
eval((progn (require 'package) (require 'bookmark) (require 'project)) t)
#f(compiled-function (&rest body) "Like progn', but evaluates the body at compile time if you're compiling.\nThus, the result of the body appears to the compiler as a quoted\nconstant. In interpreted code, this is entirely equivalent to\nprogn', except that the value of the expression may be (but is\nnot necessarily) computed at load time if eager macro expansion\nis enabled." #
(eval-when-compile (require 'package) (require 'bookmark) (require 'project))
eval-buffer(#
load-with-code-conversion("/Users/clockard/.emacs.d/.local/straight/build/ivy..." "/Users/clockard/.emacs.d/.local/straight/build/ivy..." nil t)
require(ivy-rich nil nil)
(progn (use-package-statistics-gather :init 'ivy-rich nil) (require 'ivy-rich nil nil) (use-package-statistics-gather :config 'ivy-rich nil) (setq ivy-rich-parse-remote-buffer nil) (if t (progn (let* ((v (plist-get ivy-rich-display-transformers-list 'ivy-switch-buffer))) (setcar (cdr v) (let* ((vlist ...)) (if (member ... vlist) vlist (cons ... vlist))))))) (let* ((--cl-var-- (list 'counsel-describe-variable '(:columns (... ... ...)) 'counsel-M-x '(:columns (... ...)) 'counsel-projectile-switch-to-buffer (plist-get ivy-rich-display-transformers-list 'ivy-switch-buffer) 'counsel-bookmark '(:columns (... ...)))) (prop nil) (value nil) (--cl-var--)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) value (car --cl-var--)) (setq ivy-rich-display-transformers-list (plist-put ivy-rich-display-transformers-list prop value)) (setq --cl-var-- (cdr (cdr --cl-var--)))) nil) (setq ivy-switch-buffer-faces-alist nil) (ivy-set-display-transformer 'internal-complete-buffer nil) (let* ((plist (and t (plist-get ivy-rich-display-transformers-list 'ivy-switch-buffer))) (switch-buffer-alist (and plist (assq 'ivy-rich-candidate (plist-get plist :columns))))) (if switch-buffer-alist (setcar switch-buffer-alist '+ivy-rich-buffer-name))) (ivy-rich-mode 1) t (use-package-statistics-gather :config 'ivy-rich t) (use-package-statistics-gather :init 'ivy-rich t))
(closure (t) nil (progn (use-package-statistics-gather :init 'ivy-rich nil) (require 'ivy-rich nil nil) (use-package-statistics-gather :config 'ivy-rich nil) (setq ivy-rich-parse-remote-buffer nil) (if t (progn (let* ((v (plist-get ivy-rich-display-transformers-list ...))) (setcar (cdr v) (let* (...) (if ... vlist ...)))))) (let* ((--cl-var-- (list 'counsel-describe-variable '(:columns ...) 'counsel-M-x '(:columns ...) 'counsel-projectile-switch-to-buffer (plist-get ivy-rich-display-transformers-list 'ivy-switch-buffer) 'counsel-bookmark '(:columns ...))) (prop nil) (value nil) (--cl-var--)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- ...))) value (car --cl-var--)) (setq ivy-rich-display-transformers-list (plist-put ivy-rich-display-transformers-list prop value)) (setq --cl-var-- (cdr (cdr --cl-var--)))) nil) (setq ivy-switch-buffer-faces-alist nil) (ivy-set-display-transformer 'internal-complete-buffer nil) (let* ((plist (and t (plist-get ivy-rich-display-transformers-list 'ivy-switch-buffer))) (switch-buffer-alist (and plist (assq 'ivy-rich-candidate (plist-get plist :columns))))) (if switch-buffer-alist (setcar switch-buffer-alist '+ivy-rich-buffer-name))) (ivy-rich-mode 1) t (use-package-statistics-gather :config 'ivy-rich t) (use-package-statistics-gather :init 'ivy-rich t)))()
eval-after-load-helper("/Users/clockard/.emacs.d/.local/straight/build/ivy...")
run-hook-with-args(eval-after-load-helper "/Users/clockard/.emacs.d/.local/straight/build/ivy...")
do-after-load-evaluation("/Users/clockard/.emacs.d/.local/straight/build/ivy...")
(ivy-read prompt 'internal-complete-buffer :action action :predicate filter :update-fn update :unwind unwind :preselect (buffer-name (other-buffer (current-buffer))) :matcher #'ivy--switch-buffer-matcher :keymap ivy-switch-buffer-map :caller #'ivy-switch-buffer)
(let ((current (not other)) prompt action filter update unwind) (cond ((and workspace current) (setq prompt "Switch to workspace buffer: " action #'ivy--switch-buffer-action filter #'+ivy--is-workspace-other-buffer-p)) (workspace (setq prompt "Switch to workspace buffer in other window: " action #'ivy--switch-buffer-other-window-action filter #'+ivy--is-workspace-buffer-p)) (current (setq prompt "Switch to buffer: " action #'ivy--switch-buffer-action)) ((setq prompt "Switch to buffer in other window: " action #'ivy--switch-buffer-other-window-action))) (if +ivy-buffer-preview (progn (cond ((not (and ivy-use-virtual-buffers (eq +ivy-buffer-preview ...))) (setq update #'+ivy--switch-buffer-preview unwind #'+ivy--switch-buffer-unwind)) ((setq update #'+ivy--switch-buffer-preview-all unwind #'+ivy--switch-buffer-unwind))))) (ivy-read prompt 'internal-complete-buffer :action action :predicate filter :update-fn update :unwind unwind :preselect (buffer-name (other-buffer (current-buffer))) :matcher #'ivy--switch-buffer-matcher :keymap ivy-switch-buffer-map :caller #'ivy-switch-buffer))
+ivy--switch-buffer(t nil)
+ivy/switch-workspace-buffer(nil)
funcall-interactively(+ivy/switch-workspace-buffer nil)
call-interactively(+ivy/switch-workspace-buffer nil nil)
command-execute(+ivy/switch-workspace-buffer)
Steps to reproduce:
config.org +roam to :lang (org)doom syncdoom updateSPC g g to open MagitSystem information:
((emacs
(version . "27.0.91")
(features . "RSVG IMAGEMAGICK DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS XWIDGETS JSON PDUMPER LCMS2 GMP")
(build . "May 15, 2020")
(buildopts "--disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus/HEAD-e75f6be/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus/HEAD-e75f6be --with-xml2 --with-gnutls --with-dbus --with-imagemagick --with-json --with-modules --with-rsvg --without-pop --with-xwidgets --with-ns --disable-ns-self-contained")
(windowsys . batch)
(daemonp . server-running))
(doom
(version . "2.0.9")
(build . "HEAD -> develop 847bbf380 2020-06-13 17:12:23 -0400")
(dir . "~/.config/dotfiles/Emacs/.doom.d/"))
(system
(type . darwin)
(config . "x86_64-apple-darwin19.4.0")
(shell . "/usr/local/bin/zsh")
(uname . "Darwin 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64")
(path "/usr/local/opt/[email protected]/bin" "~/.cargo/bin" "/usr/local/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Applications/Wireshark.app/Contents/MacOS" "/usr/local/opt/[email protected]/bin" "~/.emacs.d/bin" "/usr/local/bin" "~/.emacs.d/bin" "/usr/local/Cellar/emacs-plus/HEAD-e75f6be/libexec/emacs/27.0.91/x86_64-apple-darwin19.4.0"))
(config
(envfile . envvar-file)
(elc-files . 0)
(modules :completion company (ivy +icons +fuzzy) :ui deft doom doom-dashboard doom-quit fill-column hl-todo modeline nav-flash ophints (popup +all +defaults) (pretty-code +fira) tabs treemacs unicode vc-gutter vi-tilde-fringe window-select workspaces minimap :editor (evil +everywhere) fold format rotate-text snippets :emacs (dired +icons) electric (ibuffer +icons) (undo +tree) vc :term term :checkers (syntax +inline) (spell +inline) :tools editorconfig (eval +overlay) (lookup +docsets) lsp macos (magit +forge) rgb :lang common-lisp data emacs-lisp markdown (org +dragndrop +hugo +ipython +mu4e +pomodoro +pandoc +present +roam) (python +lsp) (rust +lsp) sh web :email mu4e :config literate (default +bindings +smartparens))
(packages (nyan-mode) (2048-game) (easy-hugo) (org-jira))
(unpin "n/a")
(elpa "n/a")))
Seems you're on a week old commit of Doom. Please update to the latest and see if you can still reproduce it. org-roam, among other things, have been bumped in the meantime, which will likely address your issue.
I was on an older version of Doom to work around https://github.com/hlissner/doom-emacs/issues/3406 and I've since updated to [0abbf73b07](https://github.com/hlissner/doom-emacs/commit/0abbf73b077eff3085ac5ac178f71f46f04e91a9). I can reproduce this issue on my mac laptop (details above) and my linux workstation - both on this version.
During troubleshooting I realized the cause of my problem was setting org-roam-directory and org-roam-db-location to a location on my Dropbox. The path to this location is different between my laptop and my desktop. Once I removed this configuration from config.el org-roam works as expected (near as I can tell). At the least, my Selecting deleted buffer errors have stopped.
Closing this as it was a result of my configuration.
~@chrislockard What was your solution for this problem? I've encountered a similar issue and believe that it's due to a similar setup that you had, namely org-roam-directory points to a folder which is symlinked to a dropbox folder.~
Disregard. This was a different configuration issue in my config.el file.
For anyone who may also have this problem - my fix was:
org-roam* configuration settings from .doom.d/config.{el,org}, remove +roam tag from :lang (org) in .doom.d/init.eldoom syncdoom upSelecting deleted buffer errors are absent.doom.d/init.el to include :lang (org +roam) doom syncSelecting deleted buffer remain absentSPC n r r or M-x org-roam, observe roam buffer appears without problem~/org has been created, containing ~/org-roam.db.doom.d/config.{el,org} (not sure if positioning matters) any desired org-roam-* settings. E.g., my config has (setq org-roam-directory "~/Dropbox/Chris/org/roam") set.Selecting deleted buffer errors remain absent.SPC h v or M-x describe-variable for org-roam-directory and observe it's set to the value from step 10.SPC n r r or M-x org-roam, observe roam buffer appears without problem and org-roam works.In case it helps others:
I had Emacs installed in WSL but was attempting to use a Windows user directory as the org-roam directory which resulted in a similar error.
Turns out, I had added a ransomware protection exception for emacs but with org-roam, you'll also need to add one for sqlite3.
In Admin PowerShell:
Add-MpPreference -ControlledFolderAccessAllowedApplications "C:\Users\USER\AppData\Local\Packages\TheDebianProject.DEBIANFOLDER\LocalState\rootfs\usr\bin\sqlite3"
Most helpful comment
For anyone who may also have this problem - my fix was:
org-roam*configuration settings from.doom.d/config.{el,org}, remove+roamtag from:lang (org)in.doom.d/init.eldoom syncdoom upSelecting deleted buffererrors are absent.doom.d/init.elto include:lang (org +roam)doom syncSelecting deleted bufferremain absentSPC n r rorM-x org-roam, observe roam buffer appears without problem~/orghas been created, containing~/org-roam.db.doom.d/config.{el,org}(not sure if positioning matters) any desiredorg-roam-*settings. E.g., my config has(setq org-roam-directory "~/Dropbox/Chris/org/roam")set.Selecting deleted buffererrors remain absent.SPC h vorM-x describe-variablefororg-roam-directoryand observe it's set to the value from step 10.SPC n r rorM-x org-roam, observe roam buffer appears without problem andorg-roamworks.