Kyle Meyer
ff5fc050d3
Update copyright year to 2020
2020-01-01 13:38:46 -05:00
Nicolas Goaziou
65399aea48
ob-sql: Silence byte-compiler
2019-04-16 21:53:15 +02:00
Stefano Rodighiero
f9a898d881
ob-sql: Option to reference connections in `sql-connection-alist'
...
* lisp/ob-sql.el (org-babel-find-db-connection-param): New function.
Provide a new param called :dbconnection, that can be used to
reference connections defined in `sql-connection-alist', a custom
variable defined in sql.el.
TINYCHANGE
2019-04-15 18:11:02 +02:00
Bastien
f584d37a67
Update copyright year
2019-01-01 11:50:56 +01:00
Pierre Téchoueyres
bd0b691716
ob-sql.el: Improve Oracle connection and usage for ob-sql.
...
* lisp/ob-sql.el (org-babel-sql-dbstring-oracle): Permit to omit host
and port to allow use of alias defined in Oracle's TNSNAMES files.
This now allow two way calling it :
<user>/<password>@<host>:<port>/<database ID>
or
<user>/<password>@<database alias>
2018-03-16 23:01:58 +01:00
Pierre Téchoueyres
0edf344e2a
ob-sql.el: Improve Oracle connection and usage for ob-sql.
...
* lisp/ob-sql.el (org-babel-sql-dbstring-oracle): Don't use empty
args. This allows use of alias defined in Oracle's TNSNAMES files.
(org-babel-execute:sql): Don't feed lines with trailing spaces. This
also improve speed for retrieving data.
2018-03-14 14:30:51 +01:00
Tim Landscheidt
b289a65be7
Use https for links to orgmode.org
...
TINYCHANGE
2018-01-19 18:14:58 +01:00
Kyle Meyer
3e1641ef0a
Update copyright years
2018-01-07 00:27:54 -05:00
Paul Eggert
5d3e17bf85
Backport commit bbda601d1 from Emacs
...
; Spelling fixes
bbda601d1d4e125c9d3c374b56eee3e2e9623f1d
Paul Eggert
Fri Sep 29 16:41:50 2017 -0700
2017-10-01 20:00:42 -04:00
Paul Eggert
ff0dcf52a5
Backport commit bc511a64f from Emacs
...
Prefer HTTPS to FTP and HTTP in documentation
bc511a64f6da9ab51acc7c8865e80c4a4cb655c2
Paul Eggert
Wed Sep 13 15:54:37 2017 -0700
2017-09-17 00:28:38 -04:00
Kyle Meyer
d39ccc17d4
Merge branch 'maint'
2017-07-09 11:28:54 -04:00
Paul Eggert
b7fdc30388
Backport commit 20e9a00fb from Emacs
...
* lisp/org-table.el (org-table-sort-lines): Fix misspelling in prompt.
* lisp/ox-ascii.el (org-ascii--describe-datum): Fix misspelling in
call to org-element-lineage.
Spelling fixes
20e9a00fb5d12ad408f9dd15adcfcd205783c1b0
Paul Eggert
Thu Jul 6 00:24:56 2017 -0700
2017-07-09 11:27:12 -04:00
Nicolas Goaziou
c3cdbbff9b
Merge branch 'maint'
2017-04-16 09:25:30 +02:00
Xi Shen
93972c9845
ob-sql.el: Fix filename conversion in minGW environment.
...
(org-babel-sql-convert-standard-filename): If it is not in Cygwin
environment, and `system-nt' is "windows-nt", Emacs must be in minGW
or MSYS environment, and can handle Windows filename correctly.
TINYCHANGE
2017-04-16 09:24:06 +02:00
Andreas Gerler
8ba336ea0c
ob-sql: Add vertica engine
...
* lisp/ob-sql.el (org-babel-sql-dbstring-vertica): New function.
(org-babel-execute:sql): Add `vertica' engine.
Signed-off-by: Andreas Gerler <baron@bundesbrandschatzamt.de>
2017-04-06 08:46:04 +02:00
Kyle Meyer
0d3683f2cd
Merge branch 'maint'
2017-01-05 20:23:58 -05:00
Kyle Meyer
713f785017
Update copyright years
2017-01-05 20:19:37 -05:00
MaDhAt2r
0063075f65
ob-sql: Add sqsh engine
...
* lisp/ob-sql.el (org-babel-sql-dbstring-sqsh): New function.
(org-babel-execute:sql): Add `sqsh' engine.
2016-12-05 22:45:25 +01:00
Aaron Ecay
79650ffbbd
Use assq instead of assoc for :keywords
...
* lisp/ob-C.el (org-babel-C-execute):
* lisp/ob-J.el (org-babel-execute:J):
* lisp/ob-R.el (org-babel-edit-prep:R):
(org-babel-expand-body:R):
(org-babel-execute:R):
(org-babel-variable-assignments:R):
(org-babel-R-initiate-session):
* lisp/ob-abc.el (org-babel-execute:abc):
* lisp/ob-asymptote.el (org-babel-execute:asymptote):
* lisp/ob-awk.el (org-babel-execute:awk):
* lisp/ob-clojure.el (org-babel-expand-body:clojure):
(org-babel-execute:clojure):
* lisp/ob-core.el (org-babel-expand-body:generic):
(org-babel-load-in-session):
(org-babel-initiate-session):
(org-babel-open-src-block-result):
(org-babel-process-params):
(org-babel-insert-result):
(org-babel-expand-noweb-references):
* lisp/ob-ditaa.el (org-babel-execute:ditaa):
* lisp/ob-dot.el (org-babel-execute:dot):
* lisp/ob-ebnf.el (org-babel-execute:ebnf):
* lisp/ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp):
(org-babel-execute:emacs-lisp):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
(org-babel-exp-do-export):
(org-babel-exp-code):
* lisp/ob-forth.el (org-babel-execute:forth):
* lisp/ob-fortran.el (org-babel-execute:fortran):
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
(org-babel-expand-body:gnuplot):
(org-babel-execute:gnuplot):
* lisp/ob-groovy.el (org-babel-execute:groovy):
* lisp/ob-haskell.el (org-babel-execute:haskell):
* lisp/ob-io.el (org-babel-execute:io):
* lisp/ob-java.el (org-babel-execute:java):
* lisp/ob-js.el (org-babel-execute:js):
* lisp/ob-latex.el (org-babel-execute:latex):
* lisp/ob-ledger.el (org-babel-execute:ledger):
* lisp/ob-lilypond.el (org-babel-lilypond-process-basic):
* lisp/ob-lisp.el (org-babel-expand-body:lisp):
(org-babel-execute:lisp):
* lisp/ob-lua.el (org-babel-execute:lua):
* lisp/ob-maxima.el (org-babel-execute:maxima):
* lisp/ob-mscgen.el (org-babel-execute:mscgen):
* lisp/ob-ocaml.el (org-babel-execute:ocaml):
* lisp/ob-octave.el (org-babel-execute:octave):
* lisp/ob-org.el (org-babel-execute:org):
* lisp/ob-perl.el (org-babel-execute:perl):
* lisp/ob-picolisp.el (org-babel-execute:picolisp):
* lisp/ob-plantuml.el (org-babel-execute:plantuml):
* lisp/ob-python.el (org-babel-execute:python):
* lisp/ob-ruby.el (org-babel-execute:ruby):
* lisp/ob-sass.el (org-babel-execute:sass):
* lisp/ob-scala.el (org-babel-execute:scala):
* lisp/ob-scheme.el (org-babel-execute:scheme):
* lisp/ob-screen.el (org-babel-execute:screen):
(org-babel-prep-session:screen):
* lisp/ob-shell.el (org-babel-execute:shell):
(org-babel-variable-assignments:shell):
(org-babel-sh-evaluate):
* lisp/ob-shen.el (org-babel-execute:shen):
* lisp/ob-sql.el (org-babel-execute:sql):
* lisp/ob-sqlite.el (org-babel-execute:sqlite):
* lisp/ob-tangle.el (org-babel-tangle):
(org-babel-tangle-single-block):
* lisp/org-src.el (org-src-associate-babel-session):
* lisp/org.el (org-next-link):
Use `assq' instead of `assoc' with :keyword keys.
2016-09-23 11:20:09 +01:00
Jakob Lombacher
c257e31d10
ob-sql: Add dbport and dbpassword options to postgresql
...
* lisp/ob-sql.el (org-babel-sql-dbstring-postgresql): Add port
parameter.
(org-babel-execute:sql): Handle password and port in `postgresql' SQL
engine.
TINYCHANGE.
2016-09-17 10:34:59 +02:00
Nicolas Goaziou
e7f2379297
Remove unnecessary (require 'cl)
2016-07-25 15:41:02 +02:00
Xi Shen
35df86c5c0
ob-sql.el: Support sqlcmd in Cygwin environment
...
* lisp/ob-sql.el (org-babel-sql-dbstring-mssql): Format Microsoft
`sqlcmd' command line args.
(org-babel-sql-convert-standard-filename): Convert a Posix path to
Windows long path in Cygwin environment, or do nothing.
(org-babel-execute:sql): Add `mssql' engine support and remove support
for `msosql' engine.
The `osql' command line tool was last updated in 2004,
https://technet.microsoft.com/en-us/library/aa214012(v=sql.80).aspx , and
could not output the query result in a way that morden `org-table.el'
expects. The `sqlcmd' is the preferred command line tool to connect the
Microsoft SQL Server and it also has a Linux version,
https://msdn.microsoft.com/en-us/library/hh568447(v=sql.110).aspx .
TINYCHANGE
2016-06-17 00:26:20 +02:00
Gary Oberbrunner
aa042455a7
ob-sql.el: fix typo preventing mysql table headers from being parsed
...
* ob-sql.el (org-babel-execute:sql): fix typo (introduced in 8c2e232
)
which prevented correct parsing of mysql table headers.
2016-02-09 22:16:53 +01:00
Kyle Meyer
6345de2d05
Merge branch 'maint'
2016-01-09 17:43:27 -05:00
Kyle Meyer
6bc48c5f41
Update copyright years
2016-01-09 17:12:03 -05:00
Sacha Chua
955bc57ded
ob-sql: Don't print out the command
...
* lisp/ob-sql.el (org-babel-execute:sql): Don't print out the command
in the echo area, since it could be very long.
2015-12-26 14:28:49 +01:00
Nicolas Goaziou
8c2e232b00
ob-sql: Fix `case' calls
...
* lisp/ob-sql.el (org-babel-execute:sql): Replace erroneous `case' call
with `pcase'. Small refactoring. Keep lines within 80 characters.
2015-12-20 16:57:07 +01:00
Peter Feigl
cf8bfc178d
ob-sql.el: Add support for Oracle via sqlplus
...
* lisp/ob-sql.el: Add a database type 'oracle that uses sqlplus to
support running SQL blocks against an Oracle database.
Use with properties like this (all mandatory):
:engine oracle :dbhost <host.com> :dbport <1521> :dbuser <username>
:database <database> :dbpassword <secret>
TINYCHANGE
2015-12-20 16:54:21 +01:00
Aaron Ecay
0d000f5680
babel: small change in API.
...
* lisp/ob-core.el (org-babel--get-vars): New function.
(org-babel-get-header): Delete.
* lisp/ob-C.el (org-babel-C-expand-C):
(org-babel-C-expand-D):
* lisp/ob-R.el (org-babel-variable-assignments:R):
* lisp/ob-abc.el (org-babel-expand-body:abc):
* lisp/ob-asymptote.el (org-babel-variable-assignments:asymptote):
* lisp/ob-awk.el (org-babel-execute:awk):
* lisp/ob-calc.el (org-babel-execute:calc):
* lisp/ob-clojure.el (org-babel-expand-body:clojure):
* lisp/ob-dot.el (org-babel-expand-body:dot):
* lisp/ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp):
* lisp/ob-fortran.el (org-babel-expand-body:fortran):
(org-babel-fortran-ensure-main-wrap):
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
* lisp/ob-haskell.el (org-babel-variable-assignments:haskell):
* lisp/ob-js.el (org-babel-variable-assignments:js):
* lisp/ob-latex.el (org-babel-expand-body:latex):
* lisp/ob-lilypond.el (org-babel-expand-body:lilypond):
* lisp/ob-lisp.el (org-babel-expand-body:lisp):
* lisp/ob-maxima.el (org-babel-maxima-expand):
* lisp/ob-ocaml.el (org-babel-variable-assignments:ocaml):
* lisp/ob-octave.el (org-babel-variable-assignments:octave):
* lisp/ob-org.el (org-babel-expand-body:org):
* lisp/ob-perl.el (org-babel-variable-assignments:perl):
* lisp/ob-picolisp.el (org-babel-expand-body:picolisp):
* lisp/ob-processing.el (org-babel-variable-assignments:processing):
* lisp/ob-python.el (org-babel-variable-assignments:python):
* lisp/ob-ruby.el (org-babel-variable-assignments:ruby):
* lisp/ob-scheme.el (org-babel-expand-body:scheme):
* lisp/ob-shell.el (org-babel-variable-assignments:shell):
* lisp/ob-shen.el (org-babel-expand-body:shen):
* lisp/ob-sql.el (org-babel-expand-body:sql):
* lisp/ob-sqlite.el (org-babel-expand-body:sqlite): Adapt to change.
* etc/ORG-NEWS: Document change.
2015-10-29 19:26:11 +00:00
Nicolas Goaziou
7706714200
Switch some Babel-related libraries to lexical binding
...
* lisp/ob-sed.el:
* lisp/ob-shen.el:
(org-babel-execute:shen):
* lisp/ob-sql.el:
(org-babel-prep-session:sql):
* lisp/ob-sqlite.el:
(org-babel-execute:sqlite):
(org-babel-prep-session:sqlite):
* lisp/ob-stan.el:
(org-babel-prep-session:stan):
* lisp/ob-table.el: Switch some libraries to lexical binding.
2015-10-26 16:58:34 +01:00
Paul Eggert
c86a10b0bc
Backport commit 284c470 from Emacs master branch
...
Backslash cleanup in Elisp source files
284c470ef752967fcd8bae6a450dc138462b1e49
Paul Eggert
Thu Sep 17 16:09:39 2015 -0700
2015-09-21 18:38:39 -04:00
Paul Eggert
ecf3a4af2c
Backport remaining changes from commit 7e09ef0
...
Add changes from Emacs repo that should have been backported with
bb77dd2
.
Update copyright year to 2015
7e09ef09a479731d01b1ca46e94ddadd73ac98e3
Paul Eggert
Thu Jan 1 14:26:41 2015 -0800
2015-08-10 02:17:19 -04:00
Saulius Menkevičius
187dae0ab1
ob-sql: Add possibility to set dbport
...
* lisp/ob-sql.el (org-babel-sql-dbstring-mysql): Change type
signature to accept server port number too.
(org-babel-execute:sql) Will now recognize the dbport parameter.
Passed to `org-babel-sql-dbstring-mysql' only for now.
TINYCHANGE
2015-04-07 22:24:59 +02:00
Steven Rémot
e228cd1060
ob-sql.el: Clean mysql parameters generation
...
* lisp/ob-sql.el (dbstring-mysql): Rename function and tweak a bit its
implementation
(org-babel-execute:sql): Use new function name
Prefix `dbstring-mysql' function with the namespace "org-babel-sql" to
avoid name collisions.
Also replace the call to `remq' by `delq' because it is a bit more
efficient, and also to be consistent with
`org-babel-sql-dbstring-postgresql'.
2014-09-20 23:06:40 +02:00
Steven Rémot
e5e9fc974d
ob-sql.el: Enhance postgresql support
...
* lisp/ob-sql.el (org-babel-sql-dbstring-postgresql): New function
(org-babel-execute:sql): Use new function.
Before this patch, it was necessary to use :cmdline parameter to
specify host, user and database different the the default ones. Now,
this can be done using parameters that are independents of the engine
used.
This is not trivial (and not recommended) to pass password as a
command line argument to psql, so :dbpassword is not supported.
2014-09-20 23:06:36 +02:00
Eric Schulte
8285763b97
update psql command to respect :colnames
...
Suggested by Joost Helberg on the Mailing list.
TINYCHANGE
* lisp/ob-sql.el (org-babel-execute:sql): Update psql command to
respect :colnames.
2014-01-08 09:57:40 -07:00
Bastien Guerry
f8e1745440
Merge branch 'maint'
...
Conflicts:
contrib/lisp/org-favtable.el
2014-01-07 14:19:03 +01:00
Bastien Guerry
7d9a883b50
Update copyright years again.
...
Hint: copyright years are all updated in Emacs.
2014-01-07 14:18:17 +01:00
Bastien Guerry
c41f5075ac
Merge branch 'maint'
...
Conflicts:
contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +01:00
Bastien Guerry
0beda99171
Revert "Update copyright years."
...
This reverts commit 21105594fc
.
2014-01-05 06:28:07 +01:00
Bastien Guerry
096ff7e078
Merge branch 'maint'
...
Conflicts:
contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry
21105594fc
Update copyright years.
2014-01-04 18:56:11 +01:00
Eric Schulte
baa44f6542
add --set=\"ON_ERROR_STOP=1\" to psql execution
...
Thanks to Joost Helberg for suggesting this change.
* lisp/ob-sql.el (org-babel-execute:sql): Add
--set=\"ON_ERROR_STOP=1\" to psql execution.
2013-12-01 11:07:16 -07:00
Bastien Guerry
f95641c443
Backport changes from Emacs revs 115081 and 115082
...
2013-11-12 Stefan Monnier <monnier@iro.umontreal.ca>
Address some byte-compiler warnings.
* ob-abc.el (org-babel-expand-body:abc): Use dolist.
(org-babel-execute:abc): Fix regexp quoting.
* ob-calc.el (org--var-syms): Rename from `var-syms'.
* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
* ob-table.el (sbe): Move debug declaration.
* org-clock.el (org--msg-extra): Rename from `msg-extra'.
* org.el (org-version): Avoid var name starting with _.
(org-inhibit-startup, org-called-with-limited-levels)
(org-link-search-inhibit-query, org-time-was-given)
(org-end-time-was-given, org-def, org-defdecode, org-with-time):
* org-colview.el (org-agenda-overriding-columns-format):
* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
(org-agenda-show-log-scoped):
* ob-python.el (py-which-bufname, python-shell-buffer-name):
* ob-haskell.el (org-export-copy-to-kill-ring):
* ob-exp.el (org-link-search-inhibit-query):
* ob-R.el (ess-eval-visibly-p):
* ob-core.el (org-src-window-setup): Declare before use.
(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
* ox-odt.el (org-odt-hfy-face-to-css):
* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
(org-bibtex-check):
* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
(org-babel-tangle-single-block, org-babel-tangle-comment-links):
* ob-table.el (sbe):
* ob-sqlite.el (org-babel-sqlite-expand-vars):
* ob-sql.el (org-babel-sql-expand-vars):
* ob-shen.el (org-babel-execute:shen):
* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
* ob-scala.el (org-babel-scala-evaluate):
* ob-ruby.el (org-babel-ruby-table-or-string)
(org-babel-ruby-evaluate):
* ob-python.el (org-babel-python-table-or-string)
(org-babel-python-evaluate-external-process)
(org-babel-python-evaluate-session):
* ob-picolisp.el (org-babel-execute:picolisp):
* ob-perl.el (org-babel-perl-evaluate):
* ob-maxima.el (org-babel-execute:maxima):
* ob-lisp.el (org-babel-execute:lisp):
* ob-java.el (org-babel-execute:java):
* ob-io.el (org-babel-io-evaluate):
* ob-haskell.el (org-babel-execute:haskell):
* ob-fortran.el (org-babel-execute:fortran):
* ob-exp.el (org-babel-exp-code):
* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
* ob-ditaa.el (org-babel-execute:ditaa):
* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
(org-babel-parse-header-arguments, org-babel-reassemble-table)
(org-babel-goto-src-block-head, org-babel-mark-block)
(org-babel-expand-noweb-references, org-babel-script-escape)
(org-babel-process-file-name):
* ob-clojure.el (org-babel-execute:clojure):
* ob-calc.el (org-babel-execute:calc):
* ob-awk.el (org-babel-execute:awk):
* ob-abc.el (org-babel-execute:abc):
* ob-R.el (org-babel-expand-body:R):
* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).
2013-11-12 Glenn Morris <rgm@gnu.org>
* ox-html.el (org-html-scripts): Add 2013 to copyright years.
(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 20:57:31 +01:00
Bastien Guerry
1fb57438bd
Fix code typo in commit 78b3a0
2013-03-20 07:46:53 +01:00
Rick Frankel
78b3a03981
Fix issue with dbi processing in ob-sql.
...
* lisp/ob-sql.el (org-babel-execute:sql): Unquote cmdline argument in
format string, dbish requires three separate arguments. Add dbi to
the list of engines with automatically added header separator.
2013-03-19 16:51:42 -04:00
Bastien Guerry
f8e87473d7
ob-sql.el (org-babel-execute:sql): Add header row delimiter for both mysql and postgresql
...
* ob-sql.el (org-babel-execute:sql): Add header row delimiter
for both mysql and postgresql.
Thanks to Daniel for reporting this.
2013-02-24 09:15:02 +01:00
Eric Schulte
cb3e647734
org-babel-eval command instead of shell-command
...
* lisp/ob-sql.el (org-babel-execute:sql): Use the org-babel-eval command
instead of shell-command.
2013-02-09 14:18:24 -07:00
Gary Oberbrunner
e2b17ccc52
Improvements to Org SQL support
...
* add a header-row delimiter to the tables returned from mysql
* add new sql-specific header args for the database connection, and implements them for mysql
* add support for :colnames (mysql only)
* (minor) add an edebug spec to org-babel-result-cond to allow edebugging through it
* add some doc about what header args are used
2013-02-09 14:11:45 -07:00
Bastien Guerry
5fc740a230
Merge branch 'maint'
2013-01-08 15:04:40 +01:00