Commit graph

9497 commits

Author SHA1 Message Date
Nicolas Goaziou fc95ee2768 org-element: Change to timestamp interpreter
* lisp/org-element.el (org-element-timestamp-interpreter):
  Ignore :raw-value and build timestamp from numeric properties
  instead.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-ox.el: Update tests.

This change allow to modify and update a timestamp easily without
requiring to reset :raw-value first, which was not intuitive.
2013-11-16 10:18:19 +01:00
Nicolas Goaziou 926bc85861 org-element: Rename a function
* lisp/org-element.el (org-element--cache-shift-positions): Renamed
  from `org-element--shift-positions'.
(org-element--cache-sync): Apply renaming.
2013-11-16 09:53:10 +01:00
Nicolas Goaziou 9676c59547 ox-org: Add "body-only" export
* lisp/ox-org.el (org-org-export-to-org): Add body-only export.
2013-11-16 09:19:22 +01:00
Nicolas Goaziou 4466af5c11 org-element: Fix commit 73d60606bd
* lisp/org-element.el (org-element--cache-sync): Fix commit
  73d60606bd.
2013-11-16 00:33:30 +01:00
Nicolas Goaziou 38a2bd3783 ox-org: Improve keyword handling
* lisp/ox-org.el (org-org-template): New function.
(org-org-keyword): Handle document keywords specially.
2013-11-16 00:20:13 +01:00
Nicolas Goaziou 73d60606bd org-element: Fix cache bug
* lisp/org-element.el (org-element--cache-sync): Properly remove from
  cache last element in a plain list when blank lines at the end of
  that list are modified.
2013-11-15 23:46:45 +01:00
Nicolas Goaziou 91c1718519 org-element: Fix cache corruption when moving list
* lisp/org-element.el (org-element--shift-positions): Fix cache
  corruption when moving list.
2013-11-15 23:10:41 +01:00
Achim Gratz 54a64f50b5 ob-C, ob-clojure, ob-tangle, org-agenda, org, ox: fix byte-compiler warnings
* lisp/ob-C.el, lisp/ob-clojure.e: Require 'cl at compile-time.
* lisp/ob-tangle.el: Do not require 'cl at compile time.
* lisp/org-agenda.el: Declare function `org-columns-remove-overlays´.
* lisp/org.el: Declare functions `org-clocktable-shift´,
  `org-clock-update-time-maybe´, `org-clock-remove-overlays´,
  `org-babel-tangle-file´, `org-table-blank-field´,
  `org-table-insert-row´, `org-add-archive-files´, `org-table-begin´,
  `org-table-end´.  Move defsubst `org-uniquify´ before its many uses.
* lisp/ox.el: Move defsubst `org-export-get-parent´ before its many
  uses.
2013-11-15 20:18:58 +01:00
Bastien Guerry 668ba5de0e Merge branch 'maint' 2013-11-15 06:56:10 +01:00
Achim Gratz 97e99614d8 org.el: Fix a variable name error
* lisp/org.el (org-version): Fix an error imported with merge in
  f95641c443, replace `_version´ by `version1´.
2013-11-15 06:55:59 +01:00
Bastien Guerry bf012136bd Remove org-autoload.
* org-macs.el (org-autoload): Delete.

* org-docview.el ("docview"): Fix declarations and require
doc-view directly.

* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling, org-id-new):
* org-colview.el:
(org-colview-initial-truncate-line-value)
(org-columns-open-link, org-string-to-number):
* org-clock.el:
(org-clock-put-overlay, org-count-quarter, org-clock-loaded):
* org-archive.el (org-get-local-archive-location):
* org-agenda.el (org-agenda-todo-custom-ignore-p):
Autoload.

Those functions were autoloaded from within calls to `org-autoload'
in org.el, we now autoload them from where they live.
2013-11-15 06:55:28 +01:00
Bastien Guerry f327d42734 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-11-15 06:24:07 +01:00
Bastien Guerry 22a061f575 Partially revert commit adcebf
* ox.el (org-export-async-init-file):
* ox-odt.el (org-odt-with-latex):
* ox-html.el (org-html-with-latex):
* org.el (org-return-follows-link):
* ob-python.el (org-babel-python-command): Don't use :set.

Thanks to Glenn Morris for pointing at this.
2013-11-15 06:22:36 +01:00
Bastien Guerry 19dd1e1cc3 Fix commit 1eb03c8c87
Thanks to Michael Brand for reporting this.
2013-11-14 23:39:54 +01:00
David Arroyo Menendez 695391fc24 org-effectiveness and org-license must be in contrib/lisp 2013-11-14 22:25:15 +01:00
David Arroyo Menendez 9bd85c04e6 creation 2013-11-14 22:19:42 +01:00
Achim Gratz 0e313e0405 ob-list, ob-ref: fix byte-compiler warnings
* lisp/org-list.el: Declare dynamic variable `org-drawer-regexp´.
* lisp/ob-ref.el: Declare functions `org-babel-lob-execute´ and
  `org-babel-lob-get-info´ and dynamic variable
  `org-babel-lob-one-liner-regexp´.
2013-11-14 21:22:14 +01:00
Achim Gratz 920e726758 org.el: Fix a variable name error
* lisp/org.el (org-version): Fix an error imported with merge in
  f95641c443, replace `_version´ by `version1´.
2013-11-14 21:21:58 +01:00
Achim Gratz 81815b7fb7 ob-R: declare org-every
* lisp/ob-R.el: Declare `org-every´ before first use.
2013-11-14 21:21:50 +01:00
Daniil Frumin 6c585439cd Smart quote support for Russian language
* ox.el (org-export-smart-quotes-alist): Added ("ru").

TINYCHANGE
2013-11-14 16:32:07 +01:00
Bastien Guerry 1b2736e91f Merge branch 'maint' 2013-11-14 14:14:04 +01:00
Bastien Guerry e49d3b3d69 ox-odt.el (org-odt-content-template-file): Fix version
* ox-odt.el (org-odt-content-template-file): Fix version.
2013-11-14 14:13:46 +01:00
Bastien Guerry 786ebde303 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-11-14 14:09:25 +01:00
Bastien Guerry adcebf38f8 Fix errors reported by cus-test.el
* ox.el (org-export-async-init-file): Use :set to set the
default value.

* ox-texinfo.el (org-texinfo-filename): Fix default value.
(org-texinfo-format-headline-function): Use 'ignore as the
default value.
(org-texinfo-format-drawer-function): Use a function as the
default value.  Update docstring.
(org-texinfo-drawer): Always use
`org-texinfo-format-drawer-function' as it is now a function
by default.
(org-texinfo-headline): Compare
`org-texinfo-format-headline-function' against 'ignore.
(org-texinfo-inlinetask): Compare
`org-texinfo-format-inlinetask-function' against 'ignore.

* ox-odt.el (org-odt-format-drawer-function): Use a function
as the default value.  Update docstring.
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function): Fix default value.
(org-odt-with-latex): Use :set to set the default value.
(org-odt-drawer): Always use `org-odt-format-drawer-function'
as it is now a function by default.
(org-odt-format-headline--wrap): Compare
`org-odt-format-headline-function' against 'ignore.

* ox-latex.el (org-latex-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-latex-format-inlinetask-function): Fix default value.
(org-latex-drawer): Always use
`org-latex-format-drawer-function' as it is now a function by
default.
(org-latex-inlinetask): Compare
`org-latex-format-inlinetask-function' against 'ignore.

* ox-html.el (org-html-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-html-format-headline-function)
(org-html-format-inlinetask-function): Fix default value.
(org-html-with-latex): Use :set to set the default value.
(org-html--format-toc-headline)
(org-html-format-headline--wrap): Compare
`org-html-format-headline-function' against 'ignore.
(org-html-inlinetask): Compare
`org-html-format-inlinetask-function' against 'ignore.

* ox-ascii.el (org-ascii-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-ascii-drawer): Always use
`org-ascii-format-drawer-function' as it is now a function by
default.
(org-ascii-format-inlinetask-default): New function.
(org-ascii-format-inlinetask-function): Use
`org-ascii-format-inlinetask-default' as the default.

* org.el (org-mouse-1-follows-link): Use :set to set the
default value.  Update custom type.
(org-log-note-headings): Fix order or list items in the custom
type.
(orgstruct-heading-prefix-regexp): Use an empty string as the
default value.  Use 'regexp as the custom type.
(orgstruct-make-binding): Tiny docstring enhancement.  Assume
`orgstruct-heading-prefix-regexp' is a string.

* org-agenda.el (org-agenda-search-view-max-outline-level):
Set default value to 0.  Update docstring.
(org-agenda-deadline-leaders): Fix custom type.
(org-search-view): Assume
`org-agenda-search-view-max-outline-level' is a number.

* ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.

* ob-python.el (org-babel-python-mode): Use :set to set the
default value.
(org-babel-python-None-to): Fix custom type.

* ob-plantuml.el (org-plantuml-jar-path): Fix default value.
(org-babel-execute:plantuml): Assume `org-plantuml-jar-path'
is a string.

* ob-latex.el (org-babel-latex-htlatex): Fix default value.
(org-babel-latex-htlatex-packages): Fix custom type.
(org-babel-execute:latex): Assume `org-babel-latex-htlatex' is
a string.

Thanks to Glenn Morris for reporting this.
2013-11-14 14:05:18 +01:00
Bastien Guerry 46db5623ae Merge branch 'maint' 2013-11-14 09:55:36 +01:00
Bastien Guerry 8c5406d962 ox-odt.el (org-odt-display-outline-level): Fix version
* ox-odt.el (org-odt-display-outline-level): Fix version.
2013-11-14 09:54:35 +01:00
Bastien Guerry a30567a114 Merge branch 'master' of orgmode.org:org-mode 2013-11-14 08:56:10 +01:00
Eric Schulte d840b84bbc Don't skip call lines searching for results
This fixes a bug noticed by Rick Frankel in which two subsequent
  #+call: lines will both update the same results.  Before this commit
  both of the following call lines would update the same result.

      #+name: call-me
      #+BEGIN_SRC emacs-lisp :var v="nil"
      v
      #+END_SRC

      #+call: call-me("one")

      #+call: call-me(v="two")

      #+RESULTS:
      : one

  Now both lines are given their own result.

      #+name: call-me
      #+BEGIN_SRC emacs-lisp :var v="nil"
      v
      #+END_SRC

      #+call: call-me("one")

      #+RESULTS:
      : one

      #+call: call-me(v="two")

      #+RESULTS:
      : two
2013-11-13 21:13:11 -07:00
Eric Schulte c67e3cda15 default to preserving hlines in call lines
* lisp/ob-core.el (org-babel-default-inline-header-args):
  Added (:hlines "yes") to the default value.
2013-11-13 21:13:11 -07:00
Bastien Guerry 6f6d90a363 org.el (org-refile-check-position): Enhance error message
* org.el (org-refile-check-position): Enhance error message.
2013-11-14 00:53:43 +01:00
Eric Schulte 1877652ce0 allow reference to named call lines
* lisp/ob-ref.el (org-babel-ref-resolve): Look for call lines when
  resolving references.
2013-11-13 11:43:27 -07:00
Achim Gratz b6448c4225 ob-ref: Fix "Marker points into wrong buffer" error
* lisp/ob-ref.el (org-babel-ref-parse): If
  `org-babel-current-src-block-location' is a marker, it can be from
  another buffer, use marker-position instead in this case.

Introduced with r114064 on Emacs trunk.  Not sure if this is a bug in
Org or Emacs, but the patch restores the previous behaviour.
2013-11-13 19:22:52 +01:00
Bastien Guerry 6a39355eee org.el: Name indirect buffer after the subtree's heading
* org.el (org-get-indirect-buffer): New optional argument
`heading'.  Use it to name the indirect buffer after the
heading the subtree, if any.
(org-tree-to-indirect-buffer): Use the new argument.

Thanks to Karl Voit for suggesting this.
2013-11-13 14:03:21 +01:00
Bastien Guerry 1eb03c8c87 org.el: Allow C--1 C-c C-t to set repeated tasks to a done state
* org.el (org-cancel-repeater): New function.
(org-todo): Use the new function to cancel a repeater when
called with a numeric arg of -1.

Thanks to Kenneth Jacker for requesting a similar feature.
2013-11-13 13:56:12 +01:00
Bastien Guerry 02ab072061 Merge branch 'maint' 2013-11-13 08:46:26 +01:00
Bastien Guerry 757eb6e0fb Fix previous commits
Thanks to Jambunathan for pointing this.
2013-11-13 08:46:01 +01:00
Bastien Guerry cdaeac1aa0 Merge branch 'maint' 2013-11-13 07:40:56 +01:00
Bastien Guerry 369f70ac28 ox-odt.el: Add version and package-version to some options
* ox-odt.el (org-odt-inline-formula-rules)
(org-odt-inline-image-rules, org-odt-use-date-fields): Add
version and package-version.
2013-11-13 07:35:57 +01:00
Bastien Guerry d2ba43c496 ox-html.el: Add version and package-version to some options
* ox-html.el (org-html-format-drawer-function)
(org-html-format-headline-function)
(org-html-format-inlinetask-function)
(org-html-creator-string): Add version and package-version.

Thanks to Jambunathan for reporting problems in this area.
2013-11-13 07:27:10 +01:00
Bastien Guerry b6522af499 Merge branch 'maint' 2013-11-12 21:24:57 +01:00
Bastien Guerry 4d7293e2d0 ox-html.el (org-html-text-markup-alist): Fix version
* ox-html.el (org-html-text-markup-alist): Fix version.

Thanks to Jambunathan for reporting this.
2013-11-12 21:24:32 +01:00
Bastien Guerry f505fa20b4 Merge branch 'maint' 2013-11-12 21:12:42 +01:00
Bastien Guerry f49654aeff org-agenda.el (org-agenda-set-restriction-lock): Autoload
* org-agenda.el (org-agenda-set-restriction-lock): Autoload.
2013-11-12 21:12:28 +01:00
Bastien Guerry 487057fc26 Fix conflicts from previous merge 2013-11-12 21:11:23 +01:00
Bastien Guerry 71884cc039 Merge branch 'maint'
Conflicts:
	lisp/ob-C.el
	lisp/ob-clojure.el
	lisp/ob-core.el
	lisp/ob-lisp.el
	lisp/org-clock.el
2013-11-12 21:00:49 +01: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
Eric Schulte e4984e2783 fix tangle bug, checking empty headlines commented
Thanks to Michael Brand for catching this bug.

* lisp/ob-tangle.el (org-babel-under-commented-heading-p): robust to
  empty headlines.
2013-11-11 13:54:21 -07:00
Bastien Guerry 7ca6817495 Merge branch 'maint' 2013-11-11 18:14:24 +01:00
Bastien Guerry 6a577a2b5a org.el (org-deadline, org-schedule): Fix bug
* org.el (org-deadline, org-schedule): Fix bug: allow to
update scheduled/deadline information anywhere in the subtree.
2013-11-11 18:14:11 +01:00
Bastien Guerry e156163aec Merge branch 'master' of orgmode.org:org-mode 2013-11-11 18:03:38 +01:00