[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql dbf0598731 087/427: Add "-interactive" argument (f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql dbf0598731 087/427: Add "-interactive" argument (fixes #1). |
Date: |
Tue, 13 Dec 2022 02:59:31 -0500 (EST) |
branch: elpa/emacsql
commit dbf059873163875b4388c595d53fe13e6738ca8d
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Add "-interactive" argument (fixes #1).
---
README.md | 4 +---
emacsql.el | 14 ++++++++++----
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index d2afd93818..4ea29cb555 100644
--- a/README.md
+++ b/README.md
@@ -12,9 +12,7 @@ Emacsql, including numbers, strings, symbols, lists, vectors,
and
closures. Emacsql has no concept of "TEXT" values; it's all just lisp
objects.
-Requires Emacs 24 or later. Currently Windows is unsupported due to a
-mysterious process communication issue, a bug either in Emacs or
-SQLite. Can you help solve this issue ([#1][issue-1])?
+Requires Emacs 24 or later.
## Example Usage
diff --git a/emacsql.el b/emacsql.el
index 1fde40847e..c73bfe6d92 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -67,9 +67,12 @@
(require 'cl-lib)
-(defvar emacsql-sqlite-executable "sqlite3"
+(defvar emacsql-sqlite3-executable "sqlite3"
"Path to the sqlite3 executable.")
+(defvar emacsql-sqlite3-args '("-interactive")
+ "Additional arguments to pass to sqlite3.")
+
(cl-defstruct (emacsql (:constructor emacsql--create))
"A connection to a SQLite database."
process file log)
@@ -99,14 +102,17 @@ If FILE is nil use an in-memory database.
buffer. This is for debugging purposes."
(emacsql-start-reap-timer)
(let* ((buffer (generate-new-buffer "*emacsql-connection*"))
- (process (start-process "emacsql" buffer emacsql-sqlite-executable
- (or file ":memory:"))))
+ (fullfile (if file (expand-file-name file) ":memory:"))
+ (args emacsql-sqlite3-args)
+ (sqlite3 emacsql-sqlite3-executable)
+ (process (apply #'start-process "emacsql" buffer sqlite3
+ (append args (list fullfile)))))
(setf (process-sentinel process) (lambda (_proc _) (kill-buffer buffer)))
(set-process-coding-system process 'utf-8-unix 'utf-8-unix)
(process-send-string process ".prompt #\n")
(process-send-string process ".mode line\n")
(process-send-string process ".nullvalue nil\n")
- (let ((conn (emacsql--create :process process :file file)))
+ (let ((conn (emacsql--create :process process :file (when file fullfile))))
(when log
(setf (emacsql-log conn) (generate-new-buffer "*emacsql-log*")))
(prog1 conn
- [nongnu] elpa/emacsql 5ebd12b6ff 377/427: Add some support for the ESCAPE operator, (continued)
- [nongnu] elpa/emacsql 5ebd12b6ff 377/427: Add some support for the ESCAPE operator, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c82a0e6b4d 384/427: Add public domain statement to remaining files, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 97ccd7d9e6 398/427: Update library commentaries of package libraries, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6728a8649a 396/427: No longer try to clear a buffer that isn't live anymore, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a118b6c95a 381/427: Don't use -lm flag on Windows (#55), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e7b932a5c9 378/427: Handle read-only emacsql install diretory, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9e48d12e42 402/427: Fix typos in README.md, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6d8cd93662 382/427: README: Remove a duplicate word, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b6a0336d62 405/427: make: Compile SQLite binary before Elisp, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b9d848fa9c 407/427: make: Don't warn about implicit fallthroughs, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql dbf0598731 087/427: Add "-interactive" argument (fixes #1).,
ELPA Syncer <=
- [nongnu] elpa/emacsql 79fb8cb223 230/427: Heavy compiler rework., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql dcb9a903c7 284/427: Put emacsql-thread inside a transaction., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4a570e3016 301/427: Predict new location when compiling binary., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 57fa0e1d3e 306/427: Use just BEGIN for transactions., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ef10c33355 317/427: Only create the executable when compiling emacsql-sqlite, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a270218fd9 324/427: Ignore generated var/ directory, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f00f724495 325/427: Enforce use of spaces for indentation, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 016f2bf05a 330/427: Give up compiling at compile time., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 59147c4cdf 373/427: Update README paragraph about automatic downloads (#46), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 936ac5bc86 386/427: Define emacsql using cl-defgeneric, ELPA Syncer, 2022/12/13