emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Ex


From: Kaushal Modi
Subject: Re: [O] Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Export.
Date: Mon, 31 Jul 2017 18:33:50 +0000

This patch fixes this:

From e57e9e798dd1a54cae7a633fc67e2f825b967eea Mon Sep 17 00:00:00 2001
From: Kaushal Modi <address@hidden>
Date: Mon, 31 Jul 2017 14:30:40 -0400
Subject: [PATCH] Respect :with-title in ox-html

* lisp/ox-html.el (org-html--build-meta-info): Do not insert <title>
  tag in HTML export if :with-title property is nil.  Example: by
  setting #+OPTIONS: title:nil

Reported by: Ian <address@hidden>
---
 lisp/ox-html.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index aeb38ebc10..08381d0c19 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1812,7 +1812,8 @@ INFO is a plist used as a communication channel."
        viewport-options ", "))
       info)
      "\n")))
-     (format "<title>%s</title>\n" title)
+     (when (plist-get info :with-title)
+       (format "<title>%s</title>\n" title))
      (org-html-close-tag "meta" "name=\"generator\" content=\"Org mode\"" info)
      "\n"
      (and (org-string-nw-p author)
-- 
2.13.0


OK to commit to maint?

On Mon, Jul 31, 2017 at 2:24 PM Kaushal Modi <address@hidden> wrote:

C-c C-e h H (html export to buffer) gives:

=====
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2017-07-31 Mon 14:22 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>This Title Must Not Export</title>
== <snip> ==
--

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]