GNU bug report logs - #1580
zap-to-char too raw, or document

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Wed, 17 Dec 2008 06:34:23 UTC

Severity: minor

Tags: fixed

Fixed in version 24.2

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.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 1580 in the body.
You can then email your comments to 1580 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1580; Package emacs. (Wed, 17 Dec 2008 06:34:24 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 17 Dec 2008 06:34:24 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: zap-to-char too raw, or document
Date: Sun, 14 Dec 2008 23:28:13 +0800
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...





Severity set to `minor' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 17 Dec 2008 19:30:03 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Sun, 10 Jul 2011 14:34:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 1580 <at> debbugs.gnu.org
Subject: Re: zap-to-char too raw, or document
Date: Sun, 10 Jul 2011 16:26:35 +0200
jidanni <at> 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/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Sun, 10 Jul 2011 19:38:01 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: larsi <at> gnus.org
Cc: 1580 <at> debbugs.gnu.org
Subject: Re: zap-to-char too raw, or document
Date: Mon, 11 Jul 2011 03:37:40 +0800
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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Sat, 16 Jul 2011 18:32:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 1580 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: zap-to-char too raw, or document
Date: Sat, 16 Jul 2011 20:21:43 +0200
Lars Magne Ingebrigtsen <larsi <at> 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/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Sun, 17 Jul 2011 00:29:02 GMT) Full text and rfc822 format available.

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

From: "Stephen J. Turnbull" <turnbull <at> sk.tsukuba.ac.jp>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 1580 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, jidanni <at> jidanni.org
Subject: Re: zap-to-char too raw, or document
Date: Sun, 17 Jul 2011 09:23:21 +0900
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.






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Wed, 20 Jul 2011 15:04:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 1580 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#1580: zap-to-char too raw, or document
Date: Wed, 20 Jul 2011 11:02:55 -0400
Lars Magne Ingebrigtsen <larsi <at> 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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Wed, 20 Jul 2011 20:11:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 1580 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#1580: zap-to-char too raw, or document
Date: Wed, 20 Jul 2011 22:09:35 +0200
Chong Yidong <cyd <at> stupidchicken.com> writes:

> Apart from zap-to-char, is there anything that might need this?

Perhaps not.  We could just let that command read characters
specially...

> 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'...

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Thu, 21 Jul 2011 16:20:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 1580 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#1580: zap-to-char too raw, or document
Date: Thu, 21 Jul 2011 12:19:07 -0400
Lars Magne Ingebrigtsen <larsi <at> 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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Thu, 21 Jul 2011 19:18:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 1580 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	emacs-devel <at> gnu.org
Subject: Re: bug#1580: zap-to-char too raw, or document
Date: Thu, 21 Jul 2011 15:16:56 -0400
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".




Added tag(s) pending. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 31 Jul 2011 15:33:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Sun, 31 Jul 2011 15:35:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 1580 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	emacs-devel <at> gnu.org
Subject: Re: bug#1580: zap-to-char too raw, or document
Date: Sun, 31 Jul 2011 17:33:35 +0200
Glenn Morris <rgm <at> 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/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#1580; Package emacs. (Tue, 10 Apr 2012 02:26:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 1580 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	emacs-devel <at> gnu.org
Subject: Re: bug#1580: zap-to-char too raw, or document
Date: Tue, 10 Apr 2012 04:24:20 +0200
Lars Magne Ingebrigtsen <larsi <at> 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/




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 10 Apr 2012 02:26:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.2, send any further explanations to 1580 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 10 Apr 2012 02:26:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 May 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 362 days ago.

Previous Next


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