Christian Moe <mail <at> 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