From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Export. Date: Wed, 02 Aug 2017 08:03:45 +1000 Message-ID: <871sovaqta.fsf@gmail.com> References: <71359491574f233bd37d0804042fb701@wilkesley.net> <87ini7d3aj.fsf@gmx.us> <87efsvcz9m.fsf@gmx.us> <87o9rzaubb.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcfGb-0006Pe-JO for emacs-orgmode@gnu.org; Tue, 01 Aug 2017 18:03:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcfGa-0006AH-Dl for emacs-orgmode@gnu.org; Tue, 01 Aug 2017 18:03:53 -0400 Received: from mail-pg0-x22f.google.com ([2607:f8b0:400e:c05::22f]:33010) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcfGa-00069u-8N for emacs-orgmode@gnu.org; Tue, 01 Aug 2017 18:03:52 -0400 Received: by mail-pg0-x22f.google.com with SMTP id c14so13219715pgn.0 for ; Tue, 01 Aug 2017 15:03:52 -0700 (PDT) In-reply-to: <87o9rzaubb.fsf@gmx.us> 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: Rasmus Cc: emacs-orgmode@gnu.org, kaushal.modi@gmail.com While I totally agree with your sentiments, I don't think we should worry about how/what the browser renders. We should ensure valid HTML and leave how this is interpreted/rendered to the browsers. Alternative is we jump through lots of hoops trying to get something which looks reasonable in all browsers and then find it all gets broken after next browser version is released. I do think the idea of clarifying and perhaps making suggestions in the manual is a good approach - let the author have as much control as possible. Tim Rasmus writes: > 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’ll push it then. > >> 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’ve never seen anything like it. It’s in line > with other exporters, so on that front it’s fine. I do wonder if it’s the > right thing to do. When the title is blank Firefox (and I assume other > browsers) show the path. With &lrm it’s completely blank. > > I am fine with this approach, but I’m not particularly fond about how 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)) "‎") > >> 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 -- Tim Cross