From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Sitz Subject: Re: Directional quotes in html Date: Tue, 6 Dec 2011 20:37:52 +0000 (UTC) Message-ID: References: <4EDE684C.7000801@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY1mF-0002MV-HP for emacs-orgmode@gnu.org; Tue, 06 Dec 2011 15:38:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RY1mE-0005yE-6w for emacs-orgmode@gnu.org; Tue, 06 Dec 2011 15:38:11 -0500 Received: from lo.gmane.org ([80.91.229.12]:45240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RY1mD-0005yA-Uu for emacs-orgmode@gnu.org; Tue, 06 Dec 2011 15:38:10 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RY1mB-0000vl-BA for emacs-orgmode@gnu.org; Tue, 06 Dec 2011 21:38:07 +0100 Received: from c-24-22-131-140.hsd1.wa.comcast.net ([24.22.131.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Dec 2011 21:38:07 +0100 Received: from hesitz by c-24-22-131-140.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Dec 2011 21:38:07 +0100 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: emacs-orgmode@gnu.org Christian Moe christianmoe.com> writes: > > Hi, Herb, > > I keep this in my .emacs: > > (setq org-export-html-special-string-regexps > (cons > '(" \"\\([^\"]+\\)\"" . " “\\1”") > org-export-html-special-string-regexps)) > > There may be a better way to do it altogether, and I'm sure the very > simple regexp could be improved on (in fact, I'm posting this in the > hope someone will improve on it), but it mostly works. > > Yours, > Christian > Christian -- Thanks a lot. If there's nothing built in to Org to do it then that looks like a good method. Question: Does this work only if quotes both appear on the same line of Org-mode text? Or is the regex applied to paragraph as a whole after it's been assembled as part of export? It looks like it does only double-quotes; makes me realize single quotes are a bit harder because they're often used alone as apostrophes. It seems like even single-quote pairs could work well if you put beginning-of-word (\<) and end-of-word (\<) regex anchors in there. Beginning-of-word and end-of-word anchors may be appropriate even for the double-quote search, so maybe something like change below could be improvement. Take it for what's it's worth, since I don't do emacs regexes. > '("\<\"\\([^\"]+\\)\"\>" . " “\\1”") -- Herb