org-mode.git
5 years agoorg-export: Fix smart quotes with isolated quotes
Nicolas Goaziou [Mon, 29 Oct 2012 19:36:03 +0000 (20:36 +0100)]
org-export: Fix smart quotes with isolated quotes

* contrib/lisp/org-export.el (org-export-activate-smart-quotes): Fix
  smart quotes in some corner-cases.  Refactor code.
* testing/lisp/test-org-export.el: Add test.

5 years agoorg-element: Fix accessors and setters wrt secondary strings
Nicolas Goaziou [Mon, 29 Oct 2012 18:03:54 +0000 (19:03 +0100)]
org-element: Fix accessors and setters wrt secondary strings

* lisp/org-element.el (org-element-contents, org-element-set-contents,
  org-element-adopt-elements): Fix accessors and setters wrt secondary
  strings.

5 years agoorg-element: Fix void-function org-clocking-buffer error
Nicolas Goaziou [Mon, 29 Oct 2012 15:26:34 +0000 (16:26 +0100)]
org-element: Fix void-function org-clocking-buffer error

* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser): Fix void-function
  org-clocking-buffer error.

5 years agoorg-element: Fix org-element-context on parsed keywords
Nicolas Goaziou [Mon, 29 Oct 2012 12:52:09 +0000 (13:52 +0100)]
org-element: Fix org-element-context on parsed keywords

* lisp/org-element.el (org-element-context): Fix org-element-context
  on parsed keywords.
* testing/lisp/test-org-element.el: Update test.

5 years agoorg-export: Expand correctly {{{title}}} and such
Nicolas Goaziou [Mon, 29 Oct 2012 12:42:30 +0000 (13:42 +0100)]
org-export: Expand correctly {{{title}}} and such

* contrib/lisp/org-export.el (org-export-as): Expand correctly
  {{{title}}} and such when they already contain a regular macro.
  This is done by expanding macros in two steps: at first regular
  macros,  then document specific macros.
(org-export-expand-macro): Remove function.
* testing/lisp/test-org-export.el: Add test.

5 years agoorg-export: Explicit error when using invalid syntax for INCLUDE keywords
Nicolas Goaziou [Mon, 29 Oct 2012 10:31:19 +0000 (11:31 +0100)]
org-export: Explicit error when using invalid syntax for INCLUDE keywords

* contrib/lisp/org-export.el (org-export-expand-include-keyword):
  Error out when file isn't specified within double quotes.
* testing/lisp/test-org-export.el: Add test.

5 years agoorg-element: Find objects in document and parsed affiliated keywords
Nicolas Goaziou [Mon, 29 Oct 2012 09:53:32 +0000 (10:53 +0100)]
org-element: Find objects in document and parsed affiliated keywords

* lisp/org-element.el (org-element-context): Find objects in document
  and parsable affiliated keywords.
* testing/lisp/test-org-element.el: Add tests.

5 years agoorg-element: Add `:post-affiliated' property to elements when applicable
Nicolas Goaziou [Mon, 29 Oct 2012 09:58:52 +0000 (10:58 +0100)]
org-element: Add `:post-affiliated' property to elements when applicable

* lisp/org-element.el (org-element-center-block-parser,
  org-element-drawer-parser, org-element-dynamic-block-parser,
  org-element-footnote-definition-parser,
  org-element-plain-list-parser, org-element-property-drawer-parser,
  org-element-quote-block-parser, org-element-special-block-parser,
  org-element-babel-call-parser, org-element-comment-parser,
  org-element-comment-block-parser, org-element-diary-sexp-parser,
  org-element-example-block-parser, org-element-export-block-parser,
  org-element-fixed-width-parser, org-element-horizontal-rule-parser,
  org-element-keyword-parser, org-element-latex-environment-parser,
  org-element-paragraph-parser, org-element-src-block-parser,
  org-element-table-parser, org-element-verse-block-parser): Add
  `:post-affiliated' property to elements.
(org-element-inlinetask-parser): Remove affilated keywords.
* lisp/org.el (org-adaptive-fill-function): Use new property.

This property is cheap to compute during parsing and allows to
determine if point is on an affiliated keyword or not by checking if
it is between :begin and :post-affiliated positions.

5 years agoMerge branch 'maint'
Bastien Guerry [Mon, 29 Oct 2012 06:41:29 +0000 (07:41 +0100)]
Merge branch 'maint'

5 years agoorg-src.el (org-edit-src-exit): Fix editing source section with blank lines
Le Wang [Mon, 29 Oct 2012 05:37:41 +0000 (06:37 +0100)]
org-src.el (org-edit-src-exit): Fix editing source section with blank lines

* org-src.el (org-edit-src-exit): Fix editing source section
with blank lines.

TINYCHANGE

This bug was introduced by commit aba9e2b9.

5 years agoorg-remember.el: Correctly strip the comment lines in remember buffer
Rafael Laboissiere [Sun, 28 Oct 2012 16:38:19 +0000 (17:38 +0100)]
org-remember.el: Correctly strip the comment lines in remember buffer

* org-remember.el (org-remember-handler): Correctly strip the comment lines
  in the temporary buffer *Remember* when handling a remember note.

TINYCHANGE

5 years agoorg-export: Add filter set for diary sexp elements
Nicolas Goaziou [Sun, 28 Oct 2012 22:00:04 +0000 (23:00 +0100)]
org-export: Add filter set for diary sexp elements

* contrib/lisp/org-export.el (org-export-filters-alist): Add filter
  set for diary sexp elements.
(org-export-filter-comment-block-functions): Fix docstring.
(org-export-filter-diary-sexp-functions): New variable.

5 years agoorg-element: Allow duals keywords with only secondary value
Nicolas Goaziou [Sun, 28 Oct 2012 21:43:50 +0000 (22:43 +0100)]
org-element: Allow duals keywords with only secondary value

* lisp/org-element.el (org-element--collect-affiliated-keywords):
  Allow duals keywords with only secondary value.
* testing/lisp/test-org-element.el: Add test.

This patch allows to parse correctly the following:

    #+CAPTION[short caption]:
    #+CAPTION: Very long caption
    Some paragraph.

5 years agoExport back-ends: Update timestamp export
Nicolas Goaziou [Sun, 28 Oct 2012 15:20:45 +0000 (16:20 +0100)]
Export back-ends: Update timestamp export

* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-groff.el (org-e-groff-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Update timestamp
  export.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Update
  timestamp export.
* contrib/lisp/org-e-odt.el (org-e-odt-timestamp): Update timestamp
  export.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-timestamp): Update
  timestamp export.

5 years agoorg-element: Improve timestamps parsing
Nicolas Goaziou [Fri, 28 Sep 2012 12:50:21 +0000 (14:50 +0200)]
org-element: Improve timestamps parsing

* lisp/org-element.el (org-element-timestamp-parser): Modify timestamp
  objects properties.
(org-element-headline-parser, org-element-inlinetask-parser): Remove
`:timestamp' and `:clock' property.  Add `:clockedp' property.  Also,
set `:closed', `:deadline' and `:scheduled' values to timestamp
objects, not strings.  Small refactoring.
(org-element-clock-parser): Rename `:time' property into `:duration'.
Also, set `:value' value as a timestamp object, not a string.
(org-element-planning-parser): Set `:closed', `:deadline' and
`:scheduled' values to timestamp objects, not strings.
(org-element-clock-interpreter, org-element-planning-interpreter)
(org-element-timestamp-interpreter): Update interpreters.
(org-element--current-element): Tiny refactoring.
* testing/lisp/test-org-element.el: Add tests.

5 years agoob: Fix block evaluation in a narrowed buffer
Nicolas Goaziou [Wed, 24 Oct 2012 15:23:20 +0000 (17:23 +0200)]
ob: Fix block evaluation in a narrowed buffer

* lisp/ob.el (org-babel-where-is-src-block-result): Insert new results
  keyword in current narrowed part of buffer, if necessary. Small
  refactoring.
(org-babel-insert-result): Do not widen buffer when new results have
to be inserted.  Therefore, results inserted after the last block of
a narrowed buffer still belong to the narrowed part of the buffer.
* testing/lisp/test-ob.el: Add tests.
* testing/lisp/test-ob-exp.el: Move test to test-ob.el

5 years agoorg-export: Fix expansion of babel calls in included files
Nicolas Goaziou [Thu, 18 Oct 2012 18:44:24 +0000 (20:44 +0200)]
org-export: Fix expansion of babel calls in included files

* contrib/lisp/org-export.el (org-export-as):
  `org-current-export-file' should refer to current, temporary, buffer
  containing included contents, not to original buffer with include
  keywords.
(org-export-with-current-buffer-copy): Buffer copy must contain the
whole buffer, possibly narrowed to a proper part, not only the
narrowed part.
* testing/lisp/test-org-export.el: Tweak tests.

5 years agoorg-agenda: Tiny stylistic change
Nicolas Goaziou [Sun, 28 Oct 2012 12:53:29 +0000 (13:53 +0100)]
org-agenda: Tiny stylistic change

* lisp/org-agenda.el (org-agenda-get-deadlines): Tiny stylistic
  change.

5 years agoorg.el (org-additional-option-like-keywords): Add "INDEX:"
Bastien Guerry [Sun, 28 Oct 2012 10:39:01 +0000 (11:39 +0100)]
org.el (org-additional-option-like-keywords): Add "INDEX:"

* org.el (org-additional-option-like-keywords): Add "INDEX:".

5 years agoorg-agenda: New option: skip deadline prewarning if scheduled in the future
Justus Piater [Fri, 26 Oct 2012 10:47:47 +0000 (12:47 +0200)]
org-agenda: New option: skip deadline prewarning if scheduled in the future

* lisp/org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled):
  Add an option to skip the deadline prewarning if the scheduled date is
  in the future.

5 years agoMerge branch 'maint'
Bastien Guerry [Sun, 28 Oct 2012 10:10:44 +0000 (11:10 +0100)]
Merge branch 'maint'

5 years agoorg-remember.el: Start the commented lines with the appropriate characters
Rafael Laboissiere [Sat, 27 Oct 2012 21:40:39 +0000 (23:40 +0200)]
org-remember.el: Start the commented lines with the appropriate characters

* org-remember.el (org-remember-apply-template): Start the commented
  lines in the Remember temporary buffer with the appropriate
  characters.

TINYCHANGE

5 years agoMerge branch 'maint'
Bastien Guerry [Sat, 27 Oct 2012 19:44:21 +0000 (21:44 +0200)]
Merge branch 'maint'

5 years agoorg.texi (Comment lines): Fix description of the comment syntax
Bastien Guerry [Sat, 27 Oct 2012 19:44:09 +0000 (21:44 +0200)]
org.texi (Comment lines): Fix description of the comment syntax

* org.texi (Comment lines): Fix description of the comment
syntax.

Thanks to Rafael Laboissiere for reporting this.

5 years agoorg-element: Parse diary-sexp elements
Nicolas Goaziou [Sat, 27 Oct 2012 12:23:37 +0000 (14:23 +0200)]
org-element: Parse diary-sexp elements

* lisp/org-element.el (org-element-paragraph-separate): Diary-sexp
  elements can separate paragraphs.
(org-element-all-elements): Install new `diary-sexp' type.
(org-element--current-element): Recognize new `diary-sexp' elements.
(org-element-diary-sexp-parser, org-element-diary-sexp-interpreter):
New functions.
* testing/lisp/test-org-element.el: Add tests.

5 years agoorg-element: Small refactoring
Nicolas Goaziou [Sat, 27 Oct 2012 12:19:58 +0000 (14:19 +0200)]
org-element: Small refactoring

* lisp/org-element.el (org-element-horizontal-rule-parser,
  org-element-keyword-parser, org-element--current-element): Small
  refactoring.

5 years agoExport back-ends: Install smart quotes module
Nicolas Goaziou [Fri, 26 Oct 2012 22:36:00 +0000 (00:36 +0200)]
Export back-ends: Install smart quotes module

* contrib/lisp/org-e-ascii.el (org-e-ascii-plain-text): Install smart
  quotes module.
* contrib/lisp/org-e-html.el (org-e-html-plain-text): Install smart
  quotes module.  Fix :preseve-breaks option.
(org-e-html--quotation-marks): Remove function.
(org-e-html-quotes): Remove variable.
* contrib/lisp/org-e-latex.el (org-e-latex-plain-text): Install smart
  quotes module.
(org-e-latex--quotation-marks): Remove function.
(org-e-latex-quotes): Remove variable.
* contrib/lisp/org-e-odt.el (org-e-odt-plain-text): Install smart
  quotes module.
(org-e-odt--quotation-marks): Remove function.
(org-e-odt-quotes): Remove variable.
* contrib/lisp/org-md.el (org-md-plain-text): Install smart quotes
  module.  Fix characters escaping.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-center-block,
  org-e-texinfo-special-block): new functions.
(org-e-texinfo-quotes): Remove variable.
(org-e-texinfo--quotations-marks): Remove function.
(org-e-texinfo-plain-text): Install smart quotes module.
* contrib/lisp/org-e-groff.el (org-e-groff-plain-text): Install smart
quotes module.  Fix line break preservation.
(org-e-groff--quotation-marks): Remove function.
(org-e-groff-quotes): Remove variable.
(org-e-groff-entity): Fix property name.
* contrib/lisp/org-e-man.el (org-e-man-entity): Fix property name.
(org-e-man-plain-text): Install smart quotes module.  Fix line break
preservation.
(org-e-man-quotes): Remove variable.
(org-e-man--quotation-marks): Remove function.

5 years agoorg-export: Implement a generic smart quote module
Nicolas Goaziou [Thu, 25 Oct 2012 21:54:53 +0000 (23:54 +0200)]
org-export: Implement a generic smart quote module

* contrib/lisp/org-export.el (org-export-options-alist): Add an option
  item to toggle smart quotes during export.
(org-export-with-smart-quotes, org-export-smart-quotes-alist,
org-export-smart-quotes-regexps): New variables.
(org-export-activate-smart-quotes): New function.
(org-export-data): Remove residual text properties.
* testing/lisp/test-org-export.el: Add tests.

5 years agoorg-element: Add :parent text property to strings in parse tree
Nicolas Goaziou [Thu, 25 Oct 2012 19:33:57 +0000 (21:33 +0200)]
org-element: Add :parent text property to strings in parse tree

* lisp/org-element.el (org-element-property): Access to text
  properties when argument is a string.
(org-element-put-property): Correctly set property when target is
a string.
(org-element-adopt-elements): Also put :parent properties on strings.
* testing/lisp/test-org-element.el: Add test.

5 years agoMerge branch 'maint'
Bastien Guerry [Sat, 27 Oct 2012 07:39:12 +0000 (09:39 +0200)]
Merge branch 'maint'

5 years agoorg.el (org-log-into-drawer): Honor the nil value for the :LOG_INTO_DRAWER: property.
Erik Hetzner [Sat, 27 Oct 2012 07:37:54 +0000 (09:37 +0200)]
org.el (org-log-into-drawer): Honor the nil value for the :LOG_INTO_DRAWER: property.

* org.el (org-log-into-drawer): Honor the nil value for the
:LOG_INTO_DRAWER: property.

TINYCHANGE

5 years agoMerge branch 'maint'
Bastien Guerry [Sat, 27 Oct 2012 07:25:18 +0000 (09:25 +0200)]
Merge branch 'maint'

5 years agoorg-install.el: Enhance warning
Bastien Guerry [Sat, 27 Oct 2012 07:25:14 +0000 (09:25 +0200)]
org-install.el: Enhance warning

* org-install.el: Enhance warning.

Thanks to Simon Thum for requesting this.

5 years agoMerge branch 'maint'
Bastien Guerry [Sat, 27 Oct 2012 07:08:35 +0000 (09:08 +0200)]
Merge branch 'maint'

5 years agoorg.texi (Installation): Mention "make test" in the correct section
Bastien Guerry [Sat, 27 Oct 2012 07:08:28 +0000 (09:08 +0200)]
org.texi (Installation): Mention "make test" in the correct section

* org.texi (Installation): Mention "make test" in the correct
section.

Thanks to Uvius for reporting this problem.

5 years agoorg-export: Fix error when exporting buffers not visiting a file
Nicolas Goaziou [Fri, 26 Oct 2012 22:02:28 +0000 (00:02 +0200)]
org-export: Fix error when exporting buffers not visiting a file

* contrib/lisp/org-export.el (org-export-output-file-name): Do not
  return an error when exported buffer isn't visiting a file.

5 years agoMerge branch 'maint'
Bastien Guerry [Fri, 26 Oct 2012 13:59:10 +0000 (15:59 +0200)]
Merge branch 'maint'

5 years agoFix typo in refcard and whitespaces in org.texi.
Bastien Guerry [Fri, 26 Oct 2012 13:59:06 +0000 (15:59 +0200)]
Fix typo in refcard and whitespaces in org.texi.

5 years agoMerge branch 'maint'
Bastien Guerry [Fri, 26 Oct 2012 13:12:02 +0000 (15:12 +0200)]
Merge branch 'maint'

5 years agoRemove the obsolete argument `hidden' from `org-export-as-latex'.
Bastien Guerry [Fri, 26 Oct 2012 13:05:10 +0000 (15:05 +0200)]
Remove the obsolete argument `hidden' from `org-export-as-latex'.

* org-latex.el (org-export-as-latex): Remove obsolete argument
`hidden'.  Also fix the docstring: using 'string as the value
for `to-buffer' outputs a string with no LaTeX header.
(org-export-as-latex-batch)
(org-export-as-latex-to-buffer, org-export-region-as-latex)
(org-export-as-pdf): Don't use the obsoleted argument.

* ob-haskell.el (org-export-as-latex): Don't use the obsoleted
argument `hidden'.

5 years agoRun `bookmark-set' within `with-demoted-errors'.
Bastien Guerry [Fri, 26 Oct 2012 12:55:08 +0000 (14:55 +0200)]
Run `bookmark-set' within `with-demoted-errors'.

* org.el (org-refile): Run within `with-demoted-errors' so
that a corrupted bookmark file does not stop the refile
process.

* org-capture.el (org-capture-bookmark-last-stored-position):
Ditto for the capture process.

Note: we do not prevent such errors in org-remember.el as this
libary will be obsoleted for the next major release of Org.

5 years agocontrib/lisp/org-contacts.el: Require 'org-agenda.
Bastien Guerry [Fri, 26 Oct 2012 12:49:09 +0000 (14:49 +0200)]
contrib/lisp/org-contacts.el: Require 'org-agenda.

Thanks to Christopher Schmidt for pointing this.

5 years agoClocking: Move to task before calling org-clock-in-prepare-hook
Myles English [Fri, 26 Oct 2012 11:38:09 +0000 (12:38 +0100)]
Clocking: Move to task before calling org-clock-in-prepare-hook

* lisp/org-clock.el (org-clock-in): Moved the call to
org-clock-in-prepare-hook until the task's properties
can be accessed.

The problem was when using a function to add an effort
property via the hook, it would not recognise an existing
effort property when called with the prefix (C-u C-c C-x C-i)
with the point at a place other than at the task.

TINYCHANGE

5 years agoFix bug in org-agenda-diary-sexp-prefix
Toby S. Cubitt [Fri, 26 Oct 2012 12:06:28 +0000 (14:06 +0200)]
Fix bug in org-agenda-diary-sexp-prefix

* lisp/org-agenda.el (org-agenda-get-sexps): Reset `extra' to nil at
beginning of re-search-forward loop, otherwise next iteration picks up
`extra' value from previous entry.

5 years agoMerge branch 'maint'
Achim Gratz [Fri, 26 Oct 2012 06:18:59 +0000 (08:18 +0200)]
Merge branch 'maint'

5 years agoob-ditaa: needs to require org-compat for org-find-library-dir
Achim Gratz [Fri, 26 Oct 2012 06:18:07 +0000 (08:18 +0200)]
ob-ditaa: needs to require org-compat for org-find-library-dir

* lisp/ob-ditaa.el: Needs to (require 'org-compat) for org-find-library-dir.

5 years agoob-exp: Escape code when re-creating a src blocks
Nicolas Goaziou [Thu, 25 Oct 2012 14:23:51 +0000 (16:23 +0200)]
ob-exp: Escape code when re-creating a src blocks

* lisp/ob-exp.el (org-babel-exp-code): Escape code when re-creating
  a src blocks.

5 years agoorg-e-texinfo: Update compile function
Nicolas Goaziou [Thu, 25 Oct 2012 14:07:13 +0000 (16:07 +0200)]
org-e-texinfo: Update compile function

* contrib/lisp/org-e-texinfo.el (org-e-texinfo-compile): Mirror recent
changes about base filename and default-directory made to
`org-e-latex-compile'.

5 years agoorg-e-man, org-e-groff: Update compile functions
Nicolas Goaziou [Thu, 25 Oct 2012 14:06:18 +0000 (16:06 +0200)]
org-e-man, org-e-groff: Update compile functions

* contrib/lisp/org-e-groff.el (org-e-groff-compile): Mirror recent
  changes about base filename and default-directory made to
  `org-e-latex-compile'.
* contrib/lisp/org-e-man.el (org-e-man-compile): Mirror recent changes
  about base filename and default-directory made to
  `org-e-latex-compile'.

5 years agoorg-e-latex: "%b" really means base filename
Nicolas Goaziou [Thu, 25 Oct 2012 12:52:25 +0000 (14:52 +0200)]
org-e-latex: "%b" really means base filename

* contrib/lisp/org-e-latex.el (org-e-latex-pdf-process): Update
  docstring.
(org-e-latex-compile): "%b" is replaced with base filename, that is
filename without directory and extension.

5 years agoMerge branch 'maint'
Bastien Guerry [Thu, 25 Oct 2012 08:56:47 +0000 (10:56 +0200)]
Merge branch 'maint'

5 years agoBabel: add results value support to Scala
Caio Tiago Oliveira [Mon, 15 Oct 2012 18:52:50 +0000 (15:52 -0300)]
Babel: add results value support to Scala

* lisp/ob-scala.el (org-babel-scala-wrapper-method): Use a Scala
block enclosing the submitted code.

The string representing an well formed block was not an Scala code. I
put the string from the user into an block, surrounded by an call to
replace the default output stream.

TINYCHANGE

5 years agoMerge branch 'maint'
Bastien Guerry [Thu, 25 Oct 2012 08:49:35 +0000 (10:49 +0200)]
Merge branch 'maint'

5 years agoorg-src.el (org-edit-src-exit): Fix bug when saving an empty source buffer
Bastien Guerry [Thu, 25 Oct 2012 08:48:33 +0000 (10:48 +0200)]
org-src.el (org-edit-src-exit): Fix bug when saving an empty source buffer

* org-src.el (org-edit-src-exit): Fix bug when saving an empty
source buffer.

Thanks to Hsiu-Khuern Tang for reporting this.

5 years agoMerge branch 'maint'
Bastien Guerry [Wed, 24 Oct 2012 13:56:11 +0000 (15:56 +0200)]
Merge branch 'maint'

5 years agoorg-lparse.el (org-lparse): Fix bug by returning the output of `org-do-lparse'.
Bastien Guerry [Wed, 24 Oct 2012 13:55:59 +0000 (15:55 +0200)]
org-lparse.el (org-lparse): Fix bug by returning the output of `org-do-lparse'.

* org-lparse.el (org-lparse): Fix bug by returning the output
of `org-do-lparse'.

Thanks to Jambunathan for reporting this.

5 years agoorg.texi: Delete trailing whitespaces.
Bastien Guerry [Wed, 24 Oct 2012 13:00:27 +0000 (15:00 +0200)]
org.texi: Delete trailing whitespaces.

5 years agoTable lookup functions
Jarmo Hurri [Mon, 15 Oct 2012 06:54:24 +0000 (09:54 +0300)]
Table lookup functions

* lisp/org-table.el: added macro org-define-lookup-function and the
calls to this macro that generate the lookup functions
org-lookup-first, org-lookup-last and org-lookup-all
* doc/org.texi: documented lookup functions

5 years agoMerge branch 'maint'
Bastien Guerry [Wed, 24 Oct 2012 10:49:30 +0000 (12:49 +0200)]
Merge branch 'maint'

Conflicts:
lisp/org.el

5 years agoorg.el: Add more explicit errors. Fix some declarations and one autoload.
Bastien Guerry [Wed, 24 Oct 2012 10:45:08 +0000 (12:45 +0200)]
org.el: Add more explicit errors.  Fix some declarations and one autoload.

* org.el (org-refile-check-position): Throw an error when the
refile target is the current buffer and is not a file.
(org-agenda-file-to-front, org-remove-file): Throw an error
when the current buffer is not a file.
(org-check-agenda-file): Enhance the message.
(org-element-type): Autoload.
(org-element-context, org-element-paragraph-parser): Don't
declare as these two functions are not used in org.el.

5 years agoorg-lparse.el (browse-url-file-url): Declare.
Bastien Guerry [Wed, 24 Oct 2012 10:44:22 +0000 (12:44 +0200)]
org-lparse.el (browse-url-file-url): Declare.

* org-lparse.el (browse-url-file-url): Declare.

5 years agoorg.el (org-refile-check-position): Fix typo in docstring.
Bastien Guerry [Wed, 24 Oct 2012 10:23:08 +0000 (12:23 +0200)]
org.el (org-refile-check-position): Fix typo in docstring.

* org.el (org-refile-check-position): Fix typo in docstring.

5 years agoMerge branch 'maint'
Bastien Guerry [Wed, 24 Oct 2012 09:21:48 +0000 (11:21 +0200)]
Merge branch 'maint'

5 years agoUse "mode-line" instead of "modeline".
Bastien Guerry [Wed, 24 Oct 2012 09:21:44 +0000 (11:21 +0200)]
Use "mode-line" instead of "modeline".

* org-clock.el (org-clock-modeline-total): Make obsolete.
(org-clock-mode-line-total): Rename from
`org-clock-modeline-total'.
(org-clock-get-sum-start): Fix references to
`org-clock-modeline-total'.

* org-faces.el (org-agenda-filter-tags)
(org-agenda-filter-category, mode-line): Use the 'mode-line
face instead of the obsolete 'modeline.

Thanks to Brendan Halpin for reporting this.

5 years agoob-exp: Fix small bug
Nicolas Goaziou [Tue, 23 Oct 2012 20:27:58 +0000 (22:27 +0200)]
ob-exp: Fix small bug

* lisp/ob-exp.el (org-export-blocks-preprocess): Pos can sometimes be
  set to a value greater than start, because of indentation, and lead
  to a search bound error.

5 years agoMerge branch 'maint'
Bastien Guerry [Tue, 23 Oct 2012 16:41:45 +0000 (18:41 +0200)]
Merge branch 'maint'

5 years agoFix typos fixed in Emacs (part 2)
Bastien Guerry [Tue, 23 Oct 2012 16:41:33 +0000 (18:41 +0200)]
Fix typos fixed in Emacs (part 2)

Thanks to Paul Eggert for the fixes:
http://lists.gnu.org/archive/html/emacs-diffs/2012-10/msg00069.html

5 years agoMerge branch 'maint'
Bastien Guerry [Tue, 23 Oct 2012 16:39:32 +0000 (18:39 +0200)]
Merge branch 'maint'

5 years agoFix typos fixed in Emacs (part 1)
Bastien Guerry [Tue, 23 Oct 2012 16:39:20 +0000 (18:39 +0200)]
Fix typos fixed in Emacs (part 1)

Thanks to Paul Eggert for the fixes:
http://lists.gnu.org/archive/html/emacs-diffs/2012-10/msg00069.html

5 years agoorg-export: Fix commit 468d86052805e3d1438ae4a0487b4f197e572b82
Nicolas Goaziou [Mon, 22 Oct 2012 21:56:26 +0000 (23:56 +0200)]
org-export: Fix commit 468d86052805e3d1438ae4a0487b4f197e572b82

* contrib/lisp/org-export.el (org-export-dispatch-ui): Ensure fitting
  happens once contents have been inserted in the displayed buffer.

5 years agoorg-export: Use relative path for target filenames
Nicolas Goaziou [Mon, 22 Oct 2012 18:58:27 +0000 (20:58 +0200)]
org-export: Use relative path for target filenames

* contrib/lisp/org-export.el (org-export-output-file-name): Use
  relative path for target filenames.

5 years agoob-exp: Remove comma-escaping special rule for Org blocks
Nicolas Goaziou [Mon, 22 Oct 2012 17:23:05 +0000 (19:23 +0200)]
ob-exp: Remove comma-escaping special rule for Org blocks

* lisp/ob-exp.el (org-babel-exp-code): Remove comma-escaping special
  rule for Org blocks.

5 years agoorg-export: Make sure that window displaying UI is tall enough
Nicolas Goaziou [Sun, 21 Oct 2012 12:54:23 +0000 (14:54 +0200)]
org-export: Make sure that window displaying UI is tall enough

* contrib/lisp/org-export.el (org-export-dispatch-ui): Make sure that
  window displaying UI is tall enough. This fixes a bug where only
  a part of the menu was displayed.

5 years agoSupport using git-annex with Org attachments
John Wiegley [Sat, 20 Oct 2012 14:47:01 +0000 (07:47 -0700)]
Support using git-annex with Org attachments

5 years agoMerge branch 'maint'
Nicolas Goaziou [Sat, 20 Oct 2012 09:59:07 +0000 (11:59 +0200)]
Merge branch 'maint'

5 years agoFix auto filling in a paragraph directly following a comment
Nicolas Goaziou [Sat, 20 Oct 2012 09:58:16 +0000 (11:58 +0200)]
Fix auto filling in a paragraph directly following a comment

* lisp/org.el (org-auto-fill-function): Make sure `adaptive-fill-mode'
  mode is nil when pre-computed `fill-prefix' is the empty string.
  Otherwise filling functions from fill.el think it has to be computed
  again and overwrite it.

5 years agoadding ob-makefile to `org-babel-load-languages'
Eric Schulte [Wed, 17 Oct 2012 21:07:58 +0000 (15:07 -0600)]
adding ob-makefile to `org-babel-load-languages'

* lisp/org.el (org-babel-load-languages): Adding ob-makefile to
  `org-babel-load-languages'.

5 years ago* lisp/ob-makefile.el: Org-babel support for Makefile tangling.
Thomas Dye [Fri, 12 Oct 2012 18:38:06 +0000 (08:38 -1000)]
* lisp/ob-makefile.el: Org-babel support for Makefile tangling.

5 years agoorg-reload: don't report an error for features found in load-path
Achim Gratz [Wed, 17 Oct 2012 18:27:49 +0000 (20:27 +0200)]
org-reload: don't report an error for features found in load-path

* lisp/org.el (org-reload): Remove babel-dir, since it would always
  coincide with org-dir.  Features found in load-path are not reported
  as a (possible) error, but keep a list of these to issue a message
  that the actual location may need checking.

5 years agoMerge branch 'maint'
Nicolas Goaziou [Wed, 17 Oct 2012 15:22:58 +0000 (17:22 +0200)]
Merge branch 'maint'

5 years agoFix bug related to agenda bulding with hour repeaters
Nicolas Goaziou [Wed, 10 Oct 2012 14:11:41 +0000 (16:11 +0200)]
Fix bug related to agenda bulding with hour repeaters

* lisp/org.el: Make `org-closest-date' aware of hours repeaters.

5 years agoorg-export: Don't modify inlinetasks stars when including a file
Nicolas Goaziou [Tue, 16 Oct 2012 20:00:39 +0000 (22:00 +0200)]
org-export: Don't modify inlinetasks stars when including a file

* contrib/lisp/org-export.el (org-export--prepare-file-contents):
  Don't modify inlinetasks stars when including a file.

5 years agoMerge branch 'maint'
Nicolas Goaziou [Tue, 16 Oct 2012 19:12:21 +0000 (21:12 +0200)]
Merge branch 'maint'

5 years agoDo not call `end-of-visual-line' when moving to the end of line
Nicolas Goaziou [Tue, 16 Oct 2012 18:18:57 +0000 (20:18 +0200)]
Do not call `end-of-visual-line' when moving to the end of line

* lisp/org.el (org-end-of-line): Do not call `end-of-visual-line' when
  moving to the end of line.  Also improve behaviour on elements that
  can be hidden.
* testing/lisp/test-org.el: Add tests.

5 years agoMerge branch 'maint'
Nicolas Goaziou [Mon, 15 Oct 2012 20:32:25 +0000 (22:32 +0200)]
Merge branch 'maint'

5 years agoAllow to call `org-show-todo-tree' with an argument
Nicolas Goaziou [Mon, 15 Oct 2012 20:31:37 +0000 (22:31 +0200)]
Allow to call `org-show-todo-tree' with an argument

* lisp/org.el (org-sparse-tree): Allow to call `org-show-todo-tree'
  with an argument.
* doc/orgcard.tex: Fix keybindings about `org-show-todo-tree'.

5 years agoob-exp: Fix removal of block results when exporting
Nicolas Goaziou [Mon, 15 Oct 2012 20:29:30 +0000 (22:29 +0200)]
ob-exp: Fix removal of block results when exporting

* lisp/ob-exp.el (org-export-blocks-preprocess): Results of an
  evaluated code block can be inserted within the blank lines after
  the block.  Hence, if the block has to be removed, delete everything
  down to the first non-blank line after the end of block closing
  string, instead of removing everything down to the very end of the
  block.
* testing/lisp/test-ob-exp.el: Add test.

5 years agoMerge branch 'maint'
Nicolas Goaziou [Mon, 15 Oct 2012 19:33:44 +0000 (21:33 +0200)]
Merge branch 'maint'

5 years agoorg.texi: Fix a function name
Nicolas Goaziou [Mon, 15 Oct 2012 19:33:06 +0000 (21:33 +0200)]
org.texi: Fix a function name

5 years agoFix date prompt documentation
Carsten Dominik [Mon, 15 Oct 2012 06:38:54 +0000 (08:38 +0200)]
Fix date prompt documentation

* doc/org.texi: Explain that date/time information at read-date prompt should
start at the beginning, not anywhere in the middle of a long string.

5 years agoMerge branch 'maint'
Nicolas Goaziou [Sun, 14 Oct 2012 19:51:59 +0000 (21:51 +0200)]
Merge branch 'maint'

5 years agoorg-element: Fix parsing of objects of the same type in a single paragraph
Nicolas Goaziou [Sun, 14 Oct 2012 19:47:07 +0000 (21:47 +0200)]
org-element: Fix parsing of objects of the same type in a single paragraph

* lisp/org-element.el (org-element--get-next-object-candidates): Fix
  parsing of objects of the same type in a single paragraph.
* testing/lisp/test-org-element.el: Add tests.

5 years agoorg-element: Fix parsing of syntax at beginning of item
Nicolas Goaziou [Sun, 14 Oct 2012 19:34:22 +0000 (21:34 +0200)]
org-element: Fix parsing of syntax at beginning of item

* lisp/org-element.el (org-element-sub/superscript-successor): Fix
  parsing of sub/superscript at beginning of item.
(org-element-latex-or-entity-successor): Fix parsing of latex
  fragments at beginning of item.
* testing/lisp/test-org-element.el: Add test.

5 years agoorg-export: Add tag inheritance to `org-export-get-tags'
Nicolas Goaziou [Sun, 14 Oct 2012 11:19:12 +0000 (13:19 +0200)]
org-export: Add tag inheritance to `org-export-get-tags'

* contrib/lisp/org-export.el (org-export-get-tags): Add optional tag
  inheritance.
* testing/lisp/test-org-export.el: Add test.

5 years agoMerge branch 'maint'
Nicolas Goaziou [Sat, 13 Oct 2012 10:54:21 +0000 (12:54 +0200)]
Merge branch 'maint'

5 years agoorg-agenda: Fix `org-agenda-later' when called with an argument
Nicolas Goaziou [Sat, 13 Oct 2012 10:52:43 +0000 (12:52 +0200)]
org-agenda: Fix `org-agenda-later' when called with an argument

* lisp/org-agenda.el (org-agenda-later): Fix function when span is
  a number and an argument was provided.  Also fix typo in docstring.

5 years agoorg-insert-link: Use ido when inserting links
Tony Day [Fri, 12 Oct 2012 03:39:53 +0000 (14:39 +1100)]
org-insert-link: Use ido when inserting links

org.el (org-insert-link): Remove a list within the list of link
creation that causes a bug when using ido.  Remove the hard coded
iswitch and ido switches.

(org-iread-file-name): Create a function that can use
ido-read-file-name if flagged as ok.

(org-file-complete-link): Reference org-iread-file-name.

5 years agoMerge branch 'maint'
Nicolas Goaziou [Fri, 12 Oct 2012 16:22:04 +0000 (18:22 +0200)]
Merge branch 'maint'

Conflicts:
testing/lisp/test-org.el

5 years agoFix analyzing european dates with time but without year
Nicolas Goaziou [Fri, 12 Oct 2012 15:52:47 +0000 (17:52 +0200)]
Fix analyzing european dates with time but without year

* lisp/org.el (org-read-date-analyze): Fix analyzing for dates like
  "29.03 16:40".
* testing/lisp/test-org.el: Add test.

5 years agoorg-e-latex: Fix publishing problems when compiling a TeX file
Nicolas Goaziou [Thu, 11 Oct 2012 21:46:07 +0000 (23:46 +0200)]
org-e-latex: Fix publishing problems when compiling a TeX file

* contrib/lisp/org-e-latex.el (org-e-latex-compile): Fix compilation
  when default-directory from current buffer doesn't match directory
  from file being compiled. Small refactoring, too.

Thanks to Robert Klein for reporting the problem and suggesting a fix.