Commit Graph

176 Commits

Author SHA1 Message Date
Gustav Wikström d70db54dbc Improve attachment link export functionality
Make attachment links export just as file links.

* lisp/ox-ascii.el
* lisp/ox-html.el
* lisp/ox-latex.el
* lisp/ox-man.el
* lisp/ox-md.el
* lisp/ox-texinfo.el
* lisp/org-attach.el: Move export functionality for attachment links
  into the respective export backend, for feature parity with file
  links.
2020-01-14 04:15:38 +01:00
Gustav Wikström 32aa7139fd Markdown exporter: restructure org-md-link
* lisp/ox-md.el (org-md-link): Restructure slightly to match the code
  structure of other exporters.  For easier later refactor.
2020-01-14 04:07:55 +01:00
Kyle Meyer ff5fc050d3 Update copyright year to 2020 2020-01-01 13:38:46 -05:00
Nicolas Goaziou ba943ac855 ox-md: Silence byte compiler 2019-06-05 18:34:38 +02:00
Sacha Chua a41e9950ae Add :target option for the TOC keyword
* doc/org-manual.org, etc/ORG_NEWS: Document :target option
  for the TOC keyword.

* lisp/ox.el (org-export-resolve-link): New function.

* lisp/ox-ascii.el (org-ascii-keyword): Added :target to the TOC
  keyword.
  (org-ascii--build-toc): Changed LOCAL argument to SCOPE.

* lisp/ox-html.el (org-html-keyword): Added :target to the TOC keyword.

* lisp/ox-md.el (org-md-keyword): Added :target to the TOC keyword.
  (org-md--build-toc): Changed LOCAL argument to SCOPE.

* lisp/ox-odt.el (org-odt-keyword): Added :target to the TOC keyword.

* testing/lisp/test-ox.el (test-org-export/collect-headlines): Added
  tests for specifying scope by CUSTOM_ID or by fuzzy matching.
  (test-org-export/resolve-link): New test.
2019-05-30 15:25:46 +02:00
Bastien f584d37a67 Update copyright year 2019-01-01 11:50:56 +01:00
Nicolas Goaziou 17edaf8c14 "src block" -> "source block" in documentation and comments
* etc/ORG-NEWS (Maxima: new headers ~:prologue~ and ~:epilogue~):
(Texinfo exports inline source blocks as ~@code{}~):
(Default lexical evaluation of emacs-lisp source blocks):
* lisp/ob-clojure.el (org-babel-clojure-default-ns):
* lisp/ob-core.el (org-babel-named-src-block-regexp-for-name):
(org-babel-current-src-block-location):
(org-babel-mark-block):
(org-babel-insert-result):
* lisp/ob-emacs-lisp.el (org-babel-default-header-args:emacs-lisp):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/ob-lob.el (org-babel-lob-ingest):
* lisp/ob-ref.el:
* lisp/org-element.el (org-element-object-restrictions):
(org-element-src-block-parser):
(org-element-inline-src-block-parser):
* lisp/org-lint.el:
(org-lint--checkers):
* lisp/org-pcomplete.el (pcomplete/org-mode/block-option/src):
* lisp/org-src.el (org-edit-inline-src-code):
* lisp/org.el (org-ctrl-c-ctrl-c):
(org-in-src-block-p):
(org-fill-element):
* lisp/ox-html.el (org-html--textarea-block):
(org-html-format-code):
* lisp/ox-latex.el (org-latex-minted-options):
(org-latex-custom-lang-environments):
* lisp/ox-md.el:
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-collect-listings):
* testing/lisp/test-ob-exp.el (ob-exp/src-block-with-affiliated-keyword):
* testing/lisp/test-ob.el (test-ob/preserve-results-indentation):
  Correct "src block" occurrences when they do not specifically refer
  to the element type `src-block'.
2018-09-20 11:23:49 +02:00
Nicolas Goaziou 56fe493618 Merge branch 'maint' 2018-04-21 11:13:03 +02:00
Nicolas Goaziou 5792f06871 ox-md: Tiny refactoring
* lisp/ox-md.el (org-md--build-toc): Tiny refactoring.
2018-04-21 11:12:04 +02:00
Yue Zhu c6e5aa1da8 ox-md: Fix ToC on unnumbered headings
(org-md--build-toc): When exporting markdown with ToC, if heading
numbering is not enabled, ToC will be shown as an unordered list.

TINYCHANGE
2018-04-21 10:59:47 +02:00
Nicolas Goaziou edc159c2f2 Remove `org-get-tags-string'
* lisp/org.el (org-get-tags-string): Move to "org-compat".
(org-make-tag-string): New function
(org-set-tags-to):
(org-set-tags):
(org-set-current-tags-overlay):
(org-entry-properties):
(org-agenda-prepare-buffers):
* lisp/org-mouse.el (org-mouse-set-tags):
* lisp/ox-ascii.el (org-ascii--build-title):
* lisp/ox-beamer.el (org-beamer-select-environment):
* lisp/ox-latex.el (org-latex-format-inlinetask-default-function):
* lisp/ox-md.el (org-md-headline):
(org-md--build-toc):
* lisp/ox-texinfo.el (org-texinfo-format-headline-default-function):
(org-texinfo-format-inlinetask-default-function):
* contrib/lisp/ox-groff.el (org-groff-headline):
(org-groff-inlinetask): Use new function.
* lisp/org-compat.el (org-get-tags-string): New function.
2018-04-19 11:52:07 +02:00
Kyle Meyer d94f7024bc Merge branch 'maint' 2018-01-07 00:28:35 -05:00
Kyle Meyer 3e1641ef0a Update copyright years 2018-01-07 00:27:54 -05:00
Kaushal Modi 6e95e088e8 Merge branch 'maint' 2017-12-20 17:15:52 -05: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 7df5d21f79 Merge branch 'maint' 2017-10-14 12:30:59 +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 61c81e8255 Merge branch 'maint' 2017-10-12 01:01:14 +02: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
Jay Kamat 405555ec5c org-irc.el: Add proper export functions for irc
* lisp/org-irc.el (org-irc-export): Add a new function,
  org-irc-export, which properly exports irc links to html and markdown

* lisp/ox-md.el (org-md-link): Remove workaround to get irc links
  working properly in ox-md, and use org-irc's export functions instead
2017-09-24 18:33:55 +02: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
Nicolas Goaziou d58837a5ea Merge branch 'maint' 2017-08-22 23:46:00 +02:00
Jay Kamat fc84ffee22 ox-md: Fix missing ':' in exported markdown image links
* lisp/ox-md.el (org-md-link): Append ':' to the type of non-file
  image links.
2017-08-22 23:44:23 +02:00
Nicolas Goaziou b4032ed597 Merge branch 'maint' 2017-08-06 09:13:49 +02:00
Nicolas Goaziou f3d7284ebd ox-md: Fix non-"file" image links
* lisp/ox-md.el (org-md-link): Handle non-"file" image links.

Reported-by: Jay Kamat <jaygkamat@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00147.html>
2017-08-06 09:11:59 +02:00
Nicolas Goaziou f8d0ef1b52 Merge branch 'maint' 2017-07-10 10:23:26 +02:00
Jay Kamat a8ee8e1e50 ox-md.el: Fix export of irc and mailto links
* lisp/ox-md.el (org-md-link): Add mailto and irc to links that pass
their types through to markdown export

See: https://github.com/larstvei/ox-gfm/issues/17  for an external
bug report

TINYCHANGE
2017-07-10 10:07:58 +02: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
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
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 713f785017 Update copyright years 2017-01-05 20:19:37 -05:00
Nicolas Goaziou d907041911 Change :version in defcustoms from "25.1" to "25.2"
* 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-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-cycle-hook):
(org-occur-case-fold-search):
(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.1" to "25.2".
(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-images-centered):
(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.1" to "25.2".

Neither Org 8.3 nor Org 9.0 were released with Emacs 25.1.
2016-10-05 11:18:39 +02:00
Aaron Ecay 1c18efb615 String handling improvements.
* lisp/org-agenda.el (org-agenda-export-csv-mapper): Use `replace-regexp-in-string'.
* lisp/org-capture.el (org-capture): Use `string-prefix-p'.
* lisp/org-compat.el (string-blank-p, string-remove-prefix):
* lisp/org-compat.el (string-remove-suffix): Add compatibility defuns
for emacs 24.3.
* lisp/org-datetree.el (org-datetree-cleanup): Use `string-suffix-p'.
* lisp/org-footnote.el (org-footnote-normalize-label): Use
`string-remove-prefix'.
* lisp/org-gnus.el (org-gnus-group-link): Use `string-prefix-p'.
* lisp/org-list.el (org-list-struct):
(org-list-get-list-type, org-list-send-item):
(org-list-use-alpha-bul-p): Use `string-match-p'.
* lisp/org.el (org-paste-subtree): Use `string-suffix-p'.
(org-open-file, org-refile-get-targets): Use `replace-regexp-in-string'.
(org-make-tags-matcher): Use `string-prefix-p'.
(org-set-tags): Use `string-(prefix,suffix)-p'.
* lisp/ox-beamer.el (org-beamer--element-has-overlay-p):
(org-beamer--format-block):
Use `string-(prefix,suffix)-p'.
* lisp/ox-html.el (org-html-fix-class-name): Use `replace-regexp-in-string'.
* lisp/ox-md.el (org-md-verbatim): Use `string-(prefix,suffix)-p'.
(org-md-paragraph): Use `string-prefix-p'.
2016-09-03 02:05:10 +01:00
Aaron Ecay 17efe53170 ox-md: pacify byte compiler
* lisp/ox-md.el (org-md--footnote-section):
(org-md-inner-template): Fix byte compiler warnings.
2016-09-03 01:26:45 +01:00
Jake Romer d4a073f5be ox-md.el: Export footnotes section as Markdown
* lisp/ox-md.el (org-md--headline-title): New function.
(org-md-headline): Use `org-md-headline-title' to generate section
headers.
(org-md--footnote-formatted): New function.
(org-md--footnote-section): New function.
(org-md-inner-template): Update to use `org-md-footnote-section'.
(org-md-footnotes-section): New customizable variable.
(org-md-footnote-format): New customizable variable.

Update ox-md.el to export the Footnotes section as Markdown, using HTML
only where necessary - namely, in footnote and footnote reference links.
2016-09-01 18:41:52 +02:00
Nicolas Goaziou de24694f05 Turn org-mode into Org or Org mode
Use Org or Org mode instead of org-mode or Org-mode according to
"Documentation standards".
2016-08-23 22:13:56 +02:00
Nicolas Goaziou ef38f2ff44 ox-md: Use cl-lib
* lisp/ox-md.el (org-md-item):
(org-md-link): Silence byte-compiler.
2016-07-25 15:55:16 +02:00
Kyle Meyer 6345de2d05 Merge branch 'maint' 2016-01-09 17:43:27 -05:00
Kyle Meyer 6bc48c5f41 Update copyright years 2016-01-09 17:12:03 -05:00
Nicolas Goaziou 54318add34 Change export block syntax
* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.

* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.

* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".

* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.

* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks.  Remove
  back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.

* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
  forbidden blocks.  Remove back-ends blocks, which are now special
  blocks.

* contrib/lisp/ox-extra.el: Update comments.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.

Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks.  The new syntax is

  #+BEGIN_EXPORT backend
  ...
  #+END_EXPORT

instead of

  #+BEGIN_backend
  ...
  #+END_backend

As a consequence, =INCLUDE= keywords syntax is modified, e.g.,

  #+INCLUDE: "file.org" HTML

becomes

  #+INCLUDE: "file.org" export html
2015-12-20 21:56:27 +01:00
Nicolas Goaziou ed76447f59 ox-md: Use lexical binding
* lisp/ox-md.el (org-md-separate-elements):
(org-md-bold):
(org-md-verbatim):
(org-md-example-block):
(org-md-horizontal-rule):
(org-md-italic):
(org-md-line-break):
(org-md-node-property):
(org-md-paragraph):
(org-md-plain-list):
(org-md-property-drawer):
(org-md-quote-block):
(org-md-section):
(org-md-template): Silence byte-compiler.
2015-11-01 00:05:22 +01:00
Nicolas Goaziou e68bc78ae4 ox-md: Fix docstring
* lisp/ox-md.el (org-md-separate-elements): Fix docstring.
2015-09-24 10:27:24 +02:00
Nicolas Goaziou 3e1bccc4a5 ox-md: Fix blank lines insertion in sub-lists
* lisp/ox-md.el (org-md-separate-elements): In a list, when a sub-list
  is followed by another element, make sure it is surrounded by blank
  lines.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101113>
2015-09-22 21:32:07 +02:00
Nicolas Goaziou a7c8d20ac9 ox-md: Fix ID and custom ID links export
* lisp/ox-md.el (org-md-link): Use custom ID when referring to
  a headline.  Also fix default description for custom ID links.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101344>
2015-09-20 22:58:56 +02:00
Nicolas Goaziou d70a0b6251 ox-md: Fix TOC's internal links
* lisp/ox-md.el (org-md-headline): Use CUSTOM-ID when available.

TOC is generated using HTML export back-end, which links to headlines
through their custom ID, when available.  By anchoring that custom ID,
we make sure these links are not broken.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101344>
2015-09-20 22:58:56 +02:00
Nicolas Goaziou b6c473b47f ox-md: Fix 790bd64
* lisp/ox-md.el (org-md-link): Add missing "#".
2015-09-09 16:14:01 +02:00
Nicolas Goaziou 790bd6458b ox-md: Fix fuzzy link export
* lisp/ox-md.el (org-md-link): Fix fuzzy link export.
2015-09-09 14:04:36 +02:00
Nicolas Goaziou e0567c9cac Export back-ends: Use `org-export-file-uri'
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Use `org-export-file-uri'.
2015-04-20 12:37:13 +02:00
Nicolas Goaziou 4590332652 Export back-ends: Use `org-export-get-reference'
* lisp/ox-beamer.el (org-beamer-link):
(org-beamer-plain-list):
(org-beamer-target):
(org-beamer-radio-target):

* lisp/ox-html.el (org-html--wrap-image):
(org-html--format-toc-headline):
(org-html-list-of-listings):
(org-html-list-of-tables):
(org-html-headline):
(org-html-inline-src-block):
(org-html-link):
(org-html-paragraph):
(org-html-section):
(org-html-radio-target):
(org-html-src-block):
(org-html-table):
(org-html-target):

* lisp/ox-latex.el (org-latex--caption/label-string):
(org-latex--wrap-label):
(org-latex-center-block):
(org-latex-drawer):
(org-latex-dynamic-block):
(org-latex-example-block):
(org-latex-fixed-width):
(org-latex-headline):
(org-latex-horizontal-rule):
(org-latex-latex-environment):
(org-latex-link):
(org-latex-plain-list):
(org-latex-quote-block):
(org-latex-radio-target):
(org-latex-target):
(org-latex-verse-block):

* lisp/ox-man.el (org-man-target):

* lisp/ox-md.el (org-md-headline):

* lisp/ox-odt.el (org-odt-format-headline--wrap):
(org-odt-headline):
(org-odt-format-label):
(org-odt-link--infer-description):
(org-odt-link):
(org-odt-radio-target):
(org-odt-target):

* lisp/ox-texinfo.el (org-texinfo--get-node):
(org-texinfo-radio-target):
(org-texinfo-target):

* contrib/lisp/ox-groff.el (org-groff-link):
(org-groff-radio-target):
(org-groff-target):

* contrib/lisp/ox-rss.el (org-rss-headline): Use
  `org-export-get-reference'.
2015-04-13 15:21:22 +02:00
Nicolas Goaziou a0f2293405 Remove comment related translators in export back-ends
* lisp/ox-ascii.el (ascii):
* lisp/ox-latex.el (latex):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-org.el (org):
* lisp/ox-texinfo.el (texinfo):

* contrib/lisp/ox-groff.el (groff): Remove `comment' and
`comment-block' translators.

`comment' and `comment-block' translators are not needed since both
commented lines and comment blocks do not appear anymore in the parse
tree.  See 69dd4301ab.
2015-03-28 10:56:11 +01:00
Nicolas Goaziou c76f254e8b ox: Fix custom link handling in anonymous back-end
* lisp/ox.el (org-export-custom-protocol-maybe): Change signature.
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-org.el (org-org-link):
* lisp/ox-texinfo.el (org-texinfo-link): Apply signature change.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe):
  Update test.

Provide explicitly back-end used instead of guessing it from INFO
channel as an anonymous back-end could be used, masquerading the real
one.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95402>
2015-02-24 15:54:01 +01:00
Nicolas Goaziou 3900155788 Implement `org-export-custom-protocol-maybe' and use it
* lisp/ox.el (org-export-custom-protocol-maybe): New function.
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Use new function.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe): New
  test.
2015-01-04 22:16:36 +01:00
Nicolas Goaziou 4f7b6ccf39 Merge branch 'maint' 2014-12-13 22:57:35 +01:00
Nicolas Goaziou dbc988e272 ox-md: Correctly export footnote references
* lisp/ox-md.el (md): Do not ignore footnote references.

Footnotes do not exist in Markdown syntax, but we can fallback on
HTML.

Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93447>
2014-12-13 22:55:45 +01:00
Nicolas Goaziou 9b0de2a9cf Merge branch 'maint' 2014-11-02 23:11:44 +01:00
Nicolas Goaziou b26616091d ox-md: Enforce blank line between paragraph and plain list
* lisp/ox-md.el (org-md-separate-elements): Enforce blank line between
  paragraph and plain list.

Suggested-by: Charles C. Berry <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/92321>
2014-11-02 23:09:48 +01:00
Nicolas Goaziou a526ee3b82 Fix 464cd96
* lisp/ox-html.el (org-html-link):
* lisp/ox-md.el (org-md-link): Fix errors introduced in
  464cd965cb.
2014-10-03 22:23:25 +02:00
Rasmus 464cd965cb ox: Support unnumbered headlines via property
* ox.el (org-export--collect-headline-numbering): Ignore unnumbered headline.
(org-export-get-headline-id,
org-export--collect-unnumbered-headline-id): New functions.
(org-export-numbered-headline-p): Further tests for unnumbered headline.
* ox-odt.el (org-odt-headline, org-odt-link,
org-odt-link--infer-description)
ox-md.el (org-md-headline, org-md-link),
ox-latex.el (org-latex-headline, org.latex-link),
ox-html.el (org-html-headline, org-html-link),
ox-ascii.el (org-ascii-link): Support unnumbered headlines.
* test-ox.el (test-org-export/org-export-get-headline-id): New test.
* OrgOdtStyles.xml: Add styles for unnumbered headings.
2014-10-03 22:06:34 +02:00
Nicolas Goaziou e3369c07f0 Revert "Merge export and special blocks within back-ends"
This reverts commit fbc7097ffa.

Conflicts:
	lisp/ox-texinfo.el
2014-09-08 11:57:27 +02:00
Nicolas Goaziou e7df9bc5ae Merge branch 'maint' 2014-08-22 14:54:03 +02:00
Nicolas Goaziou 1a89ec59fa ox-md: Fix b8b34ea
* lisp/ox-md.el (org-md-link): Fix b8b34ea.
2014-08-22 14:53:07 +02:00
Nicolas Goaziou 767895c970 Merge branch 'maint' 2014-08-21 11:08:44 +02:00
Nicolas Goaziou b8b34eadb4 ox-md: Allow custom link type export function
* lisp/ox-md.el (org-md-link): Allow custom link type export function.

`md' back-end is now on par with other core export back-ends.

Thanks to Ken Markoff for reponting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90011
2014-08-21 11:05:45 +02:00
Nicolas Goaziou 3a1fff1b22 Merge branch 'maint' 2014-08-16 16:22:48 +02:00
Nicolas Goaziou 3fed03941a ox-md: Fix blank lines in output
* lisp/ox-md.el (org-md-separate-elements): Outside of lists, preserve
  blank lines between paragraphs and plain lists.

For example

    Consider this list:

    - three
    - four

should become

  # Another test<a id="sec-2"></a>

  Consider this list:

  -   three
  -   four

Thanks to Rafael for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/89840
2014-08-16 16:21:46 +02:00
Nicolas Goaziou c9ca0b6df8 ox-html: Use options instead of hard-coded variables
* contrib/lisp/ox-s5.el (org-s5--format-toc-headline): Apply signature
  change.

* lisp/ox-md.el (org-md-headline): Apply signature change.

* lisp/ox-html.el (org-html-format-drawer-function,
  org-html-publish-to-html): Small reformatting.

(org-html-infojs-install-script, org-html--build-meta-info,
org-html--build-mathjax-config, org-html-format-spec,
org-html--build-pre/postamble, org-html-template, org-html-toc,
org-html--format-toc-headline, org-html-list-of-listings,
org-html-list-of-tables, org-html-bold, org-html-drawer,
org-html-headline, org-html-inlinetask, org-html-italic,
org-html-checkbox, org-html-inline-image-p, org-html-link,
org-html-section, org-html-strike-through, org-html-table-cell,
org-html-table-row, org-html-underline, org-html-verbatim,
org-html-final-function, org-html-export-to-html): Do not use
hard-coded variable names.

(org-html-format-headline-function,
org-html-format-inlinetask-function): Change default value.  Require
an additional argument.

(org-html-format-footnote-reference,
org-html-format-footnotes-section,
org-html-format-footnote-definition, org-html-format-headline,
org-html-format-headline--wrap, org-html-format-section): Remove
functions.

(org-html-footnote-section, org-html-footnote-reference): Apply
function removal.  Do not use hard-coded variable names.

(org-html--anchor, org-html--todo, org-html--tags): Change signature.
Do not use hard-coded variable names.

(org-html-radio-target, org-html-target): Apply signature change.

(org-html-format-headline-default-function,
org-html-format-inlinetask-default-function): New functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou 0540dccadd Use options instead of hard-coded variables
* lisp/ox-beamer.el (org-beamer--format-frame,
  org-beamer--format-block, org-beamer-template): Use options instead
  of hard-coded variables.

* lisp/ox-man.el (org-man-inline-src-block, org-man-src-block,
  org-man-table, org-man-table-cell): Use options instead of
  hard-coded variables.

* lisp/ox-md.el (org-md-headline): Use options instead of hard-coded
  variables.

* lisp/ox-texinfo.el (org-texinfo-format-headline-function,
  org-texinfo-format-inlinetask-function): Change default value.
(org-texinfo--text-markup, org-texinfo--format-menu): Change signature
(org-texinfo--build-menu, org-texinfo-bold, org-texinfo-code,
org-texinfo-comment, org-texinfo-italic, org-texinfo-verbatim): Apply
signature change.

(org-texinfo-template, org-texinfo-clock, org-texinfo-drawer,
org-texinfo-link, org-texinfo-plain-list, org-texinfo-planning,
org-texinfo-table, org-texinfo-table-cell, org-texinfo-timestamp): Use
options instead of variable names.

(org-texinfo-format-headline-default-function,
org-texinfo-format-inlinetask-default-function): New functions.
(org-texinfo-headline, org-texinfo-inlinetask): Use new functions.
2014-07-29 15:45:18 +02:00
Nicolas Goaziou fbc7097ffa Merge export and special blocks within back-ends
* lisp/ox-ascii.el (org-ascii-export-block): Remove function.
(org-ascii-special-block): Handle raw special blocks.

* lisp/ox-beamer.el (org-beamer-export-block): Remove function.

* lisp/ox-html.el (org-html-export-block): Remove function.
(org-html-special-block): Handle raw special blocks.

* lisp/ox-latex.el (org-latex-export-block): Remove function.
(org-latex-special-block): Handle raw special blocks.

* lisp/ox-man.el (org-man-export-block): Remove function.
(org-man-special-block): Handle raw special blocks.

* lisp/ox-md.el (org-md-export-block): Remove function.

* lisp/ox-odt.el (org-odt-export-block): Remove function.
(org-odt-special-block): Handle raw special blocks.

* lisp/ox-texinfo.el (org-texinfo-export-block): Remove function.
(org-texinfo-special-block): Handle raw special blocks.

* contrib/lisp/ox-groff.el (org-groff-export-block): Remove function.
(org-groff-special-block): Handle raw special blocks.

* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-block):
  Remove function.
2014-07-27 14:29:24 +02:00
Bastien Guerry db9d63d313 Merge branch 'maint' 2014-05-29 21:21:11 +02:00
Bastien Guerry 34c2365081 ox-md.el (org-md-headline): Add anchors when exporting with a table of contents
* ox-md.el (org-md-headline): When exporting with a HTML table
of contents, add HTML anchors to Markdown headlines.

Thanks to Marko Dimjašević for reporting this.
2014-05-29 21:20:55 +02:00
Nicolas Goaziou 7a956c3880 Associate all defcustoms to options in back-end definitions
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-texinfo.el: All defcustoms are defined as options in the
  back-end.
* lisp/ox-icalendar.el (icalendar): Ditto.  Also rename :with-vtodo
  property to :icalendar-include-todo.

* doc/org.texi (Publishing options): Update back-end specific
  properties.  Remove @vindex entries so as not to clobber variables
  index.

This change allows to change default value for any defcustom on the
fly when publishing.  It also normalizes how to choose and name what
variables to define as back-end options.
2014-05-28 14:53:29 +02:00
Nicolas Goaziou fffd055ac5 Merge branch 'maint'
Conflicts:
	lisp/org-element.el
	lisp/ox-html.el
2014-04-17 11:34:54 +02:00
Nicolas Goaziou 9dac00129d Update export back-ends wrt "file" link changes
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-html.el (org-html-link):  Do not expand absolute file names
  and do not try to fix hierarchy part, as it is already taken care of
  at the parser level.

* lisp/ox-md.el (org-md-link): Ditto.  Also fix absolute file names.

* lisp/ox-odt.el (org-odt-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-texinfo.el (org-texinfo-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Do not prepend
  scheme part to relative file names either.

* contrib/lisp/ox-deck.el (org-deck-link): Small refactoring.
2014-04-17 11:30:15 +02:00
Nicolas Goaziou 73c141e43e Revert "Fix link export"
This reverts commit fc1f7d752f.
2014-04-17 11:30:14 +02:00
Nicolas Goaziou d34fa17716 Merge branch 'maint'
Conflicts:
	lisp/ox-html.el
2014-04-14 12:41:38 +02:00
Nicolas Goaziou fc1f7d752f Fix link export
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Append "//" after some link
  types.

* lisp/ox-md.el (org-md-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto.  Also remove some
  unused code, as search options are already stripped out link's path.

Since 3589f64e42, Org ignores "//" in
a link type so it has to be re-introduced upon exporting.
2014-04-14 12:36:34 +02:00
Nicolas Goaziou 081e6b4b3b Merge branch 'maint' 2014-04-06 14:08:16 +02:00
Nicolas Goaziou 2868f962a2 ox-md: Fix handling of switches in source blocks
* lisp/ox-md.el (org-md-example-block): handle switches and references
  in source blocks.
2014-04-06 14:06:08 +02:00
Nicolas Goaziou 230d09aeb0 Merge branch 'maint' 2014-03-24 14:20:23 +01:00
Nicolas Goaziou 2e79bd8119 export back-ends: Update radio target export
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link): Update radio target export according
  to recent changes.

See bug report at http://permalink.gmane.org/gmane.emacs.orgmode/82923
2014-03-24 14:13:24 +01:00
Nicolas Goaziou ec09989cb1 Merge branch 'maint' 2014-02-14 17:29:34 +01:00
Nicolas Goaziou d25a2967b9 ox-md: Generate md links to other Org files
* lisp/ox-md.el (org-md-link): Generate md links to other Org files
  instead of html links.

Thanks to Mark Janssen for suggesting it.
2014-02-14 17:28:03 +01:00
Nicolas Goaziou 9d85d96748 Merge branch 'maint' 2014-02-08 15:51:07 +01:00
Nicolas Goaziou 87b48e5a28 ox-md: Fix image transcoding
* lisp/ox-md.el (org-md-link): Do not confuse caption and alt-text.
  Provide "img" as default alt-text.
2014-02-08 15:45:25 +01:00
Nicolas Goaziou 81f2f5a6e8 Export back-ends: Remove quote section translators
* lisp/ox-ascii.el (org-ascii--current-text-width): Remove
  `quote-section' reference.
  (org-ascii-quote-section): Remove function.
* lisp/ox-html.el (org-html-quote-section): Remove function.
* lisp/ox-man.el (org-man-quote-section): Remove function.
* lisp/ox-md.el (org-md-quote-section): Remove function.
* lisp/ox-odt.el (org-odt-quote-section): Remove function.
* lisp/ox-org.el (org-org-quote-section): Remove function.
* lisp/ox-texinfo.el (org-texinfo-quote-section): Remove function.
2014-01-27 21:14:44 +01:00
Nicolas Goaziou 410b6a65f9 Merge branch 'maint' 2014-01-21 23:40:33 +01:00
Justin Gordon d91650b854 ox-md: Set correctly blank lines between elements
* lisp/ox-md (org-md-separate-elements): Fix blank line insertion
  between elements.
* lisp/ox-md.el (org-md-inner-template): New function.
2014-01-21 23:39:23 +01:00
Nicolas Goaziou 87234bee55 Merge branch 'maint' 2014-01-08 22:50:52 +01:00
Nicolas Goaziou ba4852ec74 ox-md: Prevent error with empty items
* lisp/ox-md.el (org-md-item): Do not return an error when exporting
  an empty item.
2014-01-08 22:47:10 +01:00
Bastien Guerry f8e1745440 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-07 14:19:03 +01:00
Bastien Guerry 7d9a883b50 Update copyright years again.
Hint: copyright years are all updated in Emacs.
2014-01-07 14:18:17 +01:00
Bastien Guerry c41f5075ac Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Nicolas Goaziou 455fbca5f8 ox-md: Handle HTML export blocks
* lisp/ox-md.el (org-md-export-block): Handle HTML export blocks.
2014-01-05 00:48:58 +01:00
Nicolas Goaziou af2fa1da6a ox-md: Add support for MD, MARKDOWN keywords
* lisp/ox-md.el (org-md-keyword): New function.
(org-md-export-block): Allow "MARKDOWN" blocks.
2014-01-04 20:19:24 +01:00
Bastien Guerry 83b7f49f38 ox-md.el: Add export-block
* ox-md.el (org-md-export-block): New function.
(md): Use it.
2014-01-04 19:20:23 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Bastien Guerry 9214000c21 Merge branch 'maint'
Conflicts:
	doc/org.texi
2013-11-17 09:17:39 +01:00
Bastien Guerry a6210cc9c2 Backport Paul's fixes from Emacs trunk (1/2)
See http://article.gmane.org/gmane.emacs.diffs/123123
2013-11-17 09:12:41 +01:00