From: Matt <matt@excalamus.com>
To: "emacs-orgmode" <emacs-orgmode@gnu.org>
Subject: Export Documentation Confusions
Date: Wed, 28 Jun 2023 21:45:08 +0200 [thread overview]
Message-ID: <1890389c8ff.c8d13885752260.8791711332615822478@excalamus.com> (raw)
In-Reply-To:
[-- Attachment #1: Type: text/plain, Size: 2702 bytes --]
In the Emacs Berlin meeting today, we noticed several items that might be improved in the manual.
- Section 13.18. 1: Bare HTML may be better placed under Section 13.9 HTML Export. The information in this section appears unrelated to Exporting in non-Org buffers. In fact, the settings given for a minimal HTML export do not apply when converting a region. For example, when converting a region containing an Org table to HTML, a preamble is not inserted even when the variable `org-html-preamble` is t.
https://orgmode.org/manual/Bare-HTML.html
Proposed solution: Move Section 13.18.1 nearer the sections on HTML export.
- Section 13.18: Export in Foreign Buffers
The section uses the term "foreign buffer" without providing a definition. It appears to mean a buffer without "org-mode" enabled. The section describes functions which allow users to write Org mode syntax in non-Org buffers and use various functions to convert the Org syntax to other syntaxes, like HTML, Markdown, etc.
https://orgmode.org/manual/Export-in-Foreign-Buffers.html
Proposed solution: Change wording from "foreign buffers" to "Convert Region" and "non-Org" buffer. The functionality is really about conversion rather than anything to do with non-Org buffers. If fact, Org respects users' freedom to run the program as they wish–it does not prevent them from converting Org formatted text within an Org buffer to a non-Org format, no matter how absurd it may appear :)
- Section 13.18: Export in Foreign Buffers
There was confusion caused by the function names. Specifically, the "namespace" (such as "org-ascii-" or "org-texinfo-") is confusing to users who are not familiar with Org function naming conventions. For example, one participant thought `org-ascii-convert-region-to-utf8` might convert non-utf8 ascii to utf8 and was confused why `org-texinfo-convert-region-to-texinfo` would convert texinfo to texinfo. Of course, this is not a correct understanding of the function behavior.
https://orgmode.org/manual/Export-in-Foreign-Buffers.html
Proposed solution: Clarify the overall purpose of the functions. Another solution could be to make an aside and clarify what is meant by "Org export back end". For example, change
"The export back-ends in Org often include..."
to
"The export back-ends in Org (for example, Org ASCII or Org HTML) often include..."
However, my hope is that the changes I made with regard to "foreign buffers" also clarifies the purpose and use of functions listed in this section.
These changes are given in the attached patches. If there are no suggested improvements, I could merge them in. Please let me know your thoughts.
[-- Attachment #2: move-bare-html-section-to-html-export-section.patch --]
[-- Type: application/octet-stream, Size: 2205 bytes --]
diff --git a/doc/org-manual.org b/doc/org-manual.org
index 76131f110..c47971914 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13213,6 +13213,32 @@ a postamble from looking up author's name, email address, creator's
name, and date.
+*** Exporting to minimal HTML
+:PROPERTIES:
+:DESCRIPTION: Exporting HTML without CSS, Javascript, etc.
+:ALT_TITLE: Bare HTML
+:END:
+
+If you want to output a minimal HTML file, with no CSS, no Javascript,
+no preamble or postamble, here are the variable you would need to set:
+
+#+vindex: org-html-head
+#+vindex: org-html-head-extra
+#+vindex: org-html-head-include-default-style
+#+vindex: org-html-head-include-scripts
+#+vindex: org-html-preamble
+#+vindex: org-html-postamble
+#+vindex: org-html-use-infojs
+#+begin_src emacs-lisp
+(setq org-html-head ""
+ org-html-head-extra ""
+ org-html-head-include-default-style nil
+ org-html-head-include-scripts nil
+ org-html-preamble nil
+ org-html-postamble nil
+ org-html-use-infojs nil)
+#+end_src
+
*** Quoting HTML tags
:PROPERTIES:
:DESCRIPTION: Using direct HTML in Org files.
@@ -16410,32 +16436,6 @@ tables and lists in foreign buffers. For example, in an HTML buffer,
write a list in Org syntax, select it, and convert it to HTML with
{{{kbd(M-x org-html-convert-region-to-html)}}}.
-*** Exporting to minimal HTML
-:PROPERTIES:
-:DESCRIPTION: Exporting HTML without CSS, Javascript, etc.
-:ALT_TITLE: Bare HTML
-:END:
-
-If you want to output a minimal HTML file, with no CSS, no Javascript,
-no preamble or postamble, here are the variable you would need to set:
-
-#+vindex: org-html-head
-#+vindex: org-html-head-extra
-#+vindex: org-html-head-include-default-style
-#+vindex: org-html-head-include-scripts
-#+vindex: org-html-preamble
-#+vindex: org-html-postamble
-#+vindex: org-html-use-infojs
-#+begin_src emacs-lisp
-(setq org-html-head ""
- org-html-head-extra ""
- org-html-head-include-default-style nil
- org-html-head-include-scripts nil
- org-html-preamble nil
- org-html-postamble nil
- org-html-use-infojs nil)
-#+end_src
-
* Publishing
:PROPERTIES:
:DESCRIPTION: Create a web site of linked Org files.
[-- Attachment #3: change-foreign-to-non-org.patch --]
[-- Type: application/octet-stream, Size: 1431 bytes --]
diff --git a/doc/org-manual.org b/doc/org-manual.org
index 76131f110..b0dbe4ec6 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -16365,15 +16365,14 @@ Further steps to consider would be an interactive function,
self-installing an item in the export dispatcher menu, and other
user-friendly improvements.
-** Export in Foreign Buffers
+** Convert Region
:PROPERTIES:
:DESCRIPTION: Author tables and lists in Org syntax.
:END:
-The export backends in Org often include commands to convert selected
-regions. A convenient feature of this in-place conversion is that the
-exported output replaces the original source. Here are such
-functions:
+Some export backends include commands to convert a region of Org
+formatted text to another format, such as HTML or LaTeX. The
+conversion replaces the original source. Here are such functions:
- ~org-ascii-convert-region-to-ascii~ ::
@@ -16405,8 +16404,8 @@ functions:
#+findex: org-md-convert-region-to-md
Convert the selected region into Markdown.
-In-place conversions are particularly handy for quick conversion of
-tables and lists in foreign buffers. For example, in an HTML buffer,
+The in-place conversion is particularly handy for quick conversion of
+tables and lists in non-Org buffers. For example, in an HTML buffer,
write a list in Org syntax, select it, and convert it to HTML with
{{{kbd(M-x org-html-convert-region-to-html)}}}.
next reply other threads:[~2023-06-28 19:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 19:45 Matt [this message]
2023-06-29 10:24 ` Export Documentation Confusions Ihor Radchenko
2023-06-29 17:42 ` Matt
2023-06-29 18:04 ` Ihor Radchenko
2023-06-29 19:26 ` Matt
2023-06-29 19:30 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1890389c8ff.c8d13885752260.8791711332615822478@excalamus.com \
--to=matt@excalamus.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).