From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Antczak Subject: Re: [Patch] Few small fixes to html header Date: Fri, 28 Mar 2014 16:16:39 +0100 Message-ID: <87txaijqug.fsf@neutrico-themes.pl> References: <87vbuz1kky.fsf@neutrico-themes.pl> <20701b6c1cc0f8eda606e30a052e8e68@mail.rickster.com> 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]:55581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTYXb-0006Pg-CJ for emacs-orgmode@gnu.org; Fri, 28 Mar 2014 11:18:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTYXU-0005tM-4E for emacs-orgmode@gnu.org; Fri, 28 Mar 2014 11:17:55 -0400 Received: from 10.mo1.mail-out.ovh.net ([178.32.96.102]:45213 helo=mo1.mail-out.ovh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTYXT-0005t6-RZ for emacs-orgmode@gnu.org; Fri, 28 Mar 2014 11:17:48 -0400 Received: from mail191.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo1.mail-out.ovh.net (Postfix) with SMTP id 36BF21000F6B for ; Fri, 28 Mar 2014 16:19:49 +0100 (CET) In-reply-to: <20701b6c1cc0f8eda606e30a052e8e68@mail.rickster.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rick Frankel Cc: emacs-orgmode@gnu.org Rick Frankel writes: > On 2014-03-27 15:57, Marcin Antczak wrote: >> I've attached patch below, but I'm affraid that there is something >> wrong >> with indentation. >> I'm not sure if there is problem with my settings or just entire >> ox-html.el is indented badly. > > Unfortunately, ox-html is indented with a combination of tabs and > spaces, you can turn on whitespace-mode to see. I'm not sure why your > saving the file has touched areas you didn't edit. Did you do a > re-indent or have a whitespace-cleanup or convert-tabs-to-spaces hook > turned on? No. I didn't. Why ox-html is indented in a way that doesn't follow guidelines described on Emacs Lisp Coding Conventions? Could we fix it? >> >> My patch fixes HTML meta data produced on export by ox-html.el >> >> 1. Meta charset definition should be set before title as document >> title can contain >> some unicode symbols etc. > > I believe this is the gist of your patch (bug fix?) -- putting the > content-type declaration before the title (it's hard to tell due to > all the changes in your patch)? If so, i don't see the need. Following > is a sample org file w/ a unicode character in the title. It renders > correctly on both internet explorer 9 and chrome 31.0.1650.63, the > only browsers i have available right now. I believe that the meta > content is parsed before the rendering, so the position within the > header is irrelevant. > > #+BEGIN_SRC org > ,#+TITLE: =E2=98=91 \gamma > ,#+OPTIONS: toc:nil > > ,* Test utf-8 title > Put =E2=98=91 \gamma (checkbox and gamma) unicode characters in the ti= tle. > #+END_SRC But it's still bug. 1. Most modern browsers fallback to UTF-8 currently. 2. Charset is often set by server content type. So, this is why you can see your example rendered correctly. But there could be a case where it will not render properly. >From logical point of view - charset should be first. And it's in most html frameworks such as HTML5 Boilerplate, Twitter Bootstrap etc. > >> 2. Added viewport declaration as described here: >> >> https://github.com/h5bp/html5-boilerplate/blob/v4.3.0/doc/html.md >> >> here: >> >> https://developer.apple.com/library/safari/documentation/AppleApplicat= ions/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html > > I don't believe it's appropriate to have as a default in ox-html as > the current exporter makes no attempt at "responsive design". If you > would like your exported documents to include it, you can use the > HTML_HEAD_EXTRA property on a per-file basis, or customize the > variable `org-html-head-extra'. Ok. I'm working on some exporter that outputs HTML with Twitter Bootstrap. I'll implement this 'viewport' there. > >> 3. Fixed unnecessary "\n" at the end of Description meta. >> 4. Removed unnecessary spaces in meta tags. > > Are these bugs or simply stylistic cleanup? 3. This is a bug for me. Meta shouldn't render closing > in new line. 4. Stylistics. Marcin