Commit Graph

12888 Commits

Author SHA1 Message Date
Nicolas Goaziou 9d7d650cd7 ob-core: Fix hash with time stamp
* lisp/ob-core.el (org-babel-result-regexp): Fix regexp.
(org-babel--insert-results-keyword): Simplify format-string.
(org-babel--clear-results-maybe): Fix return value.

* testing/lisp/test-ob.el (test-ob/where-is-src-block-result): Add
  tests.

Reported-by: Thomas Alexander Gerds <tag@biostat.ku.dk>
<http://permalink.gmane.org/gmane.emacs.orgmode/109418>
2016-10-01 10:30:53 +02:00
Nicolas Goaziou b3c556d83a Fix tags alignment when headline contains invisible text
* lisp/org.el (org-align-tags-here): Do not use `org-move-to-column',
  which may move point on the other side of some invisible text.
  Refactor code.

* testing/lisp/test-org.el (test-org/tag-align): Add test.

Reported-by: Michael Fiano <michael.fiano@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109435>
2016-09-30 00:58:21 +02:00
Nicolas Goaziou 12196b8472 Fix documentation
* doc/org.texi (Conventions): Remove unhelpful and wrong footnote.
(Initial visibility): Remove spurious paragraph.
(Global and local cycling):
(Motion): Fix function name.
(Plain lists): Reverse prefix argument action.
(Column width and alignment):
(Column groups):
(Tag inheritance):
(Tag hierarchy):
(The date/time prompt): Fix typo
(Link abbreviations):
(Tag searches):
(Timers): Fix wording.
(Checkboxes): Improve accuracy of footnote.  Correctly describe the
behaviour of `org-toggle-checkbox' on a headline.
(Filtering/limiting agenda items): More accurate description for `+' and
`-'.  Also remove unused `\' key.
(Agenda commands): Fix behaviour description.

* lisp/org-agenda.el (org-agenda-filter-by-tag): Fix docstring
  appearance.
(org-agenda-show-and-scroll-up): Fix wording.

* lisp/org-id.el (org-id-link-to-org-use-id): Fix function name.
(org-id-update-id-locations): Remove reference to unused argument.

* lisp/org.el (org-insert-heading): Improve docstring.
(org-insert-todo-heading): Describe behavior on a plain list item.
(org-update-statistics-cookies): Describe behavior when called with
a prefix argument.
(org-metaright): Fix typo.
(org-kill-note-or-show-branches): Fix function name.
(org-yank): Fix wording.

Reported-by: Jorge <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109428>
2016-09-29 22:22:56 +02:00
Nicolas Goaziou 2b22d503e1 org-table: Fix inserting a new row
* lisp/org-table.el (org-table-insert-row): Fix inserting a new row when
  the buffer doesn't end with a newline character.  Tiny refactoring.

* testing/lisp/test-org-table.el (test-org-table/next-field): New test.
2016-09-28 23:33:32 +02:00
Marco Wahl ece6e39dfc ob-tangle: Fix jump from tangle to org
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Fix the jump from a
  tangled part to the respective org in the case when an org-id defines
  the linking.

  The recent (buggy) behavior was to find the file which has the org-id as
  filename.
2016-09-28 14:07:56 +02:00
Nicolas Goaziou 9a7297a281 Silence byte-compiler 2016-09-26 23:13:52 +02:00
Nicolas Goaziou a1199f040f Move obsolete function to "org-compat"
* lisp/org.el (org-in-fixed-width-region-p): Move to...
* lisp/org-compat.el (org-in-fixed-width-region-p): ... here.
2016-09-26 23:03:49 +02:00
Aaron Ecay 79dab621f9 ox-latex: tiny refactoring.
* lisp/ox-latex.el (org-latex--insert-compiler): Refactor.
2016-09-26 16:56:19 +01:00
Aaron Ecay 9bbd9e5ae2 org.el: Omit redundant optional argument
* lisp/org.el (org-ctrl-c-ctrl-c): Omit redundant optional argument to
`local-variable-p'.
2016-09-26 16:56:19 +01:00
Aaron Ecay 7772ba6e69 org.el: assume `display-warning' is defined
* lisp/org.el (org-display-warning): Assume `display-warning' is
defined.

It is present in emacs since at least 2002
2016-09-26 16:56:19 +01:00
Aaron Ecay 092acf7e67 org.el: obsolete org-in-fixed-width-region-p
* lisp/org.el (org-in-fixed-width-region-p): Make obsolete.

It has no calls in core or contrib, and its function would be better
served by using the parser.
2016-09-26 16:56:19 +01:00
Aaron Ecay 7b930dd201 org.el: Assume `command-remapping' is defined.
* lisp/org.el (org-remap): Assume `command-remapping' is defined.

It was added to emacs in 2003.
2016-09-26 16:56:19 +01:00
Aaron Ecay d00d44d6ff Tiny refactoring
* lisp/org.el: (org-dvipng-color, org-latex-color): Use *-color-format
functions.
(org-dvipng-color-format, org-latex-color-format): Use sharp-quotes.
2016-09-26 16:56:19 +01:00
Nicolas Goaziou 2e4b66f5f5 Fix some `cl-case' uses
* lisp/org-capture.el (org-capture-finalize):
* lisp/org-timer.el (org-timer-set-mode-line): Symbols need not be
  quoted in `cl-case'.
2016-09-25 21:08:36 +02:00
Aaron Ecay aafb3b5fdd Fix docstring typo.
* lisp/org.el (org-shorten-string): Fix docstring typo.
2016-09-25 16:39:30 +01:00
Aaron Ecay 140aacbf2f Use ‘eq’ instead of ‘equal’ for symbols
* lisp/ob-C.el (org-babel-C-val-to-C-type):
* lisp/ob-core.el (org-babel-get-colnames):
(org-babel-disassemble-tables):
* lisp/ob-lua.el (org-babel-lua-var-to-lua):
(org-babel-lua-table-or-string):
* lisp/ob-python.el (org-babel-python-var-to-python):
(org-babel-python-table-or-string):
* lisp/ob-ruby.el (org-babel-ruby-var-to-ruby):
(org-babel-ruby-table-or-string):
* lisp/ob-shell.el (org-babel-sh-var-to-string):
* lisp/ob-sqlite.el (org-babel-sqlite-table-or-scalar):
* lisp/org-agenda.el (org-agenda-prepare-window):
(org-compile-prefix-format):
* lisp/org-bibtex.el (org-bibtex-headline):
* lisp/org-capture.el (org-capture):
* lisp/org-colview.el (org-columns-next-allowed-value):
* lisp/org-mhe.el (org-mhe-store-link):
(org-mhe-get-message-real-folder):
(org-mhe-get-message-folder):
(org-mhe-get-message-num):
(org-mhe-get-header):
(org-mhe-follow-link):
* lisp/org-table.el (org-define-lookup-function):
* lisp/org.el (format-spec):
* lisp/ox-odt.el (org-odt--translate-description-lists):
* lisp/ox-publish.el (org-publish-compare-directory-files):
Use `eq' instead of `equal' when comparing to symbols.
* lisp/org-timer.el (org-timer-set-mode-line):
* lisp/org-capture.el (org-capture-finalize):
Use `cl-case' instead of `(cond ((eq x 'foo) ...) ...)'.
2016-09-25 16:29:06 +01:00
Nicolas Goaziou eb3dd6186d Silence byte-compiler
* lisp/org-faces.el (org-src-block-faces): Move it from here...
* lisp/org-src.el (org-src-block-faces): ... to here.
2016-09-24 10:52:49 +02:00
Nicolas Goaziou 5bc8492388 Tiny refactoring
* lisp/org.el (org-edit-special): Tiny refactoring.
2016-09-24 09:07:12 +02:00
Nicolas Goaziou 038c50a721 Fix a docstring
* lisp/org.el (org-copy-special): Fix docstring.  Tiny refactoring.
2016-09-24 09:04:40 +02:00
Nicolas Goaziou 3880789ea5 Fix a docstring
* lisp/org.el (org-cut-special): Fix docstring.  Tiny refactoring.
2016-09-24 09:03:00 +02:00
Aaron Ecay 48e7f17bc6 Use assq instead of assoc with quoted symbols
* lisp/ob-core.el (org-babel-merge-params):
* lisp/org-agenda.el (org-agenda-prepare-window):
(org-agenda-to-appt):
* lisp/org-capture.el (org-capture-finalize):
* lisp/org.el (org-find-invisible-foreground):
(org-open-file):
(org-todo-trigger-tag-changes):
(org-back-over-empty-lines):
* lisp/ox-odt.el (org-odt-get-table-cell-styles):
Use assq instead of assoc with quoted symbols.
2016-09-23 11:20:55 +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
Konubinix 3dbb74c4f4 Indicate what happens to CLOCK entries in cloned subtrees
* lisp/org.el (org-clone-subtree-with-time-shift): Add into the documentation
  string a precision about the deletion of the CLOCK entries into the cloned
  subtrees.  Indicate the rationale for this decision.
2016-09-22 21:55:09 +02:00
Nicolas Goaziou 6fbec75843 org-faces: Fix a docstring
* lisp/org-faces.el (org-src-block-faces): Fix quote in docstring.
2016-09-22 21:45:58 +02:00
Nicolas Goaziou bfc9c815e2 org-src: Tiny fix
* lisp/org-src.el (org-src-font-lock-fontify-block): Ensure LANG is case
  insensitive.
2016-09-22 21:43:38 +02:00
Rasmus 687214a092 Fix e03e837
* lisp/org-src.el (org-src-font-lock-fontify-block): Fix typos and
  silence byte-compiler.
2016-09-22 09:34:31 +02:00
Rasmus e03e837168 org-src: New syntax for source blocks faces
* doc/org.texi (Editing source code): Document changes.
* lisp/org-faces.el (org-block): Update docstring.
  (org-src-block-faces): New defcustom for source-block faces.
* lisp/org-src.el (org-src-font-lock-fontify-block): Use
  org-src-block-faces.
* etc/ORG-NEWS: Update NEWS entry.
2016-09-22 09:31:43 +02:00
Nicolas Goaziou 19113219ba org-lint: Fix Babel header arg value checker
* lisp/org-lint.el (org-lint-wrong-header-value): Do not merge in
  default values for header arguments, since we are only checking those
  defined in the buffer.
2016-09-19 00:56:34 +02:00
Kyle Meyer 7cb0decdc7 Merge branch 'maint' 2016-09-18 11:30:18 -04:00
Nicolas Goaziou 149b8046ac `org-open-line' ignores tables at the very beginning of the document
* lisp/org.el (org-open-line): Ignore tables at the very beginning of
  the document.
* testing/lisp/test-org.el (test-org/open-line): New test.
2016-09-18 17:22:48 +02:00
Michael Albinus f46b92df92 Backport commit 2c05061 from Emacs
* lisp/ob-core.el (org-babel-local-file-name): Use `file-remote-p'.

Add `make-nearby-temp-file' and `temporary-file-directory'
2c0506173d92dd9d6de409a045668c6b5cf1fcef
Michael Albinus
Sun Aug 7 13:57:23 2016 +0200
2016-09-18 11:10:41 -04: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 e1982a0a92 org.el: Respect user-defined reftex-cite-format
* lisp/org.el (org-reftex-citation): Respect user-defined reftex
  citation formats.

Suggested-by: Sebastian Boehm <sebastian@sometimesfood.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/109175>
2016-09-17 10:28:41 +02:00
Nicolas Goaziou 0ba465b899 ob-J: Add missing keywords in defcustom
* lisp/ob-J.el (org-babel-J-command): Add missing keywords.
2016-09-14 23:27:17 +02:00
Marco Wahl f61bf84836 ob-J: allow also letter 'j' indicate J code
* lisp/ob-J.el (org-babel-execute:j): Make `org-babel-execute:j' an
  alias of `org-babel-execute:J'.  This allows to use the letter
  'j' (and not only 'J') to identify the J-language for a source-block.

  Note: The source-block marked with 'j' gets the highlighting
  according j-mode.
2016-09-14 11:54:01 +02:00
Marco Wahl bb91f138b9 ob-J: New variable to specify the call to J
* lisp/ob-J.el (org-babel-J-command): New custom variable
  `org-babel-J-command' to store the command to call J.
2016-09-14 11:31:56 +02:00
Marco Wahl d68497d887 Merge branch 'maint' 2016-09-12 12:04:34 +02:00
Marco Wahl b113d4e1e6 org-agenda: Skip invisible line at bulk marking
* lisp/org-agenda.el (org-agenda-bulk-mark-regexp): When point is on an
  invisible part move point ahead one line (and don't mark that line.)
2016-09-12 11:44:49 +02:00
Nicolas Goaziou b5403dda35 org-compat: Silence byte-compiler 2016-09-07 18:31:23 +02:00
Nicolas Goaziou d66721f6b0 ox: Use tabulated lists for export stack display
* lisp/ox.el (org-export-stack):
(org-export-stack-mode):
(org-export--stack-generate):
(org-export--stack-num-predicate):
(org-export--stack-source-at-point): Use tabulated lists.
2016-09-07 18:27:54 +02:00
Nicolas Goaziou d1c1b7f8fa Move obsolete functions to "org-compat.el"
* lisp/org.el (org-sublist):
(org-table-recognize-table.el):
(org-minutes-to-hh:mm-string):
(org-remove-angle-brackets):
(org-remove-double-quotes): Move functions...
* lisp/org-compat.el: ... here.
2016-09-07 16:12:10 +02:00
Nicolas Goaziou ddb823e196 org-footnote: Silence byte-compiler
* lisp/org-footnote.el (org-footnote-normalize-label): Silence
  byte-compiler.
2016-09-07 15:56:38 +02:00
Nicolas Goaziou 56d75f0a24 org-table: Small refactoring
* lisp/org-table.el (org-table-justify-field-maybe): Small refactoring.
2016-09-06 00:31:46 +02:00
Nicolas Goaziou 7612fb2b9a Remove compatibility code for subr-x.el defsubsts
* lisp/org-compat.el: Remove compatibility code for subr-x.el defsubsts.
* lisp/org-footnote.el (org-footnote-normalize-label):
* lisp/org-macs.el (org-unbracket-string): Avoid using subr-x.el
  functions.
2016-09-06 00:08:32 +02:00
Nicolas Goaziou 5b5f9a874c Merge branch 'maint' 2016-09-05 18:21:29 +02:00
Nicolas Goaziou ab79736843 org-table: Fix alignment issue with entities
* lisp/org-table.el (org-table-justify-field-maybe): Preserve text
  properties so entities can be properly aligned.
2016-09-05 18:08:31 +02:00
Nicolas Goaziou a4f5d35fcc org-agenda: Tiny fix
* lisp/org-agenda.el (org-agenda-write): Allow writing ".htm" files.
2016-09-03 09:32:46 +02:00
Aaron Ecay 1509906e29 ob-comint: Fix org-babel-comint-in-buffer
* lisp/ob-comint.el (org-babel-comint-in-buffer):
Fix bug.

The function’s docstring says it wraps BODY in ‘save-excursion’, but in
fact it did not.
2016-09-03 02:48:23 +01:00
Aaron Ecay d350baf2db babel: change single-armed ‘if’ statements to ‘when’
* lisp/ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file):
* lisp/ob-core.el (org-babel-initiate-session):
(org-babel-hide-result-toggle):
(org-babel-insert-result):
* lisp/ob-eval.el (org-babel--shell-command-on-region):
* lisp/ob-table.el (org-babel-table-truncate-at-newline):
* lisp/ob-tangle.el (org-babel-tangle):
Change `if' without else to `when'.
2016-09-03 02:45:27 +01:00
Aaron Ecay 6e3ff4acc5 Deprecate org-remove-(angle-brackets,double-quotes)
* lisp/org.el (org-remove-angle-brackets, org-remove-double-quotes):
Deprecate.
* lisp/org-gnus.el (org-gnus-store-link):
* lisp/org-lint.el (org-lint-non-existent-setupfile-parameter):
(org-lint-wrong-include-link-parameter):
* lisp/org-macro.el (org-macro--collect-macros):
* lisp/org-mhe.el (org-mhe-store-link):
* lisp/org-rmail.el (org-rmail-store-link):
* lisp/org.el (org--setup-collect-keywords):
(org-insert-link):
(org-translate-link-from-planner):
(org-offer-links-in-entry):
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
* lisp/ox.el (org-export--get-inbuffer-options):
(org-export--list-bound-variables):
(org-export-expand-include-keyword): Replace with `org-unbracket-string'.
2016-09-03 02:22:11 +01:00
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 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 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 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
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
Nicolas Goaziou 6cb291a87b org-src: Silence byte-compiler 2016-08-19 16:19:36 +02:00
Nicolas Goaziou 190476e3e0 ob-core: Silence byte-compiler 2016-08-18 15:23:00 +02:00
Nicolas Goaziou 3771f35f80 org-src: Fix coderef regexp
* lisp/org-src.el (org-src-coderef-regexp): A coderef label cannot be
  consist of white spaces only.

* testing/lisp/test-org-src.el (test-org-src/coderef-regexp): Add test.
2016-08-18 01:04:28 +02:00
Nicolas Goaziou fea6dd167a Fix `org-store-link' in edit buffers
* lisp/org.el (org-store-link): Properly handle coderef insertion in an
  edit buffer.

This patch also removes check for duplicate coderef labels, so as to be
on par with other link types.
2016-08-17 23:45:38 +02:00
Nicolas Goaziou 48af4166fd Consider edit buffers in `org-src-coderef-regexp'
* lisp/org-src.el (org-src-coderef-format): New function
(org-src-coderef-regexp): Change signature.

* lisp/ob-core.el (org-babel--normalize-body):
* lisp/ox.el (org-export-unravel-code): Use new functions.

* testing/lisp/test-org-src.el (test-org-src/coderef-format): New test.
2016-08-17 23:43:38 +02:00
Nicolas Goaziou 910755208d Small fix to `org-store-link'
* lisp/org.el (org-store-link): Only call `org-with-limited-levels' in
  Org buffers.
2016-08-17 23:40:16 +02:00
Nicolas Goaziou 8e58c635ed org-src: Move function within library
* lisp/org-src.el (org-src-do-at-code-block): Move function definition
  out of Babel related section.
2016-08-17 23:37:55 +02:00