Commit Graph

68 Commits

Author SHA1 Message Date
Nicolas Goaziou 346d227228 ox-publish: Call preparation function earlier
* lisp/ox-publish.el (org-publish-projects): Call preparation function
  earlier in the process, before files constituting the project are
  collected.

Suggested-by: Arun Isaac <theroarofthedragon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101858>
2015-10-13 21:39:02 +02:00
Paul Eggert c86a10b0bc Backport commit 284c470 from Emacs master branch
Backslash cleanup in Elisp source files
284c470ef752967fcd8bae6a450dc138462b1e49
Paul Eggert
Thu Sep 17 16:09:39 2015 -0700
2015-09-21 18:38:39 -04:00
Kyle Meyer 077810e521 Modify quote-related backport
These changes are in line with the changes proposed on the mailing list,
but many of those changes weren't necessary because they had already
been reverted in the Emacs repo.

<http://permalink.gmane.org/gmane.emacs.orgmode/100896/>
2015-09-21 18:38:39 -04:00
Kyle Meyer d77a52a502 Backport quote-related commits from Emacs
These changes are the combination of the commits below (in order
applied).  Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits.  Changes to message and help quote
display for Emacs 25 seem to be here to stay.  The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.

  Quoting fixes in lisp/org
  6cd2629bd1b3ce77d29ac28e29237c94a4197116
  Paul Eggert
  Mon Aug 31 00:29:40 2015 -0700

  More-conservative ‘format’ quote restyling
  fbb5531fa11d13854b274d28ccd329c9b6652cfc
  Paul Eggert
  Sun Aug 23 22:39:06 2015 -0700

  Prefer directed to neutral quotes
  875a5d0ead827d3da32ecbd30e739a29f07bbc87
  Paul Eggert
  Mon Aug 24 23:57:25 2015 -0700

  Escape ` and ' in doc
  19532d147b431a4fe34f088d6de07891c48e2c5c
  Paul Eggert
  Tue Sep 1 18:23:21 2015 -0700

  Fix some more docstring etc. quoting problems
  26bd978d87dfbf9baa115cd961a67d42b416c4bf
  Paul Eggert
  Thu Sep 3 15:32:54 2015 -0700

  Go back to grave quoting in source-code docstrings etc.
  6afef3f6ca2f3009c722b84e249903b7f807b044
  Paul Eggert
  Mon Sep 7 16:09:27 2015 -0700
2015-09-21 18:38:18 -04:00
Kyle Meyer 6f9184a294 Merge branch 'maint' into backport-master 2015-07-26 23:56:50 -04:00
Paul Eggert 72416b82ac Backport commit 7aa506e from Emacs master branch
Spelling fixes
7aa506eed8881788485a9774165454404bac2623
Paul Eggert
Thu Dec 25 18:08:47 2014 -0800
2015-07-26 23:28:25 -04:00
Nicolas Goaziou a35c4332f2 ox-publish: Allow external references outside of publishing
* lisp/ox-publish.el (org-publish-resolve-external-link): Warn instead
  of throwing an error when a reference to a non-published external
  file is encountered.
2015-05-07 22:15:00 +02:00
Nicolas Goaziou e42c161109 ox-publish: Throw an error for external reference outside of publish
* lisp/ox-publish.el (org-publish-resolve-external-link): Throw an
  error when trying to resolve an external reference while not in
  a publishing process.

Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97420>
2015-05-07 00:57:22 +02:00
Nicolas Goaziou 29e33ae2af ox-publish: Fix space matching in external fuzzy links
* lisp/ox-publish.el (org-publish--collect-references):
(org-publish-resolve-external-link): Treat consecutive blank
characters as a single space, not 0.
2015-05-07 00:48:36 +02:00
Nicolas Goaziou cd7cbdcda8 ox-publish: Extend published external links
* lisp/ox-publish.el (org-publish-collect-numbering):
(org-publish-resolve-external-fuzzy-link): Remove functions.

(org-publish--collect-references, org-publish-resolve-external-link):
New functions.
(org-publish-org-to): Use new functions.

* lisp/ox-html.el (org-html-link): Reflect changes above.

This patch extends `org-publish-resolve-external-fuzzy-link', now
known as `org-publish-resolve-external-link' to custom-id links and
dedicated targets.
2015-04-13 15:37:27 +02:00
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Nicolas Goaziou 0ed5d4336b ox-publish: Clean-up `org-publish-find-date'
* lisp/ox-publish.el (org-publish-find-date): Remove useless cond
branch.

:date property is never a single timestamp, so the first branch is
always false.

Reported-by: Rasmus <rasmus@gmx.us>
2015-02-13 00:33:17 +01:00
Rasmus e6fcc853c5 ox: Optional export of title
* ox.el (org-export-with-title): New variable.
* ox (org-export-options-alist),
  ox-ascii.el (org-ascii-template--document-title),
  ox-beamer.el (org-beamer-template), ox-html.el (org-html-template),
  ox-latex.el (org-latex-template), ox-man.el (org-man-template),
  ox-odt.el (org-odt-template), ox-org.el (org-org-template),
  ox-publish.el (org-publish-project-alist),
  ox-texinfo.el (org-texinfo-template),
  ox-groff.el (org-groff--mt-head): Use new variable.
* ox-koma-letter.el (org-koma-letter-use-title): Mark obsolete.
* test-ox.el (test-org-export/parse-option-keyword): Add :with-title.
* ORG-NEWS, org.texi: Mention org-export-with-title.

This is useful in e.g. ox-html where title can be set via
`org-html-preamble-template' or when using the {{{title}}}-macro.
2015-02-12 01:45:39 +01:00
Nicolas Goaziou 588ec53124 Merge branch 'maint' 2014-11-04 22:25:18 +01:00
Nicolas Goaziou f8d7da4c33 ox-publish: Fix publishing components asynchronously
* lisp/ox-publish.el (org-publish): Ensure asynchronous process
  doesn't encounter :components parts in the project, as it may not
  know how to expand them.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/92319>
2014-11-04 22:21:30 +01:00
Nicolas Goaziou 89f5ad36d7 Merge branch 'maint' 2014-10-12 22:55:38 +02:00
Nicolas Goaziou a0ac1344fc ox: Fix 88457acff4
* lisp/ox.el (org-export-async-start): Limit first argument to lambda
  expressions.
* lisp/ox-publish.el (org-publish, org-publish-all,
  org-publish-current-file): Replace `ignore', per limit stated above.

Due to a hack allowing to provide quasi-quoted lambda expressions,
symbols are not allowed as result handler.  This limitation is not
much of a problem as `org-export-async-start' is only meant to be used
internally.
2014-10-12 22:53:01 +02:00
Bastien Guerry 3b6f386795 Merge branch 'maint' 2014-07-29 23:28:34 +02:00
Matt Lundin a40f568f19 Protect open buffers when publishing sitemap
* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Make sure to call org-export-get-environment in copy of buffer if
  emacs is already visiting. Otherwise, #+bind variables meant for
  export can be set in live buffers.

This patch also optimizes the above functions by inhibiting
org-startup on buffers emacs visits temporarily.
2014-07-29 23:20:19 +02:00
Bastien Guerry a98a6afe56 Merge branch 'maint' 2014-07-29 15:21:31 +02:00
Matt Lundin 507244d56b Remove unnecessary invocations of org-mode
* lisp/ox-publish.el: (org-publish-find-title) (org-publish-find-date)
  Fix unnecessary invocations of org-mode with
  org-inhibit-startup.

The functions above call org-mode with org-inhibit-startup in org
buffers that are already open. The result is that these open buffers
lose some crucial local variables during publishing. For instance,
an open buffer will lose its dir-local-variables-alist setting
during publishing. There is no need to call org-mode here, because
org-mode is a) either already initialized in the buffer or b)
initialized via earlier call to find-file-no-select.

This looks to me like a relic of some past time when these functions were
called in temporary buffers that contained copies of the file's contents.
2014-07-29 15:21:21 +02:00
Nicolas Goaziou f261833a26 Merge branch 'maint' 2014-03-29 14:42:08 +01:00
Nicolas Goaziou 3636783ca4 ox-publish: Fix (invalid-read-syntax "#") error
* lisp/ox-publish.el (org-publish-find-title):
  Fix (invalid-read-syntax "#").

Since 8e1386cead,
`org-element-interpret-data' no longer trims text properties attached
to strings.  We need to remove them before writing the title into the
cache, as text properties are not readable.
2014-03-29 14:41:27 +01:00
Nicolas Goaziou cd9685cd10 ox-publish: Fix code typo (take 3)
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 16:06:46 +01:00
Nicolas Goaziou b982b57cb1 ox-publish: Fix code typo (part 2)
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 10:46:34 +01:00
Nicolas Goaziou 317d2f1898 ox-publish: Fix code typo
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Fix
  code typo.
2014-03-25 10:38:48 +01:00
Nicolas Goaziou bebb7597a7 ox-publish: Fix small bug
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
  Correctly extract filename.

This bug was introduced in 6062f9ea72.
Thanks to steckerhalter for reporting it.
2014-03-25 10:05:27 +01:00
Nicolas Goaziou 6062f9ea72 ox-publish: Fix small bug
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Find
  included file even if keyword is indented.
2014-03-12 21:30:13 +01:00
Bastien Guerry 3737676632 Update copyright year for files changed since 2013 2014-01-05 06:35:21 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +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
Nicolas Goaziou e4386ba22a Merge branch 'maint' 2014-01-01 19:02:58 +01:00
Nicolas Goaziou 22c3bb81ff ox-publish: Fix a docstring
* lisp/ox-publish.el (org-publish-resolve-external-fuzzy-link): Fix
  docstring.
2014-01-01 19:02:13 +01:00
Nicolas Goaziou 3f6c64a8e2 ox-publish: Introduce `org-publish-after-publishing-hook'
* lisp/ox-publish.el (org-publish-after-publishing-hook): New variable.
(org-publish-file): Call hook with file name and output file name as
arguments.  Small refactoring.
(org-publish-attachment): Return output file.
2013-12-03 21:10:59 +01:00
Nicolas Goaziou a9eec72ecf Merge branch 'maint' 2013-11-25 23:36:38 +01:00
Nicolas Goaziou 3ead82a321 ox-publish: Error when publishing non-existent file
* lisp/ox-publish.el (org-publish-cache-ctime-of-src): Return an error
  when publishing a non-existent file.

Suggested-by: Arne Babenhauserheide <arne_bab@web.de>
2013-11-25 23:34:20 +01:00
Nicolas Goaziou b5356dadb4 Merge branch 'maint' 2013-10-13 18:41:12 +02:00
Nicolas Goaziou 9c1ef6df93 ox-publish: Fix compilation problem
* lisp/ox-publish.el (org-publish-all): Fix compilation problem.
2013-10-13 18:34:57 +02:00
Nicolas Goaziou 82837535df ox-publish: Update a docstring
* lisp/ox-publish.el (org-publish-project-alist): Update docstring wrt
  recent Property drawers changes.
2013-09-27 10:16:46 +02:00
Nicolas Goaziou 895d18abc0 ox-publish: Remove unused dynamically scoped variable
* lisp/ox-publish.el (project-plist): Remove variable.
2013-08-27 10:32:59 +02:00
Nicolas Goaziou ef2d475bf8 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-08-08 18:49:17 +02:00
Nicolas Goaziou c82cb4f75e ox-publish: Correctly return document title
* lisp/ox-publish.el (org-publish-find-title): Fix title when no
  #+TITLE property is provided.
* lisp/ox.el (org-export-store-default-title): Remove-function.
(org-export--default-title): Remove variable.
(org-export-options-alist): Do not use a default value.
(org-export--get-buffer-attributes): Store a default title.
(org-export-as): Apply function removal.
(org-export--get-global-options): Do not set a property with an
explicitely nil value.
2013-08-08 18:45:39 +02:00
Nicolas Goaziou 74750b0839 ox-publish: Fix prefix for some variables
* lisp/ox-publish.el (org-publish-sitemap-sort-files,
  org-publish-sitemap-sort-folders, org-publish-sitemap-ignore-case,
  org-publish-sitemap-requested, org-publish-sitemap-date-format,
  org-publish-sitemap-file-entry-format): Set prefix to
  "org-publish-sitemap" instead of "org-sitemap".
(org-publish-compare-directory-files, org-publish-get-base-files-1,
org-publish-projects, org-publish-format-file-entry): Use new prefix.
2013-08-08 16:21:53 +02:00
Nicolas Goaziou 9154c70a04 Export back-ends: Apply changes to export functions
* contrib/lisp/ox-confluence.el (org-confluence-export-as-confluence):
* contrib/lisp/ox-deck.el (org-deck-export-as-html,
  org-deck-export-to-html):
* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind):
* contrib/lisp/ox-groff.el (org-groff-export-to-groff,
  org-groff-export-to-pdf):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-export-as-latex,
  org-koma-letter-export-to-latex, org-koma-letter-export-to-pdf):
* contrib/lisp/ox-rss.el (org-rss-export-as-rss,
  org-rss-export-to-rss):
* contrib/lisp/ox-s5.el (org-s5-export-as-html,
  org-s5-export-to-html):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-export):
* lisp/ob-haskell.el:
* lisp/ox-ascii.el (org-ascii-export-as-ascii,
  org-ascii-export-to-ascii):
* lisp/ox-beamer.el (org-beamer-export-as-latex,
  org-beamer-export-to-latex, org-beamer-export-to-pdf):
* lisp/ox-html.el (org-html-export-as-html, org-html-export-to-html):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-latex.el (org-latex-export-as-latex,
  org-latex-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-man, org-man-export-to-pdf):
* lisp/ox-md.el (org-md-export-as-markdown,
  org-md-export-to-markdown):
* lisp/ox-odt.el (org-odt-export-to-odt):
* lisp/ox-org.el (org-org-export-as-org, org-org-export-to-org):
* lisp/ox-publish.el (org-publish-org-to):
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo,
  org-texinfo-export-to-info):
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-file):
2013-08-07 16:11:42 +02:00
Nicolas Goaziou 7fcf4995af ox-publish: Fix :recursive parameter ignoring extension restriction
* lisp/ox-publish.el (org-publish-find-date): Also return date for
  directories.
(org-publish-get-base-files-1): Fix :recursive parameter ignoring
extension restriction.
2013-07-12 15:09:58 +02:00
Nicolas Goaziou 1ce00aaffd ox-publish: Fix "Invalid time specification" error with timestamps in DATE
* lisp/ox-publish.el (org-publish-find-date): Fix "Invalid time
  specification" error with timestamps in DATE.
2013-04-29 09:39:35 +02:00
Bastien Guerry a07c745705 ox-publish.el (org-publish-project-alist): Add :with-planning in docstring
* ox-publish.el (org-publish-project-alist): Add
:with-planning in docstring.
2013-04-10 17:19:41 +02:00
Nicolas Goaziou e01daa00be ox-publish: Fix "bad timestamp" error with some DATE values
* lisp/ox-publish.el (org-publish-find-date): Fix "bad timestamp"
  error with some DATE values: :date property in communication channel
  is no longer a string.
2013-04-06 14:17:26 +02:00
Bastien Guerry b9974192a1 ox-publish.el: Set `org-inhibit-startup' to t when visiting files for publication
* ox-publish.el (org-publish-org-to)
(org-publish-org-sitemap, org-publish-find-title)
(org-publish-find-date)
(org-publish-cache-file-needs-publishing): Set
`org-inhibit-startup' to t when visiting files for
publication.

Thanks to Samuel Wales for this idea.
2013-03-19 19:39:11 +01:00