Commit Graph

20458 Commits

Author SHA1 Message Date
Nicolas Goaziou d07ee7f7f2 Implement :pre-blank property for items and footnotes definitions
* lisp/org-element.el (org-element-footnote-definition-parser):
(org-element-item-parser): Add `:pre-blank' property.
(org-element-footnote-definition-interpreter):
(org-element-item-interpreter):
(org-element-interpret-data):
* lisp/ox.el (org-export-data): Use new property.
* testing/lisp/test-org-element.el (test-org-element/footnote-definition-parser):
(test-org-element/item-parser): Add tests.
2017-11-10 00:38:31 +01:00
Marc Ihm 8f3077d14a v5.7.2 of org-index 2017-11-07 20:49:58 +01:00
Nicolas Goaziou 28ebfa6d77 Merge branch 'maint' 2017-11-06 23:10:13 +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 05034ec6ed ORG-NEWS: Document user-visible changes with new template system 2017-11-06 14:47:55 +01:00
Nicolas Goaziou 76a9e1d01d Merge branch 'maint' 2017-11-06 14:32:11 +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 8d43a0c49f ox-texinfo: Gracefully handle node collision in the same hierarchy
* lisp/ox-texinfo.el (org-texinfo--get-node): Ensure the upper element
  get the shorter node.

Considering the following document:

* Headline
** Headline

the level 1 headlines get "Headline" node and the other one
"Headline (1)".
2017-11-05 12:22:18 +01:00
Nicolas Goaziou 04f35fc473 ox-texinfo: Preserve target name as node.
* lisp/ox-texinfo.el (org-texinfo--get-node): Use target's value as
  base for the node name, instead of using `org-export-get-reference'.
2017-11-05 10:32:13 +01:00
Eric Abrahamsen c04e357f3d Replace easy templates with org-insert-structure-template
* lisp/org.el (org-insert-structure-template): New function for
  wrapping region (or element at point) in a begin/end block.
  (org-structure-predefined-blocks): New option holding predefined
  blocks, for completion.
  (org-try-structure-completion,
  org-complete-expand-structure-template): Remove functions.
* doc/org.texi (Inserting structure templates): Document.
* testing/lisp/test-org.el (test-org/insert-template): New test.
2017-11-05 09:56:26 +01:00
Nicolas Goaziou fd50740c96 Merge branch 'maint' 2017-11-04 22:41:07 +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 7ba058963e Merge branch 'maint' 2017-11-04 21:51:40 +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 9bee79a102 Merge branch 'maint' 2017-11-03 23:11:07 +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
Nicolas Goaziou 6a273e30d7 Merge branch 'maint' 2017-11-03 22:20:46 +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 ee3a9e9a77 Fix failing test
* testing/lisp/test-ox-publish.el (test-org-publish/resolve-external-link):
  Rewrite test to prevent race condition which could affect results.
* testing/examples/pub/b.org: Add missing keyword.
2017-11-03 22:15:41 +01:00
Nicolas Goaziou 902bfe1892 Merge branch 'maint' 2017-11-03 12:22:33 +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 c470edba77 ox-texinfo: Prettify adjunct for indentical nodes.
* lisp/ox-texinfo.el (org-texinfo--get-node): Nicer adjunct for
  identical nodes.
2017-11-03 11:35:53 +01:00
Nicolas Goaziou f9c09b194f ox-texinfo: Allow cross-references to headlines excluded from TOC
* lisp/ox-texinfo.el (org-texinfo-headline): Use @anchor instead of
  @node for headlines outside TOC.
2017-11-03 11:34:21 +01:00
Nicolas Goaziou 36578fda46 Merge branch 'maint' 2017-10-31 19:34:35 +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 4388bdf852 Merge branch 'maint' 2017-10-30 00:51:31 +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
U-IHM-NOTEBOOK\Olli e440c51b5f Version 5.7.1 of org-index 2017-10-29 15:31:45 +01:00
Nicolas Goaziou f474c7149b
org-table: Fix compatibility with Emacs 24.3
* lisp/org-table.el (org-table-align): Call `split-string' with the
  expected number of arguments in Emacs 24.3.

Reported-by: thomas <thomas@friendlyvillagers.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00430.html>
2017-10-29 09:15:01 +01:00
Nicolas Goaziou 99dbca3d4f Remove `org-babel-use-quick-and-dirty-noweb-expansion'
* lisp/ob-core.el (org-babel-use-quick-and-dirty-noweb-expansion):
  Remove variable.
(org-babel-expand-noweb-references): Update function.

* doc/org.texi (noweb-ref): Document new behaviour.
(Noweb reference syntax): Delete reference to removed variable.

`org-babel-use-quick-and-dirty-noweb-expansion' main use is to speed
up Noweb expansion when expanding only by name.  By distinguishing
name and reference expansion, we no longer need this variable.  In the
first case, the expansion is quicker anyway, and in the second case,
we most certainly need an accurate expansion.
2017-10-26 13:09:23 +02:00
Marco Wahl 22e7bc8e2b org-agenda: Refactoring. Deactivate mark in case of a region.
* lisp/org-agenda.el (org-agenda-bulk-mark): Use region-beginning/end
  defuns.  And deactivate the mark in case.
2017-10-25 17:35:26 +02:00
Marco Wahl 78c6a299d2 org-agenda: Bulk mark lines in region
* lisp/org-agenda.el (org-agenda-bulk-mark): Added bulk mark for entries
  in region.  This is like in dired now.

* doc/org.texi (Agenda commands): Document bulk mark entries in region
2017-10-25 15:13:13 +02:00
Nicolas Goaziou bebfd341af Merge branch 'maint' 2017-10-24 13:56:56 +02: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 048169d270 org-goto: Fix wrong number of arguments error
* lisp/org-goto.el (org-goto-location): Fix
  `isearch-search-fun-function' binding.
2017-10-24 10:28:43 +02:00
Nicolas Goaziou 3a5b75d4ee org-goto: Fix keymapp error
* lisp/org-goto.el: Remove spurious `defvar.
2017-10-24 10:28:39 +02:00
Nicolas Goaziou 73a15d1bfb ox-texinfo: Small refactoring
* lisp/ox-texinfo.el (org-texinfo--sanitize-title):
(org-texinfo--wrap-float): Use new `org-export-toc-entry-backend'
function.
2017-10-24 10:07:50 +02:00
Nicolas Goaziou 1b9a66487a Move a test
* testing/lisp/test-org-macs.el (test-org/in-regexp): Moved from...
* testing/lisp/test-org.el: ... here.
2017-10-24 09:55:49 +02:00
Nicolas Goaziou 96c7fd7541 Merge branch 'maint' 2017-10-24 09:53:47 +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 e59199e3a8 ox-texinfo: Fix missing contents in headings out of TOC
* lisp/ox-texinfo.el (org-texinfo-section): Include contents even in
  headings out of TOC.
2017-10-23 14:55:05 +02:00
Nicolas Goaziou c024bec29e org-goto: Fix header 2017-10-23 09:57:13 +02:00
Nicolas Goaziou e1c2db37ed Extract "org-goto" code into a dedicated library
* lisp/org-goto.el: New file.

* lisp/org.el (org-goto-interface):
(org-goto-max-level):
(org-goto-auto-isearch):
(org-goto-local-auto-isearch):
(org-goto-ret):
(org-goto-left):
(org-goto-right):
(org-goto-quit):
(org-goto): Move to new file.
(org-goto-location): Change signature. Move to new file.
(org-goto-map): Remove function.

* lisp/org-id.el (org-id-get-with-outline-drilling): Update to new
  `org-goto-location' signature.
2017-10-22 16:49:17 +02:00
Nicolas Goaziou 87116700e6 Move some invisibility check functions to "org-macs.el"
* lisp/org.el (org-invisible-p):
(org-truely-invisible-p):
(org-invisible-p2): Move...

* lisp/org-macs.el: ... there.
2017-10-22 16:20:58 +02:00
Nicolas Goaziou fc551191a7 Silence byte-compiler 2017-10-22 15:41:02 +02:00
Nicolas Goaziou 59d21881b1 Revert "Move `org-key' and `org-defkey' into "org-macs.el""
This reverts commit 7f56a9920f.

`org-key' is specific to Org keybinding, therefore not generic enough
to fit in "org-macs.el". So is `org-defkey'.
2017-10-22 15:38:35 +02:00
Nicolas Goaziou 486331e323 Move some generic functions into "org-macs.el"
* lisp/org.el (org-do-wrap): Remove function.
(org-base-buffer):
(org-find-base-buffer-visiting):
(org-overlay-display):
(org-overlay-before-string):
(org-find-overlays):
(org-reverse-string):
(org-shorten-string):
(org-remove-tabs):
(org-wrap):
(org-remove-indentation):
(org-do-remove-indentation):
(org-uniquify-alist):
(org-combine-plists):
(org-skip-whitespace):
(org-in-regexp):
(org-point-in-group):
(org-get-at-eol):
(org-find-text-property-in-string):
(org-display-warning):
(org-eval):
* lisp/org-compat.el (org-add-props): Move ...

* lisp/org-macs.el: ... there.
(org--do-wrap): New function.
2017-10-22 15:34:26 +02:00
Nicolas Goaziou 7f56a9920f Move `org-key' and `org-defkey' into "org-macs.el"
* lisp/org.el (org-key):
(org-defkey): Move...

* lisp/org-macs.el: ... there.
2017-10-22 15:05:48 +02:00
Nicolas Goaziou 7554012cef Move compatibility functions in "org-compat.el"
* lisp/org.el (org-imenu-and-speedbar):
(org-imenu-markers):
(org-imenu-new-marker):
(org-imenu-get-tree):
(org-speedbar-restriction-lock-overlay):
(org-speedbar-set-agenda-restriction):
(org--flyspell-object-check-p):
(org-mode-flyspell-verify):
(org-remove-flyspell-overlays-in):
(org-bookmark-jump-unhide):
(org-mark-jump-unhide): Move...

* lisp/org-compat.el: ... there.
2017-10-22 15:01:43 +02:00