all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Avoiding selection in quail
@ 2019-06-29 17:36 Douglas Lewan
  2019-06-29 18:16 ` Eli Zaretskii
  2019-06-29 18:33 ` Yuri Khan
  0 siblings, 2 replies; 4+ messages in thread
From: Douglas Lewan @ 2019-06-29 17:36 UTC (permalink / raw)
  To: help-gnu-emacs

I'd like to add "|N" --> "ℕ" (among a few others) to latin-1-prefix:

(with-temp-buffer
   (set-input-method 'latin-1-prefix)
   ...
   (quail-defrule "|N" "̱ℕ")
   ...))

When I type "|N" quail gives me a list to choose from. I know that in 
previous lives that hasn't happened. Can someone help my understand what 
I'm doing wrong?

I'm running emacs 24.5 on Debian 9.4.0. (My first thought was that 
Debian might have messed with something related, but I've gone through 
the Debian-specific emacs lisp, but I didn't find anything.)

Thanks.

-- 
,Doug




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Avoiding selection in quail
  2019-06-29 17:36 Avoiding selection in quail Douglas Lewan
@ 2019-06-29 18:16 ` Eli Zaretskii
  2019-06-29 18:33 ` Yuri Khan
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2019-06-29 18:16 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Douglas Lewan <d.lewan2000@gmail.com>
> Date: Sat, 29 Jun 2019 13:36:57 -0400
> 
> I'd like to add "|N" --> "ℕ" (among a few others) to latin-1-prefix:
> 
> (with-temp-buffer
>    (set-input-method 'latin-1-prefix)
>    ...
>    (quail-defrule "|N" "̱ℕ")
>    ...))
> 
> When I type "|N" quail gives me a list to choose from.

What kind of "list" is that?  Please show what you see in the echo
area after typing | and after typing N that follows.

Also, it could be that the other rules you added are relevant, so
please show them all.

In general, if Emacs shows several possible sequences, it means what
you typed is ambiguous and can be the beginning of more than one full
sequence.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Avoiding selection in quail
  2019-06-29 17:36 Avoiding selection in quail Douglas Lewan
  2019-06-29 18:16 ` Eli Zaretskii
@ 2019-06-29 18:33 ` Yuri Khan
  2019-06-29 21:27   ` Douglas Lewan
  1 sibling, 1 reply; 4+ messages in thread
From: Yuri Khan @ 2019-06-29 18:33 UTC (permalink / raw)
  To: Douglas Lewan; +Cc: help-gnu-emacs

On Sun, Jun 30, 2019 at 12:50 AM Douglas Lewan <d.lewan2000@gmail.com> wrote:
>
>    (quail-defrule "|N" "̱ℕ")
>
> When I type "|N" quail gives me a list to choose from.

Your translation string consists of two characters, the first being
U+0331 COMBINING MACRON BELOW, the second U+2115 DOUBLE-STRUCK CAPITAL
N. quail-defrule’s docstring says each character becomes a translation
candidate.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Avoiding selection in quail
  2019-06-29 18:33 ` Yuri Khan
@ 2019-06-29 21:27   ` Douglas Lewan
  0 siblings, 0 replies; 4+ messages in thread
From: Douglas Lewan @ 2019-06-29 21:27 UTC (permalink / raw)
  To: Yuri Khan, eliz; +Cc: help-gnu-emacs

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

On 06/29/2019 02:16 PM, Eli Zaretskii wrote:
>> From: Douglas Lewan <d.lewan2000@gmail.com>
>> Date: Sat, 29 Jun 2019 13:36:57 -0400
>>
>> I'd like to add "|N" --> "ℕ" (among a few others) to latin-1-prefix:
>>
>> (with-temp-buffer
>>     (set-input-method 'latin-1-prefix)
>>     ...
>>     (quail-defrule "|N" "̱ℕ")
>>     ...))
>>
>> When I type "|N" quail gives me a list to choose from.
> What kind of "list" is that?  Please show what you see in the echo
> area after typing | and after typing N that follows.
>
> Also, it could be that the other rules you added are relevant, so
> please show them all.
>
> In general, if Emacs shows several possible sequences, it means what
> you typed is ambiguous and can be the beginning of more than one full
> sequence.
>
Here's what I see in the echo area:
     |N     (01/01) 1.̱ 2.ℕ
(Well, that's my rendition. I couldn't figure out how to capture the 
echo area. A corresponding image is attached.)

On 06/29/2019 02:33 PM, Yuri Khan wrote:
> On Sun, Jun 30, 2019 at 12:50 AM Douglas Lewan <d.lewan2000@gmail.com> wrote:
>>     (quail-defrule "|N" "̱ℕ")
>>
>> When I type "|N" quail gives me a list to choose from.
> Your translation string consists of two characters, the first being
> U+0331 COMBINING MACRON BELOW, the second U+2115 DOUBLE-STRUCK CAPITAL
> N. quail-defrule’s docstring says each character becomes a translation
> candidate.
This sounds good and pointed me in the right direction. I shouldn't have 
been using strings as targets of quail rules; I should have been using 
characters (and I do now). That explains the ambiguity that Eli mentions.
Touching an input method is not something you do very often, so I'm not 
surprised I forgot a detail. Things look good now.
Thanks to both of you for the help.

-- 
,Doug


[-- Attachment #2: list.png --]
[-- Type: image/png, Size: 126012 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-29 21:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-29 17:36 Avoiding selection in quail Douglas Lewan
2019-06-29 18:16 ` Eli Zaretskii
2019-06-29 18:33 ` Yuri Khan
2019-06-29 21:27   ` Douglas Lewan

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.