Commit Graph

13618 Commits

Author SHA1 Message Date
Tom Tromey dd40193bfa Backport commit c92bae9a0 from Emacs
* lisp/org-list.el (org-list-insert-radio-list):
* lisp/org-table.el (orgtbl-setup, orgtbl-insert-radio-table): Use
derived-mode-p.

change org to use derived-mode-p
c92bae9a08cc7c2eb61bad32d9a9d6553b6d2c19
Tom Tromey
Wed Apr 5 15:53:38 2017 -0600
2017-04-09 20:48:07 -04:00
Andreas Gerler 8ba336ea0c
ob-sql: Add vertica engine
* lisp/ob-sql.el (org-babel-sql-dbstring-vertica): New function.
  (org-babel-execute:sql): Add `vertica' engine.

Signed-off-by: Andreas Gerler <baron@bundesbrandschatzamt.de>
2017-04-06 08:46:04 +02:00
Nicolas Goaziou 106ecb10a2 Merge branch 'maint' 2017-04-01 10:17:30 +02:00
Francesco Montanari b2f4f4dc42 ox-man: Add new line before line break tag
* lisp/ox-man.el (org-man-line-break): Transcode a LINE-BREAK object
  from Org to Man by adding the appropriate tag on a new line.

TINYCHANGE
2017-04-01 10:17:01 +02:00
Nicolas Goaziou e65be54b91 Merge branch 'maint' 2017-03-30 12:48:08 +02:00
Nicolas Goaziou 31f3725ba8 Fix `org-startup-with-latex-preview' handling
* lisp/org.el (org-mode): When honoring
  `org-startup-with-latex-preview', make sure to preview the whole
  buffer.

Reported-by: Diego Nicola Barbato
<http://permalink.gmane.org/gmane.emacs.orgmode/112925>
2017-03-30 12:46:46 +02:00
Rasmus 8892fbdb60 org-agenda: Set default-directory when exporting agenda
* lisp/org-agenda.el (org-agenda-write): Use default-directory of
  export file.  This is necessary for htmlize.el to write the correct
  path to agenda icons.
2017-03-29 17:17:19 +02:00
Nicolas Goaziou 0b87157e19 Merge branch 'maint' 2017-03-29 16:34:21 +02:00
Nicolas Goaziou df0c7d96a2 org-clock: Preserve narrowing when building clock table
* lisp/org-clock.el (org-dblock-write:clocktable): Preserve current
  narrowing, if any, when building the table.

Reported-by: Christof Musik <ml-orgmode@litephone.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112872>
2017-03-29 16:33:10 +02:00
Nicolas Goaziou d4cae34eaa Merge branch 'maint' 2017-03-29 15:34:50 +02:00
Nicolas Goaziou a08dd527d9 Small refactoring
* lisp/org.el (org-insert-link): Small refactoring.
2017-03-29 15:34:27 +02:00
Matt Lundin d9038a01c1 Allow insertion of links with multi-line search strings
* lisp/org.el: (org-insert-link): Fix regexps to match across
  newlines.
2017-03-29 14:28:48 +02:00
Nicolas Goaziou a126020e56 Merge branch 'maint' 2017-03-29 14:18:14 +02:00
Nicolas Goaziou 109c86998e Allow blank lines in text search link
* lisp/org.el (org-link-search): Allow blank lines.

This is a follow-up to 4dde26f08.
2017-03-29 14:12:58 +02:00
Nicolas Goaziou 4ac47e507d Merge branch 'maint' 2017-03-27 14:01:54 +02:00
Nicolas Goaziou c6b62fd648 ox-latex: Fix last commit
* lisp/ox-latex.el (org-latex--align-string): Fix typo in last commit.
2017-03-27 14:01:32 +02:00
Nicolas Goaziou 211d7aa9b2 Merge branch 'maint' 2017-03-27 13:53:05 +02:00
Nicolas Goaziou 7648354952 ox-latex: Fix user-defined align string in matrices
* lisp/ox-latex.el (org-latex--align-string): Change signature.
  Center all cells in matrices, yet preserve user-defined align
  string.
(org-latex--math-table): Apply signature change.

Reported-by: Phil Regier <phil.regier@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112873>
2017-03-27 13:51:55 +02:00
Nicolas Goaziou 72c3c42259 Merge branch 'maint' 2017-03-27 13:36:49 +02:00
Nicolas Goaziou 4dde26f086 Fix lsearch strings with newline characters
* lisp/org.el (org-link-search): Fix regexp.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add test.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112876>
2017-03-27 13:34:04 +02:00
Marco Wahl 772dc6ea27 Merge branch 'maint' 2017-03-26 15:40:10 +02:00
Marco Wahl 82310e34b9 org: Fix tag setter
* lisp/org.el (org-set-tags): Treat ':' and '::' as no tag.
2017-03-26 15:39:20 +02:00
Rasmus 9faf000e6a ox-latex: Support caption for latex-environment
* lisp/ox-latex.el (org-latex--environment-type): New function
  determining type of a latex-environment.
  (org-latex-latex-environment): Add support for caption.
  (org-latex--caption/label-string): Use correct type for non-floating
  latex-environments.
* etc/ORG-NEWS: Add entry.
2017-03-24 17:22:11 +01:00
Bastien 8a7fe3c219 Merge branch 'maint' 2017-03-23 23:49:11 +01:00
Bastien e3ed81c98d ox-html.el (org-html-scripts): Fix copyright years
* lisp/ox-html.el (org-html-scripts): Fix copyright years.
2017-03-23 23:46:13 +01:00
Matt Price d5bbf36553 ox-html: Allow displaying source code block using klipse
* lisp/ox-html.el (html, org-html-template)
(org-html-src-block): Allow to display source code block using
the klipse javascript plugin.

Thanks to Nicolas Goaziou for reviewing the patch.
2017-03-23 23:22:30 +01:00
Nicolas Goaziou 0f51e643c4 Merge branch 'maint' 2017-03-23 16:46:52 +01:00
Nicolas Goaziou b791cd59a5 ox: Fix "Fix :filter-options"
* lisp/ox.el (org-export-as): Remove uninterpreted data from back-end
  specific parsed keywords.

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

This fixes 6cd42b08f9.
2017-03-23 16:46:28 +01:00
Nicolas Goaziou aadde88799 ox: Clarify a docstring
* lisp/ox.el (org-export-get-all-options): Specify return value for
  unknown back-ends.
(org-export--parse-option-keyword):
(org-export--get-subtree-options):
(org-export--get-inbuffer-options):
(org-export--get-global-options): Remove useless check.
2017-03-23 16:38:59 +01:00
Marco Wahl 1d35684c56 org: Liberate org-property-action
* lisp/org.el (org-property-action): Remove unnecessary restriction
  for property action.
2017-03-23 11:03:10 +01:00
Marco Wahl 86ff112707 Merge branch 'maint' 2017-03-21 20:53:02 +01:00
Marco Wahl 4b4ccdc3fa org-agenda: Fix agenda buffer name after reload sticky agenda
* lisp/org-agenda.el (org-agenda-list): Don't rename the buffer when
  redoing sticky.

This fix has been proposed by Ian Dunn.

<http://permalink.gmane.org/gmane.emacs.orgmode/112833>

TINYCHANGE
2017-03-21 20:47:30 +01:00
Nicolas Goaziou f64fd2a8f1 Merge branch 'maint' 2017-03-19 23:56:56 +01:00
Aaron Jensen 0ccd8286a1 org-src: Fix fontification error
* lisp/org-src.el (org-src-font-lock-fontify-block): Fix fontification
error introduced in commit f2a5104e45.

TINYCHANGE
2017-03-19 23:55:51 +01:00
Nicolas Goaziou 7bbd62cef4 Merge branch 'maint' 2017-03-19 10:57:11 +01:00
Yasushi SHOJI d2835ab54d org-clock: Fix percent formula column in clock table
* lisp/org-clock.el (org-clocktable-write-default): Fix percent
  formula column in clock table.
2017-03-19 10:55:44 +01:00
Nicolas Goaziou 36c7cfe9eb Merge branch 'maint' 2017-03-18 10:29:33 +01:00
Nicolas Goaziou b72920344f ob-exp: Fix export of src blocks with pathological name
* lisp/ob-exp.el (org-babel-exp-process-buffer): Discard false
  positives.
* testing/lisp/test-ob-exp.el (ob-exp/src-block-with-affiliated-keyword):
  New test.

Reported-by: Skip Collins <skip.collins@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112797>
2017-03-18 10:28:15 +01:00
Marco Wahl 3a9ac1f035 Merge branch 'maint' 2017-03-17 19:54:48 +01:00
Marco Wahl d262ae53c9 org-agenda: Fix agenda standard name when going unsticky
* lisp/org-agenda.el (org-agenda-list): Reset `org-agenda-buffer-name'
  to the original name.
* testing/lisp/test-org-agenda.el: Pertaining unit test.  + 2 basic
  agenda tests.
* testing/examples/agenda-file.org: File to produce content for an
  agenda to test.
2017-03-17 19:52:22 +01:00
Nicolas Goaziou 9227445899 ox-publish: Raise an error on undefined components (take 2)
* lisp/ox-publish.el (org-publish-expand-projects): Raise an error on
  undefined components.
2017-03-17 09:32:21 +01:00
Nicolas Goaziou 147b4646d2 Revert "ox-publish: Raise an error when encountering undefined component"
This reverts commit 6e1d174d0a.
2017-03-17 09:30:38 +01:00
Nicolas Goaziou 72fc2d3928 org-duration: Clarify a docstring
* lisp/org-duration.el (org-duration-format): Clarify `h:mm:ss' and
  `h:mm' values.

Reported-by: Malcolm Purvis <malcolm@purvis.id.au>
<http://permalink.gmane.org/gmane.emacs.orgmode/112280>
2017-03-17 08:59:09 +01:00
Nicolas Goaziou 6e1d174d0a ox-publish: Raise an error when encountering undefined component
* lisp/ox-publish.el (org-publish-expand-projects): Raise an error
  when encountering undefined component.  Refactor code.  Fix
  docstring.

Reported-by: Bob Newell <bobnewell@bobnewell.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/112712>
2017-03-17 08:53:46 +01:00
Nicolas Goaziou 00f95cb126 org-agenda: Fix scheduled repeats
* lisp/org-agenda.el (org-agenda-get-scheduled): Fix scheduled
  repeats.

This is a follow-up to b5c19643d2.
2017-03-17 08:39:43 +01:00
Nicolas Goaziou b5c19643d2 org-agenda: Fix off-by-one scheduled repeat
* lisp/org-agenda.el (org-agenda-get-scheduled): Make the second
  repeat appear as "Sched. 1x".

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/112755>
2017-03-17 08:35:47 +01:00
Nicolas Goaziou 2ff038da31 org-capture: Tiny refactoring
* lisp/org-capture.el (org-capture-set-target-location): Use
  `point-marker'.  Also remove trailing space.
2017-03-17 08:26:29 +01:00
Bastien f6f02ea019 Merge branch 'maint' 2017-03-16 22:15:24 +01:00
Bastien e43f247e7c lisp/org-table.el: Bugfix: correctly handle increment of -/+ numbers
* lisp/org-table.el (org-table-copy-down): Bugfix: correctly
handle increment of numbers with a -/+ sign.
2017-03-16 22:15:11 +01:00
Nicolas Goaziou f2e5920f41 Fix display bug when inserting a heading
* lisp/org.el (org-N-empty-lines-before-current): Do not hide newline
  character before current headline.

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

Reported-by: Rick Frankel <rick@rickster.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112751>
2017-03-16 13:01:39 +01:00
Carsten Dominik 0f1b5ec496 Consolidate capture targets and allow outline path in datetree targets
* doc/org.texi: Document the new capture templates target.
* lisp/org-capture.el (org-capture-upgrade-templates): New function.
(org-capture-templates): Implement the new file+olp+datetree target.
(org-capture): Document the C-1 prefix.
(org-capture-sanitize-olp): New function.
(org-capture-select-template): Make sure upgraded version of templates
variable is used.
* lisp/org-datetree.el (org-datetree-find-date-create): Accept
`subtree-at-point' as a value for the KEEP-RESTRICTION argument.
(org-datetree-find-iso-week-create): Accept `subtree-at-point'
as a value for the KEEP-RESTRICTION argument.
* lisp/org.el (org-find-olp): Throw an error when called in a
buffer that is not in Org mode.
* lisp/org-capture.el (org-capture-fill-template): Use overriding time
also in `?<>' escapes.
2017-03-16 08:18:55 +01:00
Nicolas Goaziou 9f3a026e57 Merge branch 'maint' 2017-03-15 14:32:24 +01:00
Nicolas Goaziou 35ec82bb16 ox-org: Fix footnotes export, part 2
* lisp/ox-org.el (org-org--add-missing-sections): New function.
(org-org-section): Small refactoring.

Since footnote definitions are inserted in the section of the
headline, make sure those are not being skipped.
2017-03-15 14:30:52 +01:00
Nicolas Goaziou 53d1aa1b97 Merge branch 'maint' 2017-03-15 12:31:42 +01:00
Nicolas Goaziou 0fd2256eba ox-org: Correctly export footnote references in headlines
* lisp/ox-org.el (org-org-section): Also include references found in
  headlines when inserting footnote definitions at the end of
  a section.

Reported-by: WY H <jcjuly@outlook.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112678>
2017-03-15 11:51:16 +01:00
Simon Michael 09ee728c64 Babel support for hledger accounting tool
* lisp/ob-hledger.el: New file.
* lisp/org.el (org-babel-load-languages):
* lisp/ox-html.el (org-html-style-default): Allow calling hledger from
  Babel.
2017-03-14 18:19:26 +01:00
Nicolas Goaziou 10dc237eee Merge branch 'maint' 2017-03-14 18:14:32 +01:00
Nicolas Goaziou 6cd42b08f9 ox: Fix :filter-options
* lisp/ox.el (org-export--remove-uninterpreted-data): Do not modify
  communication channel.  Change "blob" to "datum".
(org-export--remove-uninterpreted-data-1): Remove function.
(org-export-as): Remove uninterpreted data from parsed keyword before
applying filters.

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

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/112730>
2017-03-14 18:10:07 +01:00
Nicolas Goaziou c41c2be339 Merge branch 'maint' 2017-03-14 09:07:55 +01:00
Nicolas Goaziou 92ee4d06a2 org-capture: Fix escaping characters in template embedded S-exps
* lisp/org-capture.el (org-capture-fill-template): Escape backslash
  characters in %i contents when those are inserted within a S-exp.
  Also prevent adding any prefix to %i contents spanning over multiple
  lines when they are inserted within a S-exp.

* testing/lisp/test-org-capture.el (test-org-capture/fill-template):
  Add tests.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112232>
2017-03-14 09:03:59 +01:00
Michael Welle 7b42697260 Make anniversaries' time span information more descriptive in agenda.
* lisp/org-bbdb.el (org-bbdb-anniversary-description): New function.
(org-bbdb-general-anniversary-description-after): New variable.
(org-bbdb-anniversaries-future): Incorporate calculation of the description.
2017-03-12 13:42:43 +01:00
Nicolas Goaziou 33b9c42395 org-lint: Report invalid durations in effort properties
* lisp/org-lint.el (org-lint-invalid-effort-property): New checker.
* testing/lisp/test-org-lint.el (test-org-lint/invalid-effort-property):
New test.
2017-03-12 09:08:28 +01:00
Nicolas Goaziou 2370a885e7 ox-md: Implement native table of contents
* lisp/ox-md.el (org-md--headline-referred-p): Try hard to limit
  anchors for headlines really referred to, either globally, or
  locally, in a table of contents.
(org-md-keyword): Add support for "TOC" keyword.
(org-md--build-toc): New function.
(org-md-inner-template): Use new function.
2017-03-11 15:21:27 +01:00
Wojciech Gac 2d1f73ebf8 org-attach.el: Add functionality to attach from URL
* lisp/org-attach.el (org-attach): Create a binding under 'u' to
  attach a file from URL
  (org-attach-url): Prompt user for URL
  (org-attach-attach): Update method list

* doc/org.texi (Attachments): Document attaching from URL

TINYCHANGE
2017-03-11 13:41:18 +01:00
Nicolas Goaziou 393dcb7094 Merge branch 'maint' 2017-03-11 11:21:50 +01:00
Nicolas Goaziou ad19484676 Revert "ox-ascii: Remove useless brackets in sub/super script"
This reverts commit 5b4215eb16.
2017-03-11 11:21:26 +01:00
Nicolas Goaziou a3747baef9 org-agenda: Fix infloop in `org-find-top-headline'
* lisp/org-agenda.el (org-find-top-headline): Prevent infloop when top
  headline has not level 1.

Reported-by: Adrian Bradd <adrian.bradd@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112623>
2017-03-11 11:20:35 +01:00
Nicolas Goaziou da79fdeb2a Merge branch 'maint' 2017-03-10 18:52:43 +01:00
Nicolas Goaziou 4cb6abe3b7 ox-md: Fix internal links
* lisp/ox-md.el (org-md-headline): Add an anchor when a link is
  referring to the headline.
(org-md--headline-referred-p): New function.
2017-03-10 18:52:06 +01:00
Nicolas Goaziou 0e0fdabc99 Merge branch 'maint' 2017-03-08 12:29:45 +01:00
Nicolas Goaziou 5b4215eb16 ox-ascii: Remove useless brackets in sub/super script
* lisp/ox-ascii.el (org-ascii-subscript):
(org-ascii-superscript): Only use brackets when there are multiple
words.
2017-03-08 12:28:28 +01:00
Nicolas Goaziou 6747bf3de6 Merge branch 'maint' 2017-03-08 11:48:56 +01:00
Nicolas Goaziou 2eda74285e Fix LaTeX and Beamer publishing processes
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Set default directory
  prior to compiling the generated tex file.

Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112388>
2017-03-08 09:33:09 +01:00
Nicolas Goaziou 2f48603d71 Merge branch 'maint' 2017-03-08 00:15:26 +01:00
Nicolas Goaziou 64a5f9a596 ox-html: Fix verse blocks
* lisp/ox-html.el (org-html-verse-block): Add missing line break at
  the end of each line in verse environments.

Reported-by: Skip Collins <skip.collins@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112537>
2017-03-08 00:12:55 +01:00
Tim Cross 7ed93eba5a Fix incorrect argument call in ob-clojure.el
* lisp/ob-clojure.el (org-babel-execute:clojure): Use
  `cider-current-ns' instead of `cider-current-session'.

org-babel-execute-clojure was calling nrepl-sync-request:eval and
nrepl-request:eval with the session ID as the 3rd argument when the
functions expected a clojure namespace.

TINYCHANGE
2017-03-07 09:09:28 +01:00
Nicolas Goaziou d73942cf99 org-agenda: Implement `org-deadline-past-days'
* lisp/org-agenda.el (org-deadline-past-days): New variable.
(org-scheduled-past-days): Set :safe keyword.
(org-agenda-get-deadlines): Use new variable.
2017-03-07 08:46:38 +01:00
Eduardo Bellani 78bddaca1f org-clock.el: Add nullary function evaluation as a clocktable scope parameter
* lisp/org-clock.el (org-dblock-write:clocktable): Funcall the scope
  argument if it is a function.

* doc/org.texi: Document the feature of using a nullary function as the
  scope for the clocktable.

* testing/lisp/test-org-clock.el: Adds a test for the above
  feature.  Also, fix the number of hours of a test that seemed to be
  broken.

TINYCHANGE
2017-03-06 18:00:19 +01:00
Nicolas Goaziou e7a52eeaa4 org-element: Fix code comment
* lisp/org-element.el (org-element-object-restrictions): Fix code
  comment.
2017-03-06 17:38:05 +01:00
Nicolas Goaziou 6251c87f66 Merge branch 'maint' 2017-03-01 22:19:29 +01:00
Nicolas Goaziou a4eb60931a ob-core: Properly escape Org syntax when inserting results
* lisp/ob-core.el (org-babel-examplify-region): Escape Org syntax
  before wrapping it.

* testing/lisp/test-ob.el (test-ob/org-babel-insert-result): Add test.
  Renamed from `test-ob/org-babel-insert-result--improper-lists'.

Reported-by: D M German <dmg@turingmachine.org>
2017-03-01 22:19:04 +01:00
Nicolas Goaziou 9d13555042 Merge branch 'maint' 2017-02-28 13:38:57 +01:00
Nicolas Goaziou e1fa353e0a org-protocol: Fix library name
* lisp/org-protocol.el (org-protocol-create-for-org): Use `ox-publish'
  instead of outdated `org-publish'.  Improve warning message.

Reported-by: Jonas Bernoulli <jonasbernoulli@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112386>
2017-02-28 13:37:48 +01:00
Kyle Meyer 5aa8d1a046 Merge branch 'maint' 2017-02-27 11:13:47 -05:00
Kyle Meyer a29525d657 org-agenda-menu: Correct key for fortnight view
* lisp/org-agenda.el (org-agenda-menu): Correct key for fortnight
  view.

Reported-by: J. David Boyd <dboyd2@mmm.com>
2017-02-27 11:11:20 -05:00
Nicolas Goaziou f9b501bc18 Merge branch 'maint' 2017-02-23 14:19:06 +01:00
Anders Johansson 4084337dbe org.el: Make faces org-quote and org-verse be appended
* lisp/org.el (org-fontify-quote-and-verse-blocks): Append faces.  Use
  `add-face-text-property'.

This means fontification of emphasis, links etc. is kept in quote and
verse blocks even with org-fontify-quote-and-verse-blocks non-nil.

TINYCHANGE
2017-02-23 14:17:56 +01:00
Nicolas Goaziou 83f5c8962f Merge branch 'maint' 2017-02-23 12:59:45 +01:00
Nicolas Goaziou da80e6c6ab org-capture: Tiny refactoring
* lisp/org-capture.el (org-capture-refile): Tiny refactoring.
2017-02-23 12:59:24 +01:00
Nicolas Goaziou 9263bf5766 org-duration: `org-duration-to-minutes' accepts plain numbers
* lisp/org-duration.el (org-duration-to-minutes): Accept plain numbers
  for backward compatibility with `org-hh:mm-string-to-minutes'.

* testing/lisp/test-org-duration.el (test-org-duration/to-minutes):
  Add test.

Reported-by: Dale <dale@codefu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112290>
2017-02-23 12:46:37 +01:00
Nicolas Goaziou b1353cb6f8 org-duration: Fix bug with decimal units
* lisp/org-duration.el (org-duration-to-minutes): Fix bug where the
  same unit with a decimal unit would be matched multiple times.
* testing/lisp/test-org-duration.el (test-org-duration/to-minutes):
  Fix test.
2017-02-22 19:34:44 +01:00
Nicolas Goaziou b712c4f77a org-duration: Improve docstring
* lisp/org-duration.el (org-duration-format): Clarify docstring.
2017-02-22 11:51:44 +01:00
Nicolas Goaziou 36581d2162 org-agenda: Display all past repeated events for plain timestamps
* lisp/org-agenda.el (org-agenda-prefer-last-repeat): Document special
  behaviour for bare timestamps.
(org-agenda-get-timestamps): Show every past repeated event when
`org-agenda-prefer-last-repeat' is non-nil.

Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
<http://permalink.gmane.org/gmane.emacs.orgmode/111731>
2017-02-21 19:20:17 +01:00
Nicolas Goaziou b785dcfd24 org-compat: Fix migration to `org-duration-format'
* lisp/org-compat.el (org-time-clocksum-format):
(org-time-clocksum-use-fractional):
(org-time-clocksum-fractional-format):
(org-time-clocksum-use-effort-durations): Do not make an alias to
a variable with an incompatible value.

Reported-by: Achim Gratz <Stromeko@nexgo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112266>
2017-02-21 18:46:32 +01:00
Bastien cfadbc3761 Merge branch 'maint' 2017-02-21 15:42:12 +01:00
Bastien df506794db org-capture: Fix commit 7d7c38 2017-02-21 15:41:15 +01:00
Nicolas Goaziou d1577d1e1b Merge branch 'maint' 2017-02-19 15:37:41 +01:00
Nicolas Goaziou 7d7c38c6b1 org-capture: Fix `org-capture-refile'
* lisp/org-capture.el (org-capture-refile): Preserve location of point
  when refiling.

* testing/lisp/test-org-capture.el (test-org-capture/refile): New
  test.

Reported-by: Liu Hui <liuhui1610@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112202>
2017-02-19 15:37:12 +01:00
Nicolas Goaziou b5d8be4a5f Merge branch 'maint' 2017-02-19 09:39:50 +01:00
Axel Kielhorn c5ab7958b7 org-clock: Add german translation.
* lisp/org-clocl.el (org-clock-clocktable-language-setup): German
  translations added.

Axel Kielhorn <org-mode@axelkielhorn.de>
TINYCHANGE
2017-02-19 09:39:06 +01:00
Nicolas Goaziou a6c318f471 org-clock: Fix missing properties in Clock table
* lisp/org-clock.el (org-clocktable-write-default): Do not ignore
  properties specified by :properties parameter.

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

The regression was introduced in b897ab722.

Reported-by: Dale <dale@codefu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112219>
2017-02-18 20:24:51 +01:00
Nicolas Goaziou 21797c3185 Merge branch 'maint' 2017-02-18 14:57:04 +01:00
Nicolas Goaziou 70872885be org-src: Fix typo in code comment
* lisp/org-src.el (org-edit-src-save): Fix typo.
2017-02-18 14:56:41 +01:00
Nicolas Goaziou 552c5c771a org-clock: Small refactoring
* lisp/org-clock.el (org-clocktable-write-default): Small refactoring.
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/compact):
  Add tests.
2017-02-18 14:54:43 +01:00
Nicolas Goaziou 326894046c org-clock: Fix number of columns with :compact parameter
* lisp/org-clock.el (org-clocktable-write-default): Fix number of
  columns with :compact parameter.

Reported-by: Stefan Nobis <stefan-ml@snobis.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112217>
2017-02-18 14:22:50 +01:00
Nicolas Goaziou 120b565054 Merge branch 'maint' 2017-02-17 22:33:16 +01:00
Nicolas Goaziou bf601016dc Properly save source blocks with `save-some-buffers'
* lisp/org-src.el (org-src-mode-configure-edit-buffer): Set
  `write-contents-functions' so that saving a remote editing buffer
  always call `org-edit-src-save'.
(org-edit-src-save): Return a non-nil value explicitly.

Reported-by: Thibault Polge <thibault@thb.lt>
<http://permalink.gmane.org/gmane.emacs.orgmode/112201>
2017-02-17 22:32:50 +01:00
Nicolas Goaziou 542890cd3f Fix: Prevent spurious newlines when inserting a new heading
* lisp/org.el (org-insert-heading): Do not insert spurious newline
  characters when inserting a headline.

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

Reported-by: Kyle Sherman <kylewsherman@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112205>
2017-02-17 21:51:16 +01:00
Nicolas Goaziou 82c3039ce4 org-clock: Fall back to English when no translation is available
* lisp/org-clock.el (org-clock--translate): New function.
(org-clocktable-write-default): Use new function.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/lang): New
  test.
2017-02-17 15:11:55 +01:00
Nicolas Goaziou 48284bafb2 Merge branch 'maint' 2017-02-17 14:38:45 +01:00
Nicolas Goaziou 7ca2e027a6 org-clock: Fix error when using unknown language
* lisp/org-clock.el (org-clocktable-write-default): Be careful
  that (nth 4 lwords) and (nth 5 lwords) can be nil, if :lang as an
  unknown value.
2017-02-17 14:34:19 +01:00
Nicolas Goaziou 67c84c161f Prefer `compilation-mode' over `special-mode' for log buffers
* lisp/org.el (org-compile-file): Use `compilation-mode' instead of
  `special-mode'.
2017-02-17 13:35:07 +01:00
Nicolas Goaziou 5018803f60 Use `special-mode' for compilation output
* lisp/org.el (org-compile-file): Switch to `special-mode' for log
  buffer.

Suggested-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112164>
2017-02-17 13:32:05 +01:00
Nicolas Goaziou f6525e8fe4 Merge branch 'maint' 2017-02-17 13:24:06 +01:00
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