Commit Graph

14045 Commits

Author SHA1 Message Date
Nicolas Goaziou bac8d25441 org-clock: Fix timezone in `org-clock-get-sum-start'
* lisp/org-clock.el (org-clock-get-sum-start): Remove timezone
  argument from `encode-time'.

Reported-by: Ihor Radchenko <ihor_radchenko@mymail.sutd.edu.sg>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00499.html>
2017-12-22 19:19:49 +01:00
Kaushal Modi 4f3fc9cb20 Fix double-escaping of # and ![ in Markdown export
* lisp/ox-md.el (org-md-plain-text): Fix the order of replacements in
  plain text.

<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00460.html>
2017-12-20 13:18:55 -05:00
Nicolas Goaziou 3acc212c8f ob-core: Get :noweb-ref from definition instead of point of call
* lisp/ob-core.el (org-babel-expand-noweb-references): Get :noweb-ref
  from definition instead of point of call.

* testing/lisp/test-ob.el (test-ob/noweb-expansion-1):
(test-ob/noweb-expansion-2): Merge tests.  Add test.
2017-12-20 13:15:08 +01:00
Neil Jerram 4932e2197a Fix Scheme evaluation in fresh Emacs
* lisp/ob-scheme.el: Require geiser-impl so that
  geiser-default-implementation is defined.  Otherwise, unless Geiser
  has previously been run (e.g. with `run-geiser'), you'll see an
  error that geiser-default-implementation is undefined.
2017-12-19 20:27:44 +01:00
Jack Kamm b506bb68d0 ob-python: Fix :session :results output multiline behavior
* lisp/ob-python.el (orb-babel-python-evaluate-session): When :session
:results output, send multiline code blocks to tmpfile and execute in
Python with exec().
(org-babel-python--exec-tmpfile): New variable.
* testing/lisp/test-ob-python.el (test-ob-python/session-multiline):
Test for :session with multiple lines and indentation.
2017-12-18 23:59:04 -05:00
Nicolas Goaziou 84cb63a44a ox: Fix plain text export with `org-export-with-backend'
* lisp/ox.el (org-export-with-backend): Handle arity for plain text
  transcoder.
* testing/lisp/test-ox.el (test-org-export/with-backend): Add test.
2017-12-16 13:44:56 +01:00
Nicolas Goaziou 5e30bbcd34 Silence byte-compiler 2017-12-15 23:21:15 +01:00
Nicolas Goaziou aab7f65a8b ox-latex: Merge check-boxes with bullets
* lisp/ox-latex.el (org-latex-item): Do not display both bullet and
  checkbox.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00225.html>
2017-12-15 22:48:57 +01:00
Nicolas Goaziou 46124812d2 Fix function declarations
Fixes: 29722
2017-12-15 22:24:44 +01:00
Nicolas Goaziou 327ca051ae ob-ref: Fix parsing arguments with a newline character
* lisp/ob-ref.el (org-babel-ref-split-regexp): Remove variable.
(org-babel-ref-parse): Handle arguments containing a newline
character (e.g., strings).

* testing/lisp/test-ob-lob.el (test-ob-lob/assignment-with-newline):
  New test.
2017-12-15 00:00:30 +01:00
Nicolas Goaziou fe98379fce Fix fuzzy link escaping
* lisp/org.el (org-make-link-string): Properly escape square brackets
  and percent sings in fuzzy links.

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

Reported-by: Paulo Matos <paulo@matos-sorge.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00269.html>
2017-12-14 22:39:54 +01:00
Nicolas Goaziou 263a0cf00e Fix defcustom type
* lisp/org-agenda.el (org-agenda-custom-commands-local-options):
* lisp/org-duration.el (org-duration-units):
* lisp/org.el (org-occur-case-fold-search): Remove spurious quote.

Fixes: 29694

lignes
2017-12-14 00:40:27 +01:00
Nicolas Goaziou d9a6408baf Fix defgroups
* lisp/org.el (org-structure-template-alist): Use `org-edit-structure'
  instead of non-existent `org-completion'.
* lisp/ox-publish.el (org-export-publish): Rename from `org-publish'.
* lisp/org-pcomplete.el (org-complete): Remove unused group.

Fixes: 29698
2017-12-14 00:16:18 +01:00
Nicolas Goaziou 08fa2ae056 Fix some defcustoms types
* lisp/ob-stan.el (org-babel-stan-cmdstan-directory):
* lisp/org.el (org-latex-default-packages-alist):
* lisp/ox-odt.el (org-odt-with-latex): Fix type mismatch.

Fixes: 29695
2017-12-13 23:51:10 +01:00
Nicolas Goaziou 0dde39ccd3 org-archive: Fix point after archiving to sibling
* lisp/org-archive.el (org-archive-to-archive-sibling): Move point in
  a consistent way upon archiving to a sibling.

Reported-by: Allen Li <vianchielfaura@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00158.html>
2017-12-11 23:19:40 +01:00
Doro Rose b467877437 Fix ob-haskell.el to work with custom ghci prompts
* lisp/ob-haskell.el (haskell-prompt-regexp):  Define defvar
`haskell-prompt-regexp`.  This variable will override the variable set by
inf-haskell, when `org-babel-execute:haskell` is called.
(org-babel-execute:haskell):  Make sure that
`comint-prompt-regexp` is set appropriately to enable  correct parsing
of "λ"-prompts.  Set `comint-preoutput-filter-functions` appropriately to
enable correct parsing of coloured ghci prompts.

The problem was that code sent back from the inf-haskell buffer to
 org-babel wasn't parsed correctly in `org-babel-comint-with-output`.
 This occured when the user uses the commonly used "λ"-prompt.

TINYCHANGE
2017-12-11 15:11:56 +01:00
Eric S Fraga 1187538a21 Allow gnuplot to generate plots in different directories
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot) if the Org buffer
  is associated with a file, direct gnuplot to change to the directory
  for that file.
2017-12-07 14:20:06 +01:00
Nicolas Goaziou b570175d76 Fix `org-files-list'
* lisp/org.el (org-files-list): Prevent duplicates in result.

Reported-by: Renato Ferreira <renatofdds@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00134.html>
2017-12-06 23:15:59 +01:00
Nicolas Goaziou 0e7e3bc6df Remove some references to reserved keybinding prefix `C-c a'
* lisp/org-agenda.el (org-stuck-projects):
(org-agenda-menu):
* lisp/org.el (org-org-menu): Remove references to reserved keybinding
  prefix `C-c a'.

Fixes: 28263
2017-12-04 22:42:16 +01:00
Nicolas Goaziou 66754e9042 org-feed: Fix parsing <guid>
* lisp/org-feed.el (org-feed-parse-rss-feed): Fix regexp for <guid>.

Fixes: 27711
2017-12-04 22:20:25 +01:00
Nicolas Goaziou d3f7309cbd org-irc: Silence byte-compiler 2017-12-04 18:55:03 +01:00
thibault e22ee8b8a3 Fix bug in HTML export of code blocks with starting blank lines
* lisp/ox-html.el (org-html-do-format-code): Preverse starting blank
  lines when splitting code lines (use `split-string' instead of
  `org-split-string').

  (org-html-fontify-code): Preserve starting blank lines in returned
  code string.
2017-12-04 08:24:02 +01:00
Nicolas Goaziou 037db00f40 Fix last commit
* lisp/org.el (org-org-menu): Fix last commit.
2017-12-03 18:14:21 +01:00
Nicolas Goaziou b4079bb894 Activate CDLatex entry in menu only if `cdlatex' is loaded
* lisp/org.el (org-org-menu): Activate CDLatex entry in menu only if
  `cdlatex' is loaded.

Fixes: 4068
2017-12-03 18:03:19 +01:00
Nicolas Goaziou efe440adbe org-gnus: Silence byte-compiler
Fixes: 29329
2017-12-03 16:22:45 +01:00
Nicolas Goaziou 2faaacfeeb Revert the whole time zone mess
* lisp/org.el (org-time-string-to-time):
(org-time-string-to-seconds): Remove optional ZONE argument.
(org-2ft):
(org-check-before-date):
(org-check-after-date):
(org-check-dates-range):
(org-parse-time-string):
* lisp/org-clock.el (org-clock-get-sum-start):
(org-clock-out):
(org-clock-timestamps-change):
(org-clock-sum):
(org-clock-update-time-maybe):
* lisp/org-colview.el (org-columns--age-to-minutes): Apply change.
* testing/lisp/test-org-clock.el (org-test-clock-create-clock):
(test-org-clock/clocktable/scope):
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Apply change.  Simplify tests to avoid daylight saving time issue.
2017-12-03 08:57:37 +01:00
Nicolas Goaziou 14620fdf0c Yet another tweak to fontification
* lisp/org.el (org-do-emphasis-faces): Handle properly asterisks at
  the beginning of line.
2017-12-02 23:21:36 +01:00
Nicolas Goaziou 8bd9839952 Revert "Fix headline fontification"
This reverts commit 5873d99121.
2017-12-02 23:07:51 +01:00
Nicolas Goaziou ca43c1f262 Fix RET past the last column of a table
* lisp/org.el (org-return): Split the table before first column or
  after last one.
* lisp/org-table.el (org-table-next-row): Remove code handling split.

* testing/lisp/test-org.el (test-org/return): Add test.
2017-12-02 17:23:03 +01:00
Nicolas Goaziou f53d1e2005 Let `or-export-last-sibling-p' handle discontinuous headlines
* lisp/ox.el (org-export-last-sibling-p): Handle discontinuous
  headlines.
* testing/lisp/test-ox.el (test-org-export/last-sibling-p): Add test.

Fixes: 24836
2017-12-02 12:22:32 +01:00
Nicolas Goaziou 0cc231a7bb Call store link functions only once
* lisp/org.el (org-store-link): Call store link functions only once.

Fixes: 19914
2017-12-01 19:33:35 +01:00
Matt Lundin dd3bf50adf Preserve point when storing link in Gnus nnir groups
* lisp/org-gnus.el: (org-gnus-store-link) This fixes a similar issue
  as commit 84b329516e, but for
  nnir search groups in gnus.
2017-11-29 21:05:19 +01:00
Matt Lundin 84b329516e Preserve position of point in gnus virtual group
* lisp/org-gnus.el: (org-gnus-store-link) Add a save-excursion to
  protect the position of point. Otherwise, when calling org-capture
  in an article with a virtual group, the point is moved and the
  region captured is incorrect.
2017-11-29 19:02:57 +01:00
Nicolas Goaziou 45c4502713 org-capture: Re-introduce history list per prompt
* lisp/org-capture.el (org-capture--prompt-history-table):
(org-capture--prompt-history): New variables.

(org-capture-fill-template): Handle history list per prompt.

Reported-by: Karl Eichwalder <ke@gnu.franken.de>
<http://lists.gnu.org/r/emacs-orgmode/2017-11/msg00251.html>
2017-11-29 15:09:44 +01:00
Nicolas Goaziou b4b2809eb1 ob-core: Fix `org-babel-src-block-names'
* lisp/ob-core.el (org-babel-src-block-names): Do not change
  visibility or windows when called.
2017-11-28 23:57:18 +01:00
Nicolas Goaziou ebe9eb2423 ob-core: Fix last commit
* lisp/ob-core.el (org-babel-result-end): Add missing `example-block'
  result type.
2017-11-28 23:35:01 +01:00
Nicolas Goaziou d7940ae2a7 ob-core: Fix removal of elements after RESULTS
* lisp/ob-core.el (org-babel-result-end): Ignore elements that do not
  correspond to a valid result type (e.g., a headline).

Fixes commit 1d8126385c.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-11/msg00384.html>
2017-11-27 23:23:04 +01:00
Nicolas Goaziou 5873d99121 Fix headline fontification
* lisp/org.el (org-do-emphasis-faces): Do not emphasize stars in
  headlines.

Reported-by: swflint@flintfam.org (Samuel W. Flint)
<http://lists.gnu.org/r/emacs-orgmode/2017-11/msg00363.html>
2017-11-27 22:54:41 +01:00
Paul Eggert adfbfd42b2 Backport commit a89f0b6f3 from Emacs
maint: shorten https://lists.gnu.org/archive/html/... links
a89f0b6f33f9eb8910a1fceda9028d76ef50b05d
Paul Eggert
Sat Nov 25 22:48:12 2017 -0800
2017-11-26 20:35:46 -05:00
Nicolas Goaziou ac4b756588 Silence byte-compiler 2017-11-26 11:01:55 +01:00
Nicolas Goaziou 18f6610b32 ox-html: Fix last commit
* lisp/ox-html.el (org-html-link): Fix last commit.
2017-11-26 10:57:02 +01:00
Matt Lundin 63f6e851bc Do not save target buffer after archiving subtree
* lisp/org-archive.el: (org-archive-subtree) Do not save buffer after
  each archive.  Saving the archive buffer after archiving each
  subtree results in substantial slowdown and many writes to disk when
  archiving an active region.  This brings the behavior of
  org-archive-subtree into line with org-refile, which does not save
  the target buffer after refiling.
2017-11-26 10:52:03 +01:00
Nicolas Goaziou 6aac798f25 Fix publishing links to absolute file names belonging to project
* lisp/ox-publish.el (org-publish-file-relative-name): New function.
* lisp/ox-html.el (org-html-link): Use new function.

* testing/lisp/test-ox-publish.el (test-org-publish/file-relative-name):
  New test.
2017-11-26 10:46:53 +01:00
Nicolas Goaziou 1d8126385c ob-core: Fix results removal without blank line between source and results
* lisp/ob-core.el (org-babel-remove-result): Delete blank lines before
  results.
(org-babel-result-end): Use `org-element-at-point'.
* testing/lisp/test-ob.el (test-ob-verify-result-and-removed-result):
  Remove duplicate.
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--no-blank-line):
  New test.
* testing/lisp/test-ob.el (test-ob/results-in-narrowed-buffer): Small
  refactoring.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00338.html>
2017-11-25 21:07:52 +01:00
Nicolas Goaziou ed06b159c3 Small fix to emphasis fontification
* lisp/org.el (org-do-emphasis-faces): Do not span over paragraph
  separators.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00202.html>
2017-11-25 15:42:10 +01:00
Nicolas Goaziou 1b1966a144 Fix cross-references from %-encoded links in publishing
* lisp/ox-publish.el (org-publish-resolve-external-link): Decode
  search string.

Reported-by: Martin Hans <martinhansdk@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00328.html>
2017-11-25 15:30:56 +01:00
Nicolas Goaziou 82812ff086 ox: Fix UNNUMBERED strict inheritance
* lisp/ox.el (org-export-numbered-headline-p): Use a less opinionated
  definition of inheritance.

* testing/lisp/test-ox.el (test-org-export/numbered-headline-p):
  Update test.

* doc/org.texi (Export settings): Insist on UNNUMBERED inheritance.

It is now possible to number a headline within an unnumbered tree.
2017-11-20 00:09:59 +01:00
Nicolas Goaziou 946f76d707 org-table: Better fix for `:org-untouchable'
* lisp/org-table.el (org-table-recalculate): Fix typo in existing
  `remove-text-properties' call instead of adding a new one.

Also, cleaning property before processing formulas is more robust,
e.g., if last process raised an error.
2017-11-15 22:47:06 +01:00
Nicolas Goaziou 696ec60341 org-macs: Fix typos in docstrings
* lisp/org-macs.el (org-split-string):
(org-string-width): Fix typo in docstring.
2017-11-15 18:58:44 +01:00
Nicolas Goaziou 40f73953f6 Fix `org-string-display'
* lisp/org-macs.el (org-string-display): Preserve original string's
  display property when computing displayed width.

* testing/lisp/test-org-macs.el (test-org/string-display): Add test.

Reported-by: Ruy Exel <ruyexel@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00160.html>
2017-11-15 18:13:34 +01:00
Nicolas Goaziou 6059c3a057 org-table: Clean left-over `:org-untouchable' property
* lisp/org-table.el (org-table-recalculate): Clean `:org-untouchable'
  property once we no longer need it.

* testing/lisp/test-org-table.el (test-org-table/formula-priority):
  New test.

Reported-by: Ruy Exel <ruyexel@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00159.html>
2017-11-15 17:40:22 +01:00
Charles A. Roelli 18af0f88d7 Backport commit 98288ecaf from Emacs
* lisp/org-clock.el (org-clock--oldest-date): Fix an issue when
compiling on macOS 10.6 with a western time zone (a continuation of
Bug#27736).

Further workaround for faulty localtime() under macOS 10.6
98288ecaffbc0947ec3193088172ea85ad5e42a5
Charles A. Roelli
Wed Nov 8 20:51:48 2017 +0100
2017-11-13 22:07:59 -05:00
Chunyang Xu 3f8d67c490 ox-html: Allow disabling htmlize
* lisp/ox-html.el (org-html-fontify-code): Do it.

Disable htmlize by setting org-html-htmlize-output-type to nil.

TINYCHANGE
2017-11-12 23:28:57 +01:00
Martin Šlouf fcf4bb61ec Add CS export translations
* lisp/ox.el (org-export-dictionary): Add translations for CS.

TINYCHANGE
2017-11-12 22:37:04 +01:00
Marco Wahl 12e41c445b org-attach: Fix handling of ATTACH tag at sychronize
* lisp/org-attach.el (org-attach-sync): Remove ATTACH tag at
  synchronize when no files left.
2017-11-10 19:35:35 +01:00
Nicolas Goaziou 0880fc580e ox-ascii: Small fix to items that do not start with a paragraph
* lisp/ox-ascii.el (org-ascii-item): Use better heuristics to
  determine if contents should follow bullet or start a new line.

Contents follow bullet when the first contributing line is
a paragraph.  As a consequence, the following snippet

    -
      #+html: ...
      This is a paragraph.

is exported as

    - This is a paragraph.

instead of

    -
      This is a paragraph.

previously.
2017-11-06 23:07:17 +01:00
Nicolas Goaziou 7000ed9ee0 ox-ascii: Fix descriptive lists
* lisp/ox-ascii.el (org-ascii-quote-margin): Update docstring.
(org-ascii--current-text-width): Properly handle width of text within
nested plain-list items.
(org-ascii-item): Always start a new line for description contents.
Indent them by `org-ascii-quote-margin' characters.
2017-11-06 14:27:45 +01:00
Nicolas Goaziou 271e58f2dd Fix characters conversion issue when loading `org-id-locations-file'
* lisp/org-id.el (org-id-locations-load): Use `insert-file-contents'
  instead of `insert-file-contents-literally'.

Reported-by: Anders Johansson <mejlaandersj@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00037.html>
2017-11-04 22:40:02 +01:00
Nicolas Goaziou 6186ed3a22 org-element: Fix item parser
* lisp/org-element.el (org-element--list-struct): Correctly handle end
  of sub-lists and end of last item.

* testing/lisp/test-org-element.el (test-org-element/item-parser):
(test-org-element/plain-list-parser): Add tests.
2017-11-04 21:50:11 +01:00
Nicolas Goaziou db16370c0b ox-texinfo: Fix @ref without description
* lisp/ox-texinfo.el (org-texinfo--@ref): Prefer @ref{} with a single
  argument when no description is provided.
2017-11-04 21:50:00 +01:00
Nicolas Goaziou 08c9de2a74 Fix typo in docstring
* lisp/org.el (org-speed-commands-user): Fix typo in docstring.
2017-11-03 23:10:38 +01:00
Xavier Martinez-Hidalgo f38a7d433b org-capture: Fix aborting after inserting text at end of buffer
* lisp/org-capture.el (org-capture-mark-kill-region): Set end marker
  insertion type so that it advances when inserting text at the end of
  the capture buffer.

* testing/lisp/test-org-capture.el (test-org-capture/insert-at-end-abort):
  Add test case.

Inserting text at the end of the capture buffer does not advance the
end kill marker.  This causes the narrowing region and the kill
markers to get out of sync, which prevents 'org-capture-finalize' from
correctly cleaning the target buffer when aborting the capture.

Setting the kill end marker insertion type fixes this.

TINYCHANGE
2017-11-03 22:20:11 +01:00
Nicolas Goaziou b5f075aa05 ox-texinfo: Fix spurious blank lines in detailed menu.
* lisp/ox-texinfo.el (org-texinfo--build-menu): Prevent spurious blank
  lines in detailed menu.
2017-11-03 12:21:56 +01:00
Nicolas Goaziou 8860fe2938 Fix `org-display-inline-images'
* lisp/org.el (org-display-inline-images): Fix regexp.

Reported-by: Leslie Watter <watter@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00455.html>
2017-10-31 19:33:55 +01:00
Nicolas Goaziou 2567fee3c9 Fix Org corruption when `org-agenda-files' is invalid
* lisp/org.el (org-install-agenda-files-menu): Prevent errors in
  `org-agenda-files' from corrupting Org initialization.

Reported-by: Allen Li <vianchielfaura@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00424.html>
2017-10-30 00:50:11 +01:00
Nicolas Goaziou 5c91976b49 ox-texinfo: Remove TABs from output
* lisp/ox-texinfo.el (org-texinfo--untabify): New function.
(texinfo): Use new function as a final output filter.

See (info "(texinfo) Conventions").
2017-10-24 13:55:38 +02:00
Nicolas Goaziou 3aa4d44ba8 Fix comma escaping with multiple leading commas
* lisp/org-src.el (org-escape-code-in-region):
(org-escape-code-in-string):
(org-unescape-code-in-region):
(org-unescape-code-in-string): Fix comma escaping with multiple
leading commas.

* testing/lisp/test-org-src.el (test-org-src/escape-code-in-string):
(test-org-src/unescape-code-in-string): New tests.

Reported-by: Michal Politowski <mpol@meep.pl>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00359.html>
2017-10-24 09:51:43 +02:00
Nicolas Goaziou a2a034f5b9 Prevent leaking fontification across table fields' borders
* lisp/org.el (org-do-emphasis-faces): Prevent leaking fontification
  across table fields' borders.

Reported-by: Ryan <rct@thompsonclan.org>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00321.html>
2017-10-22 14:39:36 +02:00
thibault 1613153aac Fix tangling of org block with nested source block
* lisp/ob-tangle.el (org-babel-tangle-single-block): Prevent double unescaping
of source block by removing unnecessary call to `org-unescape-code-in-string'.

* testing/lisp/test-ob-tangle.el (ob-tangle/nested-block) New function.
2017-10-22 12:42:05 +02:00
Marco Wahl 3df62457be ox-man: Fix org-man--protect-text 2017-10-20 12:21:08 +02:00
Nicolas Goaziou 37142cea78 ox-man: Fix verbatim markup
* lisp/ox-man.el (org-man--protect-text): New function.
(org-man-code): Use new function.
(org-man-verbatim): Use inline markup.
2017-10-19 21:51:31 +02:00
Nicolas Goaziou ee24c0769b ox-man: Fix code and verbatim export
* lisp/ox-man.el (org-man-code):
(org-man-verbatim): Fix functions.

Reported-by: Anthony Agelastos <iqgrande@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00313.html>
2017-10-18 22:54:40 +02:00
Allen Li 8c5c030c64 Fix `org-insert-todo-heading'
* lisp/org.el (org-insert-todo-heading): Insert TODO keyword relative
  to the original headline, not to the headline above.

* testing/lisp/test-org.el (test-org/insert-todo-heading-respect-content):
  Add test.
2017-10-18 22:48:16 +02:00
Allen Li 90d283f189 Update documentation on org-protocol template placeholders
* doc/org.texi (@code{capture} protocol): Fix placeholder names
(Template expansion): Add org-protocol placeholders

* lisp/org.el (org-store-link-plist): Fix docstring grammar
(org-store-link-props): Fix docstring grammar
2017-10-17 23:28:53 +02:00
Nicolas Goaziou 1d5142601a Silence byte-compiler 2017-10-14 12:32:08 +02:00
Nicolas Goaziou 827af59873 Fix links without contents in table of contents' entries
* lisp/ox.el (org-export-toc-entry-backend): New function.

* lisp/ox-html.el (org-html--format-toc-headline):
* lisp/ox-md.el (org-md--build-toc):
* lisp/ox-odt.el (org-odt-toc): Use new function.

* lisp/ox-texinfo.el (org-texinfo--sanitize-title):
(org-texinfo--wrap-float): Handle links without contents.

* testing/lisp/test-ox.el (test-org-export/toc-entry-backend): New
  test.

Reported-by: ConcreteVitamin <concretevitamin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00235.html>
2017-10-14 12:29:52 +02:00
Nicolas Goaziou 5861a55740 `org-file-contents': Improve error message
* lisp/org.el (org-file-contents): Improve error message.
2017-10-14 10:59:51 +02:00
Paul Eggert 3f1d5f9091 Backport commit 5d51403ce from Emacs
; Typo fixes, mostly repeated words
5d51403ceb9b86a1bfa66f00c7af39f1200e65f1
Paul Eggert
Mon Oct 9 22:55:06 2017 -0700
2017-10-13 15:12:27 -04:00
Paul Eggert df0e3611f1 Backport commit 0d004ed01 from Emacs
; Spelling fixes
0d004ed01abb5fa025bdc9d58fce2a3abff0b6a4
Paul Eggert
Mon Oct 9 22:55:05 2017 -0700
2017-10-13 15:11:00 -04:00
Nicolas Goaziou 76163e983b ox-md: Export TODO keywords and priority cookies
* lisp/ox-md.el (org-md-headline): Export TODO keywords and priority
  cookies.

Reported-by: Ganesh Krishnan <gkrishnan.gt@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00171.html>
2017-10-12 01:00:14 +02:00
Georgiy Tugai 07f939f419 org-clock: Fix clock report sometimes ignoring hours before :wstart
* lisp/org-clock (org-clocktable-steps): Fix weekly-step clock report
  ignoring hours between start of period and start of week, when start
  of period is on a day of week numerically less than start of week.

  Clock report now always inserts a "week" starting at the start of
  the period, if necessary; all following weeks start on the start of
  the week as expected.

TINYCHANGE
2017-10-08 10:53:39 +02:00
Nicolas Goaziou d747e51fbf Consider headlines as sentences by themselves
* lisp/org.el (org-forward-sentence): Consider headlines as sentences
  by themselves.

* testing/lisp/test-org.el (test-org/forward-sentence): Add test.

Reported-by: Mat Vibrys <vibrysec@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00130.html>
2017-10-08 10:35:22 +02:00
Nicolas Goaziou 6432fcd433 C-c C-c on a planning info timestamp fixes day
* lisp/org.el (org-ctrl-c-ctrl-c): On a timestamp in a planning line,
  fix day, like regular timestamps.

Reported-by: Aaron Jensen <aaronjensen@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00132.html>
2017-10-08 10:07:36 +02:00
Nicolas Goaziou fb403ca34e Fix `org-backward-paragraph' on an empty heading
* lisp/org.el (org-backward-paragraph): Fix behavior on greater
  elements without contents.

* testing/lisp/test-org.el (test-org/backward-paragraph): Add test.

Reported-by: Omar Antolin <omar.antolin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00099.html>
2017-10-06 19:34:28 +02:00
Matt Lundin ce536f6375 Fix interactive timestamp entry in capture templates
* lisp/org-capture.el: (org-capture-fill-template) Fix interactive
  timestamp entry to match the behavior of org-time-stamp. This fixes
  a bug related to the %^t and %^u template escapes which resulted in
  incorrect timestamps (<2017-10-06 Fri-12:00>). The difference
  between %^t and %^T now corresponds to the difference between
  org-time-stamp called without and with a prefix argument.
2017-10-06 19:13:57 +02:00
Nicolas Goaziou ef6dac812b Fix `org-backward-paragraph' on block opening line
* lisp/org.el (org-backward-paragraph): Do not error when called from
  a block opening line.
* testing/lisp/test-org.el (test-org/backward-paragraph): Add tests.

Reported-by: Omar Antolin <omar.antolin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00051.html>
2017-10-04 12:57:14 +02:00
Charles A. Roelli 24ea1b136a Backport commit bd49b6f1b from Emacs
* lisp/org-clock.el (org-clock--oldest-date): Only execute
'decode-time' on times later than year -2**31 under macOS 10.6.
See Bug#27706.

Workaround for faulty localtime() under macOS 10.6
bd49b6f1b39cffeaf6098bc7b0182552683b1c07
Charles A. Roelli
Sun Oct 1 19:07:22 2017 +0200
2017-10-01 20:46:11 -04:00
Paul Eggert 5d3e17bf85 Backport commit bbda601d1 from Emacs
; Spelling fixes
bbda601d1d4e125c9d3c374b56eee3e2e9623f1d
Paul Eggert
Fri Sep 29 16:41:50 2017 -0700
2017-10-01 20:00:42 -04:00
Glenn Morris eb8c088995 Backport commit 26d58f0c5 from Emacs
; Standardize license notices
26d58f0c5865c9132e2fc559e061ef704a086d30
Glenn Morris
Fri Sep 29 12:49:19 2017 -0400
2017-10-01 19:53:04 -04:00
Nicolas Goaziou 018fb0149d Fix parsing properties with title or summary type
* testing/lisp/test-org.el (test-org/buffer-property-keys): Ignore
  title and summary type when extracting name.

Reported-by: Adrian Bradd <adrian.bradd@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00001.html>
2017-10-01 19:01:58 +02:00
Nicolas Goaziou 4fdac06ef1 org-clock: Fix compilation error
Reported-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00623.html>
2017-09-29 22:01:29 +02:00
Nicolas Goaziou c1c5786c8a ob-lob: Expand blocks before ingesting them
* lisp/ob-lob.el (org-babel-lob-ingest): Expand blocks before
  ingesting them.

Reported-by: edgar@openmail.cc
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00361.html>
2017-09-28 23:04:54 +02:00
Nicolas Goaziou d417eac7ee org-table: Fix formula correction when removing a hline
* lisp/org-table.el (org-table-kill-row): Do not correct formula when
  removing a hline.

Reported-by: alan.wehmann@gmail.com
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00429.html>
2017-09-28 22:13:49 +02:00
Nicolas Goaziou 226d2fcaa2 org-colview: Fix "wrong-type-argument markerp nil"
* lisp/org-colview.el (org-columns-remove-overlays): Fix
"wrong-type-argument markerp nil".

When calling `org-agenda-columns', `org-columns-top-level-marker' is
not set. Handle this situation.

Reported-by: Benjamin Beckwith <bnbeckwith@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00566.html>
2017-09-26 20:03:03 +02:00
Nicolas Goaziou d40deb6967 ox-publish: Fix :base-extension any with :recursive t
* lisp/ox-publish.el (org-publish-get-base-files): Ensure MATCH regexp
  is always a string since `directory-files-recursively' requires it.
* testing/lisp/test-ox-publish.el (test-org-publish/get-project-from-filename):
  Add test.

Suggested-by: Jens Lechtenboerger <lechten@wi.uni-muenster.de>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00528.html>
2017-09-24 10:57:11 +02:00
N. Raghavendra db1dab8abe ox-html.el: Partially revert d5bbf36553
* lisp/ox-html.el (org-html-src-block): Unless klipse is used, export
source code blocks as content of `pre' elements, and not as content of
`code' children of `pre' elements.  Restores the previous way of
exporting source code blocks, and fixes the display of language
indicators while hovering over the blocks in the exported HTML file,
when klipse is not used.
(org-html-keep-old-src): Remove it.  Not needed because it is now the
default, unless klipse is used.
2017-09-19 22:00:32 +02:00
Kyle Meyer 753f3f2842 ob-hledger.el: Correct file name in header 2017-09-18 13:09:56 -04:00
Nicolas Goaziou 80cbf909ea Remove useless binding
* lisp/org.el (org-mode-map): Remove [(meta return)] binding, handled
  by (kbd "M-RET").

Suggested-by: Allen Li <vianchielfaura@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00411.html>
2017-09-17 12:48:17 +02:00
Kyle Meyer e4a0fd6b02 Adjust the license link in new lisp/*.el files
Emacs's bc511a64f6d made tree-wide changes to prefer https to http.
For Org, this resulted in the header of every lisp/*.el file being
changed.  Make the same changes in lisp/*.el files that were added
since Org version 9.0.10 (the last version that was synced with
Emacs).
2017-09-17 01:15:11 -04:00
Paul Eggert ff0dcf52a5 Backport commit bc511a64f from Emacs
Prefer HTTPS to FTP and HTTP in documentation
bc511a64f6da9ab51acc7c8865e80c4a4cb655c2
Paul Eggert
Wed Sep 13 15:54:37 2017 -0700
2017-09-17 00:28:38 -04:00