Commit Graph

13504 Commits

Author SHA1 Message Date
Nicolas Goaziou 013c0af8b0 org-lint: Add checker for empty headlines with tags
* lisp/org-lint.el (org-lint--checkers): Add checker.
(org-lint-empty-headline-with-tags): New function.

* testing/lisp/test-org-lint.el (test-org-lint/empty-headline-with-tags):
  New test.
2017-02-17 13:23:26 +01:00
Nicolas Goaziou 473ca5c86c Merge branch 'maint' 2017-02-17 08:37:55 +01:00
Fabrice Popineau b5a67ebddd Fix file:// uri handling for windows-nt and cygwin
* lisp/org-element.el (org-element-link-parser):
  Handle drive names in uri like file:///c:/dir/file

* lisp/ox.el (org-export-file-uri):
  Handle drive names in uri like file:///c:/dir/file

* testing/lisp/test-ox.el (test-org-export/file-uri):
  Generate the right uri to be tested against link exporter.
2017-02-17 08:36:00 +01:00
Nicolas Goaziou 4caad0555f ox-html: Fix last commit (part 2)
* lisp/ox-html.el (org-html-plain-list): Fix typo.
2017-02-14 17:27:26 +01:00
Nicolas Goaziou 0890cc7b6c ox-html: Fix last commit
* lisp/ox-html.el (org-html-plain-list): Fix last commit.
2017-02-14 16:34:17 +01:00
Nicolas Goaziou 54734bd69d ox-html: Silence byte-compiler
* lisp/ox-html.el (org-html-plain-list): Silence byte-compiler.  Small
  refactoring.
2017-02-14 16:32:44 +01:00
Rasmus ea16d4ca8f ox-html: More newlines around lists
* lisp/ox-html.el (org-html-headline):
(org-html-format-list-item):
(org-html-section): Insert more newlines.
2017-02-14 15:15:28 +01:00
Rasmus 8855c23c68 ox-html: Plain list supports arbitrary attributes
* lisp/ox-html.el (org-html-begin-plain-list):
(org-html-end-plain-list): Remove.
(org-html-plain-list):
(org-html-headline): Remove dependency on org-html-begin-plain-list
		     and org-html-end-plain-list.
2017-02-14 12:14:14 +01:00
Nicolas Goaziou add0be3093 org-duration: Tolerate leading and trailing blanks in durations
* lisp/org-duration.el (org-duration--h:mm-re):
(org-duration--h:mm:ss-re): Tolerate leading in trailing blanks.
Change into a defconst.
(org-duration-set-regexps): Tolerate leading in trailing blanks.

Reported-by: Detlef Steuer <steuer@unibw-hamburg.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112111>
2017-02-14 09:58:26 +01:00
Nicolas Goaziou 2e32709843 Merge branch 'maint' 2017-02-13 21:32:28 +01:00
Nicolas Goaziou b897ab7223 org-clock: Fix regression in Clock table
* lisp/org-clock.el (org-clocktable-write-default): Do not raise an
  error when :maxlevel is 0.  Small refactoring.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Split
into ...
(test-org-clock/clocktable/ranges):
(test-org-clock/clocktable/tags):
(test-org-clock/clocktable/scope):
(test-org-clock/clocktable/maxlevel):
(test-org-clock/clocktable/formula): ... these.  Add tests.

This fixes regression introduced in ccf832e83.

Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112091>
2017-02-13 21:28:59 +01:00
Nicolas Goaziou b0251b747a Merge branch 'maint' 2017-02-13 16:35:32 +01:00
Nicolas Goaziou d347d85a15 org-element: Fix `org-element-insert-before'
* lisp/org-element.el (org-element-insert-before): Do not call
  `reverse' as contents might use `eq' objects.

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

Reported-by: Justin Kirby <justinkirby@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112065>
2017-02-13 16:29:54 +01:00
Nicolas Goaziou 42e08d96e8 Merge branch 'maint' 2017-02-13 15:39:10 +01:00
Stefan-W. Hahn fe97948e89 org-table: Move table column with leaving text-properties untouched
* lisp/org-table.el (org-table-move-column): Use `transpose-regions'.

Moving org-table rows is implemented with delete-region and insert which
preserve text-properties. Moving org-table columns is implemented
with replace-string, which removes text-properties.

My proposal is to use transpose-regions in org-table-move-column which
will preserve text-properties when moving columns in org-tables.
2017-02-13 15:37:53 +01:00
Nicolas Goaziou 08dedfc9f0 org-duration: Fix typo 2017-02-13 14:57:06 +01:00
Nicolas Goaziou 4a2e5e0ed0 org-duration: Fix typos 2017-02-13 14:56:07 +01:00
Nicolas Goaziou 7e8cf5f4c2 Use Org duration library
* contrib/lisp/org-depend.el (org-depend-trigger-todo): Use new
  functions.

* contrib/lisp/org-invoice.el (org-invoice-heading-info):
(org-invoice-info-to-table):
(org-invoice-list-to-table): Use new functions.

* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task): Use
  new functions.

* lisp/org-agenda.el (org-agenda-show-clocking-issues):
(org-agenda-format-item):
(org-agenda-filter-effort-form): Use new functions.

* lisp/org-clock.el (org-clock-get-clock-string):
(org-clock-modify-effort-estimate):
(org-clock-notify-once-if-expired):
(org-clock-out):
(org-clock-display):
(org-clock-put-overlay):
(org-clocktable-write-default): Use new functions.

* lisp/org-table.el (org-table-sort-lines): Use new functions.

* lisp/org.el (org-properties-postprocess-alist):
(org-refresh-effort-properties):
(org-set-effort):
(org-entry-properties):
(org-property-next-allowed-value): Use new functions.

(org-time-clocksum-format):
(org-time-clocksum-use-fractional):
(org-time-clocksum-use-fractional-format):
(org-time-clocksum-use-effort-durations): Declare as obsolete.  Move
to "org-compat.el".

(org-minutes-to-clocksum-string):
(org-hh:mm-string-to-minutes):
(org-duration-string-to-minutes): Declare as obsolete.  Move to
"org-compat.el".
(org-hours-to-clocksum-string): Remove function.

* lisp/org-colview.el (org-columns--collect-values): Use new
  functions.
(org-columns--duration-re): Remove variable.
(org-columns--time-to-seconds): Rename to...
(org-columns--age-to-minutes): ... this.
(org-columns--format-age): New function.
(org-columns--summary-apply-times):
(org-columns--summary-min-age):
(org-columns--summary-max-age):
(org-columns--summary-mean-age): Use new functions.

* testing/lisp/test-org-clock.el (test-org-clock-clocktable-contents-at-point):
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Update tests.
2017-02-13 14:41:15 +01:00
Nicolas Goaziou f2fa092079 org-duration: Implement duration library
* lisp/org-duration.el: New file.
2017-02-13 14:39:33 +01:00
Marco Wahl 1aeb958e56 Merge branch 'maint' 2017-02-12 09:19:06 +01:00
Marco Wahl 9c824217ad org-eww: Fix copy of form-elements
* lisp/org-eww.el (org-eww-copy-for-org-mode): New behavior: Just add
  link-title when link-location is not a string.  This fixes copying
  from www.indeed.co.uk.

Reported and a suggestion of a fix by Andrea.
<http://permalink.gmane.org/gmane.emacs.orgmode/112052>.
2017-02-12 09:00:56 +01:00
Nicolas Goaziou 80cc5c6e3b Merge branch 'maint' 2017-02-11 18:38:02 +01:00
Nicolas Goaziou 91d82f7a87 Silence byte-compiler 2017-02-11 18:37:32 +01:00
Nicolas Goaziou 0fe987e060 Merge branch 'maint' 2017-02-11 02:36:15 +01:00
Nicolas Goaziou 9070b97f0e Fix header in LaTeX snippets
* lisp/ox-latex.el (org-latex-make-preamble): Add optional argument.
* lisp/org.el (org-create-formula-image): Use it.

Reported-by: plus <ctre@users.sourceforge.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/112015>
2017-02-11 02:35:00 +01:00
Nicolas Goaziou cc14aa6cfe Merge branch 'maint' 2017-02-07 17:01:10 +01:00
Nicolas Goaziou ccf832e831 org-clock: Fix clock percent
* lisp/org-clock.el (org-clocktable-write-default): Fix percent computation.
(org-clock-time%): Remove function.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Update
  test.

As a consequence of this patch, a ":formula %" doesn't generate
a TBLFM line anymore.
2017-02-07 16:52:30 +01:00
Nicolas Goaziou 6632ce537e Change `org-get-repeater' signature
* lisp/org.el (org-get-repeater): Change optional argument meaning.
* lisp/org-habit.el (org-habit-parse-todo): Apply signature change.
* testing/test-org.el (test-org/get-repeater): Add tests.
2017-02-04 21:45:35 +01:00
Nicolas Goaziou 737ada43c6 Fix "Fix `org-get-repeat'"
* lisp/org.el (org-get-repeat): Make sure matching group refers to the
  proper regexp.
* testing/lisp/test-org.el (test-org/get-repeat): New test.

The bug was introduced in aef7eef0f.
2017-02-04 21:26:17 +01:00
Nicolas Goaziou 9a0b519b4e Merge branch 'maint' 2017-02-03 22:53:30 +01:00
Nicolas Goaziou 83cea90599 org-clock: Do not associate a note to removed zero time CLOCKs
* lisp/org-clock.el (org-clock-out): When a zero time CLOCK is
  removed, do not offer to add a note for it.
2017-02-03 22:51:56 +01:00
Nicolas Goaziou 9eda09eab4 Notes associated to CLOCKs are located after the clock
* lisp/org.el (org-store-log-note): Make sure a note added after
  clocking out is inserted right after the CLOCK line.

Reported-by: Jorge Morais Neto <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111795>
2017-02-03 22:46:15 +01:00
Martin Vuk e01000a94c ox.el: Slovenian translations for exporting
* lisp/ox.el (org-export-dictionary): Slovenian translations.

* lisp/ox.el (org-export-smart-quotes-alist): Slovenian quotes and
apostrophes for exporting documents.

TINYCHANGE
2017-02-03 22:17:31 +01:00
Nicolas Goaziou 9da78f3e8d Merge branch 'maint' 2017-02-03 22:04:12 +01:00
Nicolas Goaziou 6da9d0a416 Fix indentation of some elements
* lisp/org.el (org--get-expected-indentation): Tiny refactoring.
(org-indent-line): Ignore LaTex environments.
(org-indent-region): Better handling for export blocks, LaTeX
environments and example blocks.

* testing/lisp/test-org.el (test-org/indent-line):
(test-org/indent-region): Add tests.
2017-02-03 22:03:25 +01:00
Nicolas Goaziou 515e75d093 Fix `org-auto-repeat-maybe'
* lisp/org.el (org-auto-repeat-maybe): Properly find clocks in entry.
  Ignore invalid time stamps.
2017-02-03 00:34:01 +01:00
Nicolas Goaziou ec285b1057 Harden `org-at-clock-log-p'
* lisp/org.el (org-at-clock-log-p): Do strict checking.
2017-02-03 00:33:25 +01:00
Nicolas Goaziou aef7eef0f9 Fix `org-get-repeat'
* lisp/org.el (org-get-repeat): Prevent false positive.
2017-02-03 00:32:16 +01:00
Nicolas Goaziou 2a59d2f76f Harden `org-at-timestamp-p'
* lisp/org.el (org-ts-what): Remove variable.
(org-at-timestamp-p): Do strict checking.  Also return a value instead
of setting `org-ts-what'.  Improve docstring.
(org-timestamp-change): Remove use of `org-ts-what'.
(org-shiftcontrolup):
(org-shiftcontroldown): Optimize.
* lisp/org-clock.el (org-clock-timestamp-change): Remove use of `org-ts-what'.
2017-02-03 00:20:12 +01:00
Nicolas Goaziou adfc9fb4dd Merge branch 'maint' 2017-02-02 19:54:24 +01:00
Nicolas Goaziou 37bd3586e9 Fix repeating entries without a TODO keyword
* lisp/org.el (org-auto-repeat-maybe): Allow repeating entries without
  a TODO keyword.
2017-02-02 14:17:04 +01:00
Nicolas Goaziou f157283c12 Merge branch 'maint' 2017-02-01 22:42:12 +01:00
Nicolas Goaziou 32972979c7 org-agenda: Fix scheduled and deadline S-exp entries display
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Properly handle S-exp entries.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111805>
2017-02-01 22:36:29 +01:00
Nicolas Goaziou 2b5fbfa473 Implement `org-edit-latex-environment'
* lisp/org-src.el (org-edit-latex-environment): New function.
* lisp/org.el (org-edit-special): Use new function.
2017-02-01 21:30:54 +01:00
Nicolas Goaziou 86efe92484 Merge branch 'maint' 2017-02-01 21:02:48 +01:00
Nicolas Goaziou 73330079c0 org-table: Fix error with `org-table-get-field' at bob
* lisp/org-table.el (org-table-get-field): Do not return
  `beginning-of-buffer' error when called at beginning of buffer.

* testing/lisp/test-org-table.el (test-org-table/get-field): New test.
2017-02-01 20:56:38 +01:00
Nicolas Goaziou 3134725ad8 org-table: Turn `org-table-current-column' into a command again
* lisp/org-table.el (org-table-current-column): Add `interactive'
  spec.

This function is called as a command by "Which column?" menu entry.

Reported-by: Chunyang Xu <mail@xuchunyang.me>
<http://permalink.gmane.org/gmane.emacs.orgmode/111785>
2017-02-01 15:37:32 +01:00
Nicolas Goaziou 5edc17ef73 Merge branch 'maint' 2017-01-31 22:52:43 +01:00
Nicolas Goaziou 426bce6a83 org-capture: Small fix
* lisp/org-capture.el (org-mks): Find entries with full prefix, not
last pressed key.

This fixes a bug introduced in 8194e7b09.

Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111779>
2017-01-31 22:50:09 +01:00
Nicolas Goaziou 6b30deaae9 Merge branch 'maint' 2017-01-31 09:02:55 +01:00
Lixin Chin caa54d2e98 ox-latex.el: Wrap 'minted' src blocks in a 'listing' environment
* lisp/ox-latex.el (org-latex-src-block): Make source highlighting
  using the 'minted' syntax highlighting package behave the same as
  using the 'listings' syntax highlighting package.

The source block should be floating if a caption is provided, or if
':float t' is provided in an '#+ATTR_LATEX:' block.  Previously, the
source block would only be floating if ':float multicolumn' was
provided.  This now matches the Org mode documentation for source
blocks.

TINYCHANGE
2017-01-31 09:01:42 +01:00
Nicolas Goaziou 9cb36f1982 Merge branch 'maint' 2017-01-30 23:43:14 +01:00
Nicolas Goaziou 8194e7b09d org-capture: Fix freeze when capture templates are ill-defined
* lisp/org-capture.el (org-mks): Do not freeze when there is a missing
  step in the key hierarchy.  Fix docstring.  Refactor code for clarity.

Reported-by: Roland Everaert <reveatwork@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111716>
2017-01-30 23:36:52 +01:00
Kyle Meyer 401eecb52c Merge branch 'maint' 2017-01-29 13:20:59 -05:00
Noam Postavsky f2a5104e45 Backport commit ae8264c5cc from Emacs
* lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
`inhibit-modification-hooks' to nil, since this function can be called
from jit-lock-function which binds that variable to t (Bug#25132).

Call modification hooks in org-src fontify buffers
ae8264c5cccf19d5b25a340a605bf2f07de1577e
Noam Postavsky
Sun Jan 29 11:01:32 2017 -0500
2017-01-29 13:16:09 -05:00
Marco Wahl 195151a153 Merge branch 'maint' 2017-01-29 16:14:29 +01:00
Marco Wahl 39682d4854 Fix: keep repeaters at rescheduling
* lisp/org.el (org--deadline-or-schedule): Removed a blank in a regexp.
* testing/lisp/test-org.el (test-org/schedule): New test.
2017-01-29 16:11:35 +01:00
Marco Wahl 2c27b89fe7 Merge remote-tracking branch 'origin/master' 2017-01-28 00:27:28 +01:00
Marco Wahl 50a53b3f2c Explicitly use `current-time' to set 'LAST_REPEAT'
* lisp/org.el (org-auto-repeat-maybe): Explicitly use `current-time'
  to set LAST_REPEAT.  The behavior of the function remains the same.

This allows to advice current-time to use a different time.  Which
might help with testing and with functions which bend the time.
2017-01-28 00:17:19 +01:00
Nicolas Goaziou 2fbf8cb986 Merge branch 'maint' 2017-01-27 23:58:09 +01:00
Nicolas Goaziou ebb9da0d03 Allow C-c C-c on blank lines within src blocks
* lisp/org.el (org-ctrl-c-ctrl-c): Act on blank lines if they are
  located within a src block.

Reported-by: John Hendy <jw.hendy@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111720>
2017-01-27 23:56:30 +01:00
Marco Wahl 6cb6a39443 Merge branch 'maint' 2017-01-27 19:37:35 +01:00
Marco Wahl d715cc42fa Fix `org-refresh-property'
* lisp/org.el(org-refresh-property): Fixed by comparison to the code
  before the refactoring.

With commit 126a1cd7c the "Effort" property broke the agenda.
2017-01-27 19:35:16 +01:00
Marco Wahl b2a232286d Revert "Fix `org-refresh-property'"
This reverts commit 2132c008d6.
2017-01-27 19:28:19 +01:00
Marco Wahl 2132c008d6 Fix `org-refresh-property'
* lisp/org.el(org-refresh-property): Fixed by comparison to the code
  before the refactoring.

With commit 126a1cd7c the "Effort" property broke the agenda.
2017-01-27 19:17:48 +01:00
Kyle Meyer 9c111f63d3 ob-core: Add org-babel-uppercase-example-markers option
* lisp/ob-core.el (org-babel-capitalize-example-region-markers): Mark
as obsolete.
(org-babel-uppercase-example-markers): New defcustom to replace defvar
org-babel-capitalize-example-region-markers.
(org-babel-examplify-region): Use new option.

Rather than moving org-babel-capitalize-example-region-markers to a
defcustom, give the option a new name that makes it clearer that all
characters, not just the first, will be in upper case.

Suggested-by: Vicente Vera <vicentemvp@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111656>
2017-01-26 20:06:39 -05:00
Nicolas Goaziou 0ba5e35082 Merge branch 'maint' 2017-01-27 00:29:14 +01:00
Kyle Meyer d2b93613ad Add missing quote to previous commit
* lisp/org.el (org-link-parameters): Quote :package-version value.
2017-01-26 18:26:46 -05:00
Nicolas Goaziou 919e864968 Fix internal function name
* lisp/org.el (org-property--local-values): Rename to...
(org--property-local-values): ... this.
(org-entry-get):
(org-entry-get-with-inheritance): Apply renaming.
2017-01-27 00:24:15 +01:00
Nicolas Goaziou 126a1cd7c1 Fix "APPT_WARNTIME" inheritance
* lisp/org.el (org-refresh-properties): Handle inheritance from global
  values (e.g., from "#+PROPERTY:" keyword).
(org-refresh-property): Handle property inheritance with a new
optional argument.

* testing/lisp/test-org.el (test-org/refresh-properties): New test.
2017-01-27 00:21:42 +01:00
Nicolas Goaziou f2e861e0be Small refactoring
* lisp/org.el (org--property-global-value): New function.
(org-entry-get-with-inheritance): Use new function.
2017-01-27 00:10:10 +01:00
Nicolas Goaziou 1f8fb3cf54 Fix `org-property-inherit-p'
* lisp/org.el (org-property-inherit-p): Properties are case insensitive.
2017-01-26 23:10:53 +01:00
Nicolas Goaziou c9b7e0ba46 Remove undocumented "message:" link type
* lisp/org.el (org-link-parameters): Remove "message:" link type.
  Update defcustom keywords.
2017-01-26 22:54:29 +01:00
Kyle Meyer 98d672de3d Update "25.2" defcustom :version's that remain in master
* lisp/ob-clojure.el (org-babel-clojure-sync-nrepl-timeout):
* lisp/org-agenda.el (org-agenda-show-future-repeats):
(org-agenda-prefer-last-repeat):
* lisp/org-bibtex.el (org-bibtex-headline-format-function):
* lisp/ox-publish.el (org-publish-sitemap-sort-folders):
* lisp/ox.el (org-export-global-macros): Change :version from "25.2"
  to "26.1".

As mentioned in 7c710f6f5, it looks like the goal is to sync Org
9.0.* (maint) with the Emacs master branch.  In that case, 26.1 won't
be correct for changes that are specific to Org's master branch, but
neither will 25.2.
2017-01-26 00:15:11 -05:00
Kyle Meyer 7278899697 Merge branch 'maint' 2017-01-26 00:05:29 -05:00
Kyle Meyer 7c710f6f57 Change :version in defcustoms from "25.2" to "26.1"
* lisp/ob-J.el (org-babel-J-command):
* lisp/ob-core.el (org-babel-hash-show-time):
* lisp/ob-exp.el (org-babel-exp-inline-code-template):
* lisp/ob-lisp.el (org-babel-lisp-eval-fn):
* lisp/org-agenda.el (org-agenda-view-columns-initially):
* lisp/org-attach.el (org-attach-commit):
(org-attach-archive-delete):
(org-attach-annex-auto-get):
* lisp/org-bibtex.el (org-bibtex-inherit-tags):
* lisp/org-clock.el (org-clock-into-drawer):
* lisp/org-colview.el (org-columns-summary-types):
* lisp/org-faces.el (org-block):
* lisp/org-src.el (org-src-block-faces):
* lisp/org-table.el (org-table-copy-increment):
(org-table-formula-create-columns):
(org-table-convert-region-max-lines):
* lisp/org-timer.el (org-timer-default-timer):
* lisp/org.el (org-export-backends):
(org-show-context-detail):
(org-cycle-hook):
(org-occur-case-fold-search):
(org-preview-latex-default-process):
(org-preview-latex-process-alist):
(org-preview-latex-image-directory):
(org-latex-default-packages-alist):
(org-sparse-tree-default-date-type):
(org-structure-template-alist):
(org-effort-durations):
(org-agenda-ignore-properties): Change :version from "25.2" to "26.1".
(customize-package-emacs-version-alist): Fix associations between Org
and Emacs releases.
* lisp/ox-ascii.el (org-ascii-list-margin):
* lisp/ox-beamer.el (org-beamer-subtitle-format):
* lisp/ox-html.el (org-html-format-headline-function):
(org-html-format-inlinetask-function):
(org-html-viewport):
* lisp/ox-latex.el (org-latex-caption-above):
(org-latex-prefer-user-labels):
(org-latex-subtitle-format):
(org-latex-hyperref-template):
(org-latex-footnote-defined-format):
(org-latex-images-centered):
(org-latex-default-figure-position):
(org-latex-text-markup-alist):
(org-latex-format-inlinetask-function):
(org-latex-custom-lang-environments):
(org-latex-compiler-file-string):
(org-latex-compiler):
(org-latex-bib-compiler):
(org-latex-logfiles-extensions):
(org-latex-known-warnings):
* lisp/ox-md.el (org-md-footnotes-section):
(org-md-footnote-format):
* lisp/ox-odt.el (org-odt-format-headline-function):
(org-odt-format-inlinetask-function):
(org-odt-inline-image-rules):
* lisp/ox-texinfo.el (org-texinfo-format-headline-function):
* lisp/ox.el (org-export-with-creator):
(org-export-with-title):
(org-export-with-broken-links):
(org-export-copy-to-kill-ring): Change :version from "25.2" to "26.1".

It looks like the goal is to sync Org 9.0.* (maint) with the Emacs
master branch (what will be version 26.1):
https://lists.gnu.org/archive/html/emacs-orgmode/2017-01/msg00558.html
2017-01-26 00:02:03 -05:00
Kyle Meyer c1822e5560 Clean up spacing to pass Emacs's pre-commit check
Like 00dacdcc5 (2015-08-10), this is in preparation for syncing with
the Emacs repo.
2017-01-25 22:21:59 -05:00
Kyle Meyer 63aaffdc11 Merge branch 'maint' 2017-01-25 22:00:57 -05:00
Kyle Meyer ffa4502771 ob-core: Move org-babel-local-file-name to org-compat.el
* lisp/ob-core.el (org-babel-process-file-name): Move to
org-compat.el.
* lisp/org-compat.el (org-babel-local-file-name): Add compatibility
alias.
2017-01-25 22:00:48 -05:00
Michael Albinus e97f04de8e Backport commit 22946702b from Emacs
* lisp/ob-core.el (org-babel-local-file-name): Use `file-local-name'
when available.

22946702b4296c0e42e4baf6221e205b52d05cbf
Michael Albinus
Sun Nov 20 16:29:47 2016 +0100
2017-01-25 22:00:48 -05:00
Kyle Meyer ec834812f7 org-clock: Correct file name in header
* lisp/org-clock.el (org-clock-save): Use the variable
org-clock-persist-file as the file name in the header rather than
hardcoding it to "org-persist.el".

From the introduction of org-clock-save in 6ca205398 (Add clock
persistence., 2008-10-23), the hardcoded file name did not match the
value of org-clock-persist-file.
2017-01-25 22:00:40 -05:00
Kyle Meyer 33e8a3b5d7 org-agenda: Fix docstring typo
* lisp/org-agenda.el (org-agenda-custom-commands): Fix docstring typo.
2017-01-25 20:48:41 -05:00
Nicolas Goaziou ff212d8528 org-clock: Small refactoring
* lisp/org-clock.el (org-clock-in): Use
  `org-refresh-effort-properties'.
2017-01-25 23:35:35 +01:00
Nicolas Goaziou 3d7c221a45 Merge branch 'maint' 2017-01-25 23:29:40 +01:00
Nicolas Goaziou 7d52a8c3cc Fix `org-schedule' with repeater
* lisp/org.el (org--deadline-or-schedule): New function.
(org-schedule):
(org-deadline): Use new function.

* testing/lisp/test-org.el (test-org/deadline):
(test-org/schedule): New tests.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111569>
2017-01-25 23:27:33 +01:00
Nicolas Goaziou dcad3499af Merge branch 'maint' 2017-01-25 17:58:54 +01:00
Nicolas Goaziou b6b1e35f33 ox-html: Remove <p> tag around block images when using HTML5
* lisp/ox-html.el (org-html--wrap-image): Do not add a spurious <p>
  tag when using <figure> to mark images.

Reported-by: Matt Price <moptop99@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111568>
2017-01-25 17:58:07 +01:00
Nicolas Goaziou 2348d18343 Merge branch 'maint' 2017-01-24 22:02:47 +01:00
Nicolas Goaziou c77b658b39 Fix `org-entry-get' with "TIMESTAMP" or "TIMESTAMP_IA"
* lisp/org.el (org-entry-properties): Fix special property value in
  current entry, do not leak into next entry.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111648>
2017-01-24 22:01:19 +01:00
Nicolas Goaziou 969d14deef Merge branch 'maint' 2017-01-24 18:20:22 +01:00
Nicolas Goaziou 9f4c77cb6c ox-html: Fix missing space in coderef links
* lisp/ox-html.el (org-html-link): Add missing space.

Reported-by: dmg <dmg@turingmachine.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/111625>
2017-01-24 18:19:23 +01:00
Nicolas Goaziou c6a74d4a58 Merge branch 'maint' 2017-01-24 18:15:53 +01:00
Nicolas Goaziou 4370ee4e44 org-agenda: Fix `org-agenda-list-stuck-projects'
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Fix thinko
  introduced in 7c3e0b0fd.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/111633>
2017-01-24 18:14:39 +01:00
Nicolas Goaziou 4696d6e71d org-compat: Silence byte-compiler 2017-01-22 14:46:35 +01:00
Nicolas Goaziou eda4684d35 Merge branch 'maint' 2017-01-22 14:29:05 +01:00
Nicolas Goaziou 12a23d6c61 `org-entry-delete' can remove erroneous special properties
* lisp/org.el (org-entry-delete): Also remove erroneously inserted
  special properties in properties drawer.  Small refactoring.

* testing/lisp/test-org.el (test-org/entry-delete): Add test.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111564>
2017-01-22 14:28:02 +01:00
Nicolas Goaziou 9dafef9fa8 Merge branch 'maint' 2017-01-22 13:54:26 +01:00
Nicolas Goaziou 7c3e0b0fdf org-agenda: TODO keywords are case sensitive in stuck projects
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Search for
  stuck projects is case sensitive since TODO keywords are.

Reported-by: Guy Mayraz <guy.mayraz@unimelb.edu.au>
<http://permalink.gmane.org/gmane.emacs.orgmode/111529>
2017-01-22 13:53:20 +01:00
Nicolas Goaziou 3553c0a524 org-agenda: Make `org-agenda-skip-(entry|subtree)-when.*' obsolete
* lisp/org-agenda.el (org-agenda-skip-entry-if):
(org-agenda-skip-entry-if):
(org-agenda-skip-entry-if): Move to...
* lisp/org-compat.el (org-agenda-skip-entry-when-regexp-matches):
(org-agenda-skip-subtree-when-regexp-matches):
(org-agenda-skip-entry-when-regexp-matches-in-subtree): ... here and
mark as obsolete.

These functions are not used in code base anymore, and they are easily
replaced with `org-agenda-skip-if'.
2017-01-22 13:52:43 +01:00
Nicolas Goaziou 7289293e4e ox-texinfo: Delegate "info" links handling to "org-info.el"
* lisp/org-info.el (org-info-export): Handle links when exporting to
  "texinfo" back-end.
* lisp/ox-texinfo.el (org-texinfo-link): Delegate "info" links
  handling to the function above.
2017-01-21 14:19:29 +01:00
Nicolas Goaziou dbd7d995e8 Merge branch 'maint' 2017-01-21 13:58:03 +01:00
Chunyang Xu 9a952ab18a org-info: Fix HTML export of info link
* org-info.el (org-info--map-node-url): New function.
(org-info-export): Use the new function.

TINYCHANGE
2017-01-21 13:48:27 +01:00
Nicolas Goaziou 37bffbb347 Merge branch 'maint' 2017-01-21 11:59:12 +01:00
Nicolas Goaziou 4b3fbeef2b ox: Add some autoload cookies
* lisp/ox.el (org-export-get-backend): Autoload.  Small refactoring.
(org-export-get-environment): Autoload.
2017-01-21 11:44:29 +01:00
Nicolas Goaziou 53bc58c433 Rename `org-latex--make-preamble' into `org-latex-make-preamble'
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template):
* lisp/org.el (org-create-formula-image):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-make-preamble): Renamed from
  `org-latex--make-preamble'.  Add an optional argument.  Autoload
  function.
(org-latex-template): Use new function name.
2017-01-21 11:31:25 +01:00
Nicolas Goaziou de0d933c4d Merge branch 'maint' 2017-01-21 10:42:55 +01:00
Nicolas Goaziou bbdecd1e64 org-element: Disable cache by default
* lisp/org-element.el (org-element-use-cache): Set default value to
  nil.

Using cache introduces Emacs' freezes under not well known
circumstances.  Until this is sorted out, this variable should be nil,
at least on "maint" branch.
2017-01-21 10:40:39 +01:00
Nicolas Goaziou 6dc6eb3b02 Fix failing test
* lisp/org.el (org-link-search): Remove priority cookie from headlines
  during a fuzzy search.  Tiny optimization.
* testing/lisp/test-org.el (test-org/get-heading): Add tests.
2017-01-19 00:22:49 +01:00
Matt Price 53ee147f45 Add support for new switches to org-get-heading
* lisp/org.el (org-get-heading): NO-COMMENT tag, if non-nil, will not
return the COMMENT string with heading.  Likewise, NO-PRIORITY, if
non-nil, will not return the priority cookie.
2017-01-19 00:07:03 +01:00
Nicolas Goaziou 4353deb0de Merge branch 'maint' 2017-01-18 23:36:54 +01:00
Nicolas Goaziou 35e90ced24 ox-latex: Fix insertion of line breaks at invalid locations
* lisp/ox-latex.el (org-latex-clean-invalid-line-breaks): New function.

Reported-by: Takeshi Teshima <takeshi.diadochos@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111313>
2017-01-18 23:30:01 +01:00
Kyle Meyer c3d67b3556 Merge branch 'maint' 2017-01-17 21:22:11 -05:00
Kyle Meyer 1fbc7a424f org-clone-subtree-with-time-shift: Fix SHIFT check
* lisp/org.el (org-clone-subtree-with-time-shift): Don't choke on a
  blank SHIFT argument.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
  test.

This fixes a regression introduced by c31462f33.
2017-01-17 21:16:24 -05:00
Marco Wahl 69b22b6590 org: Improved consistency + tests
* lisp/org.el (org-get-valid-level): The function now returns 1 for
  parameters level=0, change=1 and `org-odd-levels-only'=t.  Before
  it returned 3.
2017-01-17 23:06:56 +01:00
Marco Wahl 738d3b4def org: Delete useless code line
* lisp/org.el (org-refile): Dropped useless call of `looking-at'.
2017-01-17 21:59:49 +01:00
Nicolas Goaziou 4d0609f8af Merge branch 'maint' 2017-01-17 12:02:02 +01:00
Nicolas Goaziou d2af251077 org-colview: Fix summary computation in agenda
* lisp/org-colview.el (org-agenda-colview-summarize): Do not include
  already summarized values in current summary.
2017-01-17 12:00:49 +01:00
Nicolas Goaziou c1c510ffe0 Merge branch 'maint' 2017-01-17 11:36:40 +01:00
Nicolas Goaziou b223c099f0 org-colview: Fix missing agenda summary if org-agenda-overriding-header is set
* lisp/org-colview.el (org-agenda-colview-summarize): Do not ignore
  first agenda line when displaying summaries.

This fixes a regression introduced in
279902ca4d.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/111473>
2017-01-17 11:35:05 +01:00
Nicolas Goaziou 9e45783661 Save position before searching for a search option in case of error
* lisp/org.el (org-open-file): Save position with `org-mark-ring-push'
  before calling `org-link-search'.
2017-01-17 10:42:13 +01:00
Nicolas Goaziou 1619aee376 Fix last commit
* lisp/org-table.el (org-table-eval-formula): Result is not always a string.
* testing/lisp/test-org-table.el (test-org-table/copy-field): Update
  test.
2017-01-17 10:19:05 +01:00
Nicolas Goaziou a2950b00c1 Computed dates in tables appear as inactive time stamps
* lisp/org-table.el (org-table-eval-formula): Replace active time
  stamps, as produced by Calc package, with inactive ones.

Reported-by: "Doherty, Daniel" <ded@ddoherty.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111458>
2017-01-17 10:14:24 +01:00
Nicolas Goaziou 1ac8e29605 Merge branch 'maint' 2017-01-17 10:00:55 +01:00
Nicolas Goaziou 181dc50d11 Small fix
* lisp/org.el (org-clone-subtree-with-time-shift): Handle nil shift
  case.
2017-01-17 09:59:53 +01:00
Nicolas Goaziou 985ffb13d2 Merge branch 'maint' 2017-01-17 09:53:36 +01:00
Nicolas Goaziou c31462f33e Fix `org-clone-subtree-with-time-shift'
* lisp/org.el (org-clone-subtree-with-time-shift): Fix commit
  8fc9ab83b. Small refactoring.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
  tests.

Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111477>
2017-01-17 09:49:48 +01:00
Nicolas Goaziou fe9e60d61b Merge branch 'maint' 2017-01-16 22:27:24 +01:00
Kyle Meyer 8fc9ab83b4 org-clone-subtree-with-time-shift: Fix timestamp search
* lisp/org.el (org-clone-subtree-with-time-shift): Move to the
  beginning of the heading before the timestamp search so that the
  user will be prompted for a time shift even if point is after the
  timestamp.

This also prevents an "Invalid search bound" error if point is on the
blank line following a body-less heading:

   * single line <2017-02-28 Wed>
    <point here>

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/111456>
2017-01-16 22:24:25 +01:00
Kyle Meyer 84de6bab99 Merge branch 'maint' 2017-01-15 16:44:56 -05:00
Kyle Meyer f277d95c3b ox-publish: Fix docstring typo
* lisp/ox-publish.el (org-publish-property): Fix docstring typo.
2017-01-15 16:41:22 -05:00
Nicolas Goaziou 4d9857f97b Merge branch 'maint' 2017-01-14 23:25:13 +01:00
Nicolas Goaziou f0c08e3cbb Fix `org-drag-element-backward' with point just below a headline
* lisp/org.el (org-drag-element-backward): When point is on empty
  lines below a headline, call `org-move-subtree-up'.
* testing/lisp/test-org.el (test-org/drag-element-backward): Add test.
2017-01-14 23:23:26 +01:00
Nicolas Goaziou 4a878bce4a Merge branch 'maint' 2017-01-14 16:16:24 +01:00
Nicolas Goaziou 1f76dd1fe1 org-mobile: Silence byte-compiler 2017-01-14 16:16:08 +01:00
Nicolas Goaziou d251d59a71 Merge branch 'maint' 2017-01-14 16:15:14 +01:00
Nicolas Goaziou bed17f1bb5 org-mobile: Fix `org-mobile-push' with stick agendas
* lisp/org-mobile.el (org-mobile-push): Do not move back to non-sticky
  agendas once called.

Reported-by: Ian Dunn <dunni@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/111334>
2017-01-14 16:12:43 +01:00
Nicolas Goaziou 5bd340fd4e org-element: Remove object caching
* lisp/org-element.el (org-element--cache-objects): Remove variable.
(org-element--cache-put):
(org-element--cache-remove):
(org-element--cache-process-request):
(org-element-cache-reset):
(org-element-context): Apply removal.

Caching objects is complicated and doesn't buy much in most cases,
since a change in an element reset the whole objects cache for that
element.
2017-01-12 22:56:30 +01:00
Nicolas Goaziou 400d46e547 Merge branch 'maint' 2017-01-12 15:28:33 +01:00
Nicolas Goaziou 1749dfe091 ox-odt: Fix verse environment
* lisp/ox-odt.el (org-odt--encode-tabs-and-spaces): Small refactoring.
(org-odt-verse-block): Only replace leading blanks.
2017-01-12 15:27:39 +01:00
Nicolas Goaziou 343417bcdb Merge branch 'maint' 2017-01-12 14:48:53 +01:00
Nicolas Goaziou 0e626313e1 ox-html: Fix verse environment
* lisp/ox-html.el (org-html-verse-block): Do not insert duplicates
  "br" close-tags.  Refactor code.
2017-01-12 14:47:32 +01:00
Nicolas Goaziou 5ada73aef6 org-element: Fix `org-element-normalize-contents'
* lisp/org-element.el (org-element-normalize-contents): Fix return
  value when any line after the first has no indentation.
* testing/lisp/test-org-element.el (test-org-element/normalize-contents):
  Add test.
2017-01-12 14:33:17 +01:00
Nicolas Goaziou 1d57c5670a ox-html: Fix docstrings style
* lisp/ox-html.el (org-html-close-tag):
(org-html-doctype):
(org-html--make-attribute-string): Fix docstring style.
2017-01-12 09:58:50 +01:00
Nicolas Goaziou ee181b3250 ox-html: Remove spurious white space when closing a tag
* lisp/ox-html.el (org-html-close-tag): Remove spurious white space
  when no attribute is given.  Add a docstring.
2017-01-12 09:54:22 +01:00
Nicolas Goaziou a51c6ffa53 Merge branch 'maint' 2017-01-11 21:01:40 +01:00
Nicolas Goaziou 909a04e011 ox: Fix "user-error: Unable to resolve link nil" message
* lisp/ox.el (org-export-resolve-fuzzy-link): Fix typo preventing to
report the proper path of the broken link.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/111357>
2017-01-11 21:00:37 +01:00
Nicolas Goaziou 1faf5757e9 Merge branch 'maint' 2017-01-11 12:37:14 +01:00
Nicolas Goaziou 34f86ce6a4 ox-latex: Silence byte-compiler
* lisp/ox-latex.el (org-latex-format-headline-default-function):
(org-latex-format-inlinetask-default-function): Silence byte-compiler.
2017-01-11 12:36:49 +01:00
Nicolas Goaziou bd3eb74509 Remove unnecessary workaround
* lisp/org.el (org-open-at-point): Links can no longer be nested.
  Remove workaround.
2017-01-11 12:31:53 +01:00
Nicolas Goaziou 9f96208eec Merge branch 'maint' 2017-01-11 12:20:52 +01:00
Nicolas Goaziou 3fa7903d76 ox-latex: Properly escape special characters in tags
* lisp/ox-latex.el (org-latex-format-headline-default-function):
(org-latex-format-inlinetask-default-function): Use
`org-latex--protect-text' instead of `org-latex-plain-text' to format
tags.
2017-01-11 12:20:05 +01:00
Nicolas Goaziou 235d3c5e45 Merge branch 'maint' 2017-01-11 11:58:51 +01:00
Nicolas Goaziou 71890398cd org-capture: Fix :jump-+to-captured when `org-capture-bookmark' is nil
* lisp/org-capture.el (org-capture-bookmark-last-stored-position):
  Rename to ...
(org-capture-store-last-position): ... this.  Also store last position
unconditionally.
* lisp/org-capture.el (org-capture-finalize): Apply renaming.
2017-01-11 09:52:57 +01:00
Nicolas Goaziou 6a49de8862 org-capture: Improve error message for date/weektree capture
* lisp/org-capture.el (org-capture-set-target-location): Raise an
  error when target location is not an Org buffer.

Reported-by: Simao <smm@imap.cc>
<http://permalink.gmane.org/gmane.emacs.orgmode/111320>
2017-01-11 09:17:18 +01:00
Nicolas Goaziou 7404e3d22a Merge branch 'maint' 2017-01-11 00:27:07 +01:00
Nicolas Goaziou a0409e56c3 ox: Fix comments removal during export
* lisp/ox.el (org-export--skip-p): Handle comments and comment blocks
  removal.
(org-export--delete-comments): Rename to...
(org-export--delete-comment-trees): ... this.  Now only take care of
commented trees and inlinetasks.

* testing/lisp/test-ox.el (test-org-export/comments): Add test.
(org-test-with-parsed-data): Apply renaming.
2017-01-11 00:23:53 +01:00
Nicolas Goaziou 0ca32a2838 org-table: Remove command status for some functions
* lisp/org-table.el (org-table-current-column):
(org-table-current-dline): Do not allow to call these functions
interactively.  `org-table-field-info' should be used instead.
* lisp/org-capture.el (org-encrypt-entry): Silence byte-compiler.
2017-01-09 00:30:41 +01:00
Nicolas Goaziou b0cb4fe59b org-table: Speed up large tables calculation
* lisp/org-table.el (org-table-eval-formula): Do not check point is
  really within a table when context analysis is not requested.

Reported-by: Thierry Banel <tbanelwebmin@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/111276>
2017-01-09 00:19:56 +01:00
Eric S Fraga 7d4b3bbdb7 ob-maxima.el: Add prologue and epilogue src block options for Maxima
* ob-maxima.el (org-babel-maxima-expand): add contents of prologue and
  epilogue src block options to the body of code.
2017-01-07 15:51:04 +01:00
Nicolas Goaziou d809a604f2 ox: Fix image links
* lisp/ox.el (org-export-insert-image-links): Properly set :parent
  property.
* testing/lisp/test-ox.el (test-org-export/insert-image-links): Add
  test.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111238>
2017-01-07 15:48:49 +01:00
Nicolas Goaziou 22520e8087 ox: Fix typos in docstring
* lisp/ox.el (org-export-insert-image-links): Fix typos in docstring.
2017-01-07 12:33:56 +01:00
Kyle Meyer 0d3683f2cd Merge branch 'maint' 2017-01-05 20:23:58 -05:00
Kyle Meyer 713f785017 Update copyright years 2017-01-05 20:19:37 -05:00
Stefan Monnier 029c2deccc Backport commit 2ec41c415 from Emacs
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Avoid add-to-list on local variables.

Avoid add-to-list on local variables
2ec41c415f39990561cc9da4c9bad0b69bfad489
Stefan Monnier
Wed Jan 4 00:40:45 2017 -0500
2017-01-05 20:19:36 -05:00
Marco Wahl bb258a4f07 org-agenda: Set restriction lock from agenda
* lisp/org-agenda.el (org-agenda-set-restriction-lock-from-agenda):
  New function.  Allows to set the restriction lock from an agenda
  buffer.

Further bind C-c C-x < to
`org-agenda-set-restriction-lock-from-agenda' in the
`org-agenda-mode-map'.  This is the same binding as for Org files.
2017-01-06 01:09:38 +01:00
Marco Wahl 5b4fcc3e2e org-table: Check if on table for field edit
* lisp/org-table.el (org-table-edit-field): Don't open edit buffer if
  not on a table.  Further added the toggle-feature for
  org-table-follow-field-mode to the documentation.
2017-01-04 23:35:40 +01:00
Nicolas Goaziou 774ce8a50e Merge branch 'maint' 2017-01-04 23:30:11 +01:00
Nicolas Goaziou 8318957da5 org-agenda: Fix effort filtering for entries with tags
* lisp/org-agenda.el (org-agenda-compare-effort): Fix retrieval of
  `effort-minutes' property from entries with tags.

Reported-by: wtm <wtmonroe.ls@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111194>
2017-01-04 23:28:58 +01:00
Nicolas Goaziou d82d309095 Merge branch 'maint' 2017-01-04 23:11:07 +01:00
Nicolas Goaziou 7419075e48 org-agenda: Fix UI bug with effort filter
* lisp/org-agenda.el (org-agenda-filter-by-effort): "0" key
  effectively selects the last effort duration instead of the first
  one.  Do not accept invalid keys, i.e., do not treat most of invalid
  keys as "0".
2017-01-04 23:09:00 +01:00
Nicolas Goaziou 3a53e3b10a Merge branch 'maint' 2017-01-03 22:12:34 +01:00
Nicolas Goaziou 3bba31ff44 Fix "invalid face reference" when filtering agenda by effort
* lisp/org-faces.el (org-agenda-filter-effort): New face.
(org-agenda-filter-category): Fix docstring.

Reported-by: wtm <wtmonroe.ls@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111132>
2017-01-03 22:11:11 +01:00
Nicolas Goaziou f1ae79ba73 Merge branch 'maint' 2017-01-03 18:29:22 +01:00
Nicolas Goaziou 93f90c8412 ob-shell: Fix wrong variable assignment binding
* lisp/ob-shell.el (org-babel-shell-initialize): Provide bindings to
  handle variable assignments for all the supported shells.
(org-babel--variable-assignments:sh-generic):
(org-babel--variable-assignments:bash_array):
(org-babel--variable-assignments:bash_assoc):
(org-babel--variable-assignments:bash): Rename using an internal
naming scheme since they are not meant to be called directly from
"ob-core.el".
(org-babel-variable-assignments:shell): Apply renaming.

Reported-by: David Dynerman <emperordali@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111139>
2017-01-03 18:28:50 +01:00
Bastien d0d05e5df1 Delete org-bullets.el from the contrib/ directory
* lisp/org.el (org-modules): Don't mention org-bullets.el,
which is now deleted from the contrib/ directory.

See https://github.com/sabof/org-bullets/issues/18
2017-01-03 12:22:38 +01:00
Nicolas Goaziou 1fac906174 Fix `org-N-empty-lines-before-current'
* lisp/org.el (org-N-empty-lines-before-current): Preserve point when
  calling the function from the beginning of a line.

* testing/lisp/test-org.el (test-org/insert-heading): Add tests.
2017-01-02 23:21:53 +01:00
Nicolas Goaziou c32db8a8da org-table: Small optimization to `orgtbl-to-generic'
* lisp/org-table.el (org-table--to-generic-cell): Avoid, as much as
  possible, calling `org-export-table-cell-address'.
2017-01-02 00:31:27 +01:00
Nicolas Goaziou 3a54827bdf Merge branch 'maint' 2017-01-02 00:14:18 +01:00
Nicolas Goaziou d90ca0d7c9 ob-ruby: Silence byte-compiler 2017-01-02 00:14:06 +01:00
Nicolas Goaziou ff31dc2ab5 ox: Update copyright 2017-01-02 00:01:47 +01:00
Nicolas Goaziou 2f5cd67357 ox: Speed-up some tools on tables
* lisp/ox.el (org-export-table-has-special-column-p): Tiny
  refactoring.
(org-export-table-has-header-p): Fix cache use, i.e., no longer
re-compute return value when the table is already known to have no
header.
(org-export-table-row-group):
(org-export-table-row-number): Populate cache with all the rows
whenever a row is queried.  This fixes previous quadratic behaviour.

Reported-by: Thierry Banel <tbanelwebmin@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/111131>
2017-01-01 23:58:29 +01:00
Nicolas Goaziou a277fd3efa Merge branch 'maint' 2017-01-01 19:56:23 +01:00
Rick Frankel 14e3209731 Update ob-ruby for inf-ruby 2.5
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): `run-ruby` has
   very different semantics in inf-ruby 2.5. Set ruby command to the
   default which used to be set by `run-ruby` and try and find already
   existing buffer before invocation.
2017-01-01 19:55:56 +01:00
Nicolas Goaziou d07d7c29c5 Merge branch 'maint' 2017-01-01 11:19:47 +01:00
Nicolas Goaziou 336bab6ea7 Update copyright years
* lisp/org-crypt.el:
* lisp/ox-publish.el: Update copyright years.
2017-01-01 11:19:15 +01:00
Nicolas Goaziou c7cc30b4d6 ox-publish: Back-port `org-publish-property'
* lisp/ox-publish.el (org-publish-property): New function.
2017-01-01 10:43:48 +01:00
Nicolas Goaziou 20f6c1965c Merge branch 'maint' 2017-01-01 10:35:06 +01:00
Nicolas Goaziou dd727cf0cb org-crypt: Fix data loss when providing an empty key
* lisp/org-crypt.el (org-encrypt-entry): Insert original text back
  upon encryption failure.

Reported-by: fxiny <wtimew@libero.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/111115>
2017-01-01 10:34:36 +01:00
Nicolas Goaziou 4ce104bf44 Merge branch 'maint' 2016-12-31 12:29:20 +01:00
Nicolas Goaziou dff9cf9c80 ox-publish: Fix `org-publish-get-project-from-filename' and :include
* lisp/ox-publish.el (org-publish-get-project-from-filename): Properly
  check included files.  Complete docstring.  Refactor code.
2016-12-31 12:28:02 +01:00
Nicolas Goaziou ccf2b988af ox-publish: Fix :base-extension (part 2)
* lisp/ox-publish.el (org-publish-get-base-files): Make sure to remove
  directories.
* testing/examples/pub/file.txt:
* testing/examples/pub/noextension: New files.
* testing/lisp/test-ox-publish.el (test-org-publish/base-extension):
  New test.
2016-12-29 21:48:02 +01:00
Nicolas Goaziou 2c6a4bec73 Merge branch 'maint' 2016-12-29 21:16:36 +01:00
Nicolas Goaziou acebe9a282 ox-publish: Fix :base-extension set to `any'
* lisp/ox-publish.el (org-publish-get-project-from-filename): Handle
  case when :base-extension is `any'.
(org-publish-project-alist): Improve docstring.

Reported-by: Arun Isaac <arunisaac@systemreboot.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111085>
2016-12-29 21:16:13 +01:00
Nicolas Goaziou 35e8e5c93a `orgtbl-to-generic' speed-up
* lisp/org-element.el (org-element-class): Make it a defsubst.
* lisp/org-table.el (orgtbl-to-generic): Do not use cache when
  building Org table.  Factor out calls to Org Export functions when
  they are not necessary.
(org-table--to-generic-row): Factor out calls to Org Export functions
when they are not necessary.
* lisp/ox.el (org-export-resolve-fuzzy-link):
(org-export-table-has-header-p):
(org-export-table-row-group):
(org-export-table-cell-width):
(org-export-table-cell-alignment): Small refactoring.
(org-export-table-row-number): Add caching.

* testing/lisp/test-org-element.el (test-org-element/class): Remove
  test.
2016-12-29 19:46:31 +01:00
Nicolas Goaziou 6f6c2ea8d9 Merge branch 'maint' 2016-12-29 16:39:07 +01:00
Alexey Lebedeff 3e68d01bdd Reveal tags after setting them
* lisp/org.el (org-set-tags): Reveal newly inserted tags.
* testing/lisp/test-org.el (test-org/set-tags): New test.

Sometimes freshly added tags can be sucked into invisible outline
region (denoted by ellipsis) - and to see them you need to do the full
global visibilty cycle.
2016-12-29 16:38:38 +01:00
Charles Berry ed0c8cb995 org-babel-execute:R fix `:colnames yes' clash with `:results graphics'
* lisp/ob-R.el (org-babel-execute:R): The `:colnames' and `:rownames'
  header arguments are ignored if `:results graphics' is specified.

Reported by: Kodi Arfer <kodi@arfer.net>
Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/111072>
2016-12-28 18:35:59 -08:00
Nicolas Goaziou a3073a06f4 Merge branch 'maint' 2016-12-29 01:20:27 +01:00
Nicolas Goaziou 57ca9ba80a org-clock: Fix ":formula %" with disparate duration formats
* lisp/org-clock.el (org-clock-time%): Handle various duration
  formats.  Refactor code.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Add
  tests.

Reported-by: Andreas Mueller <lists@0x7.ch>
<http://permalink.gmane.org/gmane.emacs.orgmode/111067>
2016-12-29 01:19:00 +01:00
Nicolas Goaziou c47d6892fa ox: localization: add Arabic support.
* lisp/ox.el (org-export-smart-quotes-alist):
(org-export-dictionary): Add Arabic support.

Suggested-by: Fadi F. Al-Sammak <ffsammak@gmail.com>
2016-12-29 00:34:37 +01:00
Nicolas Goaziou 5b8ebe6576 Merge branch 'maint' 2016-12-27 08:33:26 +01:00
Nicolas Goaziou bbbed7aad9 ox-publish: Fix typos 2016-12-27 08:30:01 +01:00
Nicolas Goaziou 517fed8d4d Merge branch 'maint' 2016-12-26 10:32:42 +01:00
Nicolas Goaziou 4cf56e6e89 Fix following links starting with square brackets
* lisp/org.el (org-link-search): Improve regexp.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add tests.
2016-12-26 10:32:26 +01:00
Bastien c98a343f8d Fix commit 1c89082.
* lisp/org.el (org-speed-command-hook): Do not use removed alias name.
2016-12-24 12:21:42 +01:00
Nicolas Goaziou 709dad2f3a Fix last commit
* lisp/org.el (org-speed-command-hook): Do not use removed alias name.
2016-12-24 11:30:19 +01:00
Nicolas Goaziou 1c89082600 org-compat: Remove obsolete aliases 2016-12-22 13:20:39 +01:00
Nicolas Goaziou 7a90187fb1 org-compat: Silence byte-compiler 2016-12-22 13:16:30 +01:00
Nicolas Goaziou 1ddadefd37 Merge branch 'maint' 2016-12-22 13:13:08 +01:00
Nicolas Goaziou 820d1eb617 Fix `org-compile-file'
* lisp/org.el (org-compile-file): Ensure `out-dir' is always a string.
2016-12-22 13:12:19 +01:00
Nicolas Goaziou 7fd61c4f92 org-compat: Silence byte-compiler 2016-12-22 01:41:02 +01:00
Nicolas Goaziou edc8d552cd org-compat: Silence byte-compiler 2016-12-22 01:29:03 +01:00
Nicolas Goaziou c130b2e7b3 Merge branch 'maint' 2016-12-20 18:01:27 +01:00
Matt Lundin 13751c3249 Fix org-clock-load
Since commit fda64f1ae2 on November 6,
org-clock-load no longer restores clocks in org-clock-persist-file. The
contents of the file look like this:

(setq org-clock-stored-history '(("/home/matt/org/inbox.org" . 39479) ("/home/matt/org/reading.org" . 63478)))

The files both exist; the position information is correct; and
org-clock-persist is t. And yet after calling org-clock-load,
org-clock-history, org-clock-loaded, and org-clock-stored-history remain
nil.

The problem, it seems, is that the logic/order of the if statement was
reversed in the commit above. The attached patch should fix the issue.

Best,
Matt

[4. text/x-diff; 0001-org-clock-Fix-org-clock-load.patch]
From 6d649016fbbfaa28c902ee1e71c20ecf332f8a14 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Mon, 19 Dec 2016 17:24:10 -0600
Subject: [PATCH] org-clock: Fix org-clock-load

* lisp/org-clock.el: (org-clock-load): Fix incorrect order in if
statement that was preventing org-load from loading stored data and
populating org-clock-history.
2016-12-20 18:01:02 +01:00
Nicolas Goaziou 91dc1b34e3 ox: Add EXPORT_FILE_NAME keyword
* lisp/ox.el (org-export-output-file-name): Support EXPORT_FILE_NAME
  keyword.
* doc/org.texi (Export settings): Document new keyword.
* testing/lisp/test-ox.el (test-org-export/output-file-name): Add
  tests.
2016-12-20 17:10:46 +01:00
Nicolas Goaziou bd828e2d1c ox: Add `org-export-global-macros'
* lisp/ox.el (org-export-global-macros): New variable.
(org-export-as): Use new variable.
* doc/org.texi (Macro replacement): Document new variable.
* testing/lisp/test-ox.el (test-org-export/expand-macro): Add tests.
2016-12-19 23:00:38 +01:00
Nicolas Goaziou 83827952db ox-publish: Provide relative file in sitemap generation
* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Document change.

(org-publish-property):
(org-publish--expand-file-name): New functions

(org-publish-get-base-files):
(org-publish-file):
(org-publish-projects):
(org-publish--sitemap-files-to-lisp):
(org-publish-sitemap):
(org-publish-find-property):
(org-publish-find-title):
(org-publish-find-date):
(org-publish-sitemap-default-entry):
(org-publish-sitemap-default): Use new functions.

* testing/lisp/test-ox-publish.el (test-org-publish/sitemap): Update
  test.
2016-12-19 17:36:19 +01:00
Nicolas Goaziou 6663452588 ox-publish: Remove :sitemap-sans-extension
* lisp/ox-publish.el (org-publish-sitemap): Remove property.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Remove documentation.

Caches uses absolute file names as keys.  We cannot provide file names
without extension to `:sitemap-format-entry' as they are no longer
existing key, and cannot be used for `org-publish-find-property' or
`org-publish-find-title'.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou fcca882876 ox-publish: Remove unused variable
* lisp/ox-publish.el (org-publish-sitemap-date-format): Remove variable.
(org-publish-projects): Apply removal.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou d5dbf761eb ox-publish: Include directories in site-map
* lisp/ox-publish.el (org-publish-temp-files): Remove variable.
(org-publish-get-base-files-1):
(org-publish-compare-directory-files): Remove functions.
(org-publish-get-base-files): Remove optional argument.  Rewrite
function.
(org-publish-projects):
(org-publish-sitemap):
(org-publish-index-generate-theindex): Apply signature change.
(org-publish-sitemap-sort-folders): Allow to include or ignore
directories in the site-map.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Document change.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou ca0ad0a84b ox-publish: Implement `org-publish-find-property'
* lisp/ox-publish.el (org-publish-find-property): New function.
(org-publish-find-title): Use new function.  Remove unused optional
argument.
(org-publish-find-date): Use new function.

(org-publish-project-alist):
* doc/org.texi (Sitemap): Update documentation.

Suggested-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/107219>
2016-12-19 12:19:58 +01:00
Nicolas Goaziou 2d3e3f562a ox-publish: Improve control over site map
* lisp/ox-publish.el (org-publish-project-alist): Document
  new :sitemap-format-entry property, and change to `:sitemap-function'.
(org-publish-sitemap-file-entry-format): Make variable obsolete.
(org-publish-org-sitemap): Remove function.
(org-publish--sitemap-files-to-lisp):
(org-publish-sitemap):
(org-publish-sitemap-default-entry):
(org-publish-sitemap-default): New functions.
(org-publish-projects): Use new functions.
* lisp/org-compat: Implement directory-name-p when not available.

* doc/org.texi (Sitemap): Update documentation.

:sitemap-function is more specialized so it is easier to manipulate.  In
particular, it can make use of built-in `org-list-to-*' functions.
Also, :sitemap-format-entry, as a function, is less limited than
`org-publish-sitemap-file-entry-format' format string.
2016-12-19 12:19:58 +01:00
Nicolas Goaziou 45d57bb4db org-list: Implement `org-list-to-org'
* lisp/org-list.el (org-list-to-org): New function.
* testing/lisp/test-org-list.el (test-org-list/to-org): New test.
2016-12-19 12:19:58 +01:00
Nicolas Goaziou 835b8e05e5 org-list: Tweak `org-list-to-generic'
* lisp/org-list.el (org-list-to-generic): :istart, :icount, :iend
  and :isep are now called with an additional argument, the type of the
  list.  Also add a new property :ifmt.
(org-list--to-generic-item): Use new property.
(org-list-to-subtree): Adapt to new requirements for :istart and :iend.

* testing/lisp/test-org-list.el (test-org-list/to-generic): Update
  tests.
2016-12-19 12:14:48 +01:00
Nicolas Goaziou 9ea8e46df0 Merge branch 'maint' 2016-12-19 12:07:07 +01:00
Nicolas Goaziou 1d7f1349c9 org-list: Clarify code
* lisp/org-list.el (org-list-item-body-column): Clarify code.
2016-12-19 12:06:30 +01:00
Nicolas Goaziou 3469830e3d ox-odt: Fix typo
* lisp/ox-odt.el (org-odt--translate-image-links): Fix typo.
2016-12-17 11:38:53 +01:00
Nicolas Goaziou 5ffb373a2c Implement `org-export-insert-image-links'
* lisp/ox.el (org-export-insert-image-links):
* lisp/ox-odt.el (org-odt--translate-image-links):
* lisp/ox-latex.el (org-latex-image-link-filter):
* lisp/ox-html.el (org-html-image-link-filter): New functions.
2016-12-17 11:36:49 +01:00
Nicolas Goaziou 753b90e321 org-element: Do not support nested links anymore
* lisp/org-element.el (org-element-object-restrictions):
(org-element--object-lex): Do not support nested links.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
* testing/lisp/test-org-lint.el (test-org-lint/link-to-local-file):
  Remove tests.
2016-12-17 11:35:50 +01:00
Nicolas Goaziou 81f4e9f651 Merge branch 'maint' 2016-12-16 22:42:53 +01:00
Nicolas Goaziou 51efd7f1db org-list: Fix "Stack overflow in regexp matcher"
* lisp/org-list.el (org-list-item-body-column): Do not backtrack as
  much in regexp.

Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110885>
2016-12-16 22:41:08 +01:00
Nicolas Goaziou 0863f8d1ca Merge branch 'maint' 2016-12-15 22:18:43 +01:00
Nicolas Goaziou a1f516f8a5 org-agenda: Fix "Wrong type argument: number-or-marker-p"
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Make sure deadline and schedule are
a number and not a string.

Reported-by: Jeffrey DeLeo <JeffreyDeLeo@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110837>
2016-12-15 22:16:19 +01:00
Nicolas Goaziou a5e91f5e51 Merge branch 'maint' 2016-12-15 16:14:20 +01:00
Nicolas Goaziou 3e60cb900d ox-ascii: Fix internal and ID links
* lisp/ox-ascii.el (org-ascii--describe-datum): New function.
(org-ascii--describe-links): Use new function.  Do not ignore fuzzy
links anymore when they contain a description.
(org-ascii-link): Use new function.  Better handling of internal
links.
* lisp/ox.el (org-export-dictionary): New entries: "See figure %s",
  "See listing %s", "See table %s".

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110788>
2016-12-15 16:12:58 +01:00
Nicolas Goaziou 901d2470dd Merge branch 'maint' 2016-12-15 14:24:46 +01:00
Nicolas Goaziou 51227cff94 Fix C-c C-c on inline tasks
* lisp/org.el (org-ctrl-c-ctrl-c): Properly recognize inlinetasks as
  a valid context.
2016-12-15 14:24:01 +01:00
Nicolas Goaziou f5b7de222d Fix level of newly inserted headlines
* lisp/org.el (org-insert-heading): Fix level of new headline when
  creating it from a regular text line.

* testing/lisp/test-org.el (test-org/insert-heading): Add tests.

Reported-by: swflint@flintfam.org (Samuel W. Flint)
<http://permalink.gmane.org/gmane.emacs.orgmode/110842>
2016-12-15 00:15:12 +01:00
Nicolas Goaziou 4510075ea4 Merge branch 'maint' 2016-12-15 00:03:47 +01:00
Nicolas Goaziou 7856018d78 org-macs: Tiny refactoring
* lisp/org-macs.el (org-match-line): Use (beginning-of-line) instead
  of (goto-char (point-at-bol)).
2016-12-15 00:02:58 +01:00
Nicolas Goaziou e31598bad8 Merge branch 'maint' 2016-12-14 21:39:02 +01:00
Nicolas Goaziou 22a4896bf8 org-info: Fix docstrings
* lisp/org-info.el (org-info-other-documents):
(org-info-map-html-url): Fix docstrings.

Suggested-by: Chunyang Xu <mail@xuchunyang.me>
2016-12-14 21:37:03 +01:00
Nicolas Goaziou d29b9ee064 Merge branch 'maint' 2016-12-14 13:16:34 +01:00
Nicolas Goaziou b5cebbc412 ox-beamer: Fix target export
* lisp/ox-beamer.el (beamer): Let "latex" export-back-end handle
  targets.
2016-12-14 13:15:48 +01:00
Nicolas Goaziou 23a9492055 Fix bold emphasis around headlines
* lisp/org.el (org-do-emphasis-faces): Fix bold emphasis around
  headlines.  In particular, stars at the beginning of a headline are
  not bold markup, and bold markup cannot end with stars at the
  beginning of a headline.

Reported-by: Ian Dunn <dunni@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110814>
2016-12-14 11:14:29 +01:00
Nicolas Goaziou 4691033abb Merge branch 'maint' 2016-12-13 22:14:02 +01:00
Nicolas Goaziou 1c95729788 ox: Fix internal references when using `org-export-(data-)with-backend'
* lisp/ox.el (org-export-data-with-backend):
(org-export-with-backend): Preserve internal references once the local
back-end has been applied.

* testing/lisp/test-ox.el (test-org-export/get-reference): Add tests.
2016-12-13 22:11:41 +01:00
Nicolas Goaziou 3322f5edfc Merge branch 'maint' 2016-12-13 14:15:33 +01:00
Nicolas Goaziou 64a2f6e22d ox-latex: Fix typo
* lisp/ox-latex.el (org-latex--text-markup): Fix typo.
2016-12-13 14:15:07 +01:00
Nicolas Goaziou a76b000da7 Merge branch 'maint' 2016-12-13 13:48:51 +01:00