GNU bug report logs - #55668
Extending the `C-x 8' map to include macrons

Previous Next

Package: emacs;

Reported by: Tor Kringeland <tor.kringeland <at> ntnu.no>

Date: Fri, 27 May 2022 01:04:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55668 in the body.
You can then email your comments to 55668 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Fri, 27 May 2022 01:04:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tor Kringeland <tor.kringeland <at> ntnu.no>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 27 May 2022 01:04:01 GMT) Full text and rfc822 format available.

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

From: Tor Kringeland <tor.kringeland <at> ntnu.no>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 01:03:10 +0000
Currently `C-x 8 -' produces `­' (soft hyphen).  Finding uses of words
in English texts with letters with macrons are not uncommon.  For
example, it is the preferred way to write Māori names (and other words)
and Japanese names (e.g., Dōgen), since macrons denote a longer sound
which is often lost when reading these words the "default" way in
English.

I suggest chaning the `C-x 8' to add macrons to letters after `C-x 8 -'
and move the current `C-x 8 -' to `C-x 8 - -'.  Something similar was
done a while ago with `C-x 8 .' being moved to `C-x 8 . .' to allow for
new character compositions.

(It could be said that `C-x 8 _' be used, but it already has an entry
for `C-x 8 _ o' and it's not `ō'.)

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Fri, 27 May 2022 05:52:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tor Kringeland <tor.kringeland <at> ntnu.no>
Cc: 55668 <at> debbugs.gnu.org
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 08:51:36 +0300
> From: Tor Kringeland <tor.kringeland <at> ntnu.no>
> Date: Fri, 27 May 2022 01:03:10 +0000
> 
> I suggest chaning the `C-x 8' to add macrons to letters after `C-x 8 -'
> and move the current `C-x 8 -' to `C-x 8 - -'.  Something similar was
> done a while ago with `C-x 8 .' being moved to `C-x 8 . .' to allow for
> new character compositions.

I _really_ don't like us changing the default key bindings that exist
for a significant amount of time.  "C-x 8 -" exists at least since
Emacs 22, so changing it would be a bad blow to people's habits.

It sounds like you want to search for letters with combining macron,
like ā and ō?  If so, why not use a suitable input method to type
those letters?  That is the standard way in Emacs to type characters
that are not on the keyboard.  (If support for typing those characters
is missing from the input methods we have, we could relatively easily
add them.)

> (It could be said that `C-x 8 _' be used, but it already has an entry
> for `C-x 8 _ o' and it's not `ō'.)

We could augment iso-transl.el to produce the likes of ā via "C-x 8",
e.g. with "C-x 8 a -" or "C-x 8 a _".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Fri, 27 May 2022 06:04:02 GMT) Full text and rfc822 format available.

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

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Tor Kringeland <tor.kringeland <at> ntnu.no>
Cc: 55668 <at> debbugs.gnu.org
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 08:03:25 +0200
Tor Kringeland <tor.kringeland <at> ntnu.no> writes:

> I suggest chaning the `C-x 8' to add macrons to letters after `C-x 8 -'
> and move the current `C-x 8 -' to `C-x 8 - -'.  Something similar was
> done a while ago with `C-x 8 .' being moved to `C-x 8 . .' to allow for
> new character compositions.
>
> (It could be said that `C-x 8 _' be used, but it already has an entry
> for `C-x 8 _ o' and it's not `ō'.)

From the peanut gallery (I don't use macrons much in my writing, so
please disregard if not helpful): if we are going to displace an
existing binding, why not `C-x 8 ='?  It's currently bound to ¯
(MACRON), and the = prefix is reminiscent of TeX, where \=o yields ō
(which is usable right now with the TeX input method).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Fri, 27 May 2022 10:58:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: Tor Kringeland <tor.kringeland <at> ntnu.no>, 55668 <at> debbugs.gnu.org
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 12:56:50 +0200
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:

>>From the peanut gallery (I don't use macrons much in my writing, so
> please disregard if not helpful): if we are going to displace an
> existing binding, why not `C-x 8 ='?  It's currently bound to ¯
> (MACRON), and the = prefix is reminiscent of TeX, where \=o yields ō
> (which is usable right now with the TeX input method).

I think doing that might make sense.  And `C-x 8 = =' would insert ¯, so
it wouldn't be very disruptive for people.

(While I could see that some people would be annoyed by changing `C-x 8
-' to `C-x 8 - -'.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Fri, 27 May 2022 12:50:01 GMT) Full text and rfc822 format available.

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

From: Tor Kringeland <tor.kringeland <at> ntnu.no>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: "55668 <at> debbugs.gnu.org" <55668 <at> debbugs.gnu.org>
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 12:49:40 +0000
Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:

> From the peanut gallery (I don't use macrons much in my writing, so
> please disregard if not helpful): if we are going to displace an
> existing binding, why not `C-x 8 ='?  It's currently bound to ¯
> (MACRON), and the = prefix is reminiscent of TeX, where \=o yields ō
> (which is usable right now with the TeX input method).

Didn't know about this one.  I think it'd be better to use it instead of
`C-x 8 -', then, since the change in behavior is not so different.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Fri, 27 May 2022 13:17:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tor Kringeland <tor.kringeland <at> ntnu.no>
Cc: 55668 <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 16:16:38 +0300
> Cc: "55668 <at> debbugs.gnu.org" <55668 <at> debbugs.gnu.org>
> From: Tor Kringeland <tor.kringeland <at> ntnu.no>
> Date: Fri, 27 May 2022 12:49:40 +0000
> 
> Kévin Le Gouguec <kevin.legouguec <at> gmail.com> writes:
> 
> > From the peanut gallery (I don't use macrons much in my writing, so
> > please disregard if not helpful): if we are going to displace an
> > existing binding, why not `C-x 8 ='?  It's currently bound to ¯
> > (MACRON), and the = prefix is reminiscent of TeX, where \=o yields ō
> > (which is usable right now with the TeX input method).
> 
> Didn't know about this one.  I think it'd be better to use it instead of
> `C-x 8 -', then, since the change in behavior is not so different.

Does the below fit the bill?

diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el
index b90c065..bdfe9b1 100644
--- a/lisp/international/iso-transl.el
+++ b/lisp/international/iso-transl.el
@@ -134,7 +134,19 @@ iso-transl-char-map
     ("*<"   . [?«])
     ("<"    . [?«])
     ("*="   . [?¯])
-    ("="    . [?¯])
+    ("=="   . [?¯])
+    ("=A"   . [?Ā])
+    ("=a"   . [?ā])
+    ("=E"   . [?Ē])
+    ("=e"   . [?ē])
+    ("=I"   . [?Ī])
+    ("=i"   . [?ī])
+    ("=O"   . [?Ō])
+    ("=o"   . [?ō])
+    ("=U"   . [?Ū])
+    ("=u"   . [?ū])
+    ("=Y"   . [?Ȳ])
+    ("=y"   . [?ȳ])
     ("*>"   . [?»])
     (">"    . [?»])
     ("*?"   . [?¿])




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Fri, 27 May 2022 13:41:02 GMT) Full text and rfc822 format available.

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

From: Tor Kringeland <tor.kringeland <at> ntnu.no>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "55668 <at> debbugs.gnu.org" <55668 <at> debbugs.gnu.org>,
 "kevin.legouguec <at> gmail.com" <kevin.legouguec <at> gmail.com>
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 13:40:49 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

> Does the below fit the bill?

It does --- thanks!



Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 27 May 2022 15:43:01 GMT) Full text and rfc822 format available.

Notification sent to Tor Kringeland <tor.kringeland <at> ntnu.no>:
bug acknowledged by developer. (Fri, 27 May 2022 15:43:01 GMT) Full text and rfc822 format available.

Message #28 received at 55668-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tor Kringeland <tor.kringeland <at> ntnu.no>
Cc: 55668-done <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Fri, 27 May 2022 18:42:36 +0300
> From: Tor Kringeland <tor.kringeland <at> ntnu.no>
> CC: "kevin.legouguec <at> gmail.com" <kevin.legouguec <at> gmail.com>,
> 	"55668 <at> debbugs.gnu.org" <55668 <at> debbugs.gnu.org>
> Date: Fri, 27 May 2022 13:40:49 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Does the below fit the bill?
> 
> It does --- thanks!

Thanks, installed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Sat, 28 May 2022 01:47:02 GMT) Full text and rfc822 format available.

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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: 55668 <at> debbugs.gnu.org, eliz <at> gnu.org, tor.kringeland <at> ntnu.no
Cc: kevin.legouguec <at> gmail.com
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Sat, 28 May 2022 13:46:52 +1200
On 2022-05-28 03:42, Eli Zaretskii wrote:
>> From: Tor Kringeland <tor.kringeland <at> ntnu.no>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> > Does the below fit the bill?
>> It does --- thanks!
> Thanks, installed.

Nice.

Just as an addendum:

On 2022-05-27 17:51, Eli Zaretskii wrote:
> It sounds like you want to search for letters with combining macron,
> like ā and ō?  If so, why not use a suitable input method to type
> those letters?  That is the standard way in Emacs to type characters
> that are not on the keyboard.  (If support for typing those characters
> is missing from the input methods we have, we could relatively easily
> add them.)

I find the latin-4-postfix input method good for entering macrons:

             | postfix | examples
 ------------+---------+----------
  macron     |    -    | a- -> ā


I have this configured as the default:

;; Latin-4 facilitates macron accents (e.g. a- => ā).
;; n.b. If `current-language-environment' is customized, it clobbers 
this.
(setq default-input-method "latin-4-postfix")


-Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55668; Package emacs. (Mon, 06 Jun 2022 09:54:02 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: tor.kringeland <at> ntnu.no, eliz <at> gnu.org, 55668 <at> debbugs.gnu.org,
 kevin.legouguec <at> gmail.com
Subject: Re: bug#55668: Extending the `C-x 8' map to include macrons
Date: Mon, 06 Jun 2022 11:53:29 +0200
[Message part 1 (text/plain, inline)]
(what is it about Monday mornings and character rabbit holes?)

>>>>> On Sat, 28 May 2022 13:46:52 +1200, Phil Sainty <psainty <at> orcon.net.nz> said:

    Phil> I find the latin-4-postfix input method good for entering macrons:

    Phil>              | postfix | examples
    Phil>  ------------+---------+----------
    Phil>   macron     |    -    | a- -> ā

Yep. There were a couple missing from latin-postfix and C-x 8, and they were all
missing from latin-prefix, so I came up with the below. If the AE
stuff is overkill, I can remove it.

Robert
-- 
[0001-Add-more-characters-with-macron-in-C-x-8-map-and-lat.patch (text/x-diff, inline)]
From f685eaf33b7c323604aaa581a1848979045521f9 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Mon, 6 Jun 2022 11:46:55 +0200
Subject: [PATCH] Add more characters with macron in C-x 8 map and latin input
 methods
To: emacs-devel <at> gnu.org

* lisp/international/iso-transl.el (iso-transl-char-map): Add
sequences for {AE,ae,G,g} with macron.
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add missing entries
for {AE,ae,G,g} with macron.
* lisp/leim/quail/latin-pre.el ("latin-prefix"): Add entries for
'letter with macron' for {A,a,E,e,AE,ae,I,I,O,o,U,u,Y,y} with macron.

(Bug#55668)
---
 lisp/international/iso-transl.el |  6 ++++++
 lisp/leim/quail/latin-post.el    |  7 +++++++
 lisp/leim/quail/latin-pre.el     | 18 ++++++++++++++++++
 3 files changed, 31 insertions(+)

diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el
index 3be80e5e6a..5243293312 100644
--- a/lisp/international/iso-transl.el
+++ b/lisp/international/iso-transl.el
@@ -123,10 +123,12 @@ iso-transl-char-map
     ("/A"   . [?Å])
     ("/L"   . [?Ł])
     ("/E"   . [?Æ])
+    ("/=E"  . [?Ǣ])
     ("/O"   . [?Ø])
     ("/a"   . [?å])
     ("/l"   . [?ł])
     ("/e"   . [?æ])
+    ("/=e"  . [?ǣ])
     ("/o"   . [?ø])
     ("1/2"  . [?½])
     ("1/4"  . [?¼])
@@ -139,6 +141,10 @@ iso-transl-char-map
     ("=a"   . [?ā])
     ("=E"   . [?Ē])
     ("=e"   . [?ē])
+    ("=/E"  . [?Ǣ])
+    ("=/e"  . [?ǣ])
+    ("=G"   . [?Ḡ])
+    ("=g"   . [?ḡ])
     ("=I"   . [?Ī])
     ("=i"   . [?ī])
     ("=O"   . [?Ō])
diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el
index acb3ef8ede..008c949f90 100644
--- a/lisp/leim/quail/latin-post.el
+++ b/lisp/leim/quail/latin-post.el
@@ -2239,6 +2239,7 @@
   tilde      |    ~    | a~ -> ã
   cedilla    |    ,    | c, -> ç
   ogonek     |    ,    | a, -> ą
+  macron     |    -    | a- -> ā   g- -> ḡ e/- -> ǣ
   breve      |    ~    | a~ -> ă
   caron      |    ~    | c~ -> č
   dbl. acute |    :    | o: -> ő
@@ -2284,11 +2285,14 @@
  ("E-" ?Ē)
  ("E." ?Ė)
  ("E/" ?Æ)
+ ("E//" ?Æ)
+ ("E/-" ?Ǣ)
  ("E\"" ?Ë)
  ("E^" ?Ê)
  ("E`" ?È)
  ("E~" ?Ě)
  ("G," ?Ģ)
+ ("G-" ?Ḡ)
  ("G." ?Ġ)
  ("G^" ?Ĝ)
  ("G~" ?Ğ)
@@ -2374,12 +2378,15 @@
  ("e-" ?ē)
  ("e." ?ė)
  ("e/" ?æ)
+ ("e//" ?æ)
+ ("e/-" ?ǣ)
  ("e\"" ?ë)
  ("e^" ?ê)
  ("e`" ?è)
  ("e~" ?ě)
  ("e=" ?€)
  ("g," ?ģ)
+ ("g-" ?ḡ)
  ("g." ?ġ)
  ("g^" ?ĝ)
  ("g~" ?ğ)
diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el
index b6a26e0b2c..55435d5675 100644
--- a/lisp/leim/quail/latin-pre.el
+++ b/lisp/leim/quail/latin-pre.el
@@ -1104,6 +1104,7 @@
    cedilla   |  , ~   | ,c -> ç  ~c -> ç
     caron    |   ~    | ~c -> č  ~g -> ğ
     breve    |   ~    | ~a -> ă
+    macron   |   -    | -a -> ā  -/e -> ǣ  -- -> ¯
   dot above  |   / .  | /g -> ġ   .g -> ġ
     misc     | \" ~ /  | \"s -> ß  ~d -> ð  ~t -> þ  /a -> å  /e -> æ  /o -> ø
    symbol    |   ~    | ~> -> »  ~< -> «  ~! -> ¡  ~? -> ¿  ~~ -> ¸
@@ -1112,6 +1113,23 @@
 " nil t nil nil nil nil nil nil nil nil t)
 
 (quail-define-rules
+ ("--" ?¯)
+ ("-A" ?Ā)
+ ("-a" ?ā)
+ ("-E" ?Ē)
+ ("-e" ?ē)
+ ("-/E" ?Ǣ)
+ ("-/e" ?ǣ)
+ ("-G" ?Ḡ)
+ ("-g" ?ḡ)
+ ("-I" ?Ī)
+ ("-i" ?ī)
+ ("-O" ?Ō)
+ ("-o" ?ō)
+ ("-U" ?Ū)
+ ("-u" ?ū)
+ ("-Y" ?Ȳ)
+ ("-y" ?ȳ)
  ("' " ?')
  ("''" ?´)
  ("'A" ?Á)
-- 
2.35.1.607.gf01e51a7cf


bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Jul 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 353 days ago.

Previous Next


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