From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: [patch][ox-html] Stylistic changes Date: Tue, 18 Mar 2014 09:49:32 -0400 Message-ID: <0d5c03b1f1e36a4250cbd11d467d3efe@mail.rickster.com> References: <874n2z3ruf.fsf@gmx.us> <87d2hmsbuc.fsf@gmail.com> <87eh21k1qx.fsf@bzg.ath.cx> <20140317170102.GA75979@eyeBook> <87k3bs31u8.fsf@gmx.us> <20140318003542.GB92601@eyeBook> <874n2w2n62.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPuOi-00049d-SE for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 09:49:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPuOa-0005Sc-8J for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 09:49:40 -0400 Received: from mail.rickster.com ([204.62.15.78]:58737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPuOa-0005SU-5E for emacs-orgmode@gnu.org; Tue, 18 Mar 2014 09:49:32 -0400 In-Reply-To: <874n2w2n62.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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode On 2014-03-17 23:36, Rasmus wrote: > Rick Frankel writes: > > On Mon, Mar 17, 2014 at 11:19:27PM +0100, Rasmus wrote: > Hi Rick, > > > Rick Frankel writes: > > > On Mon, Mar 17, 2014 at 03:17:10AM +0100, Bastien wrote: > >> Hello, > >> > >> Nicolas Goaziou writes: > >> > >> > So if the change is only stylistic, I see no reason to break > >> > compatibility with "ox-freemind.el". > > > >> I would favor a solution where the HTML backend uses what's > >> readable (— and friends) and where the Freemind backend > >> deals with this. > >> > >> Maybe `org-html-special-string-regexps' could be a variable > >> and Freemind could temporarily set it up to what it needs? > > > > The use of numeric vs. named entities is not just stylistic. > > XHMTL[45] only support the 5 basic named entities interally: > > > > - & - the ampersand & > > - " - the double quote " > > - ' single quote ' > > - < - less-than < > > - > - greater-than > > > > > So including any others will generate non-conforming output. > > Since the change is cosmetic, I don't see the purpose in adding a lot > > of conditional code to the exporter to output different entities for > > html[45] vs xhtml[45]. > > AFAIK, we have a lot more entities in org-entities with &PRETTY-NAME;. > When I've entities I've used a pretty name over a numeric value when I > found one. What's you'r opinion on that? Should we go for readable > or aim towards replacing them with these numeric values? > > We should use only those named entities (above) which are valid in > xhtml(5). So, yes, we should change to using numeric entites for any > other than the above. > > Since Emacs knows both the codepoints and the hex for utf8 entities it > may be fairly simple to change the HTML representations, though I > don't like it. . . When you refer above to "utf-8 entities", do you mean the named html entities (e.g., <) or the actual utf-8 encoded characters? I believe the named entities are encoding independent, while including encoded characters in html output is fine -- although making sure the page is served with the correct character encoding is another issue entirely. As to using a more extensive set of named entities, as i said above, the problem is that the xhtml flavors don't support them, and I don't see any advantage in making the exporter handle character encoding differently based on ouput doctype. As Nicolas would point out, you can always use a filter to map all the entities in the output. rick