Commit Graph

155 Commits

Author SHA1 Message Date
Aaron Ecay 673165c035 ox-*: single-armed “if” -> “when”
* lisp/ox-html.el (org-html-htmlize-generate-css):
(org-html-template, org-html-final-function):
* lisp/ox-publish.el (org-publish-cache-set-file-property):
* lisp/ox-texinfo.el (org-texinfo-quote-block): Transform ‘if’ with no
else to ‘when’.
2018-05-10 01:17:12 +01:00
Nicolas Goaziou bbcf2f939c Merge branch 'maint' 2018-02-15 15:04:59 +01:00
Nicolas Goaziou 1562d4e293 ox-publish: Fix last commit
* lisp/ox-publish.el (org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Use `file-truename' instead of
`expand-file-name'.

Do not preserve symbolic links when a unique identifier is needed,
e.g., when storing or retrieving file properties from cache.
2018-02-15 14:51:26 +01:00
Nicolas Goaziou 2a7a4a65ad Merge branch 'maint' 2018-02-13 14:10:28 +01:00
Nicolas Goaziou 7c21dfc771 ox-publish: Follow symlink directories
* lisp/org-compat.el (directory-files-recursively): Remove
  compatibility function, no longer needed.
* lisp/ox-publish.el (org-publish--expand-file-name):
(org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Preserve symlinks in file name.
(org-publish-get-base-files): Follow symlink directories.
(org-publish-get-project-from-filename): Preserve symlinks in file
name.  Do not use `file-in-directory-p', which ignores symlinks.

Reported-by: Michel Damiens <michel.damiens@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00186.html>
2018-02-13 14:06:56 +01:00
Nicolas Goaziou c27d0f85e5 Merge branch 'maint' 2018-01-18 23:43:44 +01:00
Nicolas Goaziou bdc220ca17 ox-publish: Fix including files with a search option
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Remove
  double quotes prior to pruning search options.

Reported-by: Joseph Carter Osborn <jcosborn@ucsc.edu>
<http://lists.gnu.org/r/emacs-orgmode/2018-01/msg00317.html>
2018-01-18 23:40:55 +01: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
Nicolas Goaziou 01e150eb59 ox-publish: Cache results for `org-publish-find-date'
* lisp/ox-publish.el (org-publish-find-date): Cache results.
(org-publish-find-title): Tiny refactoring.

Reported-by: Lorenzo Bolla <lbolla@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00561.html>
2017-12-27 23:44:55 +01:00
Nicolas Goaziou 5d2517ba5a Merge branch 'maint' 2017-12-14 00:18:20 +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 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 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 3056abe781 Merge branch 'maint' 2017-09-24 10:58:43 +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
Kyle Meyer 297acd7517 Merge branch 'maint' 2017-09-17 01:17:10 -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
Nicolas Goaziou 007bbddbcc ox-html: Prevent spurious target below headlines
* lisp/ox-html.el (org-html-headline):
(org-html-link): Do not insert an additional target.

* lisp/ox-publish.el (org-publish-resolve-external-link): Add an
  optional argument.

* lisp/ox.el (org-export-get-reference): Improve docstring.

* testing/examples/pub/a.org:
* testing/examples/pub/b.org: New files.
* testing/lisp/test-ox-publish.el (test-org-publish/resolve-external-link):
  New test.
2017-09-10 00:23:42 +02:00
Kyle Meyer d39ccc17d4 Merge branch 'maint' 2017-07-09 11:28:54 -04:00
Paul Eggert b7fdc30388 Backport commit 20e9a00fb from Emacs
* lisp/org-table.el (org-table-sort-lines): Fix misspelling in prompt.
* lisp/ox-ascii.el (org-ascii--describe-datum): Fix misspelling in
call to org-element-lineage.

Spelling fixes
20e9a00fb5d12ad408f9dd15adcfcd205783c1b0
Paul Eggert
Thu Jul 6 00:24:56 2017 -0700
2017-07-09 11:27:12 -04:00
Nicolas Goaziou 6b6476b89c Merge branch 'maint' 2017-05-25 11:10:19 +02:00
Nicolas Goaziou 118ec40c53 ox-publish: Fix symlink publishing
* lisp/ox-publish.el (org-publish-file): Do not expand symlinks so as
  to get proper publishing directory.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/113611>
2017-05-25 11:08:02 +02:00
Nicolas Goaziou 31cf5b2a9a ox-publish: Add missing `file-truename'
* lisp/ox-publish.el (org-publish--expand-file-name): Add missing
  `file-truename'.
2017-05-08 08:48:40 +02:00
Nicolas Goaziou 449f97abbb Merge branch 'maint' 2017-05-05 23:23:29 +02:00
Nicolas Goaziou 250b64b3cb ox-publish: Consistently cache properties
* lisp/ox-publish.el (org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Use `file-truename' so that
caching keys do not depend on links in the file name.
2017-05-05 23:22:23 +02:00
Nicolas Goaziou c55770006a ox-publish: Fix last commit
* lisp/ox-publish.el (org-publish-get-project-from-filename): Fix last
  commit.
2017-05-05 19:56:58 +02:00
Nicolas Goaziou 6a4d3988b9 Merge branch 'maint' 2017-05-05 19:52:55 +02:00
Nicolas Goaziou d9c0a810f7 ox-publish: Use file true name as reference
* lisp/ox-publish.el (org-publish-file): Use file true name as
  reference.
2017-05-05 17:47:30 +02:00
Nicolas Goaziou 018ce94d88 ox-publish: Small refactoring
* lisp/ox-publish.el (org-publish-file): Use function dedicated to
  files instead of string related ones.  Small refactoring.
(org-publish-cache-get-file-property): Small refactoring.
2017-05-05 17:47:30 +02:00
Nicolas Goaziou 6539c41589 ox-publish: Fix publishing filenames with symbolic links
* lisp/ox-publish.el (org-publish-get-project-from-filename):
(org-publish-attachment):
(org-publish-projects):
(org-publish-org-sitemap): Use file comparison functions instead of
string ones so as to properly handle symbolic links in filenames.
2017-05-05 17:47:30 +02:00
Nicolas Goaziou 9227445899 ox-publish: Raise an error on undefined components (take 2)
* lisp/ox-publish.el (org-publish-expand-projects): Raise an error on
  undefined components.
2017-03-17 09:32:21 +01:00
Nicolas Goaziou 147b4646d2 Revert "ox-publish: Raise an error when encountering undefined component"
This reverts commit 6e1d174d0a.
2017-03-17 09:30:38 +01:00
Nicolas Goaziou 6e1d174d0a ox-publish: Raise an error when encountering undefined component
* lisp/ox-publish.el (org-publish-expand-projects): Raise an error
  when encountering undefined component.  Refactor code.  Fix
  docstring.

Reported-by: Bob Newell <bobnewell@bobnewell.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/112712>
2017-03-17 08:53:46 +01:00
Kyle Meyer 98d672de3d Update "25.2" defcustom :version's that remain in master
* lisp/ob-clojure.el (org-babel-clojure-sync-nrepl-timeout):
* lisp/org-agenda.el (org-agenda-show-future-repeats):
(org-agenda-prefer-last-repeat):
* lisp/org-bibtex.el (org-bibtex-headline-format-function):
* lisp/ox-publish.el (org-publish-sitemap-sort-folders):
* lisp/ox.el (org-export-global-macros): Change :version from "25.2"
  to "26.1".

As mentioned in 7c710f6f5, it looks like the goal is to sync Org
9.0.* (maint) with the Emacs master branch.  In that case, 26.1 won't
be correct for changes that are specific to Org's master branch, but
neither will 25.2.
2017-01-26 00:15:11 -05:00
Kyle Meyer 84de6bab99 Merge branch 'maint' 2017-01-15 16:44:56 -05:00
Kyle Meyer f277d95c3b ox-publish: Fix docstring typo
* lisp/ox-publish.el (org-publish-property): Fix docstring typo.
2017-01-15 16:41:22 -05:00
Nicolas Goaziou d07d7c29c5 Merge branch 'maint' 2017-01-01 11:19:47 +01:00
Nicolas Goaziou 336bab6ea7 Update copyright years
* lisp/org-crypt.el:
* lisp/ox-publish.el: Update copyright years.
2017-01-01 11:19:15 +01:00
Nicolas Goaziou c7cc30b4d6 ox-publish: Back-port `org-publish-property'
* lisp/ox-publish.el (org-publish-property): New function.
2017-01-01 10:43:48 +01:00
Nicolas Goaziou 4ce104bf44 Merge branch 'maint' 2016-12-31 12:29:20 +01:00
Nicolas Goaziou dff9cf9c80 ox-publish: Fix `org-publish-get-project-from-filename' and :include
* lisp/ox-publish.el (org-publish-get-project-from-filename): Properly
  check included files.  Complete docstring.  Refactor code.
2016-12-31 12:28:02 +01:00
Nicolas Goaziou ccf2b988af ox-publish: Fix :base-extension (part 2)
* lisp/ox-publish.el (org-publish-get-base-files): Make sure to remove
  directories.
* testing/examples/pub/file.txt:
* testing/examples/pub/noextension: New files.
* testing/lisp/test-ox-publish.el (test-org-publish/base-extension):
  New test.
2016-12-29 21:48:02 +01:00
Nicolas Goaziou 2c6a4bec73 Merge branch 'maint' 2016-12-29 21:16:36 +01:00
Nicolas Goaziou acebe9a282 ox-publish: Fix :base-extension set to `any'
* lisp/ox-publish.el (org-publish-get-project-from-filename): Handle
  case when :base-extension is `any'.
(org-publish-project-alist): Improve docstring.

Reported-by: Arun Isaac <arunisaac@systemreboot.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111085>
2016-12-29 21:16:13 +01:00
Nicolas Goaziou 5b8ebe6576 Merge branch 'maint' 2016-12-27 08:33:26 +01:00
Nicolas Goaziou bbbed7aad9 ox-publish: Fix typos 2016-12-27 08:30:01 +01:00