Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-12 Thread Max Nikulin
On 06/08/2023 07:22, Rudolf Adamkovič wrote: * lisp/ob-sqlite.el (org-babel-execute:sqlite): Default ':db' to ":memory:" instead of throwing an error. This commit message entry does not reflect changed approach clearly enough. Not passing :db is a bit different from default :memory:. Sorry

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-12 Thread Ihor Radchenko
Rudolf Adamkovič writes: > From 34f28236366affb510bfdb70a3577e765d9e0abb Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= > Date: Wed, 3 May 2023 14:59:03 +0200 > Subject: [PATCH] ob-sqlite: Use a transient in-memory database by default > > * etc/ORG-NEWS (New features): Add

Re: [accessibility] worg obscures text (Re: [PATCH] ob-sqlite: Use a transient in-memory database by default)

2023-08-10 Thread Samuel Wales
yikes yes re columns. [my fill-column is 60. on a 32 inch. and i cannot even do ediff side by side with that, to my displeasure.] [i hope to find a low-[preferably-1-nit]-minimum-brightness flicker-free monitor someplace, and i /think/ oleds, which /might/ partly satisfy that, can come

Re: [accessibility] worg obscures text (Re: [PATCH] ob-sqlite: Use a transient in-memory database by default)

2023-08-10 Thread Max Nikulin
On 05/08/2023 10:22, Samuel Wales wrote: [i.e. agree that the manuals and standard toc at top imo do a good job for accessibility.] Notice that Org manual is exported through ox-texinfo, not by ox-html directly. So somebody should confirm that default ox-html table of contents is suitable

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-05 Thread Rudolf Adamkovič
Max Nikulin writes: > On 05/08/2023 05:57, Rudolf Adamkovič wrote: >> +*** Make ~ob-sqlite~ use in-database by default > > "use in-memory database" Oops! Fixed. >> +SQLite source blocks with no ~:db~ argument now execute against a >> +transient in-memory database by default. > > I am unsure,

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-05 Thread Ihor Radchenko
Rudolf Adamkovič writes: > P.S. #1: This is my first contribution to the > WORG, and I am not sure if the patch is OK. > I do ever not plan to contribute to the WORG, > as I am not a fan of the idea and think that > all built-in backends (and more!) should be > documented in the Org manual. See

Re: [accessibility] worg obscures text (Re: [PATCH] ob-sqlite: Use a transient in-memory database by default)

2023-08-04 Thread Samuel Wales
[i.e. agree that the manuals and standard toc at top imo do a good job for accessibility.] On 8/4/23, Samuel Wales wrote: > fwiw i agree with the non-fancy toc concept for accessibility. > > On 8/4/23, Max Nikulin wrote: >> On 05/08/2023 05:57, Rudolf Adamkovič wrote: >>> P.S. #2: The Table of

Re: [accessibility] worg obscures text (Re: [PATCH] ob-sqlite: Use a transient in-memory database by default)

2023-08-04 Thread Samuel Wales
fwiw i agree with the non-fancy toc concept for accessibility. On 8/4/23, Max Nikulin wrote: > On 05/08/2023 05:57, Rudolf Adamkovič wrote: >> P.S. #2: The Table of Contents (TOC) on the >> WORG is "jumpy" on Safari. In fact, it has >> always been problematic for me, in one way or >> another.

[accessibility] worg obscures text (Re: [PATCH] ob-sqlite: Use a transient in-memory database by default)

2023-08-04 Thread Max Nikulin
On 05/08/2023 05:57, Rudolf Adamkovič wrote: P.S. #2: The Table of Contents (TOC) on the WORG is "jumpy" on Safari. In fact, it has always been problematic for me, in one way or another. Why cannot TOC be included at the beginning of the document, like in standard Org exports? Org and Emacs

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-04 Thread Max Nikulin
On 05/08/2023 05:57, Rudolf Adamkovič wrote: +*** Make ~ob-sqlite~ use in-database by default "use in-memory database" + +SQLite source blocks with no ~:db~ argument now execute against a +transient in-memory database by default. I am unsure, but perhaps it would be more clear to say that

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-04 Thread Rudolf Adamkovič
Ihor Radchenko writes: > However, I think that it will provide more freedom to users if you alter > org-babel-default-header-args:sqlite instead of hard-coding the default. > May you update the patch accordingly? Please see the attached patch. > Also, can you update the docs at >

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-04 Thread Ihor Radchenko
Rudolf Adamkovič writes: > Ihor Radchenko writes: > >> As Max described, it might be a potential issue. > > How about (1) we merge the patch, and then > (2) we add the lint warning if/when someone > has the [hypothesized] problem? Maybe. After re-thinking, your change should not break any

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-08-03 Thread Rudolf Adamkovič
Ihor Radchenko writes: > As Max described, it might be a potential issue. How about (1) we merge the patch, and then (2) we add the lint warning if/when someone has the [hypothesized] problem? Rudy -- "One can begin to reason only when a clear picture has been formed in the imagination." --

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-06-20 Thread Ihor Radchenko
Rudolf Adamkovič writes: > I am not a fan of making the use of in-memory databases into a "smell", > as per Org Lint, because it would communicate to the user that "this is > a potential issue that you should probably fix". I think that is not > true, given that SQLite defaults to in-memory for

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-06-19 Thread Rudolf Adamkovič
Ihor Radchenko writes: > I do not mind falling back to ":memory:" when :db is not specified, but > we should display a warning to notify the users. Maybe not as a warning > every time src block is executed, but at least via org-lint. > > Rudolf, WDYT? I am not a fan of making the use of

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-06-13 Thread Ihor Radchenko
Rudolf Adamkovič writes: > Max Nikulin writes: > >> Perhaps it is better to keep current behavior with error by default >> and just to recommend [...] a user is experimenting with sqlite >> features. > > This is exactly the case where the user SHOULD use > > #+PROPERTY: header-args:sqlite :db

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-05-07 Thread Max Nikulin
On 07/05/2023 03:40, Rudolf Adamkovič wrote: SQLite shell, which defaults to in-memory for good reasons. Explicit :memory argument still suppresses the following warning: Connected to a transient *in-memory* *database*. Use ".open FILENAME" to reopen on a persistent database. I am not an

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-05-06 Thread Rudolf Adamkovič
Max Nikulin writes: > Perhaps it is better to keep current behavior with error by default > and just to recommend [...] a user is experimenting with sqlite > features. This is exactly the case where the user SHOULD use #+PROPERTY: header-args:sqlite :db to avoid mistyping across their

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-05-04 Thread Ihor Radchenko
Max Nikulin writes: >> I am unsure what is better, to add a fallback here or to add :db >> ":memory" to the org-babel-default-header-args:sqlite variable. > > Perhaps it is better to keep current behavior with error by default and > just to recommend more prominently using file local header

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-05-03 Thread Max Nikulin
On 03/05/2023 22:12, Max Nikulin wrote: On 03/05/2023 19:59, Rudolf Adamkovič wrote: +++ b/lisp/ob-sqlite.el ... -    (db (cdr (assq :db params))) +    (db (or (cdr (assq :db params)) ":memory:")) I am unsure what is better, to add a fallback here or to add :db ":memory" to the

Re: [PATCH] ob-sqlite: Use a transient in-memory database by default

2023-05-03 Thread Max Nikulin
On 03/05/2023 19:59, Rudolf Adamkovič wrote: +++ b/etc/ORG-NEWS Thank you for the patch. ** New features +*** Make =ob-sqlite= use in-database by default --^ Looks like a typo +++ b/lisp/ob-sqlite.el ...> - (db (cdr (assq :db params))) + (db (or

[PATCH] ob-sqlite: Use a transient in-memory database by default

2023-05-03 Thread Rudolf Adamkovič
* etc/ORG-NEWS (New features): Add a news entry. * lisp/ob-sqlite.el (org-babel-execute:sqlite): Default ':db' to ":memory:". * testing/lisp/test-ob-sqlite.el (ob-sqlite/in-file): Test the old behavior. * testing/lisp/test-ob-sqlite.el (ob-sqlite/in-memory): Test the new behavior. ---