From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#21588: 25.0.50: Single quotes becoming curvy quotes in message function Date: Wed, 30 Sep 2015 23:54:02 -0400 Message-ID: References: <560C64F5.3060007@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013a14eacc125905210301bb X-Trace: ger.gmane.org 1443700305 12568 80.91.229.3 (1 Oct 2015 11:51:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Oct 2015 11:51:45 +0000 (UTC) Cc: 21588-done@debbugs.gnu.org, Stefan Monnier , Alan Mackenzie To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 01 13:51:36 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZhcOa-0007kb-3s for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Oct 2015 13:51:32 +0200 Original-Received: from localhost ([::1]:48742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhcOZ-0002ib-JB for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Oct 2015 07:51:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhUxY-0000v8-8K for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2015 23:55:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhUxT-00059X-0c for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2015 23:55:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhUxS-00059E-UP for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2015 23:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZhUxS-00086p-NA for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2015 23:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Oct 2015 03:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21588 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21588-done@debbugs.gnu.org id=D21588.144367168631146 (code D ref 21588); Thu, 01 Oct 2015 03:55:02 +0000 Original-Received: (at 21588-done) by debbugs.gnu.org; 1 Oct 2015 03:54:46 +0000 Original-Received: from localhost ([127.0.0.1]:49749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZhUxB-00086H-I5 for submit@debbugs.gnu.org; Wed, 30 Sep 2015 23:54:46 -0400 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:32902) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZhUx9-000868-3t for 21588-done@debbugs.gnu.org; Wed, 30 Sep 2015 23:54:44 -0400 Original-Received: by obbbh8 with SMTP id bh8so48192565obb.0 for <21588-done@debbugs.gnu.org>; Wed, 30 Sep 2015 20:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=+58uALmnnUT113sqTGc0M5kG6hxDmWm4jUzXqfkNMAA=; b=BEcW4KMSV2dby5hk8OlZBnnD6bQHWEsZX/HzYP5OAtdsEJlegpGH+peL4XU8jwwuoM GmhiYqN9s68kuG9jk/wtl/1VMRTIbLzK9Ym71dC3ihGkQJtU6GPYK9Djn/FS9copeMfu wdun6zG35F6Ny160xkeUe3jZLImnfFzRlyXPdAZn6CmQFoQGnbrDItAFU6XN0sf3I0hs ndexGgLSijA7BKO0MvVZ3AK8m5Oi/+XVr6E4sanFELW33mDuz6DBTCyIPMHXofzRmCzN x2cVXrdDZcYaUMpe5GcvOUUlZHb/RPIOSdgv/oXDpiCD4W/X7Ff/1kQEpYPAEe2xOYQh F1cg== X-Received: by 10.60.36.202 with SMTP id s10mr4799942oej.0.1443671682320; Wed, 30 Sep 2015 20:54:42 -0700 (PDT) Original-Received: by 10.202.172.205 with HTTP; Wed, 30 Sep 2015 20:54:02 -0700 (PDT) In-Reply-To: <560C64F5.3060007@cs.ucla.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107124 Archived-At: --089e013a14eacc125905210301bb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > This shouldn't happen if your ~/.emacs has (setq text-quoting-style 'grave) or (setq text-quoting-style 'straight), so I assume the issue came up because your text-quoting-style is =E2=80=98curve=E2=80=99 or defaults t= o =E2=80=98curve=E2=80=99. Correct, =E2=80=8B `text-quoting-style` was default (nil) and with that, (message "'Hey'") got displayed as =E2=80=8B =E2=80=8B=E2=80=8B =E2=80=99Hey=E2=80=99. Now I need to set =E2=80=8B `text-quoting-style` to 'grave so that apostrophes stay apostrophes and grave quotes remain grave quotes; no surprising quote conversions. I would vote for this to be the default. > I missed some instances and so some minor display glitches remain, but they can be fixed as they turn up. Thanks, I am having difficulty grepping for an expression that has both single and double quotes. But as I find such cases, I will report them or submit a patch. > To get typewriter-style straight quoting in your own code, independent of text-quoting-style, you can write (message "%s" "'Hey'"). That is good to know, thank you! Summary: - Can the default be changed to 'grave? - For the message forms that I or anyone else writes in future, is it correct if I says that you must always use `Hey' format instead of 'Hey' format? If so, we need to update the documentation that warns the user to use the correct style. =E2=80=8BDiscussion: =E2=80=8B As per "C-h i g (emacs) Quotation Marks" (excerpt below), we have contradicting information. One common way to quote is the typewriter convention, which quotes using straight apostrophes 'like this' or double-quotes "like this". Another common way is the curved quote convention, which uses left and right single or double quotation marks =E2=80=98like this=E2=80=99 or =E2=80=9Cli= ke this=E2=80=9D. Typewriter quotes are simple and portable; curved quotes are less ambiguous and typically look nicer. On one hand, the default text-quoting-style value of nil will render (message 'like this') as =E2=80=8B=E2=80=8B =E2=80=99like this=E2=80=99. On the other hand, it is mentioned that typewriter quotes are simple and portable. I agree =E2=80=8Bthat the typewriter quotes =E2=80=8B(straight quotes or apostrophes as I have been referring in my ema= ils) =E2=80=8B being simple and portable; the user does not need to think of whether to enter ` or '. But then the default value of text-quoting-style as 'grave makes more sense. =E2=80=8B We would not want unwarned people using (message "'Hey'") in defa= ult emacs sessions be faced with =E2=80=8Bthe =E2=80=8B =E2=80=99Hey=E2=80=99 =E2=80=8B with unbalanced quotes.=E2=80=8B If we want to keep the default of text-quoting-style as nil (or 'curve), more logic needs to be added that decides whether left curly quote or right curly quote should be used, which might have some performance impact as we then need to check what the previous character is, what the next character is, etc to decide if the current apostrophe needs to be replaced with a left or a right quote. Here =E2=80=8Bare few common cases that I can think of : =E2=80=8B =E2=80=8BCASE 1: 'Hey' -> =E2=80=8B =E2=80=8B =E2=80=98Hey=E2=80=99 CASE 2: it's awesome -> =E2=80=8B =E2=80=8Bit =E2=80=99 =E2=80=8Bs awesome CASE 3: my sisters' weddings -> =E2=80=8B sisters =E2=80=99 =E2=80=8B weddings =E2=80=8BCASE 4: He said 'It's awesome!' -> He said =E2=80=98It=E2=80=99s awesome!=E2=80=99 (It should have rather b= een -- He said "It's awesome!" (use of double quotes). But I am just putting here all the apostrophe cases I can think of..) Based on above cases, =E2=80=8BThe apostrophe is replaced with left quote if, (AND there's a non-space character after the apostrophe (OR the apostrophe is first character in the line there's white space before the apostrophe)) =E2=80=8B The apostrophe is replaced with right quote if=E2=80=8B,=E2=80=8B=E2=80=8B =E2=80=8B=E2=80=8B there's a non-space character =E2=80=8Bbefore the apostrophe OR, probably.. If =E2=80=8B there's a non-space character =E2=80=8Bbefore the apostrophe, replace it with right quote, else use left quote. =E2=80=8BI am by no means a literature or typography expert. So I am sure t= hat the above 4 cases are not enough to define the rules for left/right quotes. I just wanted to emphasize that we need more intelligence in deciding which quote to use if we want to keep the 'curly or nil as the default value of text-quoting-style.=E2=80=8B -- Kaushal Modi --089e013a14eacc125905210301bb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> This shouldn&= #39;t happen if your ~/.emacs has (setq text-quoting-style 'grave) or (= setq text-quoting-style 'straight), so I assume the issue came up becau= se your text-quoting-style is =E2=80=98curve=E2=80=99 or defaults to =E2=80= =98curve=E2=80=99.

Correct,
= =E2=80=8B=C2=A0
`text-quoting-style` was default (nil) and with that, = (message "'Hey'") got displayed as
=E2=80=8B=C2=A0
=E2=80=8B=E2=80=8B
=E2=80=99Hey=E2=80=99.
Now I need to set<= div class=3D"gmail_default" style=3D"font-family:'trebuchet ms',san= s-serif;font-size:small;display:inline">=E2=80=8B=C2=A0
`text-quoting-= style` to 'grave so that apostrophes stay apostrophes and grave quotes = remain grave quotes; no surprising quote conversions. I would vote for this= to be the default.

> I missed some instances and so some minor d= isplay glitches remain, but they can be fixed as they turn up.

Thank= s, I am having difficulty grepping for an expression that has both single a= nd double quotes. But as I find such cases, I will report them or submit a = patch.

> To get typewriter-style straight quoting in your own cod= e, independent of text-quoting-style, you can write (message "%s"= "'Hey'").

That is good to know, thank you!
Summary:
- Can the default be changed to 'grave?
- For the messa= ge forms that I or anyone else writes in future, is it correct if I says th= at you must always use `Hey' format instead of 'Hey' format? If= so, we need to update the documentation that warns the user to use the cor= rect style.

=E2=80=8BDiscus= sion:
=E2=80=8B

As per "C-h i g (ema= cs) Quotation Marks" (excerpt below), we have contradicting informatio= n.

One common way to quote is the typewriter convention, which quote= s using
straight apostrophes 'like this' or double-quotes "= like this".=C2=A0 Another
common way is the curved quote convention= , which uses left and right
single or double quotation marks =E2=80=98li= ke this=E2=80=99 or =E2=80=9Clike this=E2=80=9D.=C2=A0 Typewriter
quotes= are simple and portable; curved quotes are less ambiguous and
typically= look nicer.

On one hand, the default text-quoting-style value of ni= l will render (message 'like this') as
=E2=80=8B=E2=80=8B
=E2=80=99like this=E2=80=99.=C2=A0
On the other hand, it= is mentioned that typewriter quotes are simple and portable.

I agree
=E2=80=8Bthat the typewriter
=C2=A0quotes =E2=80=8B(straight quotes or apostro= phes as I have been referring in my emails) =E2=80=8B
being simple and= portable; the user does not need to think of whether to enter ` or '. = But then the default value of text-quoting-style as 'grave makes more s= ense.
=E2=80=8B We would not want u= nwarned people using (message "'Hey'") in default emacs s= essions be faced with =E2=80=8Bthe=C2=A0
=E2=80=8B
=E2=80=99Hey=E2=80=99
=E2=80= =8B with unbalanced quotes.=E2=80=8B


If we want to keep the default of text-quoting-style = as nil (or 'curve), more logic needs to be added that decides whether l= eft curly quote or right curly quote should be used, which might have some = performance impact as we then need to check what the previous character is,= what the next character is, etc to decide if the current apostrophe needs = to be replaced with a left or a right quote.

Here
=E2=80=8Bare
=C2=A0few common cases that I can think= of
:
=E2=80=8B
=E2=80=8BCASE 1:=C2=A0'Hey' ->
=E2=80=8B
=E2=80=8B
=E2=80=98Hey=E2=80=99
=
CASE 2: it's awesome -> =E2=80=8B
=
=E2=80=8Bit
=E2= =80=99
=E2=80=8Bs awes= ome
CASE 3: my sisters' weddings -> =E2=80=8B
=
sisters
=E2=80= =99
=E2=80=8B weddings=
<= font face=3D"trebuchet ms, sans-serif">
=E2=80=8BCASE 4: He said 'It's awesome!' -&= gt;=C2=A0
He said=C2=A0=E2=80=98It=E2=80=99s awesome!=E2=80=99 =C2=A0 =C2=A0(It should have rather been --= =C2=A0= He said "It's awesome!" (use of double quotes). But I am just= putting here all the apostrophe cases I can think of..)

Based on above cases,

=E2=80=8BThe apostrophe is replaced with left= quote if,=C2=A0

(AND there's a non-space character after the apostrophe
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (OR the apostroph= e is first character in the line
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0there's white space before= the apostrophe)) =E2=80=8B

The apostrophe is replac= ed with right quote if=E2=80=8B,=E2=80=8B=E2=80=8B

=E2=80=8B=E2=80=8B
there&#= 39;s a non-space character
=E2=80=8Bbefore
=C2=A0the apostrophe
<= /div>
<= br>

OR, probably..

If =E2=80=8B
there's a non-space character=C2=A0
=E2=80=8Bbefore
=C2=A0the apost= rophe, replace it with right quote, else use left quote.
=

=E2=80=8BI am by no means a literature or typography expert. So I= am sure that the above 4 cases are not enough to define the rules for left= /right quotes. I just wanted to emphasize that we need more intelligence in= deciding which quote to use if we want to keep the 'curly or nil as th= e default value of text-quoting-style.=E2=80=8B


--
Kaushal Modi

<= /div>
--089e013a14eacc125905210301bb--