all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Postfix input methods and read-char
@ 2025-01-07 12:51 Gautier Ponsinet
  2025-01-07 13:13 ` tomas
  2025-01-07 13:35 ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Gautier Ponsinet @ 2025-01-07 12:51 UTC (permalink / raw)
  To: emacs-devel

Hello everyone,

The following question is motivated by the avy package
(https://github.com/abo-abo/avy) which relies on read-char. How to
select a character without accent via read-char with an active "postfix"
input method?

An example, in emacs -Q:
- C-u C-\ french-postfix <Enter>
- M-: (read-char "Prompt: " t) <Enter>
- a

Here, the minibuffer waits for a possible accent (^ or `). How can I
enter a simple "a" without accent?

All the best,
Gautier.



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

* Re: Postfix input methods and read-char
  2025-01-07 12:51 Postfix input methods and read-char Gautier Ponsinet
@ 2025-01-07 13:13 ` tomas
  2025-01-07 13:29   ` Gautier Ponsinet
  2025-01-07 13:35 ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: tomas @ 2025-01-07 13:13 UTC (permalink / raw)
  To: Gautier Ponsinet; +Cc: emacs-devel

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

On Tue, Jan 07, 2025 at 01:51:00PM +0100, Gautier Ponsinet wrote:
> Hello everyone,
> 
> The following question is motivated by the avy package
> (https://github.com/abo-abo/avy) which relies on read-char. How to
> select a character without accent via read-char with an active "postfix"
> input method?
> 
> An example, in emacs -Q:
> - C-u C-\ french-postfix <Enter>
> - M-: (read-char "Prompt: " t) <Enter>
> - a
> 
> Here, the minibuffer waits for a possible accent (^ or `). How can I
> enter a simple "a" without accent?

It seems that just entering the next character (whenever it isn't one
of the possible postfixes) does the trick (the echo area tells you which
postfix chars, if any, are possible).

Or perhaps I misunderstood your question?

Cheers
-- 
tomás

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Postfix input methods and read-char
  2025-01-07 13:13 ` tomas
@ 2025-01-07 13:29   ` Gautier Ponsinet
  0 siblings, 0 replies; 6+ messages in thread
From: Gautier Ponsinet @ 2025-01-07 13:29 UTC (permalink / raw)
  To: tomas; +Cc: emacs-devel

<tomas@tuxteam.de> [2025-01-07 14:13 +0100]:
> It seems that just entering the next character (whenever it isn't one
> of the possible postfixes) does the trick (the echo area tells you which
> postfix chars, if any, are possible).
>
> Or perhaps I misunderstood your question?

Hello Tomas,

Do you mean entering "a" again in the exemple or any other character other
than "^" or "`"? It is true but it not very convenient since this next
character is inserted in the buffer. With the avy package for instance,
it is not desirable. I would really like to be able to enter the
character "a" in the example and nothing else.

All the best,
Gautier.



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

* Re: Postfix input methods and read-char
  2025-01-07 12:51 Postfix input methods and read-char Gautier Ponsinet
  2025-01-07 13:13 ` tomas
@ 2025-01-07 13:35 ` Eli Zaretskii
  2025-01-07 14:02   ` Gautier Ponsinet
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2025-01-07 13:35 UTC (permalink / raw)
  To: Gautier Ponsinet; +Cc: emacs-devel

> From: Gautier Ponsinet <gautier@gautierponsinet.xyz>
> Date: Tue, 07 Jan 2025 13:51:00 +0100
> 
> Hello everyone,
> 
> The following question is motivated by the avy package
> (https://github.com/abo-abo/avy) which relies on read-char. How to
> select a character without accent via read-char with an active "postfix"
> input method?
> 
> An example, in emacs -Q:
> - C-u C-\ french-postfix <Enter>
> - M-: (read-char "Prompt: " t) <Enter>
> - a
> 
> Here, the minibuffer waits for a possible accent (^ or `). How can I
> enter a simple "a" without accent?

You need to type something after it.  For example, SPC.

Another method is to type "a C-\ C-\", i.e. type C-\ twice after
typing your ASCII character.



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

* Re: Postfix input methods and read-char
  2025-01-07 13:35 ` Eli Zaretskii
@ 2025-01-07 14:02   ` Gautier Ponsinet
  2025-01-07 14:21     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Gautier Ponsinet @ 2025-01-07 14:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Hello Eli,

Eli Zaretskii <eliz@gnu.org> [2025-01-07 15:35 +0200]:
> You need to type something after it.  For example, SPC.
>
> Another method is to type "a C-\ C-\", i.e. type C-\ twice after
> typing your ASCII character.

It works but it is not convenient with the avy package since in both
solutions, the next input (SPC or C-\) is interpreted by emacs. Is there
a way to enter the character a in the example and nothing more?

All the best,
Gautier.



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

* Re: Postfix input methods and read-char
  2025-01-07 14:02   ` Gautier Ponsinet
@ 2025-01-07 14:21     ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2025-01-07 14:21 UTC (permalink / raw)
  To: Gautier Ponsinet; +Cc: emacs-devel

> From: Gautier Ponsinet <gautier@gautierponsinet.xyz>
> Cc: emacs-devel@gnu.org
> Date: Tue, 07 Jan 2025 15:02:24 +0100
> 
> Hello Eli,
> 
> Eli Zaretskii <eliz@gnu.org> [2025-01-07 15:35 +0200]:
> > You need to type something after it.  For example, SPC.
> >
> > Another method is to type "a C-\ C-\", i.e. type C-\ twice after
> > typing your ASCII character.
> 
> It works but it is not convenient with the avy package since in both
> solutions, the next input (SPC or C-\) is interpreted by emacs. Is there
> a way to enter the character a in the example and nothing more?

What does avy do with C-\ and other similar keys?  And why is it a
problem that "the next input is interpreted by emacs"?

Are there any keys that avi doesn't interpret?

And no, I'm not aware of any other ways than these two.



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

end of thread, other threads:[~2025-01-07 14:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 12:51 Postfix input methods and read-char Gautier Ponsinet
2025-01-07 13:13 ` tomas
2025-01-07 13:29   ` Gautier Ponsinet
2025-01-07 13:35 ` Eli Zaretskii
2025-01-07 14:02   ` Gautier Ponsinet
2025-01-07 14:21     ` Eli Zaretskii

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.