GNU bug report logs - #24901
Patch to add support for curly quotes to electric-pair-mode

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Tue, 8 Nov 2016 12:01:02 UTC

Severity: wishlist

Tags: patch

Done: Reuben Thomas <rrt <at> sc3d.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 02 Dec 2016 17:26:01 +0200
> From: Reuben Thomas <rrt <at> sc3d.org>
> Date: Fri, 2 Dec 2016 14:42:24 +0000
> Cc: 24901 <at> debbugs.gnu.org
> 
> ​Rationale: electric-pair-mode already has support for straight double-quote pairs, so it is logical to add
> support for curly double-quote pairs. As with straight double quotes, it's logical that these be supported
> everywhere. The same goes for straight single quotes, which are generally used for the same purpose as
> curly double and single double quotes, that is, quoting (in human language).
> 
> The use of electric-quote-chars means that electric-pair-mode will automatically use whatever the user has
> configured for single and double quotes.

I see, thanks.  Is it certain that users won't want straight quotes,
but not the curly ones?  E.g., in some programming mode, perhaps?

>  In particular, I don't understand the last sentence of the log
>  message; can you elaborate?
> 
> ​electric-pair-mode does not by default produce pairs of straight single quote (apostrophe). This is because it
> does not always make sense: a single apostrophe is often used on its own. However, with curly single
> quotes, it makes sense for electric-pair-mode to make typing a left curly quote automatically add a
> corresponding right quote, as left curly quotes are not normally used on their own. (Right single curly quotes
> can be used on their own, as an apostrophe, but this is irrelevant here, as electric-pair-mode acts when the
> left-hand mark is typed, not the right-hand mark).

So electric-pair-mode is incompatible with RTL scripts.  Too bad.

Thanks for the explanations.  If it's certain that no one will want
only straight quotes (see above), I'm okay with this change.




This bug report was last modified 7 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.