Commit Graph

133 Commits

Author SHA1 Message Date
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
Nicolas Goaziou 83827952db ox-publish: Provide relative file in sitemap generation
* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Document change.

(org-publish-property):
(org-publish--expand-file-name): New functions

(org-publish-get-base-files):
(org-publish-file):
(org-publish-projects):
(org-publish--sitemap-files-to-lisp):
(org-publish-sitemap):
(org-publish-find-property):
(org-publish-find-title):
(org-publish-find-date):
(org-publish-sitemap-default-entry):
(org-publish-sitemap-default): Use new functions.

* testing/lisp/test-ox-publish.el (test-org-publish/sitemap): Update
  test.
2016-12-19 17:36:19 +01:00
Nicolas Goaziou 6663452588 ox-publish: Remove :sitemap-sans-extension
* lisp/ox-publish.el (org-publish-sitemap): Remove property.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Remove documentation.

Caches uses absolute file names as keys.  We cannot provide file names
without extension to `:sitemap-format-entry' as they are no longer
existing key, and cannot be used for `org-publish-find-property' or
`org-publish-find-title'.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou fcca882876 ox-publish: Remove unused variable
* lisp/ox-publish.el (org-publish-sitemap-date-format): Remove variable.
(org-publish-projects): Apply removal.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou d5dbf761eb ox-publish: Include directories in site-map
* lisp/ox-publish.el (org-publish-temp-files): Remove variable.
(org-publish-get-base-files-1):
(org-publish-compare-directory-files): Remove functions.
(org-publish-get-base-files): Remove optional argument.  Rewrite
function.
(org-publish-projects):
(org-publish-sitemap):
(org-publish-index-generate-theindex): Apply signature change.
(org-publish-sitemap-sort-folders): Allow to include or ignore
directories in the site-map.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Document change.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou ca0ad0a84b ox-publish: Implement `org-publish-find-property'
* lisp/ox-publish.el (org-publish-find-property): New function.
(org-publish-find-title): Use new function.  Remove unused optional
argument.
(org-publish-find-date): Use new function.

(org-publish-project-alist):
* doc/org.texi (Sitemap): Update documentation.

Suggested-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/107219>
2016-12-19 12:19:58 +01:00
Nicolas Goaziou 2d3e3f562a ox-publish: Improve control over site map
* lisp/ox-publish.el (org-publish-project-alist): Document
  new :sitemap-format-entry property, and change to `:sitemap-function'.
(org-publish-sitemap-file-entry-format): Make variable obsolete.
(org-publish-org-sitemap): Remove function.
(org-publish--sitemap-files-to-lisp):
(org-publish-sitemap):
(org-publish-sitemap-default-entry):
(org-publish-sitemap-default): New functions.
(org-publish-projects): Use new functions.
* lisp/org-compat: Implement directory-name-p when not available.

* doc/org.texi (Sitemap): Update documentation.

:sitemap-function is more specialized so it is easier to manipulate.  In
particular, it can make use of built-in `org-list-to-*' functions.
Also, :sitemap-format-entry, as a function, is less limited than
`org-publish-sitemap-file-entry-format' format string.
2016-12-19 12:19:58 +01:00
Nicolas Goaziou c6f9aeb06e ox-publish: Fix too many opened buffer upon publishing
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Create
  a new buffer for Org files only.

Reported-by: Éric Würbel <eric.wurbel@univ-amu.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/110190>
2016-11-11 00:45:21 +01:00
Nicolas Goaziou 58683d2cf4 ox-publish: Improve docstrings
* lisp/ox-publish.el (org-publish-cache-get): Improve docstrings.
2016-11-06 11:30:23 +01:00
Nicolas Goaziou 80befa1983 ox-publish: Fix typo
* lisp/ox-publish.el (org-publish-cache-get-file-property): Fix typo.
2016-11-03 12:48:40 +01:00
Nicolas Goaziou c61ee8b82a ox-publish: Fix unwanted buffer pop-up
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Use
  `find-file-noselect' instead of `find-file'.
2016-11-02 09:28:24 +01:00
Nicolas Goaziou 1dc78402dc ox-publish: Fix typo in docstring
* lisp/ox-publish.el (org-publish-cache-get-file-property): Fix typo.
2016-11-02 09:16:35 +01:00
Nicolas Goaziou 0cf58cc208 Improve docstrings
* lisp/ob-core.el (org-confirm-babel-evaluate):
(org-babel-no-eval-on-ctrl-c-ctrl-c):
(org-babel-hash-at-point):
* lisp/org-agenda.el (org-agenda-custom-commands):
(org-stuck-projects):
(org-agenda):
(org-timeline):
(org-todo-list):
(org-agenda-filter-by-tag):
(org-agenda-log-mode):
(org-agenda-refile):
(org-agenda-show-and-scroll-up):
(org-agenda-tree-to-indirect-buffer):
(org-agenda-show-the-flagging-note):
(org-agenda-to-appt):
* lisp/org-capture.el (org-capture-mode):
(org-capture-use-agenda-date):
(org-capture):
* lisp/org-clock.el (org-clock-in):
(org-clock-display):
* lisp/org-colview.el (org-columns--display-here):
(org-columns):
* lisp/org-footnote.el (org-footnote-section):
* lisp/org-gnus.el (org-gnus-prefer-web-links):
* lisp/org-lint.el (org-lint):
* lisp/org-list.el (org-plain-list-ordered-item-terminator):
(org-list-allow-alphabetical):
(org-list-automatic-rules):
(org-list-use-circular-motion):
* lisp/org-protocol.el (org-protocol-store-link):
(org-protocol-create-for-org):
* lisp/org-src.el (org-src-preserve-indentation):
(org-edit-src-content-indentation):
(org-src-mode-hook):
(org-src-mode):
(org-edit-table.el):
(org-edit-export-block):
(org-edit-src-code):
(org-edit-fixed-width-region):
* lisp/org-table.el (org-table-automatic-realign):
(org-table-copy-increment):
(org-table-formula-evaluate-inline):
(org-table-allow-automatic-line-recalculation):
(org-table-edit-field):
(orgtbl-ascii-plot):
* lisp/org-timer.el (org-timer):
* lisp/org.el (org-deadline-string):
(org-comment-string):
(org-ellipsis):
(org-show-context-detail):
(org-indirect-buffer-display):
(org-cycle-global-at-bob):
(org-insert-heading-respect-content):
(org-enable-table-editor):
(org-context-in-file-links):
(org-display-internal-link-with-indirect-buffer):
(org-file-apps):
(org-refile-targets):
(org-todo-keywords):
(org-use-fast-todo-selection):
(org-treat-insert-todo-heading-as-state-change):
(org-time-clocksum-use-fractional):
(org-time-clocksum-use-effort-durations):
(org-agenda-files):
(org-cycle-hide-archived-subtrees):
(org-cycle):
(org-global-cycle):
(org-tree-to-indirect-buffer):
(org-insert-heading):
(org-store-link):
(org-insert-link):
(org-mark-ring-push):
(org-refile):
(org-todo):
(org-show-todo-tree):
(org-reveal):
(org-check-deadlines):
(org-switchb):
(org-cdlatex-mode):
(org-toggle-latex-fragment):
(org-ctrl-c-ctrl-c):
(org-toggle-heading):
(org-indent-line):
(org-yank):
(org-speedbar-set-agenda-restriction):
* lisp/ox-html.el (org-html-htmlize-output-type):
* lisp/ox-icalendar.el (org-icalendar-combined-agenda-file):
* lisp/ox-publish.el (org-publish-project-alist):
* lisp/ox.el (org-export-in-background):
(org-export-stack-mode):
(org-export--stack-source-at-point):
(org-export-dispatch): Improve quotes and formatting in docstrings.
2016-10-15 17:43:54 +02:00
Aaron Ecay 140aacbf2f Use ‘eq’ instead of ‘equal’ for symbols
* lisp/ob-C.el (org-babel-C-val-to-C-type):
* lisp/ob-core.el (org-babel-get-colnames):
(org-babel-disassemble-tables):
* lisp/ob-lua.el (org-babel-lua-var-to-lua):
(org-babel-lua-table-or-string):
* lisp/ob-python.el (org-babel-python-var-to-python):
(org-babel-python-table-or-string):
* lisp/ob-ruby.el (org-babel-ruby-var-to-ruby):
(org-babel-ruby-table-or-string):
* lisp/ob-shell.el (org-babel-sh-var-to-string):
* lisp/ob-sqlite.el (org-babel-sqlite-table-or-scalar):
* lisp/org-agenda.el (org-agenda-prepare-window):
(org-compile-prefix-format):
* lisp/org-bibtex.el (org-bibtex-headline):
* lisp/org-capture.el (org-capture):
* lisp/org-colview.el (org-columns-next-allowed-value):
* lisp/org-mhe.el (org-mhe-store-link):
(org-mhe-get-message-real-folder):
(org-mhe-get-message-folder):
(org-mhe-get-message-num):
(org-mhe-get-header):
(org-mhe-follow-link):
* lisp/org-table.el (org-define-lookup-function):
* lisp/org.el (format-spec):
* lisp/ox-odt.el (org-odt--translate-description-lists):
* lisp/ox-publish.el (org-publish-compare-directory-files):
Use `eq' instead of `equal' when comparing to symbols.
* lisp/org-timer.el (org-timer-set-mode-line):
* lisp/org-capture.el (org-capture-finalize):
Use `cl-case' instead of `(cond ((eq x 'foo) ...) ...)'.
2016-09-25 16:29:06 +01:00
Aaron Ecay 6e3ff4acc5 Deprecate org-remove-(angle-brackets,double-quotes)
* lisp/org.el (org-remove-angle-brackets, org-remove-double-quotes):
Deprecate.
* lisp/org-gnus.el (org-gnus-store-link):
* lisp/org-lint.el (org-lint-non-existent-setupfile-parameter):
(org-lint-wrong-include-link-parameter):
* lisp/org-macro.el (org-macro--collect-macros):
* lisp/org-mhe.el (org-mhe-store-link):
* lisp/org-rmail.el (org-rmail-store-link):
* lisp/org.el (org--setup-collect-keywords):
(org-insert-link):
(org-translate-link-from-planner):
(org-offer-links-in-entry):
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
* lisp/ox.el (org-export--get-inbuffer-options):
(org-export--list-bound-variables):
(org-export-expand-include-keyword): Replace with `org-unbracket-string'.
2016-09-03 02:22:11 +01:00
Aaron Ecay 6b52bc6a21 Clean up string handling.
* lisp/org-compat.el (string-prefix-p, string-suffix-p):
Add compatibility definitions for 24.3.

* lisp/ob-R.el (org-babel-edit-prep:R):
* lisp/ob-core.el (org-babel-demarcate-block):
* lisp/ob-js.el (org-babel-js-read):
* lisp/ob-latex.el (org-babel-execute:latex):
* lisp/ob-ref.el (org-babel-ref-parse):
* lisp/ob-shell.el (org-babel-variable-assignments:shell):
* lisp/org-protocol.el (org-protocol-create):
* lisp/org-table.el (org-table-field-info):
* lisp/org.el (org-get-buffer-for-internal-link):
* lisp/ox-publish.el (org-publish-compare-directory-files):
* lisp/ox-texinfo.el (org-texinfo-template):
Use `string-{suffix,prefix}-p' instead of `string-match(-p)'.

* lisp/ob-python.el (org-babel-python-read-string):
Ditto, also use `substring' rather than `match-string'.

* lisp/org-table.el (org-table-copy-down):
(org-table-insert-hline, org-table-current-field-formula):
(org-table-get-formula): Use `string-match-p' instead of
`string-match'.
2016-08-24 16:05:54 +01: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 5cd793c59a ox-publish: Change signature for preparation and completion functions
* doc/org.texi (Sources and destinations): Document new signature.
* lisp/ox-publish.el (org-publish-project-alist): Update docstring.
(org-publish-projects): Call preparation and
completion functions with the project properties as the sole argument.

`project-plist' used to be dynamically scoped.  This is no longer
possible due to the switch to lexical binding.

Reported-by: Arun Isaac <arunisaac@systemreboot.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107856>
2016-06-22 15:31:48 +02:00
Kyle Meyer 14f853dceb ox-publish: Correct docstring typo
* lisp/ox-publish.el (org-publish-project-alist): Correct typo in
  docstring.
2016-05-18 22:05:41 -04:00
Rasmus 44ad9ff3e4 ox-publish.el: Document `:recursive'
* ox-publish.el (org-publish-project-alist): Document `:recursive'.
2016-05-18 12:00:17 +02:00
Nicolas Goaziou 5563682ca6 ox-publish: Keep code within 80 columns
* lisp/ox-publish.el (org-publish-write-cache-file):
(org-publish-initialize-cache): Keep code within 80 columns.
2016-03-12 23:18:55 +01:00
Nicolas Goaziou bef3fc6f82 ox-publish: Better handling of cross-references
* lisp/ox-publish.el (org-publish--collect-references): Renamed...
(org-publish--store-crossrefs): ... to this.
(org-publish-org-to): Use previous function.  Small refactoring.

(org-publish-resolve-external-link): Use tight integration with
`org-export-get-reference' so as to provide reliable cross references.

* lisp/ox.el (org-export-get-reference): Conversely, take into
  consideration references suggested by
  `org-publish-resolve-external-link'.
2016-03-12 23:18:55 +01:00
Nicolas Goaziou 92443160fd ox-publish: Write cache after successfully publishing a file
* lisp/ox-publish.el (org-publish-file): Ignore NO-CACHE parameter when
  writing cache to file.  This is needed to recover from an interrupted
  publishing process.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/105046>
2016-02-22 21:53:42 +01:00