Commit Graph

20709 Commits

Author SHA1 Message Date
Nicolas Goaziou e92732efd0 Merge branch 'maint' 2017-11-28 23:35:44 +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 c1d7b2cda3 Merge branch 'maint' 2017-11-27 23:26:38 +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 68544f4f21 Merge branch 'maint' 2017-11-27 23:02:26 +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
Kyle Meyer 5cd7eb3d53 Merge branch 'maint' 2017-11-26 20:35:57 -05: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 579fa12f50 Merge branch 'maint' 2017-11-26 11:02:14 +01: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 b186d1d723 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:31 +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 26c2ad99cf ox-publish: Fix resolving url-encoded external links
* lisp/ox-publish.el (org-publish-resolve-external-link): Handle
  url-encoded links.  Do not ask to create a new headline if none is
  found.
2017-11-26 10:49:28 +01:00
Nicolas Goaziou b0ab7008df Merge branch 'maint' 2017-11-26 10:47:55 +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 be1e807942 Merge branch 'maint' 2017-11-25 21:13:58 +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 d7f2c8b8e1 Merge branch 'maint' 2017-11-25 15:42:33 +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 f67e62eb3f Merge branch 'maint' 2017-11-25 15:33:22 +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 b6df86a303 org-macro: Silence byte-compiler 2017-11-22 23:35:50 +01:00
Nicolas Goaziou 51234f9555 org-macro: Implement "keyword" macro
* lisp/org-macro.el (org-macro-initialize-templates): Implement
  "keyword" macro.
* doc/org.texi (Macro replacement): Document new macro.

* testing/lisp/test-org-macro.el (test-org-macro/keyword): New test.
2017-11-21 23:38:24 +01:00
Nicolas Goaziou 5f5d82ed51 Remove second pass for macro expansion
* lisp/org-macro.el (org-macro-initialize-templates): Initialize all
  macros, including {{{title}}} and al.
(org-macro-replace-all): Change signature.
(org-macro--find-keyword-value): New function.
* lisp/ox.el (org-export-as): Remove second macro expansion
2017-11-21 22:27:42 +01:00
Nicolas Goaziou 7455f4bf83 ox: Allow a less strict UNNUMBERED inheritance
* lisp/ox.el (org-export-collect-headlines):
(org-export-excluded-from-toc-p): Allow to number headlines in the
middle of an otherwise unnumbered tree.

* testing/lisp/test-ox.el (test-org-export/collect-headlines):
(test-org-export/excluded-from-toc-p):
(test-org-export/toc-entry-backend): Update tests.  Add more tests.

Reported-by: Akater <nuclearspace@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00219.html>
2017-11-20 14:07:03 +01:00
Nicolas Goaziou d788d1b00e Merge branch 'maint' 2017-11-20 00:15:05 +01:00
Nicolas Goaziou 3226129036 org.texi: Fix typo
* doc/org.texi (Export settings): Fix typo introduced in last commit.
2017-11-20 00:14:22 +01:00
Nicolas Goaziou f482cfa785 Merge branch 'maint' 2017-11-20 00:14:05 +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 b8d473a04f org-table: Insert new column to the right instead of the left
* lisp/org-table.el (org-table-insert-column): Insert new column to
  the right instead of the left.

* testing/lisp/test-org-table.el (test-org-table/insert-column): New
  test.
2017-11-19 23:22:16 +01:00
Nicolas Goaziou de289d1fe8 Merge branch 'maint' 2017-11-15 22:50:56 +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 04e0532ef5 Merge branch 'maint' 2017-11-15 18:59:05 +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 966af419f9 Merge branch 'maint' 2017-11-15 18:14: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 64ac3bb5b3 ox-ascii: Lighten numbering in table of contents
* lisp/ox-ascii.el (org-ascii--build-title): Use only last number in
  headline numbering when building table of contents.
2017-11-15 17:43:08 +01:00
Nicolas Goaziou 8ff3673dfc Merge branch 'maint' 2017-11-15 17:41:48 +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
Marco Wahl 5c382f2ee2 org-attach,test-org-attach: Refactoring.
* lisp/org-attach.el (org-attach-dired-to-subtree): Renamed from
  `org-attach-dired-attach-to-next-best-subtree'.  Convenience
  functions have been dropped.

* testing/lisp/test-org-attach.el: Tests use
  `org-test-with-temp-text-in-file' now and are cleaner now.
2017-11-15 14:39:26 +01:00
Marco Wahl a49ac98f3f org-attach: Refactor. Replace self made with available function.
* lisp/org-attach.el (org-attach-dired-marked-files-or-file-at-cursor-in-dired)
  (org-attach-dired-marked-files-in-dired): Removed.  Use
  `dired-get-marked-files' instead.
2017-11-15 12:21:18 +01:00
Marco Wahl 615b147031 org-attach: Attach files specified in a dired buffer.
* lisp/org-attach.el (org-attach-attach-files): New.
(org-attach-dired-marked-files-in-dired): New
(org-attach-dired-marked-files-or-file-at-cursor-in-dired): New.
(org-attach-dired-attach-to-next-best-subtree): New command.
(org-attach-dired-attach-to-next-best-subtree-cp): New command.
(org-attach-dired-attach-to-next-best-subtree-mv): New command.
(org-attach-dired-attach-to-next-best-subtree-ln): New command.
(org-attach-dired-attach-to-next-best-subtree-lns): New command.
* testing/lisp/test-org-attach.el: Tests.
2017-11-15 11:25:51 +01:00
Kyle Meyer c029c4d45d Merge branch 'maint' 2017-11-13 22:09:46 -05: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
Nicolas Goaziou 9cac9d7bc7 Merge branch 'maint' 2017-11-12 23:29:38 +01: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
Nicolas Goaziou 4c703513a7 Merge branch 'maint' 2017-11-12 22:38:26 +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 44189a72d5 Merge branch 'maint' 2017-11-10 19:40:15 +01:00