emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org, kaushal.modi@gmail.com
Subject: Re: Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Export.
Date: Wed, 02 Aug 2017 08:03:45 +1000	[thread overview]
Message-ID: <871sovaqta.fsf@gmail.com> (raw)
In-Reply-To: <87o9rzaubb.fsf@gmx.us>


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 <kaushal.modi@gmail.com> 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
>>       "\"" "&quot;" (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


-- 
Tim Cross

  parent reply	other threads:[~2017-08-01 22:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 17:35 Bug? Setting #+OPTIONS: title:nil Seems to Be Ignored in HTML Export lists
2017-07-31 18:24 ` Kaushal Modi
2017-07-31 18:33   ` Kaushal Modi
2017-08-01  8:15     ` Nicolas Goaziou
2017-08-01  9:51     ` Rasmus
2017-08-01 10:41       ` Kaushal Modi
2017-08-01 11:18         ` Rasmus
2017-08-01 19:41           ` Kaushal Modi
2017-08-01 20:48             ` Rasmus
2017-08-01 20:59               ` Kaushal Modi
2017-08-09  9:56                 ` Rasmus
2017-08-09 10:38                   ` Rasmus
2017-08-14 20:15                   ` Kaushal Modi
2017-08-01 22:03               ` Tim Cross [this message]
2017-08-01 21:58       ` Tim Cross

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=871sovaqta.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=rasmus@gmx.us \
    /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).