<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>windows &amp;mdash; nikclayton</title>
    <link>https://nikclayton.writeas.com/tag:windows</link>
    <description>Mastodon: &lt;a href=&#34;https://mastodon.social/@nikclayton&#34; rel=&#34;me&#34;&gt;https://mastodon.social/@nikclayton&lt;/a&gt;</description>
    <pubDate>Mon, 25 May 2026 03:55:08 +0000</pubDate>
    <item>
      <title>Missing prompt issues with sql-mode and sqlite on Windows</title>
      <link>https://nikclayton.writeas.com/missing-prompt-issues-with-sql-mode-and-sqlite-on-windows?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Posting this so that I can find it again, as apparently no one else has ever had this problem.&#xA;&#xA;tl;dr: If you use #Windows, #Emacs, #sql-mode, and #SQLite, make sure you set the Emacs variable sql-sqlite-options to include the value -interactive.&#xA;&#xA;If you don&#39;t do this (at least on my system) then the sqlite3.exe binary appears to buffer output. Then, when using sql-mode the sqlite   prompt is never shown. You can still type in SQL queries, they&#39;ll be executed and you get the results.&#xA;&#xA;However, this breaks ob-sql-mode. Trying to use it interactively (by evaluating a code block) shows the error `&#34;No prompt found or comint-prompt-regexp&#39; not set properly&#34;)``.&#xA;&#xA;The same error is shown when running the tests, with e.g.,:&#xA;&#xA;% &#34;c:\Program Files\Emacs\bin\emacs.exe&#34; -batch -l ert -l ob-sql-mode-test.el  -f ert-run-tests-batch-and-exit&#xA;...&#xA;Test test-simple-select condition:&#xA;    (error &#34;No prompt found or `comint-prompt-regexp&#39; not set properly&#34;)&#xA;   FAILED  7/7  test-simple-select&#xA;&#xA;Ran 7 tests, 0 results as expected, 7 unexpected (2019-02-12 20:28:23+0100)&#xA;&#xA;7 unexpected results:&#xA;   FAILED  test-no-session&#xA;   FAILED  test-select-multiple-columns&#xA;   FAILED  test-select-smallint-column&#xA;   FAILED  test-select-sqlite-master&#xA;   FAILED  test-select-varchar-column&#xA;   FAILED  test-select-with-comments&#xA;   FAILED  test-simple-select&#xA;&#xA;Setting the -interactive flag is sufficient to make the tests pass.&#xA;&#xA;% &#34;c:\Program Files\Emacs\bin\emacs.exe&#34; -batch -l ert -l ob-sql-mode-test.el --eval=&#34;(add-to-list &#39;sql-sqlite-options \&#34;-interactive\&#34;)&#34; -f ert-run-tests-batch-and-exit&#xA;...&#xA;Ran 7 tests, 7 results as expected (2019-02-12 20:30:30+0100)&#xA;`]]&gt;</description>
      <content:encoded><![CDATA[<p>Posting this so that I can find it again, as apparently no one else has ever had this problem.</p>

<p><strong>tl;dr</strong>: If you use <a href="https://nikclayton.writeas.com/tag:Windows" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Windows</span></a>, <a href="https://nikclayton.writeas.com/tag:Emacs" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Emacs</span></a>, <a href="https://nikclayton.writeas.com/tag:sql" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">sql</span></a>-mode, and <a href="https://nikclayton.writeas.com/tag:SQLite" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">SQLite</span></a>, make sure you set the Emacs variable <code>sql-sqlite-options</code> to include the value <code>-interactive</code>.</p>

<p>If you don&#39;t do this (at least on my system) then the <code>sqlite3.exe</code> binary appears to buffer output. Then, when using <code>sql-mode</code> the <code>sqlite&gt;</code> prompt is never shown. You can still type in SQL queries, they&#39;ll be executed and you get the results.</p>

<p>However, this breaks <code>ob-sql-mode</code>. Trying to use it interactively (by evaluating a code block) shows the error <code>&#34;No prompt found or `comint-prompt-regexp&#39; not set properly&#34;)</code>.</p>

<p>The same error is shown when running the tests, with e.g.,:</p>

<pre><code class="language-shell">% &#34;c:\Program Files\Emacs\bin\emacs.exe&#34; -batch -l ert -l ob-sql-mode-test.el  -f ert-run-tests-batch-and-exit
...
Test test-simple-select condition:
    (error &#34;No prompt found or `comint-prompt-regexp&#39; not set properly&#34;)
   FAILED  7/7  test-simple-select

Ran 7 tests, 0 results as expected, 7 unexpected (2019-02-12 20:28:23+0100)

7 unexpected results:
   FAILED  test-no-session
   FAILED  test-select-multiple-columns
   FAILED  test-select-smallint-column
   FAILED  test-select-sqlite-master
   FAILED  test-select-varchar-column
   FAILED  test-select-with-comments
   FAILED  test-simple-select
</code></pre>

<p>Setting the <code>-interactive</code> flag is sufficient to make the tests pass.</p>

<pre><code class="language-shell">% &#34;c:\Program Files\Emacs\bin\emacs.exe&#34; -batch -l ert -l ob-sql-mode-test.el --eval=&#34;(add-to-list &#39;sql-sqlite-options \&#34;-interactive\&#34;)&#34; -f ert-run-tests-batch-and-exit
...
Ran 7 tests, 7 results as expected (2019-02-12 20:30:30+0100)
</code></pre>
]]></content:encoded>
      <guid>https://nikclayton.writeas.com/missing-prompt-issues-with-sql-mode-and-sqlite-on-windows</guid>
      <pubDate>Tue, 12 Feb 2019 20:16:11 +0000</pubDate>
    </item>
  </channel>
</rss>