Comments (5)
I just came across this using emacs HEAD (a06c13db9eee0487975177089b44198dd08206be) and saw some "Selecting deleted buffer" messages which led me to this bug. it does appear to be related to sqlite.
Emacs 28 (the version I can get easily from Debian) works without a problem.
My minimal init.el
to reproduce this is:
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el"
user-emacs-directory))
(bootstrap-version 5)
(straight-url (concat "https://raw.githubusercontent.com/raxod502/"
"straight.el/develop/install.el")))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously straight-url
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(message (concat "got " bootstrap-file))
(load bootstrap-file nil 'nomessage))
(declare-function straight-use-package (expand-file-name "~/.emacs.d/straight/repos/straight.el/straight.el"))
(straight-use-package 'use-package)
(use-package magit
:bind (("C-x v d" . magit-status))
:ensure t
:init
(fset 'vc-dir 'magit-status)
:custom
(magit-diff-refine-hunk t)
(magit-diff-refine-ignore-whitespace t)
; maybe change to a numger if this is too heavy
(magit-diff-adjust-tab-width t))
(use-package forge
:straight t
:after magit)
from emacsql.
I have the same issue with Magit and disabling Forge temporarily fixed it. I only have the issue on MacOS, but I don't have it on Linux.
from emacsql.
I am guessing that there was some fatal error when running the executable. That causes the process sentinel to be run and that kills the process buffer unconditionally, which in this case is premature because emacsql-waiting-p
will still try to access the buffer.
Changing that function to the following should address that:
(cl-defmethod emacsql-waiting-p ((connection emacsql-protocol-mixin))
"Return t if the end of the buffer has a properly-formatted prompt.
Also return t if the process has terminated."
(let ((buffer (emacsql-buffer connection)))
(or (not (buffer-live-p buffer))
(with-current-buffer buffer
(and (>= (buffer-size) 2)
(string= "#\n"
(buffer-substring (- (point-max) 2) (point-max))))))))
However, that won't show the error message about why the executable could not be run. (You probably will get an error about a timeout, but that probably isn't correct, given that you didn't mention a hang.) The process sentinel should probably be changed to raise an error itself, but I don't know what such an error would look like, so please also apply this patch:
diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index b14d1ac..58f2f5a 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -96,7 +96,11 @@ (cl-defmethod initialize-instance :after
"emacsql-sqlite" buffer emacsql-sqlite-executable fullfile)))
(setf (slot-value connection 'process) process)
(setf (process-sentinel process)
- (lambda (proc _) (kill-buffer (process-buffer proc))))
+ (lambda (proc str)
+ (let ((buf (process-buffer proc)))
+ (message "--- %s" str)
+ (message ">>>%s<<<" (with-current-buffer buf (buffer-string)))
+ (kill-buffer buf))))
(emacsql-wait connection)
(emacsql connection [:pragma (= busy-timeout $s1)]
(/ (* emacsql-global-timeout 1000) 2))
and post the output.
from emacsql.
Bug report on the emacs side: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60872
from emacsql.
Fixed. See magit/forge#535 (comment).
from emacsql.
Related Issues (20)
- Comma syntax / How to use :set for multiple columns? HOT 1
- Test failure in emacsql-nul-character on Emacs 25 HOT 2
- MELPA recipe fails without "next" branch HOT 2
- Can't get past `(invalid-read-syntax "#" 37 73)` HOT 5
- magit-status initially fails with "process emacsql-sqlite no longer connected to pipe; closed it" HOT 4
- emacsql error on install with use package from melpa: Symbol’s value as variable is void: emacsql-sqlite-reserved HOT 5
- Test all back-ends HOT 3
- SQLite binary fails to compile (via spacemacs/magit/forge) HOT 1
- Missing sqlite subdirecotory in melpa HOT 3
- emacsql-process does not return a process on the built-in connection HOT 2
- Preparing to release 4.0.0 HOT 12
- Multi-Word Strings get truncated on output HOT 2
- Uninformative "Selected deleted buffer" error message on emacsql-sqlite failrues HOT 1
- emacsql probably the cause to freez emacs on macOS HOT 4
- Latest emacsql breaking compatibility with older ( < emacs 29.1) versions HOT 3
- emacsql-sqlite failing (timeout, still running) on OS X (Big Sur) HOT 15
- 'No EmacSQL SQLite binary available, aborting' after building from master HOT 1
- Update vendored SQLite HOT 2
- "url" and "url-http" seem never used in emacsql-sqlite.el
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacsql.