Commit Graph

18568 Commits

Author SHA1 Message Date
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
Nicolas Goaziou 8416402269 Silence byte-compiler 2016-06-17 00:24:12 +02:00
Nicolas Goaziou db671e1449 ob-ref: Fix reference expansion
* lisp/ob-ref.el (org-babel-ref-resolve): Properly expand a reference to
  a Babel call.
2016-06-16 23:44:53 +02:00
Nicolas Goaziou c3b42e917f ob: Remove `org-babel-lob-execute'
* lisp/ob-lob.el (org-babel-lob-execute): Remove function
(org-babel-lob-execute-maybe):
* lisp/ob-ref.el (org-babel-ref-resolve):
* testing/lisp/test-ob-header-arg-defaults.el (test-ob-header-arg-defaults/global/call):
(test-ob-header-arg-defaults/tree/overwrite/call):
(test-ob-header-arg-defaults/tree/accumulate/call):
(test-ob-header-arg-defaults/tree/complex/call):
* testing/lisp/test-ob-lob.el (test-ob-lob/named-caching-call-line):
(test-ob-lob/caching-call-line):
(test-ob-lob/call-with-header-arguments): Apply removal.
2016-06-16 23:37:40 +02:00
Nicolas Goaziou dbb375fdfc Simplify Babel calls evaluation
* lisp/ob-lob.el (org-babel-default-lob-header-args): Merge value with
  `org-babel-default-header-args' since this variable is meant to
  replace the latter.
(org-babel-lob-ingest): Make sure `org-babel-default-lob-header-args' is
used instead of `org-babel-default-header-args'.
(org-babel-lob--src-info): New function.
(org-babel-lob-get-info): Use new function.  Make return value
a replacement for `org-babel-get-src-block-info'.
(org-babel-lob-execute): Use `org-babel-execute-src-block' instead of
duplicating functionalities.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Apply changes to
  `org-babel-lob-get-info' return value.

* testing/examples/ob-header-arg-defaults.org:
* testing/lisp/test-ob-header-arg-defaults.el (test-ob-header-arg-defaults/tree/accumulate/call):
(test-ob-header-arg-defaults/tree/complex/call):
(test-ob-header-arg-defaults/tree/overwrite/call):
* testing/lisp/test-ob-lob.el (test-ob-lob/caching-call-line):
(test-ob-lob/named-caching-call-line): Update tests.

The purpose of this commit is to make Babel calls more
predictable (e.g., wrt property inheritance) and to remove code
duplication.  Also, Babel calls results are no longer treated as Emacs
Lisp values.
2016-06-16 23:15:01 +02:00
Nicolas Goaziou a04752d38c org-element: Small fix
* lisp/org-element.el (org-element-inline-babel-call-parser): Empty
  arguments return nil instead of the empty string, so as to be on par
  with `org-element-babel-call-parser'.
2016-06-16 22:34:12 +02:00
Nicolas Goaziou e3e52a45bb ob-lob: Use lexical binding 2016-06-16 22:34:12 +02:00
Nicolas Goaziou ddd661a783 ob-lob: Use cl-lib 2016-06-16 22:34:12 +02:00
Nicolas Goaziou 758629d6a0 ob-ref: Remove unnecessary function declarations 2016-06-16 22:34:12 +02:00
Nicolas Goaziou 9d448128b7 ox: Fix typo
* lisp/ox.el (org-export-get-reference): Fix typo.
2016-06-16 22:33:21 +02:00
Nicolas Goaziou ed8dea83a9 orgguide: Mirror changes to Org manual
* doc/orgguide.texi (Installation):
(Clean view): Remove references to old Emacsen or XEmacs.
2016-06-15 13:17:32 +02:00
Nicolas Goaziou a101aad97c org.texi: Fix left-overs from src block syntax change
* doc/org.texi (Evaluating code blocks):
(results):
* doc/orgguide.texi (HTML export):
(@LaTeX{} and PDF export): Use "#+begin_export" foo instead of
"#+begin_foo".
2016-06-15 13:15:08 +02:00
Nicolas Goaziou 1ee633ecf1 org.texi: Fix previous commit
* doc/org.texi (Plain lists): Remove reference to filladapt, which is
  not needed to fill plain lists.
2016-06-15 11:44:15 +02:00
Nicolas Goaziou 1e6a0d2268 org.texi: Remove spurious white spaces
* doc/org.texi (Clean view): Remove spurious white spaces.
2016-06-15 11:40:04 +02:00
Nicolas Goaziou c258605f7d org.texi: Remove unnecessary external package references
* doc/org.texi (Cooperation): Remove references to packages Org no
  longer cooperate with.
2016-06-15 11:34:26 +02:00
Nicolas Goaziou 27857f952f org.texi: Remove references to older Emacsen
* doc/org.texi (Activation):
(Handling links):
(Literal examples in ODT export):
(In-buffer settings):
(Clean view):
(Cooperation):
(Conflicts): Assume Emacs is at least 24.3, so remove any reference to
Emacsen earlier than this release.
2016-06-15 11:30:46 +02:00
Nicolas Goaziou 1da065ba21 org.texi: Remove XEmacs references
* doc/org.texi (Installation):
(Activation):
(Feedback):
(Sparse trees):
(Plain lists):
(Column width and alignment):
(dir): Remove XEmacs references.
2016-06-15 11:13:09 +02:00
Marco Wahl 2c4e13c56a org-timer: User can always set timer by prefix arg
* lisp/org-timer.el (org-timer-set-timer): The user can always set the
  timer with a numeric prefix argument.

Before, when the effort property has been set, the user lost control to
explicitly set the timer to a different time.
2016-06-14 21:49:44 +02:00
Marco Wahl 613b27795b Follow compiler recommendation
* testing/org-test.el (org-test-load): Switch to the seasonable
  `cl-flet'.
2016-06-14 21:26:11 +02:00
Marco Wahl 1aef73caa4 Fix a compiler warning
* lisp/org-clock.el (org-clock-timestamps-change): Switch to the
  seasonable interface for subtracting times.
2016-06-14 20:49:20 +02:00
Charles Berry dd944fb590 org-babel-goto-named-src-block bugfix
* lisp/ob-core.el (org-babel-goto-named-src-block): The user prompt
  (i.e. `initial-input' arg of `completing-read') will be the name of
  the results block, noweb reference, call reference, or symbol if
  point is in such.

* testing/lisp/test-ob.el (test-ob/goto-named-src-block): Simulate
  interactive use of `org-babel-goto-named-src-block'.
2016-06-14 09:40:35 -07:00
Nicolas Goaziou 0cf76b7a3f Merge branch 'maint' 2016-06-14 14:25:02 +02:00
meditans 504ffefcd5 org-mime: Fix LaTeX image bug in org-mime-org-buffer-htmlize
* contrib/lisp/org-mime.el (org-mime-replace-images): Change signature.
Always use temporary directory to create LaTeX images.
(org-mime-htmlize):
(org-mime-compose): Apply signature change above.

When exporting an org buffer with a LaTeX snippet including the Org
option "tex: dvipng" the images were always created in "/tmp/ltxpng/",
but the reported link in the htmlized buffer was the local "./ltxpng"
folder; so, unless the org file to htmlize was actually in "/tmp", the
user got an error saying that the image could not be found.

This was caused by the two different ways in which the function
`org-mime-replace-images' is used inside of
`org-mime-org-buffer-htmlize' and `org-mime-htmlize.'

To correct the problem, the function org-mime-replace-images doesn't
take anymore the current-file parameter (that was only used to get its
directory) and instead always creates a temporary directory using
temporary-file-directory.
2016-06-14 14:22:14 +02:00
Nicolas Goaziou 60c11dcb0c Merge branch 'maint' 2016-06-14 13:57:23 +02:00
Arun Isaac f364d55e2e ox-rss: Put email address in <author> element
* contrib/lisp/ox-rss.el (org-rss-headline): Put author's email
  address in <author> element.

The RSS specification requires the email address and the name of the
author to be provided in the <author> element in the format
"email@domain.com (Name)". Currently, only the author's name is
provided. This is invalid RSS.
2016-06-14 13:56:55 +02:00
Nicolas Goaziou 65e4370d46 Merge branch 'maint' 2016-06-11 13:40:52 +02:00
Nicolas Goaziou c792d694b7 Fix typo in test
* testing/lisp/test-org.el (test-org/deadline-close): Fix typo.
2016-06-11 13:36:45 +02:00
Nicolas Goaziou 819cdb3a09 Preserve list visibility when inserting a new item
* lisp/org.el (org-insert-heading): Do not reveal gratuitously too much
  context before inserting an item.
* testing/lisp/test-org.el (test-org/insert-heading): Add test.

Reported-by: Steinar Bang <sb@dod.no>
<http://permalink.gmane.org/gmane.emacs.orgmode/107665>
2016-06-11 13:33:50 +02:00
Nicolas Goaziou 0603f42cb7 org-element: Fix inline src blocks parameter syntax
* lisp/org-element.el (org-element--parse-paired-brackets): New function.
(org-element-inline-babel-call-parser):
(org-element-inline-src-block-parser): Use new function.

* testing/lisp/test-org-element.el (test-org-element/inline-src-block-parser):
Add test.

Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107629>
2016-06-10 23:42:50 +02:00
Nicolas Goaziou b9c64b1ecb Merge branch 'maint' 2016-06-10 18:24:55 +02:00
Nicolas Goaziou c07175bfaa Remove reference to removed function in menu
* lisp/org.el (org-org-menu): Remove reference to
  `org-beamer-insert-options-template'.

Reported-by: Giacomo M <jackjackk@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107658>
2016-06-10 18:22:16 +02:00
Rasmus 16d42a8001 Cleanup white-space in af463605f1 2016-06-10 10:14:31 +02:00
Rasmus af463605f1 Document org-block face changes
* doc/org.texi (Editing source code): Document org-block and
  org-block-LANG faces.
* lisp/org-faces.el (org-block): Mention org-block-LANG faces.
* lisp/org.el (org-src-fontify-natively): Add reference to org-block.
* etc/ORG-NEWS: Update entry.
2016-06-10 10:11:03 +02:00
Rasmus b0def38b4b org-src: Allow per language block face
* lisp/org-src.el (org-src-font-lock-fontify-block):
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Allow per-block
  face.

Suggested-by: Karl Voit <devnull <at> Karl-Voit.at>
<http://thread.gmane.org/gmane.emacs.orgmode/103833/focus=107645
2016-06-10 09:20:30 +02:00
Rasmus 81af689d0f org-src: Src-blocks also inherit org-block face
* lisp/org-src.el (org-src-font-lock-fontify-block): Inherit org-block
  face in addition to language specific faces.
* etc/ORG-NEWS: Add entry.
2016-06-09 16:18:17 +02:00
Marco Wahl 7f773f15d4 Merge remote-tracking branch 'origin/master' 2016-06-09 10:08:20 +02:00
Marco Wahl 7e57cf5d40 org: Fix tags extraction
* lisp/org.el (org-get-tags-at): Use non-greedy match up to colon to
  match all tags (and not just the last.)
* testing/lisp/test-org.el (test-org/tags-at): One test to cover the
  issue.
2016-06-09 10:06:14 +02:00
Marco Wahl 7989ebfb6e org: Fix tags extraction
* lisp/org.el (org-get-tags-at): Use non-greedy match up to colon to
  match all tags (and not just the last.)
2016-06-09 09:39:38 +02:00
Nicolas Goaziou f94df5456f ox-texinfo: Add support for strike-through and underline markup
* lisp/ox-texinfo.el (texinfo): Add transcoders.
(org-texinfo-text-markup-alist): Allow `strike-though' and `underline'
as keys.  Remove unused `comment'.
(org-texinfo-strike-through):
(org-texinfo-underline): New functions.

By default, new markup produce no Texinfo code, but can be customized by
users for specific uses.
2016-06-04 22:40:21 +02:00
Nicolas Goaziou 6daad64277 org-compat: Silence byte-compiler 2016-06-04 22:09:15 +02:00
Nicolas Goaziou 480d3523bc org-element: Fix failing test
* testing/lisp/test-org-element.el (test-org-element/link-parser): Fix
  failing test.  The bug was introduced in 827413e.
2016-06-04 21:48:02 +02:00
Nicolas Goaziou 2c70283641 org-colview: Fix docstrings
* lisp/org-colview.el (org-columns--summary-min-age):
(org-columns--summary-max-age):
(org-columns--summary-mean-age): Fix argument name in docstrings.
2016-06-04 21:29:27 +02:00
Nicolas Goaziou daa11e13de Fix a test 2016-06-04 21:27:55 +02:00
Nicolas Goaziou 827413ef2f Silence byte-compiler in "testing/" 2016-06-04 21:12:30 +02:00
Nicolas Goaziou 2e04db63ea Merge branch 'maint' 2016-06-04 20:53:54 +02:00
Don March bd49486db9 Make today's deadlines "close" without lead time
* lisp/org.el (org-deadline-close): A timestamp is close if the days
  between now and the timestamp are less then or equal to the days of
  lead time.

* testing/lisp/test-org.el: Add tests for org-deadline-close.
2016-06-04 20:45:41 +02:00
Don March 42620c1efa Rename org-deadline-is-close to have -p suffix
* lisp/org-agenda.el
  (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
* lisp/org.el (org-deadline-close): Rename to...
  (org-deadline-close-p): ...this.

* testing/lisp/test-org.el (test-org/deadline-close): Rename to...
  (test-org/deadline-close-p): ...this.
2016-06-04 20:39:15 +02:00
Don March 43b5ca1626 Make today's deadlines "close" without lead time
* lisp/org.el (org-deadline-close): A timestamp is close if the days
  between now and the timestamp are less then or equal to the days of
  lead time.

* testing/lisp/test-org.el: Add tests for org-deadline-close.
2016-06-04 20:39:15 +02:00
Nicolas Goaziou 3fd361eb77 Merge branch 'maint' 2016-06-02 13:33:34 +02:00
Yasushi SHOJI 5111c3a5fa Add tests for tag width calculation
* testing/lisp/test-org.el (test-org/tag-align): New test.
2016-06-02 13:31:54 +02:00