unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1580: zap-to-char too raw, or document
@ 2008-12-14 15:28 jidanni
  2011-07-10 14:26 ` Lars Magne Ingebrigtsen
  2011-07-10 19:37 ` jidanni
  0 siblings, 2 replies; 10+ messages in thread
From: jidanni @ 2008-12-14 15:28 UTC (permalink / raw)
  To: bug-gnu-emacs

M-z runs the command zap-to-char.
Its docstring should mention how to zap to e.g., C-g.
You see the problem is that it eats the C-q before you have a chance
to type C-q C-g.
Therefore it should say that you will have to use eval-expression
etc., unless it is tamed...







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

* bug#1580: zap-to-char too raw, or document
  2008-12-14 15:28 bug#1580: zap-to-char too raw, or document jidanni
@ 2011-07-10 14:26 ` Lars Magne Ingebrigtsen
  2011-07-16 18:21   ` Lars Magne Ingebrigtsen
       [not found]   ` <m3fwm62iiw.fsf@quimbies.gnus.org>
  2011-07-10 19:37 ` jidanni
  1 sibling, 2 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-10 14:26 UTC (permalink / raw)
  To: jidanni; +Cc: 1580

jidanni@jidanni.org writes:

> M-z runs the command zap-to-char.
> Its docstring should mention how to zap to e.g., C-g.
> You see the problem is that it eats the C-q before you have a chance
> to type C-q C-g.
> Therefore it should say that you will have to use eval-expression
> etc., unless it is tamed...

I think `C-g' is the only character you can't zap to.  Well, or any
character that requires an input method.

Should there be an interactive spec for reading a character that allows
using `C-q' for quoting, and that allows using the current input method?

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





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

* bug#1580: zap-to-char too raw, or document
  2008-12-14 15:28 bug#1580: zap-to-char too raw, or document jidanni
  2011-07-10 14:26 ` Lars Magne Ingebrigtsen
@ 2011-07-10 19:37 ` jidanni
  1 sibling, 0 replies; 10+ messages in thread
From: jidanni @ 2011-07-10 19:37 UTC (permalink / raw)
  To: larsi; +Cc: 1580

LMI> Should there be an interactive spec for reading a character that allows
LMI> using `C-q' for quoting, and that allows using the current input method?

Maybe say how to enter the char in octal, etc.





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

* bug#1580: zap-to-char too raw, or document
  2011-07-10 14:26 ` Lars Magne Ingebrigtsen
@ 2011-07-16 18:21   ` Lars Magne Ingebrigtsen
       [not found]   ` <m3fwm62iiw.fsf@quimbies.gnus.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-16 18:21 UTC (permalink / raw)
  To: jidanni; +Cc: 1580, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> I think `C-g' is the only character you can't zap to.  Well, or any
> character that requires an input method.
>
> Should there be an interactive spec for reading a character that allows
> using `C-q' for quoting, and that allows using the current input method?

(Cc-ing to emacs-devel, since it's a slightly more general problem.)

We have the "c" interactive spec that's used in commands like
`zap-to-char'.  The "c" spec doesn't seem to allow using input methods,
or to use `C-q'.

So it's pretty difficult to zap to 日.  

Should there be an interactive spec that allows reading one character,
but allows input methods?  Or does that make no sense?

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





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

* bug#1580: zap-to-char too raw, or document
       [not found]   ` <m3fwm62iiw.fsf@quimbies.gnus.org>
@ 2011-07-17  0:23     ` Stephen J. Turnbull
  2011-07-20 15:02     ` Chong Yidong
  1 sibling, 0 replies; 10+ messages in thread
From: Stephen J. Turnbull @ 2011-07-17  0:23 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 1580, jidanni, emacs-devel

Lars Magne Ingebrigtsen writes:

 > Should there be an interactive spec that allows reading one character,
 > but allows input methods?  Or does that make no sense?

Yes, there should be such a spec.  Personally, I would expect "c" to
be that spec.  This does make sense both conceptually and
implementation-wise because input methods conceptually operate as a
"preedit" stage.  And of course if your input method is implemented in
the OS rather than Emacs you already can input non-ASCII characters to
the "c" interactive spec.

However, many input methods can return non-trivial strings (in
Japanese it's quite common to compose whole sentences in the input
method before the input method returns any characters), and IIRC the
XIM spec explicitly says a string is returned.  In cases of phonetic
input methods for Asian languages, it is often convenient to convert a
whole word then delete unneeded characters to get a specific
character.  My recommendation would be for "c" to read either a
character or a string, characters being used directly, and otherwise
extracting the first character from the string read.  An empty string
would be an error.







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

* bug#1580: zap-to-char too raw, or document
       [not found]   ` <m3fwm62iiw.fsf@quimbies.gnus.org>
  2011-07-17  0:23     ` Stephen J. Turnbull
@ 2011-07-20 15:02     ` Chong Yidong
       [not found]       ` <m3pql4ww74.fsf@quimbies.gnus.org>
  1 sibling, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2011-07-20 15:02 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 1580, jidanni, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Should there be an interactive spec that allows reading one character,
> but allows input methods?  Or does that make no sense?

Apart from zap-to-char, is there anything that might need this?  It's
generally not worth it to add interactive codes for every conceivable
operation.  In this case, I think using read-char in the interactive
form should work.





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

* bug#1580: zap-to-char too raw, or document
       [not found]       ` <m3pql4ww74.fsf@quimbies.gnus.org>
@ 2011-07-21 16:19         ` Chong Yidong
  2011-07-21 19:16         ` Glenn Morris
       [not found]         ` <l9wrfb30lz.fsf@fencepost.gnu.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Chong Yidong @ 2011-07-21 16:19 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 1580, jidanni, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

>> It's generally not worth it to add interactive codes for every
>> conceivable operation.  In this case, I think using read-char in the
>> interactive form should work.
>
> Will `read-char' allow zapping to `C-g'?  It doesn't seem to be
> possible to say `C-q C-g'...

I don't think it allows `C-q C-g', but it would allow using the input
method, which is probably a more common need.  I don't support any
changes in this area until after the release, tho.





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

* bug#1580: zap-to-char too raw, or document
       [not found]       ` <m3pql4ww74.fsf@quimbies.gnus.org>
  2011-07-21 16:19         ` Chong Yidong
@ 2011-07-21 19:16         ` Glenn Morris
       [not found]         ` <l9wrfb30lz.fsf@fencepost.gnu.org>
  2 siblings, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2011-07-21 19:16 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 1580, Chong Yidong, emacs-devel


For the ctrl-g bit, just suggest

M-: (zap-to-char 1 ?\C-g)

in the doc-string and be done with it (nobody else is ever going to care
about this).

Otherwise the next bug report will be "I can't quit zap-to-char".





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

* bug#1580: zap-to-char too raw, or document
       [not found]         ` <l9wrfb30lz.fsf@fencepost.gnu.org>
@ 2011-07-31 15:33           ` Lars Magne Ingebrigtsen
       [not found]           ` <m3pqkqea7k.fsf@stories.gnus.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-31 15:33 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 1580, Chong Yidong, emacs-devel

Glenn Morris <rgm@gnu.org> writes:

> For the ctrl-g bit, just suggest
>
> M-: (zap-to-char 1 ?\C-g)
>
> in the doc-string and be done with it (nobody else is ever going to care
> about this).
>
> Otherwise the next bug report will be "I can't quit zap-to-char".

Well, they can quit by just not saying `C-q' before the `C-g'.  :-)

But I think just allowing input methods, and not allowing `C-q' would be
the best solution.

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





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

* bug#1580: zap-to-char too raw, or document
       [not found]           ` <m3pqkqea7k.fsf@stories.gnus.org>
@ 2012-04-10  2:24             ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-10  2:24 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 1580, emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> But I think just allowing input methods, and not allowing `C-q' would be
> the best solution.

I've now altered `zap-to-char' to use `read-char' inheriting input
methods.  I don't think it's worth mentioning in the NEWS file.

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





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

end of thread, other threads:[~2012-04-10  2:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-14 15:28 bug#1580: zap-to-char too raw, or document jidanni
2011-07-10 14:26 ` Lars Magne Ingebrigtsen
2011-07-16 18:21   ` Lars Magne Ingebrigtsen
     [not found]   ` <m3fwm62iiw.fsf@quimbies.gnus.org>
2011-07-17  0:23     ` Stephen J. Turnbull
2011-07-20 15:02     ` Chong Yidong
     [not found]       ` <m3pql4ww74.fsf@quimbies.gnus.org>
2011-07-21 16:19         ` Chong Yidong
2011-07-21 19:16         ` Glenn Morris
     [not found]         ` <l9wrfb30lz.fsf@fencepost.gnu.org>
2011-07-31 15:33           ` Lars Magne Ingebrigtsen
     [not found]           ` <m3pqkqea7k.fsf@stories.gnus.org>
2012-04-10  2:24             ` Lars Magne Ingebrigtsen
2011-07-10 19:37 ` jidanni

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).