* bug#70984: 30.0.50; Improved support for entering quotation marks
@ 2024-05-16 14:35 Robert Pluim
2024-05-16 15:55 ` Eli Zaretskii
2024-05-16 16:05 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 19+ messages in thread
From: Robert Pluim @ 2024-05-16 14:35 UTC (permalink / raw)
To: 70984
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
Iʼll update the commit message after I get the bug number.
I started looking at quotation marks, and came up with the attached
extensions to iso-transl and the latin-prefix and latin-postfix
methods.
Please let me know if my key sequence choices need to be improved.
Robert
--
[-- Attachment #2: 0001-Improve-support-for-entering-quotation-marks.patch --]
[-- Type: text/x-diff, Size: 6373 bytes --]
From d6de9b14660882924c13bd7237a4905bd6a5578e Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Thu, 16 May 2024 16:25:24 +0200
Subject: [PATCH] Improve support for entering quotation marks
To: emacs-devel@gnu.org
* lisp/international/iso-transl.el (iso-transl-char-map): Add entries
for "low" single and double quotation marks.
(iso-transl-language-alist): Add convenient support for the official
German quoting style, which uses "low" double quotes on the left,
and *left* double quotes on the right. Add support for single
guillemets to the French language entrey.
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add entries for
single, double and "low" Unicode quotation marks. Add entries for
single guillemets.
* lisp/leim/quail/latin-pre.el ("latin-prefix"): And here.
* etc/NEWS: Announce the changes.
---
etc/NEWS | 26 ++++++++++++++++++++++++++
lisp/international/iso-transl.el | 8 +++++++-
lisp/leim/quail/latin-post.el | 19 +++++++++++++++++++
lisp/leim/quail/latin-pre.el | 11 +++++++++++
4 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 77b2749fe43..f7aeeab46d9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -573,6 +573,32 @@ These characters can now be input with 'C-x 8 a e' and 'C-x 8 A E',
respectively, in addition to the existing translations 'C-x 8 / e' and
'C-x 8 / E'.
+*** Add 'C-x 8' key translations for "low" quotes "„", and "‚".
+These can now be entered with 'C-x , "' and 'C-x , ''.
+
+*** German language 'C-x 8' key translations for "„" and "“".
+These characters are used for the official German quoting style, and can
+now be input with 'C-x 8 9' and 'C-x 8 0' respectively (the latter could
+already be entered using 'C-x 8 {'. Using them requires activating
+"German" language support using 'iso-transl-set-language'.
+
+*** "latin-prefix" and "latin-postfix" quotation marks additions.
+These input methods can now produce single, double and "low" left and
+right quotation marks:
+"‘", "’", "“", "”", "„", and "‚"
+using "[", "]", and "," for "left", "right", and "low" respectively to
+modify "'" and """.
+
+*** "latin-prefix" and "latin-postfix" guillemets support.
+These input methods can now produce single guillemets. For
+"latin-prefix" use "~~<" and "~~>", for "latin-postfix" use "<~" and
+">~". Double guillemets were already supported.
+
+*** French language 'C-x 8' key translations for "‹" and "›".
+These characters can now be entered using 'C-x 8 < <' and 'C-x 8 > >'
+respectively, after activating "French" language support using
+'iso-transl-set-language'.
+
\f
* Changes in Specialized Modes and Packages in Emacs 30.1
diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el
index 67659f7c265..648770fa658 100644
--- a/lisp/international/iso-transl.el
+++ b/lisp/international/iso-transl.el
@@ -111,6 +111,8 @@ iso-transl-char-map
("*+" . [?±])
("+" . [?±])
(",," . [?¸])
+ (",\"" . [?„])
+ (",'" . [?‚])
(",A" . [?Ą])
(",C" . [?Ç])
(",N" . [?Ņ])
@@ -327,7 +329,9 @@ iso-transl-language-alist
("u" . [?ŭ]))
("French"
("C" . [?Ç])
- ("c" . [?ç]))
+ ("c" . [?ç])
+ ("<<" . [?‹])
+ (">>" . [?›]))
("German"
("A" . [?Ä])
("O" . [?Ö])
@@ -336,6 +340,8 @@ iso-transl-language-alist
("a" . [?ä])
("o" . [?ö])
("s" . [?ß])
+ ("9" . [?„])
+ ("0" . [?“])
("u" . [?ü]))
("Portuguese"
("C" . [?Ç])
diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el
index 25e7c4a64a8..00851a94284 100644
--- a/lisp/leim/quail/latin-post.el
+++ b/lisp/leim/quail/latin-post.el
@@ -2302,6 +2302,9 @@
subscript | _ | 0_ -> ₀ 1_ -> ₁ +_ -> ₊ -_ -> ₋
others | / | s/ -> ß ?/ -> ¿ !/ -> ¡ // -> ° o/ -> œ
| / | 2/ -> ½ 3/ -> ¾ 4/ -> ?¼
+ | [ | \\='[ -> ‘ \"[ -> “
+ | ] | \\='] -> ’ \"] -> ”
+ | , | \\=', -> ‚ \", -> „
| various | << -> « >> -> » o_ -> º a_ -> ª
Doubling the postfix separates the letter and postfix: e.g. a\\='\\=' -> a\\='
@@ -2309,6 +2312,12 @@
;; Fixme: ¦ § ¨ © ¬ ± ´ µ ¶ · ¸ × ÷
(quail-define-rules
+ ("'[" ?‘)
+ ("']" ?’)
+ ("\"[" ?“)
+ ("\"]" ?”)
+ ("\"," ?„)
+ ("'," ?‚)
("2/" ?½)
("3/" ?¾)
("4/" ?¼)
@@ -2341,6 +2350,8 @@
("//" ?°)
("<<" ?\«)
(">>" ?\»)
+ ("<~" ?\‹)
+ (">~" ?\›)
("?/" ?¿)
("$/" ?£)
("$/" ?¤)
@@ -2532,6 +2543,12 @@
("z~" ?ž)
("--" ?¯)
+ ("'[[" ["'["])
+ ("']]" ["']"])
+ ("\"[[" ["\"["])
+ ("\"]]" ["\"]"])
+ ("\",," ["\","])
+ ("',," ["',"])
("2//" ["2/"])
("3//" ["3/"])
("4//" ["4/"])
@@ -2564,6 +2581,8 @@
("///" ["//"])
("<<<" ["<<"])
(">>>" [">>"])
+ ("<~~" ["<~"])
+ (">~~" [">~"])
("?//" ["?/"])
("$//" ["$/"])
("A''" ["A'"])
diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el
index 91164df0c72..b344a6304bb 100644
--- a/lisp/leim/quail/latin-pre.el
+++ b/lisp/leim/quail/latin-pre.el
@@ -1107,6 +1107,9 @@
macron | - | -a -> ā -/e -> ǣ -- -> ¯
dot above | / . | /g -> ġ .g -> ġ
misc | \" ~ / | \"s -> ß ~d -> ð ~t -> þ /a -> å /e -> æ /o -> ø
+ | [ | [\\=' -> ‘ [\" -> “
+ | ] | ]\\=' -> ’ ]\" -> ”
+ | , | ,\\=' -> ‚ ,\" -> „
symbol | ~ | ~> -> » ~< -> « ~! -> ¡ ~? -> ¿ ~~ -> ¸
symbol | _ / | _o -> º _a -> ª // -> ° /\\ -> × _y -> ¥
symbol | ^ | ^r -> ® ^t -> ™ ^c -> © ^1 -> ¹ ^2 -> ² ^3 -> ³
@@ -1132,6 +1135,12 @@
("-y" ?ȳ)
("' " ?')
("''" ?´)
+ ("['" ?‘)
+ ("]'" ?’)
+ ("[\"" ?“)
+ ("]\"" ?”)
+ (",\"" ?„)
+ (",'" ?‚)
("'A" ?Á)
("'E" ?É)
("'I" ?Í)
@@ -1295,8 +1304,10 @@
("~-" ?)
("~." ?·)
("~<" ?\«)
+ ("~~<" ?\‹)
("~=" ?¯)
("~>" ?\»)
+ ("~~>" ?\›)
("~?" ?¿)
("~A" ?Ã)
("~A" ?Ă)
--
2.38.1.420.g319605f8f0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-16 14:35 bug#70984: 30.0.50; Improved support for entering quotation marks Robert Pluim
@ 2024-05-16 15:55 ` Eli Zaretskii
2024-05-17 7:45 ` bug#70984: 30.0.50; Improved support for entering quotation marks, " Robert Pluim
2024-05-16 16:05 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2024-05-16 15:55 UTC (permalink / raw)
To: Robert Pluim; +Cc: 70984
> From: Robert Pluim <rpluim@gmail.com>
> Date: Thu, 16 May 2024 16:35:33 +0200
>
> * lisp/international/iso-transl.el (iso-transl-char-map): Add entries
> for "low" single and double quotation marks.
> (iso-transl-language-alist): Add convenient support for the official
> German quoting style, which uses "low" double quotes on the left,
> and *left* double quotes on the right. Add support for single
> guillemets to the French language entrey.
^^^^^^
A typo?
> +*** Add 'C-x 8' key translations for "low" quotes "„", and "‚".
This style is for ChangeLog entries, not for NEWS. In NEWS we say
something like "New 'C-x 8' key translations for..." instead.
> +*** "latin-prefix" and "latin-postfix" quotation marks additions.
> +These input methods can now produce single, double and "low" left and
> +right quotation marks:
> +"‘", "’", "“", "”", "„", and "‚"
Why is the last line broken in the middle?
> +*** "latin-prefix" and "latin-postfix" guillemets support.
> +These input methods can now produce single guillemets. For
> +"latin-prefix" use "~~<" and "~~>", for "latin-postfix" use "<~" and
> +">~". Double guillemets were already supported.
Suggest to show the guillemets themselves: not sure everyone knows
what they are.
Are any of these worthy of being mentioned in the user manual (the
"Inserting Text" node)?
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-16 14:35 bug#70984: 30.0.50; Improved support for entering quotation marks Robert Pluim
2024-05-16 15:55 ` Eli Zaretskii
@ 2024-05-16 16:05 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 19+ messages in thread
From: Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-16 16:05 UTC (permalink / raw)
To: Robert Pluim; +Cc: 70984
On Thu, 16 May 2024 16:35:33 +0200 Robert Pluim <rpluim@gmail.com> wrote:
I spotted a couple of typos and stylistic infelicities (IMO):
> From d6de9b14660882924c13bd7237a4905bd6a5578e Mon Sep 17 00:00:00 2001
> From: Robert Pluim <rpluim@gmail.com>
> Date: Thu, 16 May 2024 16:25:24 +0200
> Subject: [PATCH] Improve support for entering quotation marks
> To: emacs-devel@gnu.org
>
> * lisp/international/iso-transl.el (iso-transl-char-map): Add entries
> for "low" single and double quotation marks.
> (iso-transl-language-alist): Add convenient support for the official
> German quoting style, which uses "low" double quotes on the left,
> and *left* double quotes on the right. Add support for single
> guillemets to the French language entrey.
^^^^^^
entry
[...]
> +*** German language 'C-x 8' key translations for "„" and "“".
> +These characters are used for the official German quoting style, and can
> +now be input with 'C-x 8 9' and 'C-x 8 0' respectively (the latter could
> +already be entered using 'C-x 8 {'. Using them requires activating
^^
').
> +"German" language support using 'iso-transl-set-language'.
^^^^^^^^ ^^^^^
[...]
> +*** French language 'C-x 8' key translations for "‹" and "›".
> +These characters can now be entered using 'C-x 8 < <' and 'C-x 8 > >'
> +respectively, after activating "French" language support using
^^^^^^^^ ^^^^^
I would drop the quotes and replace "using" by "via" or "with".
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-16 15:55 ` Eli Zaretskii
@ 2024-05-17 7:45 ` Robert Pluim
2024-05-17 8:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 10:44 ` Eli Zaretskii
0 siblings, 2 replies; 19+ messages in thread
From: Robert Pluim @ 2024-05-17 7:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Stephen Berman, 70984
>>>>> On Thu, 16 May 2024 18:55:10 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> +*** "latin-prefix" and "latin-postfix" quotation marks additions.
>> +These input methods can now produce single, double and "low" left and
>> +right quotation marks:
>> +"‘", "’", "“", "”", "„", and "‚"
Eli> Why is the last line broken in the middle?
Because I messed up the formatting.
>> +*** "latin-prefix" and "latin-postfix" guillemets support.
>> +These input methods can now produce single guillemets. For
>> +"latin-prefix" use "~~<" and "~~>", for "latin-postfix" use "<~" and
>> +">~". Double guillemets were already supported.
Eli> Suggest to show the guillemets themselves: not sure everyone knows
Eli> what they are.
Those who need to use them know what they are 😀, but Iʼll add them in
anyway.
Eli> Are any of these worthy of being mentioned in the user manual (the
Eli> "Inserting Text" node)?
I donʼt think so. I do plan to mention them in the manual when I
extend `electric-quote-chars'.
>>>>> On Thu, 16 May 2024 18:05:33 +0200, Stephen Berman <stephen.berman@gmx.net> said:
Stephen> I spotted a couple of typos and stylistic infelicities (IMO):
Thanks, all fixed.
Iʼm assuming this means youʼre both ok with the key sequences I chose.
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 7:45 ` bug#70984: 30.0.50; Improved support for entering quotation marks, " Robert Pluim
@ 2024-05-17 8:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 8:59 ` Robert Pluim
2024-05-17 10:44 ` Eli Zaretskii
1 sibling, 1 reply; 19+ messages in thread
From: Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-17 8:21 UTC (permalink / raw)
To: Robert Pluim; +Cc: Eli Zaretskii, 70984
On Fri, 17 May 2024 09:45:14 +0200 Robert Pluim <rpluim@gmail.com> wrote:
[...]
>>>>>> On Thu, 16 May 2024 18:05:33 +0200, Stephen Berman
>>>>>> <stephen.berman@gmx.net> said:
>
> Stephen> I spotted a couple of typos and stylistic infelicities (IMO):
>
> Thanks, all fixed.
>
> Iʼm assuming this means youʼre both ok with the key sequences I chose.
As an innocent bystander I was at first puzzled at your choice of 'C-x 8
< <' and 'C-x 8 > >' for "‹" and "›", respectively; but then I found
that 'C-x 8 <' and 'C-x 8 >' in the global map already produce "«" and
"»", presumably because the latter are the real quotation marks in
French, while "single guillemets" are less frequently used. So your
choice makes sense after all.
Steve Berman
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 8:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-17 8:59 ` Robert Pluim
2024-05-17 9:59 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2024-05-17 8:59 UTC (permalink / raw)
To: Stephen Berman; +Cc: Eli Zaretskii, 70984
>>>>> On Fri, 17 May 2024 10:21:08 +0200, Stephen Berman <stephen.berman@gmx.net> said:
>> Iʼm assuming this means youʼre both ok with the key sequences I chose.
Stephen> As an innocent bystander I was at first puzzled at your choice of 'C-x 8
Stephen> < <' and 'C-x 8 > >' for "‹" and "›", respectively; but then I found
Stephen> that 'C-x 8 <' and 'C-x 8 >' in the global map already produce "«" and
Stephen> "»", presumably because the latter are the real quotation marks in
Stephen> French, while "single guillemets" are less frequently used. So your
Stephen> choice makes sense after all.
Exactly (should I put the existing C-x 8 bindings in the NEWS
entry?).
Iʼm more doubtful about my choices for the German quotation marks in
the C-x 8 map. They correspond to the keys that have '(' and ')' on
the US keyboard, but not the German standard keyboard, but theyʼre
easy to type on both layouts. I could put them on 'C-x 8 8' and 'C-x 8
9', since those can produce '[' and ']' in the German layout, which is
kind of mnemonic. (The official German layout has them on 2nd or 3rd
level shift variants of 'x' and 'v', which I thought was too
convoluted to emulate).
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 8:59 ` Robert Pluim
@ 2024-05-17 9:59 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 12:10 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-17 9:59 UTC (permalink / raw)
To: Robert Pluim; +Cc: Eli Zaretskii, 70984
On Fri, 17 May 2024 10:59:57 +0200 Robert Pluim <rpluim@gmail.com> wrote:
>>>>>> On Fri, 17 May 2024 10:21:08 +0200, Stephen Berman
> <stephen.berman@gmx.net> said:
>
> >> Iʼm assuming this means youʼre both ok with the key sequences I chose.
>
> Stephen> As an innocent bystander I was at first puzzled at your choice of 'C-x 8
> Stephen> < <' and 'C-x 8 > >' for "‹" and "›", respectively; but then I found
> Stephen> that 'C-x 8 <' and 'C-x 8 >' in the global map already produce "«" and
> Stephen> "»", presumably because the latter are the real quotation marks in
> Stephen> French, while "single guillemets" are less frequently used. So your
> Stephen> choice makes sense after all.
>
> Exactly (should I put the existing C-x 8 bindings in the NEWS
> entry?).
That probably would have spared me my momentary puzzlement and the brief
time it took me to discover 'C-x 8 <' and 'C-x 8 >', but I'm not sure
that makes them NEWSworthy.
> Iʼm more doubtful about my choices for the German quotation marks in
> the C-x 8 map. They correspond to the keys that have '(' and ')' on
> the US keyboard, but not the German standard keyboard, but theyʼre
> easy to type on both layouts. I could put them on 'C-x 8 8' and 'C-x 8
> 9', since those can produce '[' and ']' in the German layout, which is
> kind of mnemonic.
Yeah, and also shifted '8' and '9' produce "(" and ")" in the German
layout, so using '8' and '9' for another pairing seems better motivated
for the German iso-transl map than '9' and '0'.
> (The official German layout has them on 2nd or 3rd
> level shift variants of 'x' and 'v', which I thought was too
> convoluted to emulate).
Probably. To add to the convolution, I use a German keyboard under
Xfce4 with the no dead keys layout, and that assigns "„" to AltGr-v and
"“" to AltGr-b; no idea why... (In my experience, for email and
non-processed text in German, "" is mostly used for quoting.
LibreOffice automatically turns "" into „“ in documents configured for
German, and otherwise, when I need processed German text I use LaTeX.)
Steve Berman
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 7:45 ` bug#70984: 30.0.50; Improved support for entering quotation marks, " Robert Pluim
2024-05-17 8:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-17 10:44 ` Eli Zaretskii
2024-05-17 12:15 ` Robert Pluim
1 sibling, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2024-05-17 10:44 UTC (permalink / raw)
To: Robert Pluim; +Cc: stephen.berman, 70984
> From: Robert Pluim <rpluim@gmail.com>
> Cc: Stephen Berman <stephen.berman@gmx.net>, 70984@debbugs.gnu.org
> Date: Fri, 17 May 2024 09:45:14 +0200
>
> Iʼm assuming this means youʼre both ok with the key sequences I chose.
I don't have any objections, but I'm not going to be a frequent user
of this, so I guess we'll let the users judge that.
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 9:59 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-17 12:10 ` Robert Pluim
2024-05-17 12:53 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2024-05-17 12:10 UTC (permalink / raw)
To: Stephen Berman; +Cc: Eli Zaretskii, 70984
>>>>> On Fri, 17 May 2024 11:59:30 +0200, Stephen Berman <stephen.berman@gmx.net> said:
>> Exactly (should I put the existing C-x 8 bindings in the NEWS
>> entry?).
Stephen> That probably would have spared me my momentary puzzlement and the brief
Stephen> time it took me to discover 'C-x 8 <' and 'C-x 8 >', but I'm not sure
Stephen> that makes them NEWSworthy.
Since people donʼt read NEWS, does it matter? 😉 It canʼt hurt.
>> Iʼm more doubtful about my choices for the German quotation marks in
>> the C-x 8 map. They correspond to the keys that have '(' and ')' on
>> the US keyboard, but not the German standard keyboard, but theyʼre
>> easy to type on both layouts. I could put them on 'C-x 8 8' and 'C-x 8
>> 9', since those can produce '[' and ']' in the German layout, which is
>> kind of mnemonic.
Stephen> Yeah, and also shifted '8' and '9' produce "(" and ")" in the German
Stephen> layout, so using '8' and '9' for another pairing seems better motivated
Stephen> for the German iso-transl map than '9' and '0'.
OK, I can make that change.
>> (The official German layout has them on 2nd or 3rd
>> level shift variants of 'x' and 'v', which I thought was too
>> convoluted to emulate).
'AltGr × <release> S-v' to produce "‘", for example, where '×' is
located where Iʼd put ESC.
Stephen> Probably. To add to the convolution, I use a German keyboard under
Stephen> Xfce4 with the no dead keys layout, and that assigns "„" to AltGr-v and
Stephen> "“" to AltGr-b; no idea why...
Thatʼs a gratuitous but coherent difference from the T2 layout, and
much easier to type. 'C-x 8 v' and 'C-x 8 b' (and thus 'A-v' and
'A-b') are unused by iso-transl, we could put them there as well (or
only there) for the German language, since they seem sensible.
Where do you have "‚" and "‘"? We can copy those as well.
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 10:44 ` Eli Zaretskii
@ 2024-05-17 12:15 ` Robert Pluim
2024-05-17 13:05 ` Eli Zaretskii
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2024-05-17 12:15 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: stephen.berman, 70984
>>>>> On Fri, 17 May 2024 13:44:12 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> From: Robert Pluim <rpluim@gmail.com>
>> Cc: Stephen Berman <stephen.berman@gmx.net>, 70984@debbugs.gnu.org
>> Date: Fri, 17 May 2024 09:45:14 +0200
>>
>> Iʼm assuming this means youʼre both ok with the key sequences I chose.
Eli> I don't have any objections, but I'm not going to be a frequent user
Eli> of this, so I guess we'll let the users judge that.
Apropos, what about the following for electric-quote-chars? I think
Iʼve covered most of the common combinations:
diff --git a/lisp/electric.el b/lisp/electric.el
index fee0bf36d7f..406eac2f3a1 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -506,12 +506,55 @@ electric-quote-string
:version "25.1"
:type 'boolean :safe 'booleanp :group 'electricity)
+(define-widget 'electric-quote-chars-type 'lazy
+ "Display list of electric quote chars."
+ :group 'electricity
+ :format "%t:\n%v\n"
+ :type '(list (character :tag "Left single quote ")
+ (character :tag "Right single quote")
+ (character :tag "Left double quote ")
+ (character :tag "Right double quote")))
+
(defcustom electric-quote-chars '(?‘ ?’ ?“ ?”)
"Curved quote characters for `electric-quote-mode'.
This list's members correspond to left single quote, right single
-quote, left double quote, and right double quote, respectively."
+quote, left double quote, and right double quote, respectively.
+
+There are predefined settings for common styles, or you can define
+your own custom style."
:version "26.1"
- :type '(list character character character character)
+ :type '(choice
+ ;; The countries and languages mentioned here are not intended
+ ;; to be an exhaustive list.
+ ;; US English, Canada, India, Brazil…, almost everywhere in
+ ;; fact.
+ (electric-quote-chars-type :tag "Default" (?‘ ?’ ?“ ?”))
+ ;; This style has ?“ and ?” as first level quotation,
+ ;; which is why they're on the single quote, not double quote.
+ ;; UK English
+ (electric-quote-chars-type :tag "Reversed" (?“ ?” ?‘ ?’ ))
+ ;; France
+ (electric-quote-chars-type :tag "Guillemets" (?« ?» ?« ?»))
+ ;; Switzerland
+ (electric-quote-chars-type :tag "Single/double guillemets" (?‹ ?› ?« ?»))
+ ;; Norway
+ (electric-quote-chars-type :tag "Single quote guillemets" (?‘ ?’ ?« ?»))
+ ;; Greece, Italy, Portugal
+ (electric-quote-chars-type :tag "Guillemets double quote" (?« ?» ?“ ?”))
+ ;; This style also has ?“ and ?” as first level quotation,
+ ;; Spain, Ukraine
+ (electric-quote-chars-type :tag "Double quote guillemets" (?“ ?” ?« ?» ))
+ ;; Hebrew, Sweden
+ (electric-quote-chars-type :tag "Right only" (?’ ?’ ?” ?”))
+ ;; Netherlands
+ (electric-quote-chars-type :tag "Low/high right only" (?‚ ?’ ?„ ?”))
+ ;; Germany
+ (electric-quote-chars-type :tag "Low/high right/left" (?‚ ?‘ ?„ ?“))
+ ;; Chinese, simplified.
+ (electric-quote-chars-type :tag "Corners" (?「 ?」 ?『 ?』))
+ ;; Chinese, traditional.
+ (electric-quote-chars-type :tag "Corners reversed" (?『 ?』?「 ?」))
+ (electric-quote-chars-type :tag "Custom" (?‘ ?’ ?“ ?”)))
:safe (lambda (x)
(pcase x
(`(,(pred characterp) ,(pred characterp)
Robert
--
^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 12:10 ` Robert Pluim
@ 2024-05-17 12:53 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 13:15 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-17 12:53 UTC (permalink / raw)
To: Robert Pluim; +Cc: Eli Zaretskii, 70984
On Fri, 17 May 2024 14:10:03 +0200 Robert Pluim <rpluim@gmail.com> wrote:
[...]
> >> (The official German layout has them on 2nd or 3rd
> >> level shift variants of 'x' and 'v', which I thought was too
> >> convoluted to emulate).
>
> 'AltGr × <release> S-v' to produce "‘", for example, where '×' is
> located where Iʼd put ESC.
Sorry, I don't follow you here. (Or do you mean like the key sequences
I give for these characters below? But there there's no ESC and no
release.)
> Stephen> Probably. To add to the convolution, I use a German keyboard under
> Stephen> Xfce4 with the no dead keys layout, and that assigns "„" to AltGr-v and
> Stephen> "“" to AltGr-b; no idea why...
>
> Thatʼs a gratuitous but coherent difference from the T2 layout, and
> much easier to type. 'C-x 8 v' and 'C-x 8 b' (and thus 'A-v' and
> 'A-b') are unused by iso-transl, we could put them there as well (or
> only there) for the German language, since they seem sensible.
>
> Where do you have "‚" and "‘"? We can copy those as well.
AltGr-S-v for "‚" and AltGr-S-b for "‘", which nicely parallels the
bindings for "„" and "“", but it seems that can't be done with the C-x 8
map: Typing `C-x 8 S-v' tells me "C-x 8 v is undefined" (n.b.: "v" not "V").
Steve Berman
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 12:15 ` Robert Pluim
@ 2024-05-17 13:05 ` Eli Zaretskii
2024-05-17 13:27 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2024-05-17 13:05 UTC (permalink / raw)
To: Robert Pluim; +Cc: stephen.berman, 70984
> From: Robert Pluim <rpluim@gmail.com>
> Cc: stephen.berman@gmx.net, 70984@debbugs.gnu.org
> Date: Fri, 17 May 2024 14:15:31 +0200
>
> >>>>> On Fri, 17 May 2024 13:44:12 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> >> From: Robert Pluim <rpluim@gmail.com>
> >> Cc: Stephen Berman <stephen.berman@gmx.net>, 70984@debbugs.gnu.org
> >> Date: Fri, 17 May 2024 09:45:14 +0200
> >>
> >> Iʼm assuming this means youʼre both ok with the key sequences I chose.
>
> Eli> I don't have any objections, but I'm not going to be a frequent user
> Eli> of this, so I guess we'll let the users judge that.
>
> Apropos, what about the following for electric-quote-chars? I think
> Iʼve covered most of the common combinations:
What's the purpose of this?
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 12:53 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-17 13:15 ` Robert Pluim
2024-05-17 13:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2024-05-17 13:15 UTC (permalink / raw)
To: Stephen Berman; +Cc: Eli Zaretskii, 70984
>>>>> On Fri, 17 May 2024 14:53:39 +0200, Stephen Berman <stephen.berman@gmx.net> said:
Stephen> On Fri, 17 May 2024 14:10:03 +0200 Robert Pluim <rpluim@gmail.com> wrote:
Stephen> [...]
>> >> (The official German layout has them on 2nd or 3rd
>> >> level shift variants of 'x' and 'v', which I thought was too
>> >> convoluted to emulate).
>>
>> 'AltGr × <release> S-v' to produce "‘", for example, where '×' is
>> located where Iʼd put ESC.
Stephen> Sorry, I don't follow you here. (Or do you mean like the key sequences
Stephen> I give for these characters below? But there there's no ESC and no
Stephen> release.)
Sorry, itʼs the T2 sequence for entering "‘", just to show why we
donʼt want to emulate it.
Stephen> Probably. To add to the convolution, I use a German keyboard under
Stephen> Xfce4 with the no dead keys layout, and that assigns "„" to AltGr-v and
Stephen> "“" to AltGr-b; no idea why...
>>
>> Thatʼs a gratuitous but coherent difference from the T2 layout, and
>> much easier to type. 'C-x 8 v' and 'C-x 8 b' (and thus 'A-v' and
>> 'A-b') are unused by iso-transl, we could put them there as well (or
>> only there) for the German language, since they seem sensible.
>>
>> Where do you have "‚" and "‘"? We can copy those as well.
Stephen> AltGr-S-v for "‚" and AltGr-S-b for "‘", which nicely parallels the
Stephen> bindings for "„" and "“", but it seems that can't be done with the C-x 8
Stephen> map: Typing `C-x 8 S-v' tells me "C-x 8 v is undefined" (n.b.: "v" not "V").
It can be done, we just need to add the mappings to
iso-transl.el. Emacs is showing "v" instead of "V" because it
automatically downcases the binding when thereʼs no binding for the
uppercase key sequence. See eg 'C-x 8 L' which has only an upper case
binding, or 'C-x 8 c', which has both upper and lower case bindings.
Iʼll update the patch to use v/b/n, and drop the 9/0 bindings, which
aligns Emacs with the usual GNU/Linux German keyboard layout.
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 13:15 ` Robert Pluim
@ 2024-05-17 13:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 11:33 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-17 13:21 UTC (permalink / raw)
To: Robert Pluim; +Cc: Eli Zaretskii, 70984
On Fri, 17 May 2024 15:15:57 +0200 Robert Pluim <rpluim@gmail.com> wrote:
>>>>>> On Fri, 17 May 2024 14:53:39 +0200, Stephen Berman
> <stephen.berman@gmx.net> said:
>
> Stephen> On Fri, 17 May 2024 14:10:03 +0200 Robert Pluim
> Stephen> <rpluim@gmail.com> wrote:
> Stephen> [...]
> >> >> (The official German layout has them on 2nd or 3rd
> >> >> level shift variants of 'x' and 'v', which I thought was too
> >> >> convoluted to emulate).
> >>
> >> 'AltGr × <release> S-v' to produce "‘", for example, where '×' is
> >> located where Iʼd put ESC.
>
> Stephen> Sorry, I don't follow you here. (Or do you mean like the key sequences
> Stephen> I give for these characters below? But there there's no ESC and no
> Stephen> release.)
>
> Sorry, itʼs the T2 sequence for entering "‘", just to show why we
> donʼt want to emulate it.
Ah, ok.
> Stephen> Probably. To add to the convolution, I use a German keyboard under
> Stephen> Xfce4 with the no dead keys layout, and that assigns "„" to AltGr-v and
> Stephen> "“" to AltGr-b; no idea why...
> >>
> >> Thatʼs a gratuitous but coherent difference from the T2 layout, and
> >> much easier to type. 'C-x 8 v' and 'C-x 8 b' (and thus 'A-v' and
> >> 'A-b') are unused by iso-transl, we could put them there as well (or
> >> only there) for the German language, since they seem sensible.
> >>
> >> Where do you have "‚" and "‘"? We can copy those as well.
>
> Stephen> AltGr-S-v for "‚" and AltGr-S-b for "‘", which nicely parallels the
> Stephen> bindings for "„" and "“", but it seems that can't be done with the C-x 8
> Stephen> map: Typing `C-x 8 S-v' tells me "C-x 8 v is undefined" (n.b.:
> Stephen> "v" not "V").
>
> It can be done, we just need to add the mappings to
> iso-transl.el. Emacs is showing "v" instead of "V" because it
> automatically downcases the binding when thereʼs no binding for the
> uppercase key sequence. See eg 'C-x 8 L' which has only an upper case
> binding, or 'C-x 8 c', which has both upper and lower case bindings.
Thanks, TIL yet again!
> Iʼll update the patch to use v/b/n, and drop the 9/0 bindings, which
> aligns Emacs with the usual GNU/Linux German keyboard layout.
Sounds good.
Steve Berman
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 13:05 ` Eli Zaretskii
@ 2024-05-17 13:27 ` Robert Pluim
2024-05-17 13:38 ` Eli Zaretskii
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2024-05-17 13:27 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: stephen.berman, 70984
>>>>> On Fri, 17 May 2024 16:05:18 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> From: Robert Pluim <rpluim@gmail.com>
>> Cc: stephen.berman@gmx.net, 70984@debbugs.gnu.org
>> Date: Fri, 17 May 2024 14:15:31 +0200
>>
>> >>>>> On Fri, 17 May 2024 13:44:12 +0300, Eli Zaretskii <eliz@gnu.org> said:
>>
>> >> From: Robert Pluim <rpluim@gmail.com>
>> >> Cc: Stephen Berman <stephen.berman@gmx.net>, 70984@debbugs.gnu.org
>> >> Date: Fri, 17 May 2024 09:45:14 +0200
>> >>
>> >> Iʼm assuming this means youʼre both ok with the key sequences I chose.
>>
Eli> I don't have any objections, but I'm not going to be a frequent user
Eli> of this, so I guess we'll let the users judge that.
>>
>> Apropos, what about the following for electric-quote-chars? I think
>> Iʼve covered most of the common combinations:
Eli> What's the purpose of this?
electric-quote-chars is convenient for entering single and double
Unicode quotes, and can be configured according to everyoneʼs own
preference, but you have to do it character by character. Adding these
options just provides pre-configured correct settings for a number of
styles around the world without the user having to figure out for
themselves how to customize it to use guillemets (or whatever their
preference is).
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 13:27 ` Robert Pluim
@ 2024-05-17 13:38 ` Eli Zaretskii
2024-05-17 15:41 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2024-05-17 13:38 UTC (permalink / raw)
To: Robert Pluim; +Cc: stephen.berman, 70984
> From: Robert Pluim <rpluim@gmail.com>
> Cc: stephen.berman@gmx.net, 70984@debbugs.gnu.org
> Date: Fri, 17 May 2024 15:27:15 +0200
>
> >>>>> On Fri, 17 May 2024 16:05:18 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> >> Apropos, what about the following for electric-quote-chars? I think
> >> Iʼve covered most of the common combinations:
>
> Eli> What's the purpose of this?
>
> electric-quote-chars is convenient for entering single and double
> Unicode quotes, and can be configured according to everyoneʼs own
> preference, but you have to do it character by character. Adding these
> options just provides pre-configured correct settings for a number of
> styles around the world without the user having to figure out for
> themselves how to customize it to use guillemets (or whatever their
> preference is).
But then the correct UI is to show pairs of quote characters and allow
selection of any combination of any number of the pairs. What you
seem to suggest instead are pre-composed combinations, according to
your selection, which I think is less optimal. Can't Customize
support radio buttons and allow selection of any number of
possibilities, not just one out of many?
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 13:38 ` Eli Zaretskii
@ 2024-05-17 15:41 ` Robert Pluim
2024-05-18 10:57 ` Eli Zaretskii
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2024-05-17 15:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: stephen.berman, 70984
>>>>> On Fri, 17 May 2024 16:38:21 +0300, Eli Zaretskii <eliz@gnu.org> said:
Eli> But then the correct UI is to show pairs of quote characters and allow
Eli> selection of any combination of any number of the pairs. What you
Eli> seem to suggest instead are pre-composed combinations, according to
Eli> your selection, which I think is less optimal. Can't Customize
Eli> support radio buttons and allow selection of any number of
Eli> possibilities, not just one out of many?
Sure, thatʼs another way to do it. Let me look at it. <epic struggle
with defcustom...>
So here all all the variations I can find. Itʼs pretty long. Iʼd be
tempted to leave out the last four, but Iʼll defer to you on that.
:tag "Single" (character ?‘) (character ?’))
:tag "Double" (character ?“) (character ?”))
:tag "Guillemets" (character ?«) (character ?»))
:tag "Single guillemets" (character ?‹) (character ?›))
:tag "Corners" (character ?「) (character ?」))
:tag "Double corners" (character ?『) (character ?』))
:tag "Low/high single left" (character ?‚) (character ?‘))
:tag "Low/high double left" (character ?„ ) (character ?“))
:tag "Low/high single right" (character ?‚) (character ?’))
:tag "Low/high double right" (character ?„ ) (character ?”))
:tag "Single inverted" (character ?’) (character ?‘))
:tag "Right single only" (character ?’) (character ?’))
:tag "Right double only" (character ?”) (character ?”))
:tag "Guillemets inverted" (character ?») (character ?«))
:tag "Guillemets right only" (character ?») (character ?»))
:tag "Single guillemets inverted" (character ?›) (character ?‹))
:tag "Mathematical double angle" (character ?⟪) (character ?⟫))
:tag "Mathematical single angle" (character ?⟨) (character ?⟩))
:tag "Double angle" (character ?《) (character ?》))
:tag "Single angle" (character ?〈) (character ?〉))
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 15:41 ` Robert Pluim
@ 2024-05-18 10:57 ` Eli Zaretskii
0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2024-05-18 10:57 UTC (permalink / raw)
To: Robert Pluim; +Cc: stephen.berman, 70984
> From: Robert Pluim <rpluim@gmail.com>
> Cc: stephen.berman@gmx.net, 70984@debbugs.gnu.org
> Date: Fri, 17 May 2024 17:41:35 +0200
>
> >>>>> On Fri, 17 May 2024 16:38:21 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> Eli> But then the correct UI is to show pairs of quote characters and allow
> Eli> selection of any combination of any number of the pairs. What you
> Eli> seem to suggest instead are pre-composed combinations, according to
> Eli> your selection, which I think is less optimal. Can't Customize
> Eli> support radio buttons and allow selection of any number of
> Eli> possibilities, not just one out of many?
>
> Sure, thatʼs another way to do it. Let me look at it. <epic struggle
> with defcustom...>
>
> So here all all the variations I can find. Itʼs pretty long. Iʼd be
> tempted to leave out the last four, but Iʼll defer to you on that.
LGTM, and I would leave them all there. Let the users decide.
Thanks.
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#70984: 30.0.50; Improved support for entering quotation marks, Re: bug#70984: 30.0.50; Improved support for entering quotation marks
2024-05-17 13:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-06-03 11:33 ` Robert Pluim
0 siblings, 0 replies; 19+ messages in thread
From: Robert Pluim @ 2024-06-03 11:33 UTC (permalink / raw)
To: Stephen Berman; +Cc: Eli Zaretskii, 70984
tags 70984 fixed
close 70984 30.1
quit
>>>>> On Fri, 17 May 2024 15:21:39 +0200, Stephen Berman <stephen.berman@gmx.net> said:
>> Iʼll update the patch to use v/b/n, and drop the 9/0 bindings, which
>> aligns Emacs with the usual GNU/Linux German keyboard layout.
I was briefly tempted to add x,v,b bindings in an alternate layout to
match the T2 keyboard, but weʼll wait until someone actually asks for
that :-)
Closing.
Committed as 0e811aba53f
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2024-06-03 11:33 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 14:35 bug#70984: 30.0.50; Improved support for entering quotation marks Robert Pluim
2024-05-16 15:55 ` Eli Zaretskii
2024-05-17 7:45 ` bug#70984: 30.0.50; Improved support for entering quotation marks, " Robert Pluim
2024-05-17 8:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 8:59 ` Robert Pluim
2024-05-17 9:59 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 12:10 ` Robert Pluim
2024-05-17 12:53 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 13:15 ` Robert Pluim
2024-05-17 13:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 11:33 ` Robert Pluim
2024-05-17 10:44 ` Eli Zaretskii
2024-05-17 12:15 ` Robert Pluim
2024-05-17 13:05 ` Eli Zaretskii
2024-05-17 13:27 ` Robert Pluim
2024-05-17 13:38 ` Eli Zaretskii
2024-05-17 15:41 ` Robert Pluim
2024-05-18 10:57 ` Eli Zaretskii
2024-05-16 16:05 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
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.