From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Dixit Subject: bug in org-export-smart-quotes Date: Fri, 27 Mar 2015 14:45:31 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c17d7044ca6a0512498b65 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbZGe-0006ob-T2 for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 14:46:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbZGd-0006af-OZ for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 14:46:04 -0400 Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:34853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbZGd-0006YP-GE for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 14:46:03 -0400 Received: by oiag65 with SMTP id g65so83518012oia.2 for ; Fri, 27 Mar 2015 11:46:02 -0700 (PDT) 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: org-mode org --001a11c17d7044ca6a0512498b65 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi everyone, I've noticed that when I use quotation marks in conjunction with an em dash (=E2=80=94), org-export-smart-quotes gets confused and forgets to activate = smart quotes for the closing quotation mark. If my org-mode file contains a sentence like this... A [[ http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract][= new study]] published in Psychological and Personality Science has found that helping other people---what scientists call being "prosocial"---increases your odds of finding a long-term relationship. ...then it exports to HTML like this: A new study published in Social Psychological and Personality Science has found that helping other people=E2=80=94what scientists call being =E2=80=9Cprosocial"=E2=80= =94increases your odds of finding a long-term relationship. Note the non-smart closing quotation mark. Does anyone know a fix for this? Thanks! Jay --- Jay Dixit jaydixit.com (646) 355-8001 Jay Dixit --001a11c17d7044ca6a0512498b65 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi everyone,

I've noticed that wh= en I use quotation marks in conjunction with an em dash (=E2=80=94),=C2=A0<= /span>org-export-smart-quotes ge= ts confused and forgets to activate smart quotes for the closing quotation = mark.

=
If my org= -mode file contains a sentence like this...

A [[http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.a= bstract][new study]] published in=C2=A0= Psychological and Personality Science has found that helping other people--= -what scientists call being "prosocial"---increases your odds of = finding a long-term relationship.

...then it exports to HTML like this:<= /div>

=
A=C2=A0new = study=C2=A0= published in Social Psychological and Personality Science has found that he= lping other people=E2=80=94what scientists call being =E2=80=9Cprosocial&qu= ot;=E2=80=94increases your odds of finding a long-term relationship.=

<= /div>
Note the n= on-smart closing quotation mark. Does anyone know a fix for this?=C2=A0

Thanks!

Jay

---
Jay Dixit=C2=A0
(646) 355-8001
Jay Dixit=

--001a11c17d7044ca6a0512498b65-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: bug in org-export-smart-quotes Date: Fri, 27 Mar 2015 15:20:28 -0400 Message-ID: <87h9t6458j.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbZoW-0004hW-8b for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 15:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbZoR-0003n9-AP for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 15:21:04 -0400 Received: from plane.gmane.org ([80.91.229.3]:32910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbZoR-0003n4-3q for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 15:20:59 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YbZoL-0003Kl-NT for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 20:20:53 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Mar 2015 20:20:53 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Mar 2015 20:20:53 +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 Jay Dixit writes: > Hi everyone, > > I've noticed that when I use quotation marks in conjunction with an em dash (—), org-export-smart-quotes gets confused and forgets > to activate smart quotes for the closing quotation mark. > > If my org-mode file contains a sentence like this... > > A [[http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract][new study]] published in Psychological and > Personality Science has found that helping other people---what scientists call being "prosocial"---increases your odds of finding a > long-term relationship. > > ...then it exports to HTML like this: > > A new study published in Social Psychological and Personality Science has found that helping other people—what scientists call > being “prosocial"—increases your odds of finding a long-term relationship. > > Note the non-smart closing quotation mark. Does anyone know a fix for this?  > The regexps are probably looking for spaces - try ... people --- what scientists call being "prosocial" --- increases Nick From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Dixit Subject: Re: bug in org-export-smart-quotes Date: Fri, 27 Mar 2015 16:23:59 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1135293c6a6d6c05124aebb2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ybanw-0005BJ-7v for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 16:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ybanu-0002q6-Q0 for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 16:24:32 -0400 Received: from mail-ob0-x236.google.com ([2607:f8b0:4003:c01::236]:34467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ybanu-0002py-Jg for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 16:24:30 -0400 Received: by obbgh1 with SMTP id gh1so17790129obb.1 for ; Fri, 27 Mar 2015 13:24:30 -0700 (PDT) In-Reply-To: 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: org-mode org --001a1135293c6a6d6c05124aebb2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =E2=80=8BHi Nick, Thanks for the suggestion. Putting extra spaces in the original solves the smart quotes issue, but creates unwanted spaces on either side of the em dash: A new study published in Social Psychological and Personality Science has found that helping other people =E2=80=94 what scientists call being =E2=80=9Cprosocial=E2=80= =9D =E2=80=94 increases your odds of finding a long-term relationship. Thanks, Jay --- Jay Dixit jaydixit.com (646) 355-8001 Jay Dixit On Fri, Mar 27, 2015 at 2:45 PM, Jay Dixit wrote: > Hi everyone, > > I've noticed that when I use quotation marks in conjunction with an em > dash (=E2=80=94), org-export-smart-quotes gets confused and forgets to ac= tivate > smart quotes for the closing quotation mark. > > If my org-mode file contains a sentence like this... > > A [[ > http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract= ][new > study]] published in Psychological and Personality Science has found that > helping other people---what scientists call being "prosocial"---increases > your odds of finding a long-term relationship. > > ...then it exports to HTML like this: > > A new study > published > in Social Psychological and Personality Science has found that helping > other people=E2=80=94what scientists call being =E2=80=9Cprosocial"=E2=80= =94increases your odds of > finding a long-term relationship. > > Note the non-smart closing quotation mark. Does anyone know a fix for > this? > > Thanks! > > Jay > > --- > Jay Dixit > jaydixit.com > (646) 355-8001 > Jay Dixit > > --001a1135293c6a6d6c05124aebb2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
=E2=80=8BHi Nick,

Thanks = for the suggestion. Putting extra spaces in the original solves the smart q= uotes issue, but creates unwanted spaces on either side of the em dash:=C2= =A0

A=C2=A0new study=C2=A0published in Social Psycholog= ical and Personality Science has found that helping other people =E2=80=94 = what scientists call being =E2=80=9Cprosocial=E2=80=9D =E2=80=94 increases = your odds of finding a long-term relationship.

=
Thanks,
Jay




On Fri, Mar 27, 2015 at 2:45 PM, Jay Dixit <= span dir=3D"ltr"><dixit@aya.yale.edu> wrote:
Hi everyone,

I've noticed that when I= use quotation marks in conjunction with an em dash (=E2=80=94),=C2=A0org-export-smart-quotes gets c= onfused and forgets to activate smart quotes for the closing quotation mark= .

If my org-mod= e file contains a sentence like this...

A [[http://spp.sagepub.com/content/early/2015/01/23/194855= 0614568867.abstract][new study]] published in=C2=A0Psychological and Personality Science has found that helping ot= her people---what scientists call being "prosocial"---increases y= our odds of finding a long-term relationship.

...then it exports to HTM= L like this:

A=C2=A0new study=C2=A0published in Social Psychological and Person= ality Science has found that helping other people=E2=80=94what scientists c= all being =E2=80=9Cprosocial"=E2=80=94increases your odds of finding a= long-term relationship.

Note the non-smart closing quotation mark. Does anyone= know a fix for this?=C2=A0

Thanks!

Jay

---
<= div>Jay Dixit=C2=A0
=
Jay Dixit


--001a1135293c6a6d6c05124aebb2-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: bug in org-export-smart-quotes Date: Fri, 27 Mar 2015 19:35:15 -0400 Message-ID: <871tka3tfw.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ybdmu-0005HI-6A for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 19:35:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ybdmp-00060u-5Q for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 19:35:40 -0400 Received: from plane.gmane.org ([80.91.229.3]:46120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ybdmo-00060m-VQ for emacs-orgmode@gnu.org; Fri, 27 Mar 2015 19:35:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ybdmm-00058L-Nh for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 00:35:32 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Mar 2015 00:35:32 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Mar 2015 00:35:32 +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 Jay Dixit writes: > Thanks for the suggestion. Putting extra spaces in the original solves > the smart quotes issue, but creates unwanted spaces on either side of > the em dash: > I understand but I can't really help. If I'm right that the regexps are looking for a space[fn:1] (and that's a big if), then the only way to fix it is to modify one or more of them (see org-export-smart-quotes-regexps, which btw is a defconst, so not really meant to be modified), but I'm not up to that task. Let's hope that I'm wrong and somebody comes up with a simpler solution. Nick Footnotes: [fn:1] or, rather, for something that the dash does not satisfy From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: bug in org-export-smart-quotes Date: Sat, 28 Mar 2015 16:03:10 +0100 Message-ID: <87r3s9i2q9.fsf@nicolasgoaziou.fr> References: 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]:56996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbsFN-0002u8-S4 for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 11:02:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbsFI-00015f-Tq for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 11:02:01 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:39310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbsFI-00015b-Ol for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 11:01:56 -0400 In-Reply-To: (Jay Dixit's message of "Fri, 27 Mar 2015 16:23:59 -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: Jay Dixit Cc: org-mode org Hello, Jay Dixit writes: > Thanks for the suggestion. Putting extra spaces in the original solves the > smart quotes issue, but creates unwanted spaces on either side of the em > dash: > > A new study > > published > in Social Psychological and Personality Science has found that helping > other people =E2=80=94 what scientists call being =E2=80=9Cprosocial=E2= =80=9D =E2=80=94 increases your odds > of finding a long-term relationship. I updated the algorithm for "smart" quotes. It's not perfect, but should at least DTRT in your example. Regards, --=20 Nicolas Goaziou