From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Export. Date: Tue, 01 Aug 2017 22:48:08 +0200 Message-ID: <87o9rzaubb.fsf@gmx.us> References: <71359491574f233bd37d0804042fb701@wilkesley.net> <87ini7d3aj.fsf@gmx.us> <87efsvcz9m.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dce5R-0004Un-D0 for emacs-orgmode@gnu.org; Tue, 01 Aug 2017 16:48:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dce5O-0007f8-9M for emacs-orgmode@gnu.org; Tue, 01 Aug 2017 16:48:17 -0400 Received: from mout.gmx.net ([212.227.17.21]:62253) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dce5N-0007d1-Uh for emacs-orgmode@gnu.org; Tue, 01 Aug 2017 16:48:14 -0400 In-Reply-To: (Kaushal Modi's message of "Tue, 01 Aug 2017 19:41:15 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: kaushal.modi@gmail.com Cc: emacs-orgmode@gnu.org Hi Kaushal, Kaushal Modi writes: > Your patch to fix printing of h1 title when :with-title is nil looks good. > > More comments below. OK I=E2=80=99ll push it then.=20 > Here is my attempt to fix it (below is a whitespace ignored diff): Thanks for looking into this. That hack really leaves the title on the tabs completely blank! I=E2=80=99ve never seen anything like it. It=E2=80= =99s in line with other exporters, so on that front it=E2=80=99s fine. I do wonder if i= t=E2=80=99s the right thing to do. When the title is blank Firefox (and I assume other browsers) show the path. With &lrm it=E2=80=99s completely blank. I am fine with this approach, but I=E2=80=99m not particularly fond about h= ow it looks in Firefox and Chromium... > diff --git a/lisp/ox-html.el b/lisp/ox-html.el > index 43e4ef8d48..25a41e1dc4 100644 > --- a/lisp/ox-html.el > +++ b/lisp/ox-html.el > @@ -1812,11 +1812,14 @@ INFO is a plist used as a communication channel." > (defun org-html--build-meta-info (info) > "Return meta tags for exported document. > INFO is a plist used as a communication channel." > - (let ((protect-string > + (let* ((protect-string > (lambda (str) > (replace-regexp-in-string > "\"" """ (org-html-encode-plain-text str)))) > (title (org-export-data (plist-get info :title) info)) Perhaps this would be simpler? (or (org-string-nw-p (org-export-data (plist-get info :title) info)) "&= lrm;") > Credit: > https://stackoverflow.com/questions/23556255/how-can-i-have-a-blank-title= -page#comment67991763_23558385 > > With above, a "blank" title will also result in a valid HTML, correct? It is indeed valid according to the validator. Thanks, Rasmus --=20 Summon the Mothership!