Re: [O] org-latex-export: Name sections by CUSTOM_ID (rather than %s)?

2018-09-02 Thread Robert Klein
Hi,

On Sat, 1 Sep 2018 21:30:19 -0500
Florian Hollerweger  wrote:

> Hi everyone,
> 
> When exporting an .org file to LaTeX, is it possible to name the
> sections in the exported .tex file *not* according to the
> corresponding headlines in the .org file, but instead according to
> the respective sections' CUSTOM_ID ?
> 
> For example, there might be an equivalent to the %s operator (which
> is replaced by the headline string; see
> https://orgmode.org/worg/org-tutorials/org-latex-export.html), only
> for the section's CUSTOM_ID?
> 
> To clarify, I'd like the .org code
> 
> * My section
> :PROPERTIES:
> :CUSTOM_ID: foo
> :END:
> 
> to result in the following .tex code when exported via C-c C-e C-b l
> L:
> 
> \section{foo}
> \label{sec:orga20100d}
> 
> and *not* in the following (which is the default behavior):
> 
> \section{My section}
> \label{sec:orga20100d}
> 
> For the record, I have also posted this question to StackExchange
> (https://emacs.stackexchange.com/questions/44497) and would be more
> than happy to provide credit for an answer there.
> 
> Best wishes,
> Florian
> 


You could write a derived exporter (from ox-latex) and replace
the org-latex-headline function.



Otherwise, mechanically replace headlines with their custom-ids before
exporting...


BTW, the “%s” is not an operator, but a format specifier Emacs uses for
strings.  See “man 3 printf” under “Conversion Specifier” on Linux.


Best regards
Robert




Re: [O] newbie which LaTeX for PDF publish

2018-09-02 Thread Eric S Fraga
On Saturday,  1 Sep 2018 at 22:12, adam wrote:
> Am on Ubuntu 16.04, org-version is 8.2.10 
>
> Export to PDF C-c C-e l o  is working. 
> However I wish finer grain LaTeX control. 
>
>
> For Export to PDF to work, I needed  pdftex  

But org exports to LaTeX, not TeX.  I.e. it exports to TeX with the
assumption that the LaTeX macros are all available.

Am I missing something?

What finer grain control would you like that you cannot achieve using
org directions such as #+latex: and #+begin_export latex?

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4



[O] [PATCH] Change: (org-agenda-bulk-action) Prompt w/number of marked items

2018-09-02 Thread Adam Porter
* lisp/org-agenda.el (org-agenda-bulk-action): When scattering, prompt
  for number of days with number of marked items.

A typical pattern for me is to mark a significant number of items
scheduled in the past and scatter them into the future.  Usually I
want to schedule one item per day, i.e. across a number of days equal
to the number of marked items.  The default prompt is 7 days, and
counting the number of items is tedious.  This uses the number of
marked items as the initial prompt for the number of days.

Alternatively, the number of marked items could be indicated in the
prompt string, e.g. "Scatter X tasks across how many days:".  A
customizeable default could also be provided.
---
 lisp/org-agenda.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index eaeddb6..44ecd70 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9967,7 +9967,7 @@ The prefix arg is passed through to the command if 
possible."
 (let ((days (read-number
  (format "Scatter tasks across how many %sdays: "
  (if arg "week" ""))
- 7)))
+  (length org-agenda-bulk-marked-entries
   (setq cmd
 `(lambda ()
(let ((distance (1+ (random ,days
-- 
2.7.4





[O] org-element-adopt-elements, append before children

2018-09-02 Thread Ivan Tadeu Ferreira Antunes Filho
At the moment  org-element-adopt-elements always appends the new elements
after the elements original children.  In many cases one might want to
append before the original children.

I want to propose adding an argument to org-element-adopt-elements that
defines if the elements should be added before or after the children, i.e.
(if append-before
  (nconc children (org-element-contents parent))
  (nconc (org-element-contents parent) children))

Would this be okay?


Re: [O] newbie which LaTeX for PDF publish

2018-09-02 Thread adam
On Sat, 2018-09-01 at 14:34 +0200, Robert Klein wrote:
> Hi,
> 
> On Sat, 01 Sep 2018 22:12:39 +1200
> adam  wrote:
> 
> > 
> > Am on Ubuntu 16.04, org-version is 8.2.10 
> > 
> > Export to PDF C-c C-e l o  is working. 
> > However I wish finer grain LaTeX control. 
> > 
> > 
> > For Export to PDF to work, I needed  pdftex  
> > 
> > So I followed one suggestion and installed    
> > sudo apt-get install texlive-latex-extra 
> > 
> > However Tex's tlmgr reports errors and doesn't work. Tex users
> > suggest a version incompatibility between that tlmgr and this Tex
> > package. 
> > 
> > Any suggestions are welcome. 
> > 
> > Perhaps I should un-install texlive-latex-extra  and install a more
> > fully blown LaTex package. In which case, which one?
> I typically install texlive-full (Debian 9), but don't use tlmgr on it.
> 
> If you want newer packages best download and install it from
> texlive.net to a separate location (e.g. /opt/texlive/$YEAR).
> 
> Are you sure you don't have pdftex installed already?
> 
> Is your Ubuntu an “update” installation that may have gone wrong?  Or
> does Ubuntu offer several tex/latex distributions?  I think most people
> nowadays use the texlive distribution.
> 
> Best regards
> Robert


Thanks Robert. 

No, I didn't have a pdftex beforehand, so I needed that from any 
Tex/LaTeX/TexLive
system. 

It was perhaps my mistake to install  texlive-extra  because tlmgr doesn't work 
properly,
tlmgrgui seems unavailable, thus I can't list my currently available fonts or 
load new
packages. 

With some hesitation or regret, I feel must install a full-blown TeX Live 
system, simply
for some help or control with the Tex of the org-mode LaTeX PDF export.    


I found this link below, which suggests using the TeX Live Installer

https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-u
buntu?noredirect=1=1 


Thank you. 



Re: [O] English and Dutch version of a Graphviz picture

2018-09-02 Thread Cecil Westerhof
2018-09-01 17:04 GMT+02:00 Robert Klein :

> On Sat, 1 Sep 2018 12:38:54 +0200
> Cecil Westerhof  wrote:
>
> > I have the following:
> > #+BEGIN_SRC dot :file Graphviz/habitLoop.png :cmdline -Kfdp -Tpng
> > digraph habitLoop {
> > bgcolor = steelblue
> > edge [penwidth = 4.0 ]
> > node [fontcolor = white, fontsize = 60, style = filled]
> >
> > spur   [pos = "4,4!" color = red]
> > habit  [pos = "7,1!" color = darkgreen]
> > reward [pos = "1,1!" color = blue]
> >
> > spur:e   -> habit:n
> > habit:w  -> reward:e
> > reward:n -> spur:w
> >
> > copyright [
> > pos   = "4,.75!"
> > color = steelblue,
> > fontcolor = black,
> > fontsize  = 14,
> > label = "© Cecil
> > Westerhof\ntimemanagem...@decebal.nl", shape = plaintext
> >   ]
> >
> > spur   [label = "Spur"]
> > habit  [label = "Habit"]
> > reward [label = "Reward"]
> > }
> > #+END_SRC
> >
> > But I also want to have a Dutch version. So I also have:
> > #+BEGIN_SRC dot :file Graphviz/gewoonteLoop.png :cmdline -Kfdp -Tpng
> > digraph habitLoop {
> > bgcolor = steelblue
> > edge [penwidth = 4.0 ]
> > node [fontcolor = white, fontsize = 60, style = filled]
> >
> > spur   [pos = "4,4!" color = red]
> > habit  [pos = "7,1!" color = darkgreen]
> > reward [pos = "1,1!" color = blue]
> >
> > spur:e   -> habit:n
> > habit:w  -> reward:e
> > reward:n -> spur:w
> >
> > copyright [
> > pos   = "4,.75!"
> > color = steelblue,
> > fontcolor = black,
> > fontsize  = 14,
> > label = "© Cecil
> > Westerhof\ntimemanagem...@decebal.nl", shape = plaintext
> >   ]
> >
> > spur   [label = "Prikkel"]
> > habit  [label = "Gewoonte"]
> > reward [label = "Beloning"]
> > }
> > #+END_SRC
> >
> > The only difference are the three label statements. Can this be done
> > more efficient? Because now I need to do updates at two places. That
> > is an accident waiting to happen.
> >
>
>
> There's a complicated solution (like, using variables from tables) at
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html
>
> In your case you might want to use noweb (see
> https://orgmode.org/org.html#Noweb-reference-syntax).  Then your code
> might look like this:
>
> #+Name: habitloop-main
> #+BEGIN_SRC dot
> bgcolor = steelblue
> edge [penwidth = 4.0 ]
> node [fontcolor = white, fontsize = 60, style = filled]
>
> spur   [pos = "4,4!" color = red]
> habit  [pos = "7,1!" color = darkgreen]
> reward [pos = "1,1!" color = blue]
>
> spur:e   -> habit:n
> habit:w  -> reward:e
> reward:n -> spur:w
>
> copyright [
> pos   = "4,.75!"
> color = steelblue,
> fontcolor = black,
> fontsize  = 14,
> label = "© Cecil
> Westerhof\ntimemanagem...@decebal.nl",
> shape = plaintext
>   ]
> #+END_SRC
>
>
> #+BEGIN_SRC dot :file gewoonteLoop.png :cmdline -Kfdp -Tpng :noweb yes
> digraph habitLoop {
> <>
> spur   [label = "Prikkel"]
> habit  [label = "Gewoonte"]
> reward [label = "Beloning"]
> }
> #+END_SRC
>
> #+RESULTS:
> [[file:gewoonteLoop.png]]
>
> #+BEGIN_SRC dot :file habitLoop.png :cmdline -Kfdp -Tpng :noweb yes
> digraph habitLoop {
> <>
> spur   [label = "Spur"]
> habit  [label = "Habit"]
> reward [label = "Reward"]
> }
> #+END_SRC
>

I tried this, but I did not get it to work. Maybe something in my
configuration is wrecking havoc on me. I have to play with it a bit more I
am afraid.



> Note, for better looks I put the whole surrounding block in the
> language-specific parts (the “digraph”-line could be in the
> “habitloop-main” block, too).
>
>
> When your code gets more involved this can get ugly, fast.  Then you'll
> probably have to go the elisp way.
>

For the moment I do not think it will get more involved very soon, but you
never know. Maybe the elisp route is not a bad idea.

-- 
Cecil Westerhof


Re: [O] How about lifting the limit of 35 tasks in org-clock-history?

2018-09-02 Thread Marcin Borkowski


On 2018-09-02, at 14:45, Nicolas Goaziou  wrote:

> Hello,
>
> Marcin Borkowski  writes:
>
>> I attach a trivial patch fixing a very annoying cap on
>> org-clock-history.  (I want to set org-clock-history to 120.)
>
> According to 7972356d092736af06282a09f008c2b5f938134d and
> 77f1f31c99f521751dc0b57f9923773e97644bb5, this limits selection to
> standard selection keys. 
>
> If we want to allow more clock history, we need to remove the selection
> keys, and be sure we have something else to use.

I decided to put a warning about this in the docstring in my patch.  My
assumption was that this is enough.  If a user wants to change the
default, he will most probably see the docstring and will have to
actively ignore the warning.

I do not use the vanilla Org way of selecting tasks to clock from
history - I use org-mru-clock, for which the restriction doesn't make
sense.  So we have something else to use, and it doesn't bother me that
I can't select older tasks with the original Org method.

Best,

-- 
Marcin Borkowski
http://mbork.pl



[O] Bug: Capturing an entry without final endline modifies heading structure [9.1.14 (9.1.14-dist @ /usr/share/emacs/25.2/site-lisp/elpa/org-9.1.11/)]

2018-09-02 Thread Christoph Groth
Hello,

I'm using org's capture functionality to file new entries for my agenda.
I noticed a problem when capturing entries to be placed in the middle of
a file (for example, I have a subtree for "notes" that comes before
"miscellaneous"): when the captured text ends without a trailing endline
character, it will be inserted as such into the org file and thus modify
the overall heading structure.  For example, inserting a note may lead
to the following situation:

** Note without trailing endline
[2018-09-02 Sun 13:10]
example text* miscellaneous

IMHO this qualifies as a bug, because it's easy to accidentally corrupt
the heading structure of a file.

Cheers,
Christoph

Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-11, modified by Debian
Package: Org mode version 9.1.14 (9.1.14-dist @ 
/usr/share/emacs/25.2/site-lisp/elpa/org-9.1.11/)

current state (relevant excerpt):

(setq
 org-capture-templates '(("u" "unscheduled" entry
  (file+headline "" "miscellaneous") "* TODO %?\n%U")
 ("U" "" entry (file+headline "" "miscellaneous")
  "* TODO %?\n%a\n%U")
 ("s" "scheduled" entry
  (file+headline "" "miscellaneous")
  "* TODO %?\nSCHEDULED: %^t\n%U")
 ("S" "" entry (file+headline "" "miscellaneous")
  "* TODO %?\nSCHEDULED: %^t\n%a\n%U")
 ("m" "maybe" entry (file+headline "" "miscellaneous")
  "* MAYBE %?\n%U")
 ("M" "" entry (file+headline "" "miscellaneous")
  "* MAYBE %?\n%a\n%U")
 ("d" "deadline" entry
  (file+headline "" "miscellaneous")
  "* TODO %?\nDEADLINE: %^t\n%U")
 ("D" "" entry (file+headline "" "miscellaneous")
  "* TODO %?\nDEADLINE: %^t\n%a\n%U")
 ("a" "appointment" entry
  (file+headline "" "miscellaneous") "* %?\n%^t\n%U")
 ("A" "" entry (file+headline "" "miscellaneous")
  "* %?\n%^t\n%a\n%U")
 ("r" "reply" entry (file+headline "" "miscellaneous")
  "* TODO Reply to %:fromname%?\nSCHEDULED: 
%^t\n%a\n%U")
 ("n" "note" entry (file+headline "" "notes")
  "* %?\n%U")
 ("i" "interruption" entry
  (file+headline "" "interruptions") "* %? :work:\n%U"
  :clock-in t :clock-resume t)
 )
 )



Re: [O] ob-lilypond and 'Symbol’s function definition is void: org-babel-get-header'

2018-09-02 Thread Henrik Frisk
Den tis 21 aug. 2018 23:39Nicolas Goaziou  skrev:

> Hello,
>
> Henrik Frisk  writes:
>
> > I have been trying out ob-lilypond and it works really well, except for
> the
> > arrange mode. Any attempt to run ly-tangle results in 'Symbol’s function
> > definition is void: org-babel-get-header' and so does an attempt to
> export
> > a file, such as the example file, in basic mode to html for instance.
> >
> > I was thinking it was related to sh/shell since this appears to be a
> common
> > issue with regard to this error, but the ob-lilypond does not appear to
> use
> > any reference to sh (the doc for ob-lilypond does). I also tried to load
> > ob-core as was suggested in some post but that didn't work either.
> >
> > Other tangle other languages works fine.
> >
> > Any suggestions?
>
> `org-babel-get-header' was removed in Org 9.0 and current ob-lilypond.el
> doesn't call this function. My guess is you are mixing a new Org release
> with an old "ob-lilypond.el".
>

Sorry for not replying earlier, I missed this message. Thanks, that points
me in a useful direction I think!

Best,
Henrik

>


[O] org-copy-visible does not work with x-select-enable-primary

2018-09-02 Thread Alain . Cochard


Hello.


I use

   emacs -Q -l ~/.emacs.debug

with the ~/.emacs.debug file containing only

   (add-to-list 'load-path "/home/cochard/Org/Coch-git/org-mode/lisp")

I tried 2 versions of emacs, giving:

   Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
   3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
   Org mode version 9.1.14 (release_9.1.14-908-gf1269e @
   /home/cochard/Org/Coch-git/org-mode/lisp/)

   Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
   3.18.9) of 2018-05-30 Package: Org mode version 9.1.14
   (release_9.1.14-908-gf1269e @
   /home/cochard/Org/Coch-git/org-mode/lisp/)

In both cases, org-copy-visible works as I expect: if I select region
containing a folded tree, use 'M-x org-copy-visible', then put the
cursor elsewhere and use 'M-x org-yank', only the visible part is
copied.

Now, if I append the line

   (setq x-select-enable-primary t) 

to ~/.emacs.debug, the whole tree is copied instead of the expected
result, that is, including the invisible parts, also for the two emacs
versions.

NB: For emacs 26, as the manual says that 

   [x-select-enable-primary] is an alias for ‘select-enable-primary’.
   This variable is obsolete since 25.1; use ‘select-enable-primary’
   instead.

I have also tried (setq select-enable-primary t) but this fails in the
same way.

Regards


-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 



Re: [O] org-element-adopt-elements, append before children

2018-09-02 Thread Nicolas Goaziou
Hello,

Ivan Tadeu Ferreira Antunes Filho  writes:

> At the moment  org-element-adopt-elements always appends the new elements
> after the elements original children.  In many cases one might want to
> append before the original children.
>
> I want to propose adding an argument to org-element-adopt-elements that
> defines if the elements should be added before or after the children, i.e.
> (if append-before
>   (nconc children (org-element-contents parent))
>   (nconc (org-element-contents parent) children))
>
> Would this be okay?

You can simply use `org-element-insert-before'.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Fix: (org-agenda-get-progress) Logbook list bullets with 2+ spaces

2018-09-02 Thread Nicolas Goaziou
Hello,

Adam Porter  writes:

> Previously, logbook list entries with more than one space between the
> bullet and the beginning of the entry would be ignored (i.e. if a
> bullet is defined in org-list-two-spaces-after-bullet-regexp, two
> spaces will be inserted after the bullet, and that prevents
> state-changed entries from appearing in the Agenda Log Mode view).

I tweaked the commit message to bend it to our conventions and applied
your patch.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] edit installation section

2018-09-02 Thread Nicolas Goaziou
Hello,

Will Pierce  writes:

> * emphasize org's near-universal distribution
> * reformat vertical list
> * minor grammar fix
>

Applied, with a minor tweak to the commit message.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] How about lifting the limit of 35 tasks in org-clock-history?

2018-09-02 Thread Nicolas Goaziou
Hello,

Marcin Borkowski  writes:

> I attach a trivial patch fixing a very annoying cap on
> org-clock-history.  (I want to set org-clock-history to 120.)

According to 7972356d092736af06282a09f008c2b5f938134d and
77f1f31c99f521751dc0b57f9923773e97644bb5, this limits selection to
standard selection keys. 

If we want to allow more clock history, we need to remove the selection
keys, and be sure we have something else to use.

WDYT?

Regards,

-- 
Nicolas Goaziou



Re: [O] A strange problem with org-babel and SQLite

2018-09-02 Thread Cecil Westerhof
2018-09-01 14:24 GMT+02:00 Robert Klein :

> Hi Cecil,
>
> On Sat, 1 Sep 2018 11:12:57 +0200
> Cecil Westerhof  wrote:
>
> > 2018-08-31 13:22 GMT+02:00 Robert Klein :
> >
> > > On Fri, 31 Aug 2018 12:24:33 +0200
> > > Cecil Westerhof  wrote:
> > >
> > > > 2018-08-31 11:17 GMT+02:00 Robert Klein :
> > > >
> > > > > Hi Cecil,
> > > > >
> > > > > On Fri, 31 Aug 2018 10:47:50 +0200
> > > > > Cecil Westerhof  wrote:
> > > > >
> > > > > > I have a strange problem with org-babel and SQLite.
> > > > > >
> > > > > > I have a database that is created with:
> > > > > > CREATE TABLE "quotes" (
> > > > > > quoteID TEXT   PRIMARY KEY,
> > > > > > quote   TEXT NOT NULL  UNIQUE,
> > > > > > lastUsedTEXT,
> > > > > > totalUsed   INT  DEFAULT 'unused'
> > > > > > )
> > > > > >
> > > > > > When using:
> > > > > > #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames
> > > > > > yes SELECT   lastUsed
> > > > > > ,totalUsed
> > > > > > FROM quotes
> > > > > > ORDER BY lastused  ASC
> > > > > > ,totalUsed DESC
> > > > > > LIMIT40
> > > > > > #+END_SRC
> > > > > >
> > > > > > Everything is fine. But when I use (add the quote field in the
> > > > > > select): #+BEGIN_SRC sqlite :db
> > > > > > ~/Twitter/twitter.sqlite :colnames yes SELECT   quote
> > > > > > ,lastUsed
> > > > > > ,totalUsed
> > > > > > FROM quotes
> > > > > > ORDER BY lastused  ASC
> > > > > > ,totalUsed DESC
> > > > > > LIMIT40
> > > > > > #+END_SRC
> > > > > >
> > > > > > I get:
> > > > > > executing Sqlite code block...
> > > > > > Wrote /tmp/babel-27920y_/ob-input-2792BTG
> > > > > > org-babel-read: End of file during parsing
> > > > > >
> > > > > > What could be the problem?
> > > > > >
> > > > >
> > > > > does it work outside of org/babel/emacs, that is, when you use
> > > > > the query in a command line sqlite session, does it work?
> > > > > “quote” is also a function in sqlite, so this might be your
> > > > > issue.
> > > >
> > > > Yes, in sqlite3 and sqlitebrowser it works without problems.
> > > > In org-babel even 'SELECT *' goes wrong.
> > > >
> > >
> > > I can't reproduce the issue, it works for me.  What are your
> > > org-mode and Emacs versions?
> > >
> >
> > GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of
> > 2017-09-15, modified by Debian
> > Org-mode version 8.2.10 (release_8.2.10
> > @ /usr/share/emacs/25.1/lisp/org/)
> >
> >
> > >
> > > Can you provide an ECM (Example, complete, minimal) org-mode setup /
> > > Emacs initialization file?
> > >
> >
> > (add-hook 'org-babel-after-execute-hook 'bh/display-inline-images
> > 'append)
> >
> > ; Make babel results blocks lowercase
> > (setq org-babel-results-keyword "results")
> >
> > (defun bh/display-inline-images ()
> >   (condition-case nil
> >   (org-display-inline-images)
> > (error nil)))
> >
> > (org-babel-do-load-languages
> >  (quote org-babel-load-languages)
> >  (quote ((emacs-lisp . t)
> >  (sqlite . t)
> >  (dot . t)
> >  (ditaa . t)
> >  (R . t)
> >  (python . t)
> >  (ruby . t)
> >  (gnuplot . t)
> >  (clojure . t)
> >  (sh . t)
> >  (ledger . t)
> >  (org . t)
> >  (plantuml . t)
> >  (latex . t
> >
> > ; Do not prompt to confirm evaluation
> > ; This may be dangerous - make sure you understand the consequences
> > ; of setting this -- see the docstring for details
> > (setq org-confirm-babel-evaluate nil)
> >
> > ; Use fundamental mode when editing plantuml blocks with C-c '
> > (add-to-list 'org-src-lang-modes (quote ("plantuml" . fundamental)))
> >
> > Is this what you need, or do you need more?
> >
>
> sorry, I still can't reproduce the issue, even using the same stock
> Emacs and org-mode from Debian 9 as you do.
>
> Could you _attach_ the emacs init file and the org-mode file which
> shows the issue?  (so I can simply start “emacs -Q -l sqlite.emacs
> sqlite.org” and then press C-c C-c inside the sqlite code to see the
> issue?
>

My emacs init has grown over the years and it includes a lot of others. I
should try to create

a clean one.

-- 
Cecil Westerhof


Re: [O] newbie which LaTeX for PDF publish

2018-09-02 Thread Robert Klein
Hi Adam,

On Mon, 03 Sep 2018 09:32:14 +1200
adam  wrote:

> On Sun, 2018-09-02 at 11:04 +0100, Eric S Fraga wrote:
> > On Saturday,  1 Sep 2018 at 22:12, adam wrote:  
> > > 
> > > Am on Ubuntu 16.04, org-version is 8.2.10 
> > > 
> > > Export to PDF C-c C-e l o  is working. 
> > > However I wish finer grain LaTeX control. 
> > > 
> > > 
> > > For Export to PDF to work, I needed  pdftex    
> > But org exports to LaTeX, not TeX.  I.e. it exports to TeX with the
> > assumption that the LaTeX macros are all available.
> > 
> > Am I missing something?
> > 
> > What finer grain control would you like that you cannot achieve
> > using org directions such as #+latex: and #+begin_export latex?
> >   
> 
> I require management of TeX (TeX Live) for export to PDF (LaTeX). 
> 
> The Tex Live manager (tlmgr) displays available fonts, loads and
> removes fonts and other packages. 
> https://www.tug.org/texlive/doc/tlmgr.html 
> 
> 
> Sure, pdftex (from texlive-latex-extra) enables org-mode export to
> PDF, however the fonts available are opaque within the TexLive
> environment without tlmgr. Navigation of TexLive customizations, set
> with install-tl are opaque without tlmgr.  
> 
> 
> packages for Ubuntu 16.04 LTS can be seen here, 
> https://packages.ubuntu.com/search?keywords=texlive 
> 
> using the TexLive installer  install-tl  can be seen here, 
> https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-u
> buntu 
> 
> 
> In other words, org-mode export to PDF assumes a pdftex, and the
> tex/texlive/LaTex environment is up to the user to simply provide a
> pdftex. 
> 

I don't get the “require management” part of this.  Ubuntu has about
100 texlive packages, the texlive distribution offers about 47.  The
SUSE guys went overboard and had (still have?) about 3500 packages ---
a former 2-hour installation with about 3-5 “texlive” packages (fully
automated) took 4.5 plus then...

Why don't you just install Ubuntu's texlive-full and be done with it?

Best regards
Robert





[O] code.orgmode.org misbehaving?

2018-09-02 Thread Adam Porter
Hi,

Trying to pull with git from the main Org repo, I'm getting errors from git:

fatal: https://code.orgmode.org/bzg/org-mode.git/info/refs not valid: is this a 
git repository?

Loading https://code.orgmode.org/ in a browser, that page loads fine,
but loading https://code.orgmode.org/bzg/org-mode does not: the server
appears to be inserting debug messages before the HTTP headers, which
causes the browser and git to fail to parse the response.  The raw HTTP
response begins with:

2018/09/03 00:14:32 [TRACE] Session ID: badcd72c524a221e
2018/09/03 00:14:32 [TRACE] CSRF Token: 
6GjMG7eVb5ftPm2fwg0PMuBUY7c6MTUzNTkzMzI5MDc1NTE5OTU0Mg==
2018/09/03 00:14:32 [TRACE] Template: repo/home
HTTP/1.0 200 OK
Content-Type: text/html; charset=UTF-8
Date: Mon, 03 Sep 2018 00:14:32 GMT




...

Thanks,
Adam




Re: [O] A strange problem with org-babel and SQLite

2018-09-02 Thread Cecil Westerhof
2018-09-02 15:22 GMT+02:00 Cecil Westerhof :

>
>
> 2018-09-01 14:24 GMT+02:00 Robert Klein :
>
>> Hi Cecil,
>>
>> On Sat, 1 Sep 2018 11:12:57 +0200
>> Cecil Westerhof  wrote:
>>
>> > 2018-08-31 13:22 GMT+02:00 Robert Klein :
>> >
>> > > On Fri, 31 Aug 2018 12:24:33 +0200
>> > > Cecil Westerhof  wrote:
>> > >
>> > > > 2018-08-31 11:17 GMT+02:00 Robert Klein :
>> > > >
>> > > > > Hi Cecil,
>> > > > >
>> > > > > On Fri, 31 Aug 2018 10:47:50 +0200
>> > > > > Cecil Westerhof  wrote:
>> > > > >
>> > > > > > I have a strange problem with org-babel and SQLite.
>> > > > > >
>> > > > > > I have a database that is created with:
>> > > > > > CREATE TABLE "quotes" (
>> > > > > > quoteID TEXT   PRIMARY KEY,
>> > > > > > quote   TEXT NOT NULL  UNIQUE,
>> > > > > > lastUsedTEXT,
>> > > > > > totalUsed   INT  DEFAULT 'unused'
>> > > > > > )
>> > > > > >
>> > > > > > When using:
>> > > > > > #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames
>> > > > > > yes SELECT   lastUsed
>> > > > > > ,totalUsed
>> > > > > > FROM quotes
>> > > > > > ORDER BY lastused  ASC
>> > > > > > ,totalUsed DESC
>> > > > > > LIMIT40
>> > > > > > #+END_SRC
>> > > > > >
>> > > > > > Everything is fine. But when I use (add the quote field in the
>> > > > > > select): #+BEGIN_SRC sqlite :db
>> > > > > > ~/Twitter/twitter.sqlite :colnames yes SELECT   quote
>> > > > > > ,lastUsed
>> > > > > > ,totalUsed
>> > > > > > FROM quotes
>> > > > > > ORDER BY lastused  ASC
>> > > > > > ,totalUsed DESC
>> > > > > > LIMIT40
>> > > > > > #+END_SRC
>> > > > > >
>> > > > > > I get:
>> > > > > > executing Sqlite code block...
>> > > > > > Wrote /tmp/babel-27920y_/ob-input-2792BTG
>> > > > > > org-babel-read: End of file during parsing
>> > > > > >
>> > > > > > What could be the problem?
>> > > > > >
>> > > > >
>> > > > > does it work outside of org/babel/emacs, that is, when you use
>> > > > > the query in a command line sqlite session, does it work?
>> > > > > “quote” is also a function in sqlite, so this might be your
>> > > > > issue.
>> > > >
>> > > > Yes, in sqlite3 and sqlitebrowser it works without problems.
>> > > > In org-babel even 'SELECT *' goes wrong.
>> > > >
>> > >
>> > > I can't reproduce the issue, it works for me.  What are your
>> > > org-mode and Emacs versions?
>> > >
>> >
>> > GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of
>> > 2017-09-15, modified by Debian
>> > Org-mode version 8.2.10 (release_8.2.10
>> > @ /usr/share/emacs/25.1/lisp/org/)
>> >
>> >
>> > >
>> > > Can you provide an ECM (Example, complete, minimal) org-mode setup /
>> > > Emacs initialization file?
>> > >
>> >
>> > (add-hook 'org-babel-after-execute-hook 'bh/display-inline-images
>> > 'append)
>> >
>> > ; Make babel results blocks lowercase
>> > (setq org-babel-results-keyword "results")
>> >
>> > (defun bh/display-inline-images ()
>> >   (condition-case nil
>> >   (org-display-inline-images)
>> > (error nil)))
>> >
>> > (org-babel-do-load-languages
>> >  (quote org-babel-load-languages)
>> >  (quote ((emacs-lisp . t)
>> >  (sqlite . t)
>> >  (dot . t)
>> >  (ditaa . t)
>> >  (R . t)
>> >  (python . t)
>> >  (ruby . t)
>> >  (gnuplot . t)
>> >  (clojure . t)
>> >  (sh . t)
>> >  (ledger . t)
>> >  (org . t)
>> >  (plantuml . t)
>> >  (latex . t
>> >
>> > ; Do not prompt to confirm evaluation
>> > ; This may be dangerous - make sure you understand the consequences
>> > ; of setting this -- see the docstring for details
>> > (setq org-confirm-babel-evaluate nil)
>> >
>> > ; Use fundamental mode when editing plantuml blocks with C-c '
>> > (add-to-list 'org-src-lang-modes (quote ("plantuml" . fundamental)))
>> >
>> > Is this what you need, or do you need more?
>> >
>>
>> sorry, I still can't reproduce the issue, even using the same stock
>> Emacs and org-mode from Debian 9 as you do.
>>
>> Could you _attach_ the emacs init file and the org-mode file which
>> shows the issue?  (so I can simply start “emacs -Q -l sqlite.emacs
>> sqlite.org” and then press C-c C-c inside the sqlite code to see the
>> issue?
>>
>
> My emacs init has grown over the years and it includes a lot of others. I
> should try to create
>
> a clean one.
>

I think I am almost there. Is it possible to create a memory database with
org-babel instead of a file based

one. That would make more transparent I think.

>
> --
> Cecil Westerhof
>



-- 
Cecil Westerhof


Re: [O] A strange problem with org-babel and SQLite

2018-09-02 Thread Cecil Westerhof
It has to do with the data. With the following I can reproduce it:
#+BEGIN_SRC sqlite :db ~/testingOrgBabel.sqlite :colnames yes
DROP TABLE IF EXISTS quotes
;
CREATE TABLE "quotes" (
quoteID TEXT   PRIMARY KEY,
quote   TEXT NOT NULL  UNIQUE,
lastUsedTEXT,
totalUsed   INT  DEFAULT 'unused'
)
;
INSERT INTO quotes
(quoteID, quote)
VALUES
("1230FCF5-B25D-4087-88A4-41DF3AC353DA", '[
  "Limitations live only in our minds.
But if we use our imaginations,
our possibilities become limitless.

- Jamie Paolinett",
  "Hoe gebruik jij je verbeelding om
je mogelijkheden te vergroten?"
]'),
(2, "Second record.")
;
SELECT *
FROM   quotes
;
#+END_SRC

When I put a JSON field in the quote field the parsing goes wrong.


2018-09-03 3:09 GMT+02:00 Cecil Westerhof :

> 2018-09-01 14:24 GMT+02:00 Robert Klein :
>
>> Hi Cecil,
>>
>> On Sat, 1 Sep 2018 11:12:57 +0200
>> Cecil Westerhof  wrote:
>>
>> > 2018-08-31 13:22 GMT+02:00 Robert Klein :
>> >
>> > > On Fri, 31 Aug 2018 12:24:33 +0200
>> > > Cecil Westerhof  wrote:
>> > >
>> > > > 2018-08-31 11:17 GMT+02:00 Robert Klein :
>> > > >
>> > > > > Hi Cecil,
>> > > > >
>> > > > > On Fri, 31 Aug 2018 10:47:50 +0200
>> > > > > Cecil Westerhof  wrote:
>> > > > >
>> > > > > > I have a strange problem with org-babel and SQLite.
>> > > > > >
>> > > > > > I have a database that is created with:
>> > > > > > CREATE TABLE "quotes" (
>> > > > > > quoteID TEXT   PRIMARY KEY,
>> > > > > > quote   TEXT NOT NULL  UNIQUE,
>> > > > > > lastUsedTEXT,
>> > > > > > totalUsed   INT  DEFAULT 'unused'
>> > > > > > )
>> > > > > >
>> > > > > > When using:
>> > > > > > #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames
>> > > > > > yes SELECT   lastUsed
>> > > > > > ,totalUsed
>> > > > > > FROM quotes
>> > > > > > ORDER BY lastused  ASC
>> > > > > > ,totalUsed DESC
>> > > > > > LIMIT40
>> > > > > > #+END_SRC
>> > > > > >
>> > > > > > Everything is fine. But when I use (add the quote field in the
>> > > > > > select): #+BEGIN_SRC sqlite :db
>> > > > > > ~/Twitter/twitter.sqlite :colnames yes SELECT   quote
>> > > > > > ,lastUsed
>> > > > > > ,totalUsed
>> > > > > > FROM quotes
>> > > > > > ORDER BY lastused  ASC
>> > > > > > ,totalUsed DESC
>> > > > > > LIMIT40
>> > > > > > #+END_SRC
>> > > > > >
>> > > > > > I get:
>> > > > > > executing Sqlite code block...
>> > > > > > Wrote /tmp/babel-27920y_/ob-input-2792BTG
>> > > > > > org-babel-read: End of file during parsing
>> > > > > >
>> > > > > > What could be the problem?
>> > > > > >
>> > > > >
>> > > > > does it work outside of org/babel/emacs, that is, when you use
>> > > > > the query in a command line sqlite session, does it work?
>> > > > > “quote” is also a function in sqlite, so this might be your
>> > > > > issue.
>> > > >
>> > > > Yes, in sqlite3 and sqlitebrowser it works without problems.
>> > > > In org-babel even 'SELECT *' goes wrong.
>> > > >
>> > >
>> > > I can't reproduce the issue, it works for me.  What are your
>> > > org-mode and Emacs versions?
>> > >
>> >
>> > GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of
>> > 2017-09-15, modified by Debian
>> > Org-mode version 8.2.10 (release_8.2.10
>> > @ /usr/share/emacs/25.1/lisp/org/)
>> >
>> >
>> > >
>> > > Can you provide an ECM (Example, complete, minimal) org-mode setup /
>> > > Emacs initialization file?
>> > >
>> >
>> > (add-hook 'org-babel-after-execute-hook 'bh/display-inline-images
>> > 'append)
>> >
>> > ; Make babel results blocks lowercase
>> > (setq org-babel-results-keyword "results")
>> >
>> > (defun bh/display-inline-images ()
>> >   (condition-case nil
>> >   (org-display-inline-images)
>> > (error nil)))
>> >
>> > (org-babel-do-load-languages
>> >  (quote org-babel-load-languages)
>> >  (quote ((emacs-lisp . t)
>> >  (sqlite . t)
>> >  (dot . t)
>> >  (ditaa . t)
>> >  (R . t)
>> >  (python . t)
>> >  (ruby . t)
>> >  (gnuplot . t)
>> >  (clojure . t)
>> >  (sh . t)
>> >  (ledger . t)
>> >  (org . t)
>> >  (plantuml . t)
>> >  (latex . t
>> >
>> > ; Do not prompt to confirm evaluation
>> > ; This may be dangerous - make sure you understand the consequences
>> > ; of setting this -- see the docstring for details
>> > (setq org-confirm-babel-evaluate nil)
>> >
>> > ; Use fundamental mode when editing plantuml blocks with C-c '
>> > (add-to-list 'org-src-lang-modes (quote ("plantuml" . fundamental)))
>> >
>> > Is this what you need, or do you need more?
>> >
>>
>> sorry, I still can't reproduce the issue, even using the same stock
>> Emacs and org-mode from Debian 9 as you do.
>>
>> Could you _attach_ the emacs init file and the org-mode file which
>> shows the issue?  (so I can simply start 

Re: [O] org-copy-visible does not work with x-select-enable-primary

2018-09-02 Thread Nicolas Goaziou
Hello,

alain.coch...@unistra.fr writes:

> Hello.
>
>
> I use
>
>emacs -Q -l ~/.emacs.debug
>
> with the ~/.emacs.debug file containing only
>
>(add-to-list 'load-path "/home/cochard/Org/Coch-git/org-mode/lisp")
>
> I tried 2 versions of emacs, giving:
>
>Emacs : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version
>3.18.9) of 2016-04-11 on buildvm-25.phx2.fedoraproject.org Package:
>Org mode version 9.1.14 (release_9.1.14-908-gf1269e @
>/home/cochard/Org/Coch-git/org-mode/lisp/)
>
>Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
>3.18.9) of 2018-05-30 Package: Org mode version 9.1.14
>(release_9.1.14-908-gf1269e @
>/home/cochard/Org/Coch-git/org-mode/lisp/)
>
> In both cases, org-copy-visible works as I expect: if I select region
> containing a folded tree, use 'M-x org-copy-visible', then put the
> cursor elsewhere and use 'M-x org-yank', only the visible part is
> copied.
>
> Now, if I append the line
>
>(setq x-select-enable-primary t) 
>
> to ~/.emacs.debug, the whole tree is copied instead of the expected
> result, that is, including the invisible parts, also for the two emacs
> versions.
>
> NB: For emacs 26, as the manual says that 
>
>[x-select-enable-primary] is an alias for ‘select-enable-primary’.
>This variable is obsolete since 25.1; use ‘select-enable-primary’
>instead.
>
> I have also tried (setq select-enable-primary t) but this fails in the
> same way.

You may want to report it to Emacs Devel instead. Since it works in some
cases, it may not be related to Org.

Regards,

-- 
Nicolas Goaziou



Re: [O] newbie which LaTeX for PDF publish

2018-09-02 Thread Eric S Fraga
On Monday,  3 Sep 2018 at 09:32, adam wrote:
> On Sun, 2018-09-02 at 11:04 +0100, Eric S Fraga wrote:
>> On Saturday,  1 Sep 2018 at 22:12, adam wrote:
>> > 
>
>> > Am on Ubuntu 16.04, org-version is 8.2.10 
>> > 
>> > Export to PDF C-c C-e l o  is working. 
>> > However I wish finer grain LaTeX control. 
>> > 
>> > 
>> > For Export to PDF to work, I needed  pdftex  
>> But org exports to LaTeX, not TeX.  I.e. it exports to TeX with the
>> assumption that the LaTeX macros are all available.
>> 
>> Am I missing something?
>> 
>> What finer grain control would you like that you cannot achieve using
>> org directions such as #+latex: and #+begin_export latex?
>> 
>
> I require management of TeX (TeX Live) for export to PDF (LaTeX). 
>
> The Tex Live manager (tlmgr) displays available fonts, loads and
> removes fonts and other packages.

So this has nothing to do with org then?

I've never used tlmgr so cannot help.  Sorry.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4



Re: [O] newbie which LaTeX for PDF publish

2018-09-02 Thread adam
On Sun, 2018-09-02 at 11:04 +0100, Eric S Fraga wrote:
> On Saturday,  1 Sep 2018 at 22:12, adam wrote:
> > 
> > Am on Ubuntu 16.04, org-version is 8.2.10 
> > 
> > Export to PDF C-c C-e l o  is working. 
> > However I wish finer grain LaTeX control. 
> > 
> > 
> > For Export to PDF to work, I needed  pdftex  
> But org exports to LaTeX, not TeX.  I.e. it exports to TeX with the
> assumption that the LaTeX macros are all available.
> 
> Am I missing something?
> 
> What finer grain control would you like that you cannot achieve using
> org directions such as #+latex: and #+begin_export latex?
> 

I require management of TeX (TeX Live) for export to PDF (LaTeX). 

The Tex Live manager (tlmgr) displays available fonts, loads and removes fonts 
and other
packages. 
https://www.tug.org/texlive/doc/tlmgr.html 


Sure, pdftex (from texlive-latex-extra) enables org-mode export to PDF, however 
the 
fonts available are opaque within the TexLive environment without tlmgr. 
Navigation of TexLive customizations, set with install-tl are opaque without 
tlmgr.  


packages for Ubuntu 16.04 LTS can be seen here, 
https://packages.ubuntu.com/search?keywords=texlive 

using the TexLive installer  install-tl  can be seen here, 
https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-u
buntu 


In other words, org-mode export to PDF assumes a pdftex, and the 
tex/texlive/LaTex
environment is up to the user to simply provide a pdftex. 


 


   







Re: [O] org-element-adopt-elements, append before children

2018-09-02 Thread Ivan Tadeu Ferreira Antunes Filho
Org element insert before would insert the new element before the selected
element, not as the first element child (I think)


At the moment I'm finding the first child, checking if it is non nil, and
if it is not nil, dolist insert before the first child, else, adopt the
elements. Which is a fairly convoluted way

On Sun, Sep 2, 2018, 8:27 AM Nicolas Goaziou  wrote:

> Hello,
>
> Ivan Tadeu Ferreira Antunes Filho  writes:
>
> > At the moment  org-element-adopt-elements always appends the new elements
> > after the elements original children.  In many cases one might want to
> > append before the original children.
> >
> > I want to propose adding an argument to org-element-adopt-elements that
> > defines if the elements should be added before or after the children,
> i.e.
> > (if append-before
> >   (nconc children (org-element-contents parent))
> >   (nconc (org-element-contents parent) children))
> >
> > Would this be okay?
>
> You can simply use `org-element-insert-before'.
>
> Regards,
>
> --
> Nicolas Goaziou
> ___
> Ita mailing list
> i...@mit.edu
> http://mailman.mit.edu/mailman/listinfo/ita
>


Re: [O] A strange problem with org-babel and SQLite

2018-09-02 Thread Cecil Westerhof
2018-09-01 14:24 GMT+02:00 Robert Klein :

> Hi Cecil,
>
> On Sat, 1 Sep 2018 11:12:57 +0200
> Cecil Westerhof  wrote:
>
> > 2018-08-31 13:22 GMT+02:00 Robert Klein :
> >
> > > On Fri, 31 Aug 2018 12:24:33 +0200
> > > Cecil Westerhof  wrote:
> > >
> > > > 2018-08-31 11:17 GMT+02:00 Robert Klein :
> > > >
> > > > > Hi Cecil,
> > > > >
> > > > > On Fri, 31 Aug 2018 10:47:50 +0200
> > > > > Cecil Westerhof  wrote:
> > > > >
> > > > > > I have a strange problem with org-babel and SQLite.
> > > > > >
> > > > > > I have a database that is created with:
> > > > > > CREATE TABLE "quotes" (
> > > > > > quoteID TEXT   PRIMARY KEY,
> > > > > > quote   TEXT NOT NULL  UNIQUE,
> > > > > > lastUsedTEXT,
> > > > > > totalUsed   INT  DEFAULT 'unused'
> > > > > > )
> > > > > >
> > > > > > When using:
> > > > > > #+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames
> > > > > > yes SELECT   lastUsed
> > > > > > ,totalUsed
> > > > > > FROM quotes
> > > > > > ORDER BY lastused  ASC
> > > > > > ,totalUsed DESC
> > > > > > LIMIT40
> > > > > > #+END_SRC
> > > > > >
> > > > > > Everything is fine. But when I use (add the quote field in the
> > > > > > select): #+BEGIN_SRC sqlite :db
> > > > > > ~/Twitter/twitter.sqlite :colnames yes SELECT   quote
> > > > > > ,lastUsed
> > > > > > ,totalUsed
> > > > > > FROM quotes
> > > > > > ORDER BY lastused  ASC
> > > > > > ,totalUsed DESC
> > > > > > LIMIT40
> > > > > > #+END_SRC
> > > > > >
> > > > > > I get:
> > > > > > executing Sqlite code block...
> > > > > > Wrote /tmp/babel-27920y_/ob-input-2792BTG
> > > > > > org-babel-read: End of file during parsing
> > > > > >
> > > > > > What could be the problem?
> > > > > >
> > > > >
> > > > > does it work outside of org/babel/emacs, that is, when you use
> > > > > the query in a command line sqlite session, does it work?
> > > > > “quote” is also a function in sqlite, so this might be your
> > > > > issue.
> > > >
> > > > Yes, in sqlite3 and sqlitebrowser it works without problems.
> > > > In org-babel even 'SELECT *' goes wrong.
> > > >
> > >
> > > I can't reproduce the issue, it works for me.  What are your
> > > org-mode and Emacs versions?
> > >
> >
> > GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of
> > 2017-09-15, modified by Debian
> > Org-mode version 8.2.10 (release_8.2.10
> > @ /usr/share/emacs/25.1/lisp/org/)
> >
> >
> > >
> > > Can you provide an ECM (Example, complete, minimal) org-mode setup /
> > > Emacs initialization file?
> > >
> >
> > (add-hook 'org-babel-after-execute-hook 'bh/display-inline-images
> > 'append)
> >
> > ; Make babel results blocks lowercase
> > (setq org-babel-results-keyword "results")
> >
> > (defun bh/display-inline-images ()
> >   (condition-case nil
> >   (org-display-inline-images)
> > (error nil)))
> >
> > (org-babel-do-load-languages
> >  (quote org-babel-load-languages)
> >  (quote ((emacs-lisp . t)
> >  (sqlite . t)
> >  (dot . t)
> >  (ditaa . t)
> >  (R . t)
> >  (python . t)
> >  (ruby . t)
> >  (gnuplot . t)
> >  (clojure . t)
> >  (sh . t)
> >  (ledger . t)
> >  (org . t)
> >  (plantuml . t)
> >  (latex . t
> >
> > ; Do not prompt to confirm evaluation
> > ; This may be dangerous - make sure you understand the consequences
> > ; of setting this -- see the docstring for details
> > (setq org-confirm-babel-evaluate nil)
> >
> > ; Use fundamental mode when editing plantuml blocks with C-c '
> > (add-to-list 'org-src-lang-modes (quote ("plantuml" . fundamental)))
> >
> > Is this what you need, or do you need more?
> >
>
> sorry, I still can't reproduce the issue, even using the same stock
> Emacs and org-mode from Debian 9 as you do.
>
> Could you _attach_ the emacs init file and the org-mode file which
> shows the issue?  (so I can simply start “emacs -Q -l sqlite.emacs
> sqlite.org” and then press C-c C-c inside the sqlite code to see the
> issue?
>

It is quite strange. It looks like it has something to do with the database
itself, because the following works:
#+BEGIN_SRC sqlite :db ~/testingOrgBabel.sqlite :colnames yes
DROP TABLE IF EXISTS quotes
;
CREATE TABLE "quotes" (
quoteID TEXT   PRIMARY KEY,
quote   TEXT NOT NULL  UNIQUE,
lastUsedTEXT,
totalUsed   INT  DEFAULT 'unused'
)
;
INSERT INTO quotes
(quoteID, quote)
VALUES
(1, "First record."),
(2, "Second record.")
;
SELECT *
FROM   quotes
;
#+END_SRC

The create is just copied from the original database.

The following works:
#+BEGIN_SRC sqlite :db ~/testingOrgBabel.sqlite :colnames yes
SELECT *
FROM   quotes
LIMIT  2
;
#+END_SRC


But this does not work:
#+BEGIN_SRC sqlite :db ~/Twitter/twitter.sqlite :colnames yes
SELECT *
FROM   quotes
LIMIT  2
;
#+END_SRC