Commit Graph

18862 Commits

Author SHA1 Message Date
Aaron Ecay f7c01f217b Add obsolescence warning
* lisp/org-capture.el (org-capture-import-remember-templates):
Add obsolescence warning.
2016-09-03 02:11:18 +01:00
Aaron Ecay 1c18efb615 String handling improvements.
* lisp/org-agenda.el (org-agenda-export-csv-mapper): Use `replace-regexp-in-string'.
* lisp/org-capture.el (org-capture): Use `string-prefix-p'.
* lisp/org-compat.el (string-blank-p, string-remove-prefix):
* lisp/org-compat.el (string-remove-suffix): Add compatibility defuns
for emacs 24.3.
* lisp/org-datetree.el (org-datetree-cleanup): Use `string-suffix-p'.
* lisp/org-footnote.el (org-footnote-normalize-label): Use
`string-remove-prefix'.
* lisp/org-gnus.el (org-gnus-group-link): Use `string-prefix-p'.
* lisp/org-list.el (org-list-struct):
(org-list-get-list-type, org-list-send-item):
(org-list-use-alpha-bul-p): Use `string-match-p'.
* lisp/org.el (org-paste-subtree): Use `string-suffix-p'.
(org-open-file, org-refile-get-targets): Use `replace-regexp-in-string'.
(org-make-tags-matcher): Use `string-prefix-p'.
(org-set-tags): Use `string-(prefix,suffix)-p'.
* lisp/ox-beamer.el (org-beamer--element-has-overlay-p):
(org-beamer--format-block):
Use `string-(prefix,suffix)-p'.
* lisp/ox-html.el (org-html-fix-class-name): Use `replace-regexp-in-string'.
* lisp/ox-md.el (org-md-verbatim): Use `string-(prefix,suffix)-p'.
(org-md-paragraph): Use `string-prefix-p'.
2016-09-03 02:05:10 +01:00
Aaron Ecay c997bf7ff1 assoc -> assq
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Change `assoc' to `assq'.
2016-09-03 01:57:53 +01:00
Aaron Ecay a3adfb062b Introduce new function for removing paired delimiters from string.
* lisp/org-macs.el (org-unbracket-string): New function.
* lisp/ob-core.el (org-babel-strip-quotes):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ox-beamer.el (org-beamer--normalize-argument): Use it.
2016-09-03 01:55:45 +01:00
Aaron Ecay 79999af264 ob-core: Rename and refactor a function
* lisp/ob-core.el (org-babel--string-to-number): Rename and refactor
from `org-babel-number-p'.
(org-babel-read-element, org-babel-read): Apply renaming.

The old name implies that the function is a predicate, but it’s actually
a type conversion function.
2016-09-03 01:52:27 +01:00
Aaron Ecay ab04bab4d6 Use org-with-wide-buffer where appropriate
* lisp/org-agenda.el (org-agenda-get-some-entry-text):
(org-agenda-refile, org-agenda-open-link):
(org-agenda-change-all-lines, org-agenda-clock-out):
* lisp/org-capture.el (org-capture-refile):
(org-capture-bookmark-last-stored-position):
* lisp/org-clock.el (org-with-clock-position):
(org-clock-in):
* lisp/org-table.el (org-table-recalculate-buffer-tables):
(org-table-iterate-buffer-tables):
* lisp/org.el (org-table-map-tables):
(org-outline-overlay-data, org-refresh-properties):
(org-refresh-stats-properties, org-offer-links-in-entry):
(org-refile, org-refile-check-position):
(org-refile-new-child, org-map-entries):
(org-find-exact-headline-in-buffer):
(org-reftex-citation, org-imenu-get-tree):
Use `org-with-wide-buffer'.
2016-09-03 01:44:58 +01:00
Aaron Ecay 17efe53170 ox-md: pacify byte compiler
* lisp/ox-md.el (org-md--footnote-section):
(org-md-inner-template): Fix byte compiler warnings.
2016-09-03 01:26:45 +01:00
Aaron Ecay ab21e2b72d Use file-name-extension where appropriate
* lisp/ob-R.el (org-babel-R-construct-graphics-device-call):
* lisp/ob-asymptote.el (org-babel-execute:asymptote):
* lisp/ob-latex.el (org-babel-execute:latex):
* lisp/org-agenda.el (org-agenda-write):
* lisp/ox-odt.el (org-odt--copy-formula-file): Use `file-name-extension'
instead of string munging.
2016-09-01 18:46:48 +01:00
Jake Romer d4a073f5be ox-md.el: Export footnotes section as Markdown
* lisp/ox-md.el (org-md--headline-title): New function.
(org-md-headline): Use `org-md-headline-title' to generate section
headers.
(org-md--footnote-formatted): New function.
(org-md--footnote-section): New function.
(org-md-inner-template): Update to use `org-md-footnote-section'.
(org-md-footnotes-section): New customizable variable.
(org-md-footnote-format): New customizable variable.

Update ox-md.el to export the Footnotes section as Markdown, using HTML
only where necessary - namely, in footnote and footnote reference links.
2016-09-01 18:41:52 +02:00
Nicolas Goaziou cd18ac22ff Merge branch 'maint' 2016-09-01 18:33:19 +02:00
Nicolas Goaziou d2cb298e72 ox-html: Remove duplicate option in back-end
* lisp/ox-html.el (html): Remove spurious :html-link-use-abs-url option.

Reported-by: Arun Isaac <arunisaac@systemreboot.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/108952>
2016-09-01 18:32:16 +02:00
Nicolas Goaziou 0d7e86608e Merge branch 'maint' 2016-09-01 18:26:48 +02:00
Aaron Ecay 890ed78c0d babel: replace org-babel-*-read-string functions with single version.
* lisp/ob-core.el (org-babel-strip-quotes): New function.
* lisp/ob-haskell.el (org-babel-haskell-read-string): Remove.
(org-babel-execute:haskell): Use new function.
* lisp/ob-octave.el (org-babel-octave-read-string): Remove.
(org-babel-octave-evaluate-session): Use new function.
* lisp/ob-ruby.el (org-babel-ruby-read-string): Remove.
2016-09-01 16:57:57 +01:00
Aaron Ecay ab5e100806 Fix ISO Latin1 expansion of \Delta
* lisp/org-entities.el (org-entities): Fix entry for Delta.

Reported by Matthew Junker
2016-09-01 16:50:09 +01:00
Nick Dokos 38de6b6ed4 Merge branch 'maint' 2016-08-31 12:07:32 -04:00
Nick Dokos 96b410f896 Fix scheme expression parsing
* org-babel-scheme-execute-with-geiser: Do not use elisp reader to parse scheme expression.

Reported by Lawrence Bottorff:

http://lists.gnu.org/archive/html/emacs-orgmode/2016-08/msg00328.html

and also

https://lists.gnu.org/archive/html/emacs-orgmode/2015-09/msg00390.html
2016-08-31 11:51:38 -04:00
Nicolas Goaziou f685535f72 Merge branch 'maint' 2016-08-30 11:52:23 +02:00
Konstantin Kliakhandler bca5bd1e40 org-entities: Correct unicode symbol of circ
* org-entities.el (org-entities): Change the unicode symbol of circ to
  "ring operator" (#x2218).

TINYCHANGE
2016-08-30 11:50:09 +02:00
Nicolas Goaziou 0b75848228 ORG-NEWS: Notify ob-lua addition 2016-08-29 15:39:56 +02:00
Nicolas Goaziou ee4e3eb8f7 ob-lua: Silence byte-compiler 2016-08-29 15:39:05 +02:00
thibault c72a0d2df9 ox-html: Add pre.src-lua to CSS
* lisp/ox-html.el (org-html-style-default): Add pre.src-lua to CSS.
2016-08-29 09:03:27 +02:00
Nicolas Goaziou a4cb6463d0 org.texi: Add Lua to supported languages
* doc/org.texi (Languages): Add Lua to the list of supported languages.
2016-08-29 08:57:10 +02:00
Nicolas Goaziou cddc7d8d2d ob-lua: Use cl-lib
* lisp/ob-lua.el (org-babel-lua-evaluate-session): Refactor code to
  avoid using unprefixed "cl" macro.
2016-08-29 08:57:10 +02:00
Nicolas Goaziou f795479432 ob-lua: Use lexical binding
* lisp/ob-lua.el (org-babel-lua-initiate-session-by-key):
(org-babel-lua-initiate-session):
(org-babel-lua-evaluate-session): Silence byte-compiler.
2016-08-29 08:57:10 +02:00
thibault 2090efaed7 ob-lua.el: Update library for Org 9.0
* lisp/ob-lua.el (org-babel-lua-evaluate-external-process):
(org-babel-lua-evaluate-session): Update for Org 9.0 compatibility.

* testing/test-ob-lua.el: New file.

TINYCHANGE
2016-08-29 08:57:10 +02:00
Dieter Schoen 66fbece100 ob-lua: New file 2016-08-29 08:57:10 +02:00
Nicolas Goaziou 56c93cc8c7 org-table: Tiny refactoring
* lisp/org-table.el (org-table-recalculate): Tiny refactoring.
2016-08-29 00:54:41 +02:00
Nicolas Goaziou a9aad1c8e1 Merge branch 'maint' 2016-08-29 00:45:07 +02:00
Nicolas Goaziou 2dfdafd35a org-table: Fix column formulas
* lisp/org-table.el (org-table-recalculate): Fix column formulas in
  tables consisting of a single row group.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/108886>
2016-08-29 00:43:38 +02:00
Aaron Ecay d5b720fb1e Fix entity definition of \nbsp
* lisp/org-entities.el (org-entities): Use a proper non-breaking space
for \nbsp.
2016-08-28 19:06:18 +01:00
Nicolas Goaziou cefe157d42 ox-latex: Fix typo
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix typo
  in docstring.
2016-08-28 12:14:39 +02:00
Nicolas Goaziou beb940cf56 org-compat: Silence byte-compiler 2016-08-28 12:12:55 +02:00
Nicolas Goaziou 7a14bd172c Merge branch 'maint' 2016-08-28 12:02:51 +02:00
Nicolas Goaziou b7c144a104 ox-html: Remove spurious newline at the end of inline source code
* lisp/ox-html.el (org-html-inline-src-block): Do not call
  `org-html-format-code', which is meant to be used for source blocks
  only.

Reported-by: Clément Pit--Claudel <clement.pit@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108890>
2016-08-28 12:01:08 +02:00
Nicolas Goaziou 3b3fc520aa Fix coderef handling in source blocks
* lisp/ob-core.el (org-babel--normalize-body): Do not remove coderef.
(org-babel-get-src-block-info): Add coderef label information, when
available, to the return value.
(org-babel-execute-src-block): Expand noweb and remove coderefs
non-destructively.
* lisp/ob-lob.el (org-babel-lob-get-info): Adapt to new INFO.

* testing/lisp/test-ob-exp.el (ob-export/body-with-coderef):
* testing/lisp/test-ob.el (test-ob/evaluate-body-with-coderefs): Add
  tests.

Reported-by: Thibault Marin <thibault.marin@gmx.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108888>
2016-08-28 11:56:14 +02:00
Aaron Ecay 6b52bc6a21 Clean up string handling.
* lisp/org-compat.el (string-prefix-p, string-suffix-p):
Add compatibility definitions for 24.3.

* lisp/ob-R.el (org-babel-edit-prep:R):
* lisp/ob-core.el (org-babel-demarcate-block):
* lisp/ob-js.el (org-babel-js-read):
* lisp/ob-latex.el (org-babel-execute:latex):
* lisp/ob-ref.el (org-babel-ref-parse):
* lisp/ob-shell.el (org-babel-variable-assignments:shell):
* lisp/org-protocol.el (org-protocol-create):
* lisp/org-table.el (org-table-field-info):
* lisp/org.el (org-get-buffer-for-internal-link):
* lisp/ox-publish.el (org-publish-compare-directory-files):
* lisp/ox-texinfo.el (org-texinfo-template):
Use `string-{suffix,prefix}-p' instead of `string-match(-p)'.

* lisp/ob-python.el (org-babel-python-read-string):
Ditto, also use `substring' rather than `match-string'.

* lisp/org-table.el (org-table-copy-down):
(org-table-insert-hline, org-table-current-field-formula):
(org-table-get-formula): Use `string-match-p' instead of
`string-match'.
2016-08-24 16:05:54 +01:00
Nicolas Goaziou 9873e59913 contrib/README: Remove "org-eww.el" from the list
* contrib/README: Remove "org-eww.el", which has been moved to core.
2016-08-23 22:17:49 +02:00
Nicolas Goaziou de24694f05 Turn org-mode into Org or Org mode
Use Org or Org mode instead of org-mode or Org-mode according to
"Documentation standards".
2016-08-23 22:13:56 +02:00
Nicolas Goaziou 250567b133 Fix typo in a docstring
* lisp/org.el (org-link-abbrev-alist): Fix typo.
2016-08-23 10:47:18 +02:00
Nicolas Goaziou 112463cbff Handle tooltips on abbreviated links
* lisp/org.el (org-activate-bracket-links): Expand abbreviations before
  adding :help-echo property.

Reported-by: mc <mc@aiguphonie.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108785>
2016-08-23 09:34:29 +02:00
Nicolas Goaziou 596f585a7d ox-html: Tiny fix
* lisp/ox-html.el (org-html-paragraph): Move space after the figure
  number within the "figure-number" class so it can be hidden if needed.
  Small refactoring.
2016-08-22 22:13:24 +02:00
Nicolas Goaziou 579569cc84 ox-html: Number source blocks with listings
* lisp/ox-html.el (org-html-src-block): Number source block if it has
  a caption.  Numbering is done among source blocks with a caption,
  only.

Suggested-by: Clément Pit--Claudel <clement.pit@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108808>
2016-08-22 22:07:34 +02:00
Nicolas Goaziou 908b3b05cd ox-latex: Fix repeated footnotes in tables
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix
  referencing multiple occurrences of the same footnote in a table.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108789>
2016-08-22 12:07:34 +02:00
Marco Wahl 29942e6aa8 test-ob-maxima: Revert last commit
* testing/lisp/test-ob-maxima.el:
(ob-maxima/matrix-output): Remove filtering of informational output.

Credit to Leo Butler.  From his post:

    Since those informational messages are written to stdout, do

    with_stdout("/dev/null", load(numericalio))$
    write_data ....

    to muffle the messages. Note that sbcl warnings are muffled by

    :lisp (setf sb-ext::*muffled-warnings* 'warning)
2016-08-20 23:43:35 +02:00
Marco Wahl 7afd7ebff5 ob-maxima-test: Clarify matrix test
* testing/examples/ob-maxima-test.org: Suppress informational output at
  load of numericalio.  (This output made testing complicated.)
2016-08-20 23:36:41 +02:00
Marco Wahl b7b93a0c2c test-ob-maxima: Fix maxima matrix test
* testing/lisp/test-ob-maxima.el (ob-maxima/matrix-output): Remove lines
  starting with ";;" from the result of `org-babel-execute-src-block'.

This fix works around the occurance of lines like

;; loading #P"/home/b/.../numericalio/encode-decode-float.fasl"

in the output of maxima.

Maxima version: "5.38.1"
Lisp implementation type: "SBCL"
Lisp implementation version: "1.3.6"
2016-08-20 21:48:16 +02:00
Marco Wahl b394cfd9ed ob-maxima-test: Tiny cleanup
* testing/examples/ob-maxima-test.org: Removed superfluous source block
  variable.
2016-08-20 19:33:16 +02:00
Nicolas Goaziou 71a3331aaf Move org-eww to core
* lisp/org-eww.el: Move file from contrib/lisp/ to lisp/.
* lisp/org.el (org-modules): Apply change.
* lisp/org-capture.el (org-capture-templates):
* doc/org.texi: Document changes.
2016-08-20 02:59:56 +02:00
Nicolas Goaziou c0924db32c Merge branch 'maint' 2016-08-20 00:27:33 +02:00
Nicolas Goaziou 589e96321b org-clock: Fix infloop when creating a clock table
* lisp/org-clock.el (org-clock-sum): Fix infloop when first headline in
  scope has a level strictly greater than 1.

Reported-by: Yichao Woo <wooyichao@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/108606>
2016-08-20 00:22:13 +02:00