Commit Graph

16407 Commits

Author SHA1 Message Date
Nicolas Goaziou a24ac01cd5 Merge branch 'maint'
Conflicts:
	lisp/ox-latex.el
2014-09-22 17:43:30 +02:00
Nicolas Goaziou 05d8d76e74 ox-latex: Fix link to unnumbered headline
* lisp/ox-latex.el (org-latex-link): Improve test for unnumbered
  headlines.
2014-09-22 17:40:55 +02:00
Achim Gratz 7585fe449b ob-ruby: clean up the session code some more and work around an I/O sync problem in comint
* lisp/ob-ruby.el (org-babel-ruby-evaluate): Clean up the session code
  and remove a superfluous `butlast'.  Work around a problem in comint
  where the first prompt in a session may be printed after the
  evaluation has already started, thus producing a spurious line in
  the output.

* testing/lisp/test-ob-ruby.el (test-ob-ruby/session-output-1,
  test-ob-ruby/session-output-2 test-ob-ruby/session-output-3): Test
  correct transfer of interpreter state across several session
  invocations.
2014-09-21 17:59:49 +02:00
Achim Gratz 4ef78e68c1 ob-ruby: fix a24775dc79 again
* lisp/ob-ruby.el (org-babel-ruby-evaluate): Temporarily disable the
  irb prompt to ensure that the output is properly recognized using
  the standard settings from inf-ruby and no extra settings in .irbrc
  or other configuration files from Ruby.  Remove superfluous
  `comint-send-input' that produced a spurious empty line in output.
* testing/lisp/test-ob-ruby.el (test-ob-ruby/session-output): Remove
  spurious emtpy line in expected output.
2014-09-21 12:57:49 +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
Nicolas Goaziou 20539b8d1d Merge branch 'maint' 2014-09-20 23:02:20 +02:00
marcowahlsoft@gmail.com 60418c5ca8 Fix to determine a bulk-markable line
* lisp/org-agenda.el (org-agenda-bulk-mark,
  org-agenda-bulk-mark-regexp, org-agenda-bulk-toggle-all): This fixes
  e.g. org-agenda-bulk-mark-all when time-grid is shown.

TINYCHANGE
2014-09-20 23:01:51 +02:00
Achim Gratz 7070545599 Merge branch 'maint' 2014-09-20 21:55:09 +02:00
Achim Gratz 1113e3e027 test-ob-exp: fix failing test
* testing/lisp/test-ob-exp.el (ob-exp/export-from-a-temp-buffer):
  Check for the correct expected output so the test stops failing.
2014-09-20 21:54:21 +02:00
Nicolas Goaziou 8771dafd7c ox-koma-letter: Fix "to" and "from"
* contrib/lisp/ox-koma-letter.el (koma-letter): Properly display
  default "from" address from template.
(org-koma-letter--determine-to-and-from): Do not provide a default
"to" value as it might be set through a LCO file.
(org-koma-letter-template): Remove trailing whitespace.
2014-09-20 21:32:52 +02:00
Nicolas Goaziou aaa7aa983d ox-ascii: Implement plain-lists own extra margin
* lisp/ox-ascii.el (org-ascii-list-margin): New variable.
(ascii): New property.
(org-ascii--current-text-width, org-ascii-plain-list): Take into
account list margin.

* doc/org.texi (Publishing options):
* etc/ORG-NEWS (argument): Document new variable.
2014-09-20 15:06:22 +02:00
Nicolas Goaziou 0491ae5204 Merge branch 'maint' 2014-09-20 01:06:22 +02:00
Nicolas Goaziou 1b17e8c8da ox-ascii: Fix filling with preserve break
* lisp/ox-ascii.el (org-ascii--fill-string): Allow filling even when
  `org-export-preserve-breaks' is non-nil.
2014-09-20 01:05:22 +02:00
Nicolas Goaziou 1465229957 Merge branch 'maint'
Conflicts:
	doc/org.texi
2014-09-20 00:35:09 +02:00
Nicolas Goaziou 2d02479c34 org.texi: Be more explicit about output file name
* doc/org.texi (Export settings): Be more explicit about how output
  file name is built.
2014-09-20 00:33:54 +02:00
Nicolas Goaziou b82f1cb2c2 Fix 788780296c 2014-09-19 22:45:22 +02:00
Nicolas Goaziou 788780296c org.texi: Document case-sensitivity of special blocks
* doc/org.texi (Special blocks, HTML doctypes, @LaTeX{} specific
  attributes): Take into account case-sensitivity of special blocks.
2014-09-19 22:42:35 +02:00
Nicolas Goaziou 0620fe98cb Merge branch 'maint' 2014-09-19 21:03:27 +02:00
Nicolas Goaziou 3f484a5277 Fix headline insertion after an empty headline
* lisp/org.el (org-N-empty-lines-before-current): Make sure to delete
  only empty lines, not trailing whitespaces.

* testing/lisp/test-org.el (test-org/insert-heading): Add test.

Thanks to Oleh for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90876
2014-09-19 20:59:40 +02:00
Aaron Ecay 5bb58daa22 org-table: fix docstring
* lisp/org-table.el (org-table-get): Fix docstring.
2014-09-19 14:38:23 -04:00
Achim Gratz 37e1a11b9e ob-R: declare ess-current-process-name
* lisp/ob-R.el: Forward declare `ess-current-process-name'.
2014-09-19 12:03:43 +02:00
Achim Gratz c478b57d4e Merge branch 'maint' 2014-09-19 11:53:46 +02:00
Achim Gratz 98afe0046f ob-sh: compatibility fix for "Marker does not point anywhere" errors in Emacs 23
* lisp/ob-sh.el (org-babel-sh-initiate-session): After initiating a
  session, initialize the marker `comint-last-output-start' since it
  is going to be used by the ANSI color filter without further checks
  in Emacs 23 and throws an error.
2014-09-19 11:52:30 +02:00
Achim Gratz 7d8523d9d1 ob-shell: compatibility fix for "Marker does not point anywhere" errors in Emacs 23
* lisp/ob-shell.el (org-babel-sh-initiate-session): After initiating a
  session, initialize the marker `comint-last-output-start' since it
  is going to be used by the ANSI color filter without further checks
  in Emacs 23 and throws an error.
2014-09-19 11:34:09 +02:00
Achim Gratz 1aa719cff2 ox-texinfo: fix bug in 3432681fbe
* lisp/ox-texinfo.el: Add missing argument to call of
  `org-element-property'.
2014-09-19 10:39:02 +02:00
Achim Gratz 1483df8c99 org-table: for compatibility, use org-file-equal-p
* lisp/org-table.el: Predicate function `file-equal-p' is not
  available in older Emacsen, use compatibility function
  `org-file-equal-p' instead.
2014-09-19 10:05:15 +02:00
Nicolas Goaziou dd70cf773c Merge branch 'master' of orgmode.org:org-mode 2014-09-18 22:09:40 +02:00
Nicolas Goaziou 80e493a1f7 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-09-18 22:08:30 +02:00
Achim Gratz e5f61642a3 ob-R: make it work with older ESS versions
* lisp/ob-R.el (org-babel-R-initiate-session): The PROC argument is
  mandatory for older ESS versions.
2014-09-18 21:56:53 +02:00
Nicolas Goaziou 873fe49811 ox-html: Fix linking to deep level headlines
* lisp/ox-html.el (org-html-headline): Make sure even listified
  headlines have proper anchors so internal links can refer to them.
  Small refactoring.

Thanks to Bruce Gilstrap for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90835
2014-09-18 21:37:07 +02:00
chasberry 0fd29a5ee7 lisp/ob-R.el: use `ess-wait-for-process' to assure clean session startup
* lisp/ob-R.el (org-babel-R-initiate-session): Make sure that (R) has
finished before `rename-buffer' is run.

TINYCHANGE
2014-09-17 21:10:40 -04:00
Nicolas Goaziou 3432681fbe Parsing and exporting special blocks preserve case
* lisp/org-element.el (org-element-special-block-parser):
* lisp/ox-latex.el (org-latex-special-block):
* lisp/ox-html.el (org-html-special-block):
* lisp/ox-man.el (org-man-special-block):
* lisp/ox-odt.el (org-odt-special-block):
* lisp/ox-texinfo.el (org-texinfo-special-block):
* contrib/lisp/ox-groff.el (org-groff-special-block): Preserve case.

* testing/lisp/test-org-element.el (test-org-element/special-block-parser):
  Add test.
2014-09-17 20:52:54 +02:00
Nicolas Goaziou b2fca73e30 Tiny refactoring
* lisp/org.el (org-hide-block-toggle-maybe): Tiny refactoring.
2014-09-16 09:30:29 +02:00
Nicolas Goaziou c8a7e474ec Fix `org-hide-block-toggle' return value
* lisp/org.el (org-hide-block-toggle-maybe): Do not return a non-nil
  value when toggling failed.
(org-hide-block-toggle): Update docstring.

* testing/lisp/test-org.el (test-org/hide-block-toggle-maybe): New
  test.
2014-09-16 09:29:28 +02:00
Nicolas Goaziou 2afd5fbb09 Fix `org-hide-block-toggle-maybe'
* lisp/org.el (org-hide-block-toggle-maybe): Never throw an error.
  Improve docstring.
(org-hide-block-toggle): Improve docstring.
2014-09-15 20:21:20 +02:00
Nicolas Goaziou 9ba9f916e8 Fix `org-up-heading-safe'
* lisp/org.el (org-up-heading-safe): Do not throw any error, as
  advertised in the docstring.
2014-09-15 18:49:19 +02:00
Nicolas Goaziou a927894d12 ob-gnuplot: Fix error when table contains dates
* lisp/ob-gnuplot.el (org-babel-gnuplot-table-to-data): Dynamically
  bind `org-babel-gnuplot-timestamp-fmt' instead of making it
  buffer-local, since export takes place in another buffer anyway.

Thanks to Thomas Holst for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90709
2014-09-15 13:47:20 +02:00
Nicolas Goaziou 3aa27acfcb Fix "Not at a block" error on dynamic blocks
* lisp/org.el (org-hide-block-toggle, org-indent-block): Recognize
  dynamic blocks.

Thanks to Eric S Fraga for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90711
2014-09-15 13:32:50 +02:00
Bastien Guerry e17ee8e577 Merge branch 'master' of orgmode.org:org-mode 2014-09-14 11:02:51 +02:00
Michael Brand 739136e17f Table formula: Fix for Lisp return value nil
* lisp/org-table.el (org-table-eval-formula): Substitute `listp' with
`consp'.

* testing/lisp/test-org-table.el (test-org-table/lisp-return-value):
Fix test.
2014-09-14 10:44:28 +02:00
Michael Brand 551891e2ad Table formula: Add ERT for Lisp return values
* testing/lisp/test-org-table.el (test-org-table/lisp-return-value):
Add test with TODO.
2014-09-14 10:43:37 +02:00
Nicolas Goaziou 3f88821f01 org-element: Fix outdated comment 2014-09-13 22:34:15 +02:00
Nicolas Goaziou 97ae50fab3 org-element: Fix planning parsing
* lisp/org-element.el (org-element-planning-parser): Remove useless
  check.
(org-element--next-mode): Change signature.
(org-element--parse-elements, org-element--parse-to): Apply signature
change.

* testing/lisp/test-org-element.el (test-org-element/planning-parser):
  Add test.
2014-09-13 22:31:06 +02:00
Bastien Guerry e6074ec4d7 Merge branch 'master' of orgmode.org:org-mode 2014-09-13 15:52:17 +02:00
Nicolas Goaziou 9209aa3c9d org-table: Use "ox.el" internally for radio tables
* lisp/org-table.el (org-table-clean-before-export, orgtbl-get-fmt,
  orgtbl-apply-fmt, orgtbl-eval-str, orgtbl-format-line,
  orgtbl-format-section): Remove functions.
(org-table-clean-did-remove-column, *orgtbl-table*, *orgtbl-rtn*,
  *orgtbl-hline*, *orgtbl-sep*, *orgtbl-default-fmt*, *orgtbl-fmt*,
  *orgtbl-efmt*, *orgtbl-lfmt*, *orgtbl-llfmt*, *orgtbl-lstart*,
  *orgtbl-llstart*, *orgtbl-lend*, *orgtbl-llend*): Remove variables.

(org-table-export, orgtbl-send-table): Apply function removal.  Do not
set `org-table-last-alignment' and `org-table-last-column-widths'
anymore.
(org-table-to-lisp, orgtbl-send-replace-tbl): Small refactoring.

(org-table--to-generic-table, org-table--to-generic-row,
org-table--to-generic-cell): New functions.
(orgtbl-to-generic): Rewrite function.  Handle :skip and :skipcols
parameters.
(orgtbl-to-latex, orgtbl-to-html, orgtbl-to-texinfo, orgtbl-to-orgtbl,
orgtbl-to-unicode): Use new `orgtbl-to-generic' features.

* testing/lisp/test-org-table.el (test-org-table/to-generic,
  test-org-table/to-latex, test-org-table/to-texinfo,
  test-org-table/to-html, test-org-table/to-unicode,
  test-org-table/send-region): New tests.

* doc/org.texi (Radio tables, A @LaTeX{} example, Translator
  functions): Update documentation.

* etc/ORG-NEWS (argument): Document new features.
2014-09-13 15:10:26 +02:00
Nicolas Goaziou 66b1263d9a ox-latex: Tweak table row export
* lisp/ox-latex.el (org-latex-table-row): Rewrite code to distinguish
  between regular rows and separators.
2014-09-13 00:13:46 +02:00
Bastien Guerry 2bd8370d06 Merge branch 'master' of orgmode.org:org-mode 2014-09-12 21:40:17 +02:00
Nicolas Goaziou 70a0c5bfa1 Fix "Not at a block" error on export blocks
* lisp/org.el (org-hide-block-toggle): Fix "Not at a block" error on
  export blocks.
2014-09-12 20:58:47 +02:00
Bastien Guerry fdd9d878e0 Merge branch 'master' of orgmode.org:org-mode 2014-09-12 19:02:50 +02:00