[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 2fa32d2ab7 395/427: Create new log buffer if exist
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 2fa32d2ab7 395/427: Create new log buffer if existing one isn't live anymore |
Date: |
Tue, 13 Dec 2022 03:00:15 -0500 (EST) |
branch: elpa/emacsql
commit 2fa32d2ab7a8542091868f475716c707acc5eca0
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Create new log buffer if existing one isn't live anymore
The user might have killed the log buffer, in which case we have
to create a new one, if logging is enabled.
Closes #60.
Closes #62.
---
emacsql.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/emacsql.el b/emacsql.el
index 5f180f0a10..7b93c4c819 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -130,11 +130,13 @@ SQL expression.")
(cl-defmethod emacsql-log ((connection emacsql-connection) message)
"Log MESSAGE into CONNECTION's log.
MESSAGE should not have a newline on the end."
- (let ((log (emacsql-log-buffer connection)))
- (when log
- (with-current-buffer log
+ (let ((buffer (emacsql-log-buffer connection)))
+ (when buffer
+ (unless (buffer-live-p buffer)
+ (setq buffer (emacsql-enable-debugging connection)))
+ (with-current-buffer buffer
(setf (point) (point-max))
- (princ (concat message "\n") log)))))
+ (princ (concat message "\n") buffer)))))
;;; Sending and receiving
- [nongnu] elpa/emacsql 2e9e2d6ba1 390/427: Fix SQL truncated when print-level or print-length are changed, (continued)
- [nongnu] elpa/emacsql 2e9e2d6ba1 390/427: Fix SQL truncated when print-level or print-length are changed, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 50b139443b 414/427: make: Fix compiling and cleaning tests, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4fe4413994 420/427: Re-indent some data so that machine and human can agree, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 62d3915737 363/427: Update to SQLite 3.22.0 and remove download system (#40), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a164ecd9d3 374/427: Implement operator precedence handling, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 214b46f547 372/427: Update documentation for building SQLite backend (#46), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5f30787890 375/427: Add precedence handling for "between" syntax, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 60b99760c5 371/427: Extend the compiler search to a configurable list (#45), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 373975cbcc 387/427: Remove types from cl-defgeneric arguments, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9dca599616 383/427: Fix whitespace, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2fa32d2ab7 395/427: Create new log buffer if existing one isn't live anymore,
ELPA Syncer <=
- [nongnu] elpa/emacsql 374726060d 385/427: Fix buffer struct allocation size (fixes #91), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql d5c37d905d 379/427: Put emacs-version in path for out-of-package binary, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1ce92a6f4a 397/427: No longer require emacsql-psql in emacsql-pg, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql d03c1a606f 392/427: Include optional .config.mk in Makefile, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6622516e15 393/427: Update library headers, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b405d99aed 408/427: make: Don't use LDFLAGS to set Emacs load-path, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b907279bab 418/427: Fix docstring of emacsql-sqlite-condition-alist, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9ee397b2be 413/427: Whitespace cosmetics, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql d3d76ea72a 409/427: make: Use essentially same Makefile as for other packages I maintain, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b4d5ef41fe 410/427: make: Don't require pg.el to be available to build and test, ELPA Syncer, 2022/12/13