Commit graph

10264 commits

Author SHA1 Message Date
Oleh Krehel 3a9bbb0ec3 ob-clojure.el: fix behavior for :results pp
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Simplify the
  pretty printing.
  (org-babel-execute:clojure): Check for "pp" in the parameters.

http://permalink.gmane.org/gmane.emacs.orgmode/84876
2014-04-14 12:28:02 +02:00
Nicolas Goaziou b8781c4c85 ox: Make footnotes file specific when including Org files
* lisp/ox.el (org-export-expand-include-keyword,
  org-export--prepare-file-contents): Make footnotes file specific
  when including Org files.

* doc/org.texi (Include files): Add documentation.

* testing/lisp/test-ox.el (test-org-export/expand-include): Add tests.

http://permalink.gmane.org/gmane.emacs.orgmode/83606
2014-04-12 15:07:42 +02:00
Bastien Guerry e24f336cd3 Merge branch 'master' of orgmode.org:org-mode 2014-04-11 21:33:08 +02:00
Nicolas Goaziou 7c82e6ac19 No alphanumeric characters around radio links
* lisp/org.el (org-make-target-link-regexp): Change regexp so
  alphanumeric characters cannot be found next to a radio link.
(org-activate-target-links): Apply changes to radio link regexp.

* lisp/org-element.el (org-element--object-lex,
  org-element-link-parser): Apply changes to radio link regexp.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update test.

Patch suggested by Daniel Clemente.
http://permalink.gmane.org/gmane.emacs.orgmode/84461
2014-04-11 21:30:15 +02:00
Bastien Guerry eb0b98d91f Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-04-11 12:22:48 +02:00
Markus Hauck faa1703b8f org.el (org-refile): Allow org-refile goto from everywhere
* lisp/org-agenda.el (org-refile): Flip logic to allow instead of
  prohibit the use of `org-refile' with the goto flat from non
  org-mode buffers.

In commit 49da67d the condition was changed from only
`(unless goto ...)` to `(unless (and goto (listp arg)) ...)`
where the `and` condition is only true for non-empty lists, so that
calling `(org-refile t)` complains about not being inside an org-mode
buffer.

With this patch org-refile can be used (again) from anywhere when
passed the goto flag to jump to the chosen task.

TINYCHANGE
2014-04-11 11:59:43 +02:00
Sacha Chua d6a38604e6 org.el (org-refresh-properties): Don't throw an error when reaching the end of the buffer
* org.el (org-refresh-properties): Don't throw an error when
reaching the end of the buffer.
2014-04-11 11:28:45 +02:00
Eric Schulte e8112c86ec only wrap R code graphics-file on execution
Move this out of the expand-body function so that it is *never*
  applied to tangled code.
2014-04-10 20:34:58 -06:00
Nicolas Goaziou dc71b742a9 ox-latex: Improve error report after compilation
* lisp/ox-latex.el (org-latex-known-warnings): New variable.
(org-latex-known-errors): Remove variable.
(org-latex-compile): Report correctly when pdf file was not produced.
Catch all errors from process.  Report some warnings.
(org-latex--collect-warnings): New function.
(org-latex--collect-errors): Remove function.

http://permalink.gmane.org/gmane.emacs.orgmode/77552
2014-04-10 23:08:04 +02:00
Nicolas Goaziou 37e3c112dd Merge branch 'maint' 2014-04-10 23:01:20 +02:00
Nicolas Goaziou 3589f64e42 Make Org links compatible with URI syntax
* lisp/org.el (org-make-link-regexps): Allow optional double slashes
  after type.  Small refactoring.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update test.

This patch allows to write both [[file:/file.org]] and [[file:///file.org]].
See bug#16751.
2014-04-10 22:57:05 +02:00
Nicolas Goaziou fea23d3da2 Fix COMMENT keyword when stacked with a regular keyword
* lisp/org.el (org-set-font-lock-defaults): Fix headline fontification
  when keywords are stacked.
(org-toggle-comment): Properly toggle COMMENT keyword when a regular
keyword is already present.
(org-todo, org-agenda-prepare-buffers): Correctly match a commented
heading.
* lisp/org-colview.el (org-columns-capture-view): Correctly match
  a commented heading.

* testing/lisp/test-org.el (test-org/toggle-comment): New test.
2014-04-10 22:51:16 +02:00
Oleh Krehel 11f8efcda1 ob-clojure.el: revert cl-case back to case
* lisp/ob-clojure.el (org-babel-execute:clojure): Revert cl-case back
  to case.
2014-04-10 12:51:31 +02:00
Oleh Krehel 645384a037 ob-clojure: adapt to new cider
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Don't handle
  output here, since the result becomes double quoted with current
  cider. Move to `org-babel-execute:clojure' instead.

  (org-babel-execute:clojure): Use `nrepl-send-string-sync' instead
  of `cider-eval-sync', which was removed.
2014-04-10 10:30:23 +02:00
Nicolas Goaziou ce72d251f7 Merge branch 'maint' 2014-04-09 23:49:49 +02:00
Nicolas Goaziou a768cf045d org-element: Tiny refactoring
* lisp/org-element.el (org-element-headline-parser): Tiny refactoring.
2014-04-09 23:49:04 +02:00
Nicolas Goaziou 1b7d3ffcbf org-element: Tiny fix to headline parsing
* lisp/org-element.el (org-element-headline-parser): Correctly parse
  blank lines after a headline.

Thanks to Thorsten Jolitz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84753
2014-04-09 23:44:15 +02:00
Nicolas Goaziou dfcfca8219 Merge branch 'maint'
Conflicts:
	lisp/org-element.el
2014-04-08 18:59:06 +02:00
Nicolas Goaziou 728661309e org-element: Fix table parsing with missing final bar
* lisp/org-element.el (org-element-table-cell-parser,
  org-element-table-cell-successor): Recognize cell even when last
  vertical bar is missing.

* testing/lisp/test-org-element.el (test-org-element/table-cell-parser):
  Add test.

Thanks to Thorsten Jolitz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84713
2014-04-08 18:56:51 +02:00
Nicolas Goaziou 798bb8d42f Merge branch 'maint' 2014-04-06 19:59:13 +02:00
Michael Weylandt 0820d002cb ox-latex.el: Downcase language name in minted blocks
* lisp/ox-latex.el (org-latex-export-to-latex): Downcase the language
name when using minted highlighting for src block exports.

Minted, by convention, uses all lowercase names for languages.  This
will handle mappings like "R" to "r" or "Python" to "python"
automatically.  More complex renamings still need to be handled by
customizing `org-latex-minted-langs'.

Note that the `downcase' is only applied when using the "automatic"
name.  Names in `org-latex-minted-langs' still need to be lower-case.

TINYCHANGE
2014-04-06 19:58:06 +02:00
Greg Tucker-Kellogg c99fa2ab8a ox-latex.el: support sideways :float options for tables and figures
* lisp/ox-latex.el (org-latex--inline-image): support a 'sideways
option for the float, and add case to handle it with a \sideaysfigure
in the export.
(org-latex--org-table): support "sideways" instead of deprecated
"sidewaystable".  The latter is still handled for backward
compatibility.

* doc/org.texi (Tables in LaTeX export): Document use of :float
  sideways.
(Images in LaTeX export): Document use of :float sideways.

This patch provides consistent :float sideways support for LaTeX
export of both figures and tables.

http://permalink.gmane.org/gmane.emacs.orgmode/84618

TINYCHANGE
2014-04-06 14:19:55 +02:00
Nicolas Goaziou 081e6b4b3b Merge branch 'maint' 2014-04-06 14:08:16 +02:00
Nicolas Goaziou 2868f962a2 ox-md: Fix handling of switches in source blocks
* lisp/ox-md.el (org-md-example-block): handle switches and references
  in source blocks.
2014-04-06 14:06:08 +02:00
Nicolas Goaziou a36dde7c68 Merge branch 'maint' 2014-04-05 09:51:36 +02:00
Nicolas Goaziou 7de492a0c4 Update docstrings
* lisp/org.el (org-latex-packages-alist,
  org-latex-default-packages-alist): Update docstrings.
2014-04-05 09:50:20 +02:00
Nicolas Goaziou 957177cebc Merge branch 'maint' 2014-04-03 22:51:54 +02:00
Nicolas Goaziou a6485af3e4 ox-ascii: Ignore line breaks when removing duplicates links
* lisp/ox-ascii.el (org-ascii--unique-links): Ignore white spaces when
  uniquifying links in section.

Thanks to Mathias Bauer for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84548
2014-04-03 22:50:53 +02:00
Nicolas Goaziou 23e62f7527 Radio targets cannot beging or end with whitespace
* lisp/org.el (org-radio-target-regexp): Radio targets cannot begin or
  end with whitespace.
(org-target-regexp): Update syntax according to previous rule.
(org-any-target-regexp): Fix fontification bug.

* testing/lisp/test-org-element.el (test-org-element/radio-target-parser):
  Add test.

Variables are turned into defconst to emphasize the fact that they are
not subject to change.

Thanks to Daniel Clemente for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84461
2014-04-02 14:54:37 +02:00
Nicolas Goaziou 8a43270e8e org-element: Small fix
* lisp/org-element.el (org-element--cache-process-request): Small fix.

This fixes 7fca554f43.
2014-04-01 08:10:41 +02:00
Nicolas Goaziou 7fca554f43 org-element: Slightly change object cache
* lisp/org-element.el (org-element--cache-objects):
(org-element-context): Simplify structure of object cache.

This change avoids relying on buffer positions and artificial keys.
2014-03-31 22:56:25 +02:00
Alan Schmitt f57b2d7141 ob-ocaml.el: Make sure a value was extracted before printing
* lisp/ob-ocaml.el (org-babel-execute:ocaml): Do not try to print
a value if either the type or the value could not be extracted from
the toplevel.
2014-03-31 14:24:22 +02:00
Nicolas Goaziou a7e12d2af5 ox: Fix multiple deactivated subscripts export
* lisp/ox.el (org-export--remove-uninterpreted-data-1): Fix multiple
  deactivated subscripts export.

* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.

Thanks to Xavier Garrido for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84403
2014-03-29 22:47:01 +01:00
Alan Schmitt c6aa8340ba ob-ocaml.el: Clean up babel evaluation of ocaml blocks
* ob-ocaml.el (org-babel-execute:ocaml): Capture the output, type, and
value when evaluating ocaml blocks. Return the one requested by
`results'.

(org-babel-ocaml-parse-output): Change the signature to take a type
and a value. Make the parsing of the type more robust.
2014-03-29 19:51:03 +01:00
Nicolas Goaziou 91175a31ee ox-odt: Ignore blank titles
* lisp/ox-odt.el (org-odt-template): Ignore blank titles.
2014-03-29 15:00:00 +01:00
Nicolas Goaziou f261833a26 Merge branch 'maint' 2014-03-29 14:42:08 +01:00
Nicolas Goaziou 3636783ca4 ox-publish: Fix (invalid-read-syntax "#") error
* lisp/ox-publish.el (org-publish-find-title):
  Fix (invalid-read-syntax "#").

Since 8e1386cead,
`org-element-interpret-data' no longer trims text properties attached
to strings.  We need to remove them before writing the title into the
cache, as text properties are not readable.
2014-03-29 14:41:27 +01:00
Nicolas Goaziou 10cd4ed4d0 org-element: Fix regression
* lisp/org-element.el (org-element--object-regexp): Take into
  consideration `org-emphasis-regexp-components' when building regexp.

http://permalink.gmane.org/gmane.emacs.orgmode/84349
2014-03-28 17:25:25 +01:00
Nicolas Goaziou 25c591fcc4 ox-odt: Ignore blank titles
* lisp/ox-odt.el (org-odt-template): Ignore blank titles.
2014-03-28 10:08:56 +01:00
Jakob Lombacher af23a276a3 Bugfix, there was one entry too much.
It failed when mixed (int double) table is used as input variable e.g
| 1 | 1.2 |

TINYCHANGE
2014-03-27 17:53:39 -04:00
Nicolas Goaziou 938e1ef3bf Fix `org-in-commented-heading-p'
* lisp/org.el (org-in-commented-heading-p): Fix recursive call.

http://permalink.gmane.org/gmane.emacs.orgmode/84294
2014-03-27 16:13:58 +01:00
Nicolas Goaziou 3e5fc4540b org-element: Fix docstring
* lisp/org-element.el (org-element--cache-objects): Fix docstring.
2014-03-27 10:47:36 +01:00
Nicolas Goaziou b5dd32c7e4 org-element: Rewrite object parsing algorithm
* lisp/org-element.el (org-element-all-successors,
  org-element-object-successor-alist): Remove variables.
(org-element-object-restrictions): Update value.
(org-element-bold-parser, org-element-code-parser,
org-element-entity-parser, org-element-export-snippet-parser,
org-element-footnote-reference-parser,
org-element-inline-babel-call-parser,
org-element-inline-src-block-parser, org-element-italic-parser,
org-element-latex-fragment-parser, org-element-line-break-parser,
org-element-link-parser, org-element-macro-parser,
org-element-radio-target-parser, org-element-statistics-cookie-parser,
org-element-strike-through-parser, org-element-subscript-parser,
org-element-superscript-parser, org-element-target-parser,
org-element-timestamp-parser, org-element-underline-parser,
org-element-verbatim-parser): Return nil when syntax at point is not
of the expected type.
(org-element-text-markup-successor,
org-element-latex-or-entity-successor,
org-element-export-snippet-successor,
org-element-footnote-reference-successor,
org-element-inline-babel-call-successor,
org-element-inline-src-block-successor,
org-element-line-break-successor, org-element-link-successor,
org-element-macro-successor, org-element-radio-target-successor,
org-element-statistics-cookie-successor,
org-element-sub/superscript-successor,
org-element-table-cell-successor, org-element-target-successor,
org-element-timestamp-successor,
org-element--get-next-object-candidates): Remove functions.
(org-element-timestamp-regexp, org-element--object-regexp): New
variables.
(org-element--object-lex): New function.
(org-element--parse-objects, org-element-context): Make use of new
tools.

This patch simplifies a lot object parsing and should improve
significantly `org-element-context''s speed.

http://permalink.gmane.org/gmane.emacs.orgmode/83872
2014-03-27 01:25:52 +01:00
Nicolas Goaziou e2872b21e4 ox-latex: Fix defcustom
* lisp/ox-latex.el (org-latex-hyperref-template): Add keywords.
2014-03-26 17:59:39 +01:00
Rick Frankel 37df5f94f4 Allow disabling of htmlization in ox-html export.
* lisp/ox-html.el (org-html-htmlize-output-type): Add `nil'
  option (no htmlization).
(org-html-fontify-code): Return plain text if
`org-html-htmlize-output-type' is `nil'.
2014-03-26 08:42:23 -04:00
Bastien Guerry 1f155ef1e7 Merge branch 'maint' 2014-03-25 21:47:02 +01:00
Bastien Guerry e330027ac1 org-agenda.el (org-agenda-show-new-time): Don't use `move-beginning-of-line'
* org-agenda.el (org-agenda-show-new-time): Don't use
`move-beginning-of-line' as it is slower and not needed.

Thanks to Matt Lundin for reporting this.
2014-03-25 21:46:50 +01:00
Achim Gratz 539b89451c ob-sh: add :hlines processing and :hline-string header arg
* lisp/ob-sh.el (org-babel-variable-assignments:sh): Check for
  ":hlines yes" and use header arg :hlines-string if
  defined (default to "hline") and add this to the call of
  `org-babel-sh-var-to-sh'.
  (org-babel-sh-var-to-sh, org-babel-sh-var-to-string): Add additional
  optional string argument `hline' and use it for the :hline parameter
  in the call to `orgtbl-to-generic'.
2014-03-25 19:25:58 +01:00
Nicolas Goaziou ea097c25dd ox-latex: Allow :options in LaTeX attributes
* lisp/ox-latex.el (org-latex-src-block): Allow to add options to
  listings or minted block-wise.
(org-latex-listings-options, org-latex-minted-options): Update
docstring.

* doc/org.texi (@LaTeX{} specific attributes): Document feature.
2014-03-25 19:08:56 +01:00
Achim Gratz 9973fbc347 ob-lob: do not use cl at runtime
* lisp/ob-lob.el (org-babel-lob-execute): Do not use defun subseq from
  cl at runtime.  Replace concatenation of sub-sequences by splicing
  the modified params list into a copy of info (pre-must info be
  preserved).
2014-03-25 18:59:59 +01:00
Achim Gratz 078329f813 Merge branch 'maint' 2014-03-25 18:59:25 +01:00
Achim Gratz e89adba685 ob-gnuplot: create a proper table even when handed just a vector
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
  `org-babel-gnuplot-table-to-data´ expects a table, so we need to
  construct one when Babel hands us a vector.

Thanks to Eric Fraga for reporting the bug.
http://permalink.gmane.org/gmane.emacs.orgmode/84072
2014-03-25 18:55:13 +01:00
Nicolas Goaziou cd9685cd10 ox-publish: Fix code typo (take 3)
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 16:06:46 +01:00
Bastien Guerry 71ee4425b6 Merge branch 'master' of orgmode.org:org-mode 2014-03-25 12:13:01 +01:00
Bastien Guerry 4cf2b55cb0 Merge branch 'maint' 2014-03-25 12:04:19 +01:00
Bastien Guerry 0e344ae04a org-compat.el (org-move-to-column): Fix bug
* org-compat.el (org-move-to-column): Temporarily set
`buffer-invisibility-spec' more accurately.

Thanks to Samuel Wales for reporting this.
2014-03-25 12:04:09 +01:00
Nicolas Goaziou b982b57cb1 ox-publish: Fix code typo (part 2)
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 10:46:34 +01:00
Nicolas Goaziou 317d2f1898 ox-publish: Fix code typo
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 10:38:48 +01:00
Nicolas Goaziou 1c1936fbb1 Allow radio links after an apostrophe and mid-word
* lisp/org.el (org-make-target-link-regexp): Allow radio links after
  an apostrophe and mid-word.  Small refactoring.

* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add
  test.

See http://permalink.gmane.org/gmane.emacs.orgmode/84108.
2014-03-25 10:21:26 +01:00
Nicolas Goaziou bebb7597a7 ox-publish: Fix small bug
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
  Correctly extract filename.

This bug was introduced in 6062f9ea72.
Thanks to steckerhalter for reporting it.
2014-03-25 10:05:27 +01:00
Bastien Guerry 6289868d28 Revert "org-plot: Handle explicit date/time index"
This reverts commit e2b6c506c2.
2014-03-25 09:18:25 +01:00
Nicolas Goaziou ad16ef42da Silence byte-compiler 2014-03-24 21:07:43 +01:00
Nicolas Goaziou 6d1d61f667 Rename `org-babel-under-commented-heading-p'
* lisp/org.el (org-in-commented-heading-p): New function.
* lisp/ob-tangle.el (org-babel-under-commented-heading-p): Remove
  function.
(org-babel-tangle-collect-blocks): Use new function.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Use new function.

* testing/lisp/test-org.el (test-org/in-commented-heading-p): New
  test.
2014-03-24 13:29:42 -04:00
Nicolas Goaziou 230d09aeb0 Merge branch 'maint' 2014-03-24 14:20:23 +01:00
Nicolas Goaziou 2e79bd8119 export back-ends: Update radio target export
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link): Update radio target export according
  to recent changes.

See bug report at http://permalink.gmane.org/gmane.emacs.orgmode/82923
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 8212776cfc Fix radio target parsing
* lisp/org-element.el (org-element-all-successors,
  org-element-object-restrictions): Prioritize `link' over other
  successors in order to find radio links starting with another syntax
  object (e.g., an entity).  Also allow text markup within radio
  targets.
(org-element-link-parser): Add contents to radio targets.

* lisp/org.el (org-make-target-link-regexp): Fix regexp so it can
  match targets starting with an Org object (e.g., an entity).
(org-ctrl-c-ctrl-c): Fix function when applied on an object contained
within a radio target.

* testing/lisp/test-org-element.el (test-org-element/radio-target-parser): Add test.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add test.
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 955d9d8a78 Change "\" and "~" syntax to symbol
* lisp/org.el (org-mode): Change "\" and "~" characters syntax from
  `punctuation' to `symbol' so they are on par with other characters used
  in Org syntax (e.g., "/", "*"...).

This change is needed to correctly find radio links starting with an
entity:

  <<<\alpha-test>>> \alpha-test
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 09ee2336ef Merge branch 'maint' 2014-03-24 13:59:44 +01:00
Nicolas Goaziou 33dce5b98f Fix LaTeX and Beamer publishing process
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Ensure ".tex" file is
  generated in the same directory as the ".org" file.

Thanks to Rafael for reporting it.  See
http://permalink.gmane.org/gmane.emacs.orgmode/84095.
2014-03-24 13:58:25 +01:00
Bastien Guerry bf27c6b71f Merge branch 'maint' 2014-03-24 06:29:26 +01:00
Bastien Guerry c4bca1c384 Fix 3a233aa 2014-03-24 06:29:14 +01:00
Nicolas Goaziou 9665f83f7b Merge branch 'maint' 2014-03-22 15:16:44 +01:00
Nicolas Goaziou d91d4bfb47 ox-latex: Fix underline in sections
* lisp/ox-latex.el (org-latex-headline): Hard-code "\underline" in
  sections because "\uline" ("ulem" package) returns an error and
  "\ul" ("soul" package) doesn't support chinese characters.

See http://permalink.gmane.org/gmane.emacs.orgmode/83962 for the
related thread.
2014-03-22 15:15:35 +01:00
Nicolas Goaziou 95eeefa9bc Revert "LaTeX: Use \ul (from the "soul" package) instead of \uline"
This reverts commit b399ff0cba.
2014-03-22 15:15:35 +01:00
Aaron Ecay cb53665e55 Fix org-src-edit interaction with undo.
* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.

The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer.  The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.
2014-03-22 09:40:18 +01:00
Nicolas Goaziou 7e689ae961 org-element: Fix infloop in `org-element-context'
* lisp/org-element.el (org-element-context): Fix infloop.
2014-03-22 09:16:36 +01:00
Bastien Guerry 368aa1078f Merge branch 'maint' 2014-03-22 00:28:30 +01:00
Bastien Guerry b399ff0cba LaTeX: Use \ul (from the "soul" package) instead of \uline
* ox-latex.el (org-latex-text-markup-alist): Use \ul{...} for
underlining instead of \uline{...} as requiring the hyperref
package makes \uline{...} unusable on headline.

* org.el (org-latex-default-packages-alist): Add the "soul"
package.

Thanks to Konstantin Kliakhandler for reporting this.
2014-03-22 00:27:34 +01:00
Nicolas Goaziou d6d1f25429 Fix `org-open-at-point'
* lisp/org.el (org-open-at-point): Correctly open fuzzy links when
  path is hexified.
* testing/lisp/test-org.el (test-org/coderef): New test.
(test-org/fuzzy-links): Add test.
2014-03-21 14:51:34 +01:00
Bastien Guerry 83a55c6f5b Merge branch 'maint' 2014-03-21 12:51:16 +01:00
Bastien Guerry 5a195423d3 org.el (org-refresh-properties): Bugfix
* org.el (org-refresh-properties): Don't add the property to
the whole subtree, only to the part between the beginning of
the headline and the end of the "content", before any other
headline.  This fix a bug about properties displayed as
inherited in the agenda, where Org properties are checked
against text properties.

Thanks to Sébastien Vauban for reporting this.
2014-03-21 12:51:04 +01:00
Bastien Guerry 3abea32044 Merge branch 'master' of orgmode.org:org-mode 2014-03-21 09:56:50 +01:00
Bastien Guerry ec8f5dba02 Fix comment typo
* ox-latex.el (org-latex--text-markup): Replace newlines by
whitespaces in \verb constructs.
2014-03-21 09:56:41 +01:00
Bastien Guerry f8cb7803cc ox-latex.el (org-latex--text-markup): Replace newlines by whitespaces in \verb constructs
* ox-latex.el (org-latex--text-markup): Replace newlines by
whitespaces in \verb constructs.

Thanks to Alan Schmitt for reporting this.
2014-03-21 09:56:18 +01:00
Nicolas Goaziou 625397177d Merge branch 'maint' 2014-03-20 18:22:39 +01:00
Nicolas Goaziou a97959984a Revert "ox-ascii: Fix radio link"
This reverts commit b4ffae0d09.
2014-03-20 18:21:29 +01:00
Nicolas Goaziou 0c4ab29d0a Revert "org-element: Fix radio-target and radio link parsing"
This reverts commit 5174495ee6.

Conflicts:
	lisp/org-element.el
2014-03-20 18:21:04 +01:00
Bastien Guerry 0e3b49e3e1 Merge branch 'maint' 2014-03-20 17:08:39 +01:00
Bastien Guerry 3559ff84b2 org-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered agendas
* org-agenda.el (org-agenda-filter-hide-line): Hide from the
beginning of the line to the beginning of the next line.
(org-agenda-show-new-time): Use `move-beginning-of-line' and
`move-end-of-line'.
(org-agenda-drag-line-forward): Adapt to the new definition of
hidden filtered lines.

Thanks to Igor Sosa Mayor for reporting this bug and to Nick Dokos
and Matt Lundin for providing further information.
2014-03-20 17:07:03 +01:00
Bastien Guerry 613333d665 Merge branch 'maint' 2014-03-20 15:07:11 +01:00
Bastien Guerry a3ec854cab Fix bugs wrt invisibility handline.
* org-compat.el (org-move-to-column): Always ignore invisible
text in agenda buffer, and when there is both a bracket link
and '(org-link) as a member of `buffer-invisibility-spec'.
Add a docstring.

* org.el (org-align-tags-here): Add docstring and remove
useless arguments when calling `org-move-to-column'.

* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row):
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-todo)
(org-agenda-priority, org-agenda-show-new-time)
(org-agenda-clock-in, org-agenda-clock-out): Remove useless
arguments when calling `org-move-to-column'.

This fixes the issue about S-RET not placing the cursor in the right
table field when M-x org-toggle-link-display RET removed '(org-link)
from `buffer-invisibility-spec' and some other discrepancies (like
S-M-<up> not restoring point correctly when there is a bracket link
before point, or M-x org-clock-display RET not aligning overlays
correctly, etc.

Thanks to Matt Lundin and Michael Brand for tracking issues
about this.
2014-03-20 15:04:49 +01:00
Bastien Guerry 9bb4dd6e0a Merge branch 'maint' 2014-03-20 09:45:09 +01:00
Bastien Guerry 8bab38bcba Fix 3a233aa
Thanks to Alexey Lebedeff for providing the fix.
2014-03-20 09:44:56 +01:00
Bastien Guerry 5d0e706836 org-agenda.el (org-agenda-switch-to): Ensure point is at the beginning of the heading
* org-agenda.el (org-agenda-switch-to): Ensure point is at the
beginning of the heading.
2014-03-20 00:05:04 +01:00
Nicolas Goaziou df10309489 ob-ref: Properly resolve references in ":post" arguments
* lisp/ob-core.el (org-babel-exp-reference-buffer): New variable, as
  a replacement for `org-current-export-file'.
(org-babel-check-confirm-evaluate): Use new variable.
* lisp/ob-exp.el (org-babel-exp-in-export-file): Use new variable.
(org-babel-exp-get-export-buffer): Remove function.
(org-babel-exp-process-buffer): Change signature.
* lisp/ob-ref.el (org-babel-ref-resolve): Use new variable during
  export in order to properly resolve references.
* lisp/ox.el (org-export-execute-babel-code): Use new variable.

* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
  Remove a cond branch as it is always
  false (`org-current-export-file' couldn't be a string).

* testing/lisp/test-ob-lob.el (test-ob-lob/export-lob-lines): Update
  test.
* testing/lisp/test-ob.el (test-ob/eval-header-argument): Update test.
* testing/lisp/test-ob-exp.el (ob-export/reference-in-post-header):
  New test.

During export, Babel executes sequentially all blocks in the buffer
being exported.  This can lead to modifications preventing some
references from being resolved.  As a workaround, Babel stores
a pristine copy of the buffer in a variable so it can always find
needed references.

Before this patch, the variable storing this copy was
`org-current-export-file' and was dynamically bound in "ox.el".  It
was used to resolve noweb references (`org-babel-expand-noweb-references')
but not regular references (`org-babel-ref-resolve').

Now, the variable is `org-babel-exp-reference-buffer' and it is bound
from `org-babel-exp-process-buffer'.  It is used to resolve all
references.  In particular, this allows to use references in :post
header.

Thanks to Jarmo Hurri for reporting it.
2014-03-19 21:34:56 +01:00
Bastien Guerry 932b41e973 org.el (org-refile): Only keep bracket links descriptions in the displayed heading
* org.el (org-refile): Rename first argument to arg, as its
use goes beyond is now more general.  Only keep bracket links
descriptions in the displayed heading.  Enhance docstring.
2014-03-19 16:22:46 +01:00
Bastien Guerry 5590531007 Merge branch 'maint' 2014-03-19 16:13:43 +01:00
Bastien Guerry 49da67d351 org.el (org-refile): Fix C-u 3 C-c C-w
* org.el (org-refile): Fix calling with a numeric prefix
argument of 3 to refile and keep.
2014-03-19 16:13:33 +01:00
Bastien Guerry 2cd15b9c7c org.el (org-refile): Minor docstring enhancement
* org.el (org-refile): Minor docstring enhancement.
2014-03-19 15:47:20 +01:00
Bastien Guerry 8994c096a8 org-bibtex.el: Fix typos
* org-bibtex.el (org-bibtex-read-buffer)
(org-bibtex-import-from-file): Fix typos.
2014-03-19 12:01:57 +01:00
Bastien Guerry 4223367f89 ox-html.el: Enhance docstrings
* ox-html.el (org-html-table-header-tags)
(org-html-table-data-tags): Enhance docstrings.
2014-03-19 11:27:18 +01:00
Bastien Guerry 719b6ec77d Merge branch 'maint' 2014-03-19 10:49:01 +01:00
Bastien Guerry 3a233aa6d9 org-clock.el (org-clock-get-table-data): Bugfix
* org-clock.el (org-clock-get-table-data): When :link is `t'
in the clocktable parameters, bracket links in the clocktable
should only contain their description, other C-c C-o will try
to open the bracket link at point instead of the headline.

Thanks to Alexey Lebedeff for providing a preliminary patch for this.
2014-03-19 10:48:44 +01:00
Thomas Holst 176125c32f org-capture.el: Allow `:table-line-pos' to be a function name, a string or a variable
* lisp/org-capture.el (org-capture-place-table-line): If the value of
`:table-line-pos' is a function name, used its return value to set the
position inside the table.  The return value must be a string like
"II-3".  Else `:table-line-pos' is 'eval'ed.

TINYCHANGE
2014-03-19 09:34:58 +01:00
Bastien Guerry 88d151b05b Merge branch 'maint' 2014-03-19 09:31:23 +01:00
Nikolai Weibull 2d09804e19 org.el: Only set org-hide foreground if one is available
* org.el (org-mode): Add guard around set-face-foreground.

TINYCHANGE
2014-03-19 09:31:11 +01:00
Bastien Guerry 35f27a1fe5 Merge branch 'maint' 2014-03-18 21:00:40 +01:00
Bastien Guerry 6ba3b2d03d org-agenda.el (org-agenda-todo): Restore the window correctly
* org-agenda.el (org-agenda-todo): Always restore the window
state after `org-agenda-change-all-lines' has been called.

`org-agenda-change-all-lines' is narrowing to the line it needs to
update.  In the narrowed state, `org-agenda-finalize' is called,
which may lead to a change in the way the window is displayed.  We
use `save-window-excursion' to ensure the window state is restored
correctly.

Thanks to Francesco Pizzolante for reporting this with a
detailed recipe.
2014-03-18 20:54:02 +01:00
Bastien Guerry 0b1d8c40ea Merge branch 'maint' 2014-03-18 17:23:56 +01:00
Bastien Guerry c16e09e158 org-agenda.el (org-agenda-open-link): Bugfix
* org-agenda.el (org-agenda-open-link): Don't throw an error
when trying to open a link when the point is on a place that
is not associated with a buffer.
2014-03-18 17:23:45 +01:00
Bastien Guerry 74162d9eb6 org-attach.el: Allow to attach files starting with a dot
* org-attach.el (org-attach-sync, org-attach-file-list): Allow
to attach files starting with a dot.

Thanks to Oleh for requesting this and providing a patch.
2014-03-18 17:17:41 +01:00
Bastien Guerry fdf3fdaa94 Merge branch 'maint' 2014-03-18 16:41:35 +01:00
Bastien Guerry 03bcfbe3d0 ox-latex.el (org-latex-link): Escape `%' characters
* ox-latex.el (org-latex-link): Escape `%' characters.
2014-03-18 16:41:24 +01:00
Bastien Guerry 040ec48a0d Merge branch 'maint' 2014-03-18 16:25:55 +01:00
Bastien Guerry 3a1a72f2f5 org-timer.el: Silent compiler warnings 2014-03-18 16:25:35 +01:00
Bastien Guerry 922135a4a6 org.el (org-entry-get-with-inheritance): Remove wrong quote
* org.el (org-entry-get-with-inheritance): Remove wrong quote.
2014-03-18 16:25:12 +01:00
Bastien Guerry cdb16718c0 Merge branch 'maint' 2014-03-18 14:50:42 +01:00
Bastien Guerry 42ee862d33 org.el (org-entry-get): Fix inheritance problem
* org.el (org-entry-get): Only try to combine file properties
with local properties when the property drawer contains such
local property, not when the property drawer exists.

Before the fix, `org-entry-get' behavior was inconsistent,
returning `nil' when looking for a property in a subtree with
no property drawer, and returning the global properties in a
subtree with a property drawer, independantly of whether this
property drawer contained a reference to the property we are checking
against or not.

As a side-effect, inheritance was broken for the case that
Ilya reported in commit 475f2f53, because `org-entry-get' returned
a value (with the global properties of the file) too early.

Thanks to Ilya for raising this bug and to Achim for pointing
out that the previous fix was wrong.
2014-03-18 14:47:09 +01:00
Nicolas Goaziou 5d8cc35e4a org-element: Re-enable cache
* lisp/org-element.el (org-element--cache-put): Effectively store
  elements in cache.

This fixes a bug introduced in 0a5f5117a3.
2014-03-17 21:31:33 +01:00
Bastien Guerry 6e0e76308c Merge branch 'maint' 2014-03-17 21:22:20 +01:00
Bastien Guerry 3074d081e7 Revert "Properties: Fix property-getting with inheritance"
This reverts commit 475f2f5388.
2014-03-17 21:22:04 +01:00
Bastien Guerry 2202826e5e org-timer.el: Silent compiler warnings 2014-03-17 20:34:52 +01:00
Nicolas Goaziou 17ecfd4130 Merge branch 'maint' 2014-03-17 10:33:21 +01:00
Nicolas Goaziou 39cfc39ccb org-element: Fix docstring and code typos 2014-03-17 10:31:37 +01:00
Nicolas Goaziou b4ffae0d09 ox-ascii: Fix radio link
* lisp/ox-ascii.el (org-ascii-link): Correctly handle case mismatch
  between radio targets and radio links.
2014-03-17 10:25:57 +01:00
Nicolas Goaziou 5174495ee6 org-element: Fix radio-target and radio link parsing
* lisp/org-element.el (org-element-link-parser): "radio" links have
  their path downcased to avoid introducing case mismatch with their
  relative radio target.  With this change it is also necessary to add
  contents to them, since `:path' property no longer matches real
  value of the link.
(org-element-radio-target-parser): Downcase value as explained above.
Store the initial value in a new `:raw-value' property.
2014-03-17 10:24:43 +01:00
Nicolas Goaziou 44095d483b Revert "Fix links to radio targets."
This reverts commit d2e7b1b5b1.
2014-03-17 10:05:52 +01:00
Bastien Guerry ed3f1288cb Merge branch 'maint' 2014-03-17 03:00:04 +01:00
Bastien Guerry d2e7b1b5b1 Fix links to radio targets.
* ox-latex.el (org-latex-link):
* ox-html.el (org-html-link):
* ox-beamer.el (org-beamer-link): Fix links to radio targets.

* ox-ascii.el (org-ascii-link): For links to a radio target,
use the link, not the target.

Thanks to Noah Slater for reporting this.
2014-03-17 02:58:02 +01:00
Bastien Guerry da13eea415 Merge branch 'maint' 2014-03-17 02:19:37 +01:00
Bastien Guerry 28a9e35ddb org.el (org-do-emphasis-faces): Explicitly prevent nested emphasis
* org.el (org-do-emphasis-faces): Explicitly prevent nested
emphasis.

Thanks to Sébastien Vauban for reporting this.
2014-03-17 02:19:27 +01:00
Bastien Guerry 5f2dced185 org.el (org-store-link): Allow to create links from sr-mode
* org.el (org-store-link): Check `dired-mode' through
`derived-mode-p' to allow storing links from derived modes
like `sr-mode'.

Thanks to Thomas Holst for the idea.
2014-03-17 01:56:59 +01:00
Bastien Guerry 5289825cb2 Merge branch 'maint' 2014-03-17 01:42:42 +01:00
Bastien Guerry afffe03dcf org.el (org-insert-heading): Don't remove whitespaces following an empty headline
* org.el (org-insert-heading): Don't remove whitespaces
following an empty headline.

Thanks to Brady Trainor for reporting this.
2014-03-17 01:41:42 +01:00
Nicolas Goaziou 818e2a1de7 Merge branch 'maint' 2014-03-16 10:56:46 +01:00
Rasmus d9dd1e6bd5 Remove reference to hgroup in ox-html
* ox-html.el (org-html-html5-elements): Drop reference to hgroup.
2014-03-16 10:56:09 +01:00
Nicolas Goaziou 05f69e5bf8 ob-exp: During export ignore Babel code under commented headlines
* lisp/ob-exp.el (org-babel-exp-process-buffer): Skip code under
  a commented headline.
* testing/lisp/test-ob-exp.el (ob-export/export-under-commented-headline):
  New test.
2014-03-15 19:40:13 -06:00
Nicolas Goaziou 7ae45b5331 ob-tangle: Fix `org-babel-under-commented-heading-p'
* lisp/ob-tangle.el (org-babel-under-commented-heading-p):
  `org-comment-string' is case sensitive and cannot be attached to
  other text.
2014-03-15 19:40:08 -06:00
Nicolas Goaziou ee8d564479 Properly unescape optional part in file links
* lisp/org.el (org-open-at-point): Unescape optional part in file
  links.

This patch allows to handle properly links like:

  [[file:somefile.org::*headline%20with%20spaces]]

Thanks to Thomas Holst for reporting it.
2014-03-15 16:04:38 +01:00
Bastien Guerry e1ede2271c org-src.el (org-src-preserve-indentation): Reformat docstring
* org-src.el (org-src-preserve-indentation): Reformat
docstring.
2014-03-15 07:42:19 +01:00
Nicolas Goaziou 8012443bc8 org-element: Speed up parsing
* lisp/org-element.el (org-element-inline-babel-call-successor):
  Improve speed.
2014-03-14 19:41:06 +01:00
Nicolas Goaziou e3fa9355f3 org-element: Tiny fix
* lisp/org-element.el (org-element--list-struct): Fix regexp.  Small
  refactoring.
2014-03-14 16:15:57 +01:00
Bastien Guerry d49957ef02 org-timer.el: Use the number of minutes in the Effort property
* org-timer.el (org-timer-cancel-timer, org-timer-stop):
Enhance message.
(org-timer-set-timer): Use the number of minutes in the Effort
property as the default timer value.  Three prefix arguments
will ignore the Effort value property.
2014-03-14 12:14:49 +01:00
Bastien Guerry e75d2031bc Merge branch 'maint' 2014-03-14 12:07:06 +01:00
Markus Hauck 62d759e3c9 Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline
* lisp/org-agenda.el (org-agenda-get-scheduled): If
  `org-agenda-skip-scheduled-if-deadline-is-shown' is set to
  'repeated-after-deadline, still show tasks without any deadline

The problem was that the check for the deadline seems to return a
default time even if no deadline is set for the task.  This adds a
check if there is a deadline at all, if there is none, the task is
shown in the agenda, otherwise the old semantics apply.

TINYCHANGE
2014-03-14 12:03:07 +01:00
Ilya Shlyakhter 475f2f5388 Properties: Fix property-getting with inheritance
* lisp/org.el (org-entry-get-with-inheritance): Temporarily
let-bind `org-file-properties', `org-global-properties' and
`org-global-properties-fixed' to nil before calling `org-entry-get'
on entries up the hierarchy from the queried entry.

Problem was that when org-entry-get-with-inheritance went up the
hierarchy of entries from a given entry, checking whether the property
has been set in any of the entries, it was calling org-entry-get,
which always looks at file-scope and global-scope properties.  So if
our property was set file-wide or system-wide, and somewhere up the
hierarchy there was an entry which set some properties _other_ than
the one we're looking up but did not set ours, org-entry-get would
fill in the global property value and report that our property was in
fact set in that entry.  The search would stop, and if the property
was actually set further up the hierarchy (which should override
file-wide or system-wide settings), we would never get to that
up-the-hierarchy setting.

Illustration of fixed problem:

#+PROPERTY: myprop aaa
* headline A
	:PROPERTIES:
	:myprop: bbb
	:END:
*** headline B
		:PROPERTIES:
		:otherprop:       ccc
		:END:

    #+BEGIN_SRC emacs-lisp
    (message (org-entry-get-with-inheritance "myprop"))
    #+END_SRC

    #+RESULTS:
    : aaa

		Result should be bbb, which it is after the fix.
2014-03-14 12:02:11 +01:00
Bastien Guerry 0997778dd1 org-timer.el (org-timer-stop): Set `org-timer-current-timer' to nil
* org-timer.el (org-timer-stop): Set `org-timer-current-timer'
to nil.
2014-03-14 11:57:15 +01:00
Bastien Guerry 07347025ee Merge branch 'maint' 2014-03-14 09:59:38 +01:00
Bastien Guerry 49a9c2b213 Fix 9323857 (again^2)
Thanks to Florian Beck for providing the right fix.
2014-03-14 09:59:28 +01:00
Oleh Krehel c1d5a0ae05 org.el (org-delete-property): Fix bug
* lisp/org.el (org-delete-property): `org-entry-delete' takes 2 args
  but was called with 3.
2014-03-13 21:51:50 +01:00
Bastien Guerry 6a57319d47 Merge branch 'maint' 2014-03-13 19:08:00 +01:00
Bastien Guerry 5ef5e7119f Fix 9323857 (again) 2014-03-13 19:07:50 +01:00
Bastien Guerry 3cf92b5bd8 org-entities.el (org-entities): Add "langle" and "rangle" aliases
* org-entities.el (org-entities): Add "langle" and "rangle" as
aliases for "lang" and "rang".

Thanks to Anders Johansson for suggesting this.
2014-03-13 16:46:04 +01:00
Bastien Guerry cec03f07b9 Merge branch 'maint' 2014-03-13 16:28:01 +01:00
Bastien Guerry 0cf58595d7 org.el (org-store-link): Fix bugs
* org.el (org-store-link): Ensure desc is not nil before
matching a regexp against it.
2014-03-13 16:27:51 +01:00
Nicolas Richard 700d58230b org.el (org-version): Obey all arguments in non-interactive uses
* org.el (org-version): Obey all arguments in non-interactive uses.
2014-03-13 16:00:45 +01:00
Bastien Guerry f4b0fb3dee Merge branch 'maint' 2014-03-13 15:50:35 +01:00
Bastien Guerry 7f65ba52ee org.el (org-store-link): Bugfix
* org.el (org-store-link): Fall back on an empty string when
no description is available.

This fixes a bug about tangling a source block outside of any
subtree when `org-id-link-to-org-use-id' is `t'.

Thanks to Sean Allred for reporting this.
2014-03-13 15:50:16 +01:00
Yasushi SHOJI e2b6c506c2 org-plot: Handle explicit date/time index
* lisp/org-plot.el (org-plot-quote-tsv-field): Dump data as is when
  `timeind' is set.

* lisp/org-plot.el (org-plot/gnuplot): By-pass type checking when
  either `textind' or `timeind' is set.

The current org-plot relies on `org-table-number-regexp' and
`org-ts-regexp3' to check the index type.  However, we already have
`timeind' to indicate that the index is the datatype of date/time.

By-pass the type checking in `org-plot/gnuplot' when either `textind'
or `timeind' is set.  The whole point of the check is to determine the
type. We do not need that when we already know.

Also dump the date/time data with `org-plot-quote-tsv-field' as is,
without double quotes, when `timeind' is set.  So that we can use
`timefmt' to read what we have.  Currently we do not have a good way
to specify `timefmt' with the double quotes.

TINYCHANGE
2014-03-13 12:56:54 +01:00
Bastien Guerry bca8a49363 Merge branch 'maint' 2014-03-13 12:50:18 +01:00
Bastien Guerry 23b98ac01e org-agenda.el (org-agenda-list-stuck-projects): Fix bug
* org-agenda.el (org-agenda-list-stuck-projects): Bugfix: set
`org-agenda-buffer-name'.

Thanks to Sébastien Vauban for reporting this.
2014-03-13 12:50:09 +01:00
Bastien Guerry 36ec702369 Merge branch 'maint' 2014-03-13 12:15:08 +01:00
Bastien Guerry 84bb027076 Revert "org-compat.el (org-move-to-column): Bugfix"
This reverts commit b32306279b.
2014-03-13 12:14:58 +01:00
Bastien Guerry 25f47777ef Complete commit 07158e
* org.el (org-refresh-category-properties)
(org-complete-expand-structure-template)
(org-buffer-property-keys, org-context):
* org-mouse.el (org-mouse-context-menu):
* org-list.el (org-list-send-list):
* org-element.el (org-element--list-struct):
* org-archive.el (org-all-archive-files): Allow spaces before
any option keyword.

* org.el (org-fontify-meta-lines-and-blocks-1): Fix
fontification of all option keywords.

Thanks to Alan Schmitt for raising the problem with fontification.
2014-03-13 11:28:07 +01:00
Bastien Guerry 423133efe9 org-capture.el: Use `org-buffer-narrowed-p'
* org-capture.el (org-capture-put-target-region-and-position):
Use `org-buffer-narrowed-p'.
2014-03-13 10:49:48 +01:00
Bastien Guerry 94f104ad5c org-capture.el: Fix wrong narrowing with :prepend set to `t'
* org-capture.el (org-capture-finalize): Ensure to widen the
buffer when the target buffer is not initially narrowed.

Thanks to Adam Spiers and Thomas Proschinger for reporting this bug.
2014-03-13 10:45:08 +01:00
Bastien Guerry a6bac51c5b org-capture.el: Fix wrong narrowing with :prepend set to `t'
* org-capture.el (org-capture-finalize): Ensure to widen the
buffer when the target buffer is not initially narrowed.

Thanks to Adam Spiers and Thomas Proschinger for reporting this bug.
2014-03-13 10:44:41 +01:00
Bastien Guerry a6f8460487 Merge branch 'maint' 2014-03-13 09:46:58 +01:00
Bastien Guerry f94ed64ffd Fix 9323857
Thanks to Charles Berry for reporting this.
2014-03-13 09:46:45 +01:00
Nicolas Goaziou 6062f9ea72 ox-publish: Fix small bug
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Find
  included file even if keyword is indented.
2014-03-12 21:30:13 +01:00
Nicolas Goaziou 07158efa53 Ignore indentation for all keywords
* lisp/org-archive.el (org-get-local-archive-location): Ignore
  identation for ARCHIVE keywords.
* lisp/org-colview.el (org-columns-store-format): Ignore indentation
  for COLUMNS keywords.
* lisp/org.el (org-mode): Keywords can start at any column.
(org-reftex-citation): Ignore indentation for BIBLIOGRAPHY keywords.
(org-make-options-regexp): Ignore indentation for all keywords.
2014-03-12 21:30:13 +01:00
Bastien Guerry c62b19eb2a Merge branch 'maint' 2014-03-12 19:42:17 +01:00
Bastien Guerry b32306279b org-compat.el (org-move-to-column): Bugfix
* org-compat.el (org-move-to-column): Fix bug about ignoring
bracket links visibility status in tables with S-RET.

Thanks to Michael Brand for reporting this.
2014-03-12 19:42:07 +01:00
Bastien Guerry 6bc020f153 Merge branch 'master' of orgmode.org:org-mode 2014-03-12 19:14:20 +01:00
Bastien Guerry 4d835d719d Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-03-12 19:14:03 +01:00
Arun Persaud 9323857411 org-src.el (org-edit-src-exit): Don't add indentation on empty lines
* org-src.el (org-edit-src-exit): Don't add indentation on
empty lines.

TINYCHANGE
2014-03-12 19:08:17 +01:00
Bastien Guerry f0e5683a12 org-src.el (org-edit-src-find-region-and-lang): Check if we are in a table.el table last
* org-src.el (org-edit-src-find-region-and-lang): Check if we
are in a table.el table last.

Thanks to zwz and Thomas Holst for reporting this.
2014-03-12 18:56:57 +01:00
Bastien Guerry b28ebdf3f1 org.el (org-delete-property): Don't suggest to delete the CATEGORY property
* org.el (org-delete-property): Don't suggest to delete the
CATEGORY property when the category is not explicitely set in
the property drawer.  Also enforce matching when completing.

Thanks to Oleh for providing a preliminary patch for this.
2014-03-12 18:41:01 +01:00
Bastien Guerry 250abf061b Bugfixes wrt inserting headings.
* org.el (org-insert-heading): Fix regression: with two
universal prefixes, insert heading at the end of the subtree.
(org-insert-todo-heading): Bugfix: only enforce the first TODO
state when arg is '(4).
2014-03-12 17:51:18 +01:00
Bastien Guerry ccd1d1a198 org-agenda.el (org-agenda-skip-subtree-if): Fix docstring
* org-agenda.el (org-agenda-skip-subtree-if): Fix docstring.
2014-03-12 16:44:08 +01:00
Bastien Guerry 4d32b9ebc4 Move ob-groovy.el into core. 2014-03-12 15:57:41 +01:00
Nicolas Goaziou 0a5f5117a3 org-element: Fix memory leak in cache
* lisp/org-element.el (org-element--cache-put): Do not store objects
  within headlines in cache as headlines are not cached, and,
  therefore, never removed.  This prevents adding the same object in
  cache multiple times without ever garbage collecting it.
2014-03-12 15:18:47 +01:00
Bastien Guerry bff69f97f3 org.el (org-contextualize-validate-key): Bugfix
* org.el (org-contextualize-validate-key): Fix bug: perform
the check even when (buffer-file-name) returns `nil'.
2014-03-12 11:57:38 +01:00
Nicolas Goaziou 2f60dfc1b3 Merge branch 'maint' 2014-03-12 09:08:37 +01:00
Nicolas Goaziou cb22a0355f org-element: Fix parsing of bold objects at the beginning of a headline
* lisp/org-element.el (org-element-context): Fix parsing of bold
  objects at the beginning of a headline.
* testing/lisp/test-org-element.el (test-org-element/context): Add
  test.
2014-03-12 09:05:50 +01:00
Eric Schulte 28ddf07a56 update named code block regexp for indentation
Previously didn't work if #+header lines intervening between the
  name and the block were indented.
2014-03-07 08:28:42 -07:00
Oleh Krehel 367780d133 Enforce `org-bookmark-names-plist'
* lisp/org-capture.el (org-capture-goto-last-stored): Use
  `org-bookmark-names-plist'.
* lisp/org.el (org-refile-goto-last-stored): Use
  `org-bookmark-names-plist'.
2014-03-07 14:09:16 +01:00
Nicolas Richard ec33c0cf9e lisp/ob-tangle.el: "elisp" should get tangled to ".el" files.
TINYCHANGE
2014-03-06 14:58:12 -07:00
Nicolas Goaziou a8568372ad org-element: Fix wrong cache behaviour
* lisp/org-element.el (org-element--cache-before-change): Correctly
  preserve match data.
2014-03-05 16:39:29 +01:00
Bastien Guerry 080f1dd5af Merge branch 'maint' 2014-03-05 15:47:55 +01:00
Bastien Guerry 9639edc517 org-colview.el (org-columns-display-here): Let-bind `fm'
* org-colview.el (org-columns-display-here): Let-bind `fm'.
2014-03-05 15:47:41 +01:00
Bastien Guerry c9e6a07cdf ob-coq.el: Declare external functions 2014-03-05 15:38:48 +01:00
Nicolas Goaziou 51718d9674 Fix last commit
* lisp/org.el (org-link-types): Hardcode "file+emacs" and "file+sys".
2014-03-05 14:59:12 +01:00
Nicolas Goaziou 2891ef7f87 Fix `org-open-at-point' on "docview"-type links
* lisp/org.el (org-open-at-point): Open "docview"-type links
  correctly, i.e., without adding "file+" first.
(org-open-file-with-system, org-open-file-with-emacs): Change
signature.  Deprecate functions.

* lisp/org-docview.el (org-docview-open): Open file even when no file
  number is specified.

This change removes "file+emacs" and "file+sys" types from
`org-link-protocols', since they are not hard-coded in
`org-open-at-point'.
2014-03-05 11:39:48 +01:00
Bastien Guerry adbb2f7c9f Fix doc and code inconsistency: now use =verbatim= and ~code~.
* org.el (org-emphasis-alist): Use `org-verbatim' for =text=
and `org-code' for ~text~.

* org.texi (Emphasis and monospace): Document the use of
=verbatim= and ~code~ to be consistent with
`org-element-text-markup-successor'.

Thanks to Yasushi for reporting this.
2014-03-04 10:49:49 +01:00
Bastien Guerry fb8a042887 org-agenda.el (org-agenda-custom-commands-contexts): Fix docstring
* org-agenda.el (org-agenda-custom-commands-contexts): Fix docstring.
2014-03-03 17:34:12 +01:00
Nicolas Goaziou 567ec8791a Unescape links before opening them
* lisp/org.el (org-open-at-point): Unescape links before opening
  them.  This bug was introduced in
  fc9ce86cfc.
2014-03-03 15:55:26 +01:00
Bastien Guerry ebceff5412 ob-clojure.el: Don't use `cider-current-ns' to set the current namespace
* ob-clojure.el (org-babel-execute:clojure): Don't use
`cider-current-ns' to set the current namespace.

Thanks to Volker Strobel for reporting this issue.
2014-03-03 13:53:50 +01:00
Bastien Guerry 7097566dfb org.el (org-link-prettify): Docstring cleanup
* org.el (org-link-prettify): Docstring cleanup.
2014-03-03 13:31:24 +01:00
Ilya Shlyakhter 9059c8fae0 When computing clock table, remove arbitrary limit on hierarchy depth.
* org-clock.el (org-clock-sum): Enlarge array of per-level clock
  totals as needed on demand.
2014-03-03 13:26:15 +01:00