From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: "Smart" quotes Date: Fri, 25 May 2012 19:14:13 +0200 Message-ID: <87zk8w6v4q.fsf@gmail.com> References: <4FBB08CA.5060705@kli.org> <87d35u8rvk.fsf@gmail.com> <4FBDA56E.5030901@kli.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXy8a-0000r0-Lm for emacs-orgmode@gnu.org; Fri, 25 May 2012 13:17:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXy8X-0003ts-Jd for emacs-orgmode@gnu.org; Fri, 25 May 2012 13:17:16 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:41265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXy8X-0003ta-AU for emacs-orgmode@gnu.org; Fri, 25 May 2012 13:17:13 -0400 Received: by wefh52 with SMTP id h52so939162wef.0 for ; Fri, 25 May 2012 10:17:11 -0700 (PDT) In-Reply-To: <4FBDA56E.5030901@kli.org> (Mark E. Shoulson's message of "Wed, 23 May 2012 23:05:18 -0400") 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: "Mark E. Shoulson" Cc: org-mode mailing list Hello, "Mark E. Shoulson" writes: > Hm. I like the idea, but it raises some questions for me. It would > be particularly good if this could share code/custom variables with > the pieces of the (new) exporter that make smart quotes on export. > That way we could be sure that what it looks like onscreen would also > be what it looked like when exported. I could be interesting, but keep in mind that no matter how "smart" your quotes are, they will fail in some situations. So, it will have to be optional for export, independently on their in-buffer status. The OPTIONS keyword may be used, with q:t and q:nil items. > Looking at contrib/lisp/org-e-latex.el at an upcoming exporter for > such things, I see a variable org-e-latex-quotes, which has nice > language-aware parts... but misses an important point. Each language > gets to define one regexp for opening quotes, one for closing quotes, > and one for single quotes. But don't we want to talk about (at least) > two levels of quotes, see your own reference[fn:1]? Probably. But that's going to be somewhat harder. > Single quotes would be for inner, second-level quotes (if we're using > double straight quotes according to (American) English usage, I would > guess we'd be using single straight quotes the same way). That works > okay for English, where a single apostrophe not part of a grouping > construct is going to be interpreted as a "close" single quote and > look right for an apostrophe. The regexp may be able to tell level 1 from level 2 quotes. > It might not work so good in French where apostrophes are also used, There are no spaces around apostrophes, so they shouldn't be caught by the regexp. > but also single guillemets for inner-level quotes. What are single guillemets? I don't think there is such thing in French. > Should/can we consider extending this for the new exporters? I think it would be a good addition to the export mechanism, if you want to give it a try. > (I'm looking forward to HTML and ODT exporters that can do smart > quotes; the straight quotes are really the main jarring things about > using Org as a lightweight markup and exporting into something > fancier) A function, provided in org-export, could help changing dumb quotes into smart quotes in plain text. Then, it would be easier for back-ends to provide the feature, if they wanted to. Regards, -- Nicolas Goaziou