* bug in org-export-smart-quotes
@ 2015-03-27 18:45 Jay Dixit
2015-03-27 19:20 ` Nick Dokos
2015-03-27 20:23 ` Jay Dixit
0 siblings, 2 replies; 5+ messages in thread
From: Jay Dixit @ 2015-03-27 18:45 UTC (permalink / raw)
To: org-mode org
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
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
<http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract>
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?
Thanks!
Jay
---
Jay Dixit
jaydixit.com
(646) 355-8001
Jay Dixit
[-- Attachment #2: Type: text/html, Size: 3608 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in org-export-smart-quotes
2015-03-27 18:45 bug in org-export-smart-quotes Jay Dixit
@ 2015-03-27 19:20 ` Nick Dokos
2015-03-27 20:23 ` Jay Dixit
1 sibling, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2015-03-27 19:20 UTC (permalink / raw)
To: emacs-orgmode
Jay Dixit <dixit@aya.yale.edu> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in org-export-smart-quotes
2015-03-27 18:45 bug in org-export-smart-quotes Jay Dixit
2015-03-27 19:20 ` Nick Dokos
@ 2015-03-27 20:23 ` Jay Dixit
2015-03-27 23:35 ` Nick Dokos
2015-03-28 15:03 ` Nicolas Goaziou
1 sibling, 2 replies; 5+ messages in thread
From: Jay Dixit @ 2015-03-27 20:23 UTC (permalink / raw)
To: org-mode org
[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]
Hi 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
<http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract>
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.
Thanks,
Jay
---
Jay Dixit
jaydixit.com
(646) 355-8001
Jay Dixit
On Fri, Mar 27, 2015 at 2:45 PM, Jay Dixit <dixit@aya.yale.edu> wrote:
> 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
> <http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract> 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?
>
> Thanks!
>
> Jay
>
> ---
> Jay Dixit
> jaydixit.com
> (646) 355-8001
> Jay Dixit
>
>
[-- Attachment #2: Type: text/html, Size: 6673 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in org-export-smart-quotes
2015-03-27 20:23 ` Jay Dixit
@ 2015-03-27 23:35 ` Nick Dokos
2015-03-28 15:03 ` Nicolas Goaziou
1 sibling, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2015-03-27 23:35 UTC (permalink / raw)
To: emacs-orgmode
Jay Dixit <dixit@aya.yale.edu> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bug in org-export-smart-quotes
2015-03-27 20:23 ` Jay Dixit
2015-03-27 23:35 ` Nick Dokos
@ 2015-03-28 15:03 ` Nicolas Goaziou
1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2015-03-28 15:03 UTC (permalink / raw)
To: Jay Dixit; +Cc: org-mode org
Hello,
Jay Dixit <dixit@aya.yale.edu> 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
> <http://spp.sagepub.com/content/early/2015/01/23/1948550614568867.abstract>
> 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.
I updated the algorithm for "smart" quotes. It's not perfect, but should
at least DTRT in your example.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-28 15:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-27 18:45 bug in org-export-smart-quotes Jay Dixit
2015-03-27 19:20 ` Nick Dokos
2015-03-27 20:23 ` Jay Dixit
2015-03-27 23:35 ` Nick Dokos
2015-03-28 15:03 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).