[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 9d06e7bf80 2/2: ox.el: Add more customizable `org-e
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/org 9d06e7bf80 2/2: ox.el: Add more customizable `org-export-dispatch' options |
|
Date: |
Sun, 14 May 2023 10:59:02 -0400 (EDT) |
branch: externals/org
commit 9d06e7bf80056a3fb8ae68a86883e2b3c6746553
Author: Jim Wisniewski <wisnij@gmail.com>
Commit: Ihor Radchenko <yantar92@posteo.net>
ox.el: Add more customizable `org-export-dispatch' options
* lisp/ox.el (org-export-dispatch): Add customizable variables
`org-export-body-only', `org-export-visible-only', and
`org-export-force-publishing', and use them in `org-export-dispatch'.
* doc/org-manual.org (The Export Dispatcher): Document the new export
variables.
* etc/ORG-NEWS (New customization options for ~org-export-dispatch~):
Announce the new customization options.
Currently when calling `org-export-dispatch', two of the export
options can have their defaults specified with customizable variables:
"Export scope" (via `org-export-initial-scope') and "Async export"
(via `org-export-in-background'). This change adds customizable
variables for the "Body only", "Visible only", and "Force publishing"
options as well.
---
doc/org-manual.org | 22 ++++++++++++++++++++++
etc/ORG-NEWS | 8 ++++++++
lisp/ox.el | 28 ++++++++++++++++++++++++++++
3 files changed, 58 insertions(+)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index ba9fdaf20c..ab5c10c1d3 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -11859,6 +11859,24 @@ further alter what is exported, and how.
in the export. Affects only those backend formats that have
sections like =<head>...</head>= in HTML.
+ #+vindex: org-export-body-only
+ To make body-only export the default, customize the variable
+ ~org-export-body-only~.
+
+- {{{kbd(C-f)}}} ::
+ #+kindex: C-c C-e C-f
+
+ Toggle force-publishing export. Publish functions normally only
+ publish changed files (see [[**Triggering Publication]]). Forced
+ publishing causes files to be published even if their timestamps do
+ not indicate the file has been changed.
+
+ #+vindex: org-export-force-publishing
+ To make forced publishing the default, customize the variable
+ ~org-export-force-publishing~. (This is similar to
+ ~org-publish-use-timestamps-flag~, but only affects the export
+ dispatcher.)
+
- {{{kbd(C-s)}}} ::
#+kindex: C-c C-e C-s
@@ -11880,6 +11898,10 @@ further alter what is exported, and how.
certain parts of an Org document by adjusting the visibility of
particular headings. See also [[*Sparse Trees]].
+ #+vindex: org-export-visible-only
+ To make visible-only export the default, customize the variable
+ ~org-export-visible-only~.
+
** Export Settings
:PROPERTIES:
:DESCRIPTION: Common export settings.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 03894f128d..bba9457f27 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -180,6 +180,14 @@ backend used for evaluation of ClojureScript.
official [[https://clojure.org/guides/deps_and_cli][Clojure CLI tools]].
The command can be customized with ~ob-clojure-cli-command~.
+*** New customization options for ~org-export-dispatch~
+
+New custom variables ~org-export-body-only~,
+~org-export-visible-only~, and ~org-export-force-publishing~ allow the
+default settings of "Body only", "Visible only", and "Force
+publishing" in the ~org-export-dispatch~ UI to be customized,
+respectively.
+
** New features
*** Add support for ~logind~ idle time in ~org-user-idle-seconds~
diff --git a/lisp/ox.el b/lisp/ox.el
index 953245024a..70bba0cf5d 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -956,6 +956,31 @@ these cases."
:group 'org-export-general
:type 'boolean)
+(defcustom org-export-body-only nil
+ "The initial \"Body only\" setting when exporting with `org-export-dispatch'.
+Non-nil means only export body code, without the surrounding
+template."
+ :group 'org-export-general
+ :package-version '(Org . "9.7")
+ :type 'boolean
+ :safe #'booleanp)
+
+(defcustom org-export-visible-only nil
+ "The initial \"Visible only\" setting when exporting with
`org-export-dispatch'.
+Non-nil means don't export the contents of hidden elements."
+ :group 'org-export-general
+ :package-version '(Org . "9.7")
+ :type 'boolean
+ :safe #'booleanp)
+
+(defcustom org-export-force-publishing nil
+ "The initial \"Force publishing\" setting for `org-export-dispatch'.
+Non-nil means force all files in the project to be published."
+ :group 'org-export-general
+ :package-version '(Org . "9.7")
+ :type 'boolean
+ :safe #'booleanp)
+
(defcustom org-export-in-background nil
"Non-nil means export and publishing commands will run in background.
Results from an asynchronous export are never displayed
@@ -7095,6 +7120,9 @@ asynchronous export stack."
(setq org-export-dispatch-last-action
(org-export--dispatch-ui
(list org-export-initial-scope
+ (and org-export-body-only 'body)
+ (and org-export-visible-only 'visible)
+ (and org-export-force-publishing 'force)
(and org-export-in-background 'async))
nil
org-export-dispatch-use-expert-ui)))