all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 21588-done@debbugs.gnu.org,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Alan Mackenzie <acm@muc.de>
Subject: bug#21588: 25.0.50: Single quotes becoming curvy quotes in message function
Date: Fri, 2 Oct 2015 12:50:00 -0400	[thread overview]
Message-ID: <CAFyQvY2cRrgW7SF3Sht8eMTUPNwdJ-GguPNibHayvCa3zpAsYA@mail.gmail.com> (raw)
In-Reply-To: <560E295C.6000402@cs.ucla.edu>

[-- Attachment #1: Type: text/plain, Size: 4203 bytes --]

tl;dr: Thanks Paul, this is awesome!

---

> The GNU coding standards were changed a while ago to recommend against
grave quoting in diagnostics and many GNU applications have already changed
(e.g., coreutils, GCC).  Although Emacs has been one of the holdouts, now
is as good a time as any to make the move.

I was unaware of that. Thanks for letting me know. For future reference for
anyone else, you can learn more about this "C-h i g (standards) Quote
Characters".

> Thanks, done in the attached patch, which I just installed in the master
branch.

Thanks! For future reference for anyone else, these clarifications can be
viewed in the following info nodes:

- (elisp) Displaying Messages
- (elisp) Signaling Errors

> That discussion was intended to be about text files, so I added a phrase
to that effect in the attached patch.  This should help resolve the seeming
contradiction.

- (emacs) Quotation Marks

> Any heuristics will go awry sometimes so we need some way to override the
heuristics; and once we have such an override, there is a real benefit to
keeping the heuristics simple.

I agree to that argument.

Thanks for fixing the quotes in string formats in few other .el files.

In summary:
- I agree with you now that the current default value of text-quoting-style
is good.
- I will stick to that default and find places where the quoting needs to
be updated from 'Hey' to `Hey'.
- I will submit patches/pull requests wherever I find such instances within
emacs or in external packages.

Thank you for all your time and effort in making this clear and fixing up
the documentation and .el files.



--
Kaushal Modi

On Fri, Oct 2, 2015 at 2:51 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:

> On 09/30/2015 08:54 PM, Kaushal Modi wrote:
> > - Can the default be changed to 'grave?
>
> The GNU coding standards were changed a while ago to recommend against
> grave quoting in diagnostics and many GNU applications have already changed
> (e.g., coreutils, GCC).  Although Emacs has been one of the holdouts, now
> is as good a time as any to make the move.
>
> we need to update the documentation that warns the user to use the correct
>> style.
>>
>
> Thanks, done in the attached patch, which I just installed in the master
> branch.
>
> > it is mentioned that typewriter quotes are simple and portable.
>
> That discussion was intended to be about text files, so I added a phrase
> to that effect in the attached patch.  This should help resolve the seeming
> contradiction.
>
> 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.
>>
>
> It’s not a significant performance impact.  It’s more a hassle of
> documenting a more-complex approach.  That is partly why I gave up on such
> an approach after implementing it, and went with the simpler approach that
> is in Emacs master now.
>
> > CASE 1: 'Hey' -> ‘Hey’
> > CASE 2: it's awesome -> it’s awesome
> > CASE 3: my sisters' weddings -> my sisters’ weddings
> > CASE 4: He said 'It's awesome!' -> He said ‘It’s awesome!’
>
> ‘message’ already does cases 2 and 3 that way, as well as the 2nd
> apostrophe in case 4.  The remaining cases are quite rare in Emacs
> diagnostics, as the Emacs style uses directed quotes when single-quoting.
>
> If there's a non-space character before the apostrophe, replace it with
>> right quote, else use left quote.
>>
>
> That would mishandle common English phrases like “'60s pop culture” and
> “rock 'n' roll”.  (These phrases don’t occur in Emacs diagnostics either,
> but as long as we’re being pedantic....)  Any heuristics will go awry
> sometimes so we need some way to override the heuristics; and once we have
> such an override, there is a real benefit to keeping the heuristics simple.
>

[-- Attachment #2: Type: text/html, Size: 9313 bytes --]

  reply	other threads:[~2015-10-02 16:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 21:17 bug#21588: 25.0.50: Single quotes becoming curvy quotes in message function Kaushal Modi
2015-09-29 21:32 ` Glenn Morris
2015-09-29 22:54   ` Kaushal Modi
2015-09-30  1:05     ` Kaushal Modi
2015-09-30 22:40       ` Paul Eggert
2015-10-01  3:54         ` Kaushal Modi
2015-10-02  6:51           ` Paul Eggert
2015-10-02 16:50             ` Kaushal Modi [this message]
2015-09-30 21:10 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY2cRrgW7SF3Sht8eMTUPNwdJ-GguPNibHayvCa3zpAsYA@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=21588-done@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=eggert@cs.ucla.edu \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.