GNU bug report logs - #6457
24.0.50; Inappropriate error msg for set-variable

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 18 Jun 2010 16:09:01 UTC

Severity: minor

Tags: confirmed, fixed, wontfix

Found in version 24.0.50

Fixed in version 27.1

Done: Lars 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 6457 in the body.
You can then email your comments to 6457 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Fri, 18 Jun 2010 16:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 18 Jun 2010 16:09:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; Inappropriate error msg for set-variable
Date: Fri, 18 Jun 2010 09:06:59 -0700
emacs -Q
M-x set-variable RET scroll-conservatively 
Set scroll-conservatively globally to value (0): 99999999 RET
 
No problem. Now do it again, adding one more `9':
M-x set-variable RET scroll-conservatively
Set scroll-conservatively globally to value (99999999): 999999999 RET
 
The error message is this:
 
Value `999999999.0' does not match type integer of
scroll-conservatively.
 
1. There should be no `.0' added to the echoed input. The actual input
should be echoed.  Emacs shouldn't seem to be complaining about
something the user didn't enter.
 
2. The cause of the error is an arithmetic overflow.  The message should
indicate this, if possible.  If not, it's OK to say that an integer
wasn't entered (since 999999999 is too big to correspond to an integer),
but such a message is not ideal and will be confusing to some users.
 
But the main problem is #1.  Confusion from a message saying that you
didn't input an integer is even greate if what is echoed is a decimal
number (999999999.0).
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-06-14 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Sat, 19 Jun 2010 14:56:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 6457 <at> debbugs.gnu.org
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Sat, 19 Jun 2010 17:43:16 +0300
> emacs -Q
> M-x set-variable RET scroll-conservatively
> Set scroll-conservatively globally to value (0): 99999999 RET
>
> No problem. Now do it again, adding one more `9':
> M-x set-variable RET scroll-conservatively
> Set scroll-conservatively globally to value (99999999): 999999999 RET

What is a number in parens?  I don't have these parens.
Do you use a modified source?

> The error message is this:
>
> Value `999999999.0' does not match type integer of
> scroll-conservatively.

I can't reproduce this bug when I set to 999999999.

When I tried a larger value "9999999999999999999",
I get the following error:

  Arithmetic overflow error: "9999999999999999999"

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Sun, 20 Jun 2010 14:49:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>
Cc: 6457 <at> debbugs.gnu.org
Subject: RE: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Sun, 20 Jun 2010 07:47:49 -0700
> > emacs -Q
> > M-x set-variable RET scroll-conservatively
> > Set scroll-conservatively globally to value (0): 99999999 RET
> >
> > No problem. Now do it again, adding one more `9':
> > M-x set-variable RET scroll-conservatively
> > Set scroll-conservatively globally to value (99999999): 
> 999999999 RET
> 
> What is a number in parens?  I don't have these parens.
> Do you use a modified source?

Forget the number in parens.
No, it does not appear with emacs -Q.

> > The error message is this:
> >
> > Value `999999999.0' does not match type integer of
> > scroll-conservatively.

That is still the (inappropriate) error message.

> I can't reproduce this bug when I set to 999999999.

Perhaps it is platform-specific.

> When I tried a larger value "9999999999999999999",
> I get the following error:
> 
>   Arithmetic overflow error: "9999999999999999999"

Perhaps the inappropriate error message is platform-specific.

I definitely see that message with emacs -Q.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 00:30:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'Juri Linkov' <juri <at> jurta.org>, 6457 <at> debbugs.gnu.org
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Wed, 05 Feb 2014 16:28:23 -0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

>> > The error message is this:
>> >
>> > Value `999999999.0' does not match type integer of
>> > scroll-conservatively.
>
> That is still the (inappropriate) error message.
>
>> I can't reproduce this bug when I set to 999999999.
>
> Perhaps it is platform-specific.
>
>> When I tried a larger value "9999999999999999999",
>> I get the following error:
>> 
>>   Arithmetic overflow error: "9999999999999999999"
>
> Perhaps the inappropriate error message is platform-specific.
>
> I definitely see that message with emacs -Q.

I get:

set-variable: Value `1e+19' does not match type integer of scroll-conservatively

So I can reproduce this bug.

(This is with Emacs 23.3.50 on Fedora.)

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




Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 06 Feb 2014 00:30:03 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 06 Feb 2014 00:30:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 01:42:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 6457 <at> debbugs.gnu.org
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Wed, 05 Feb 2014 20:41:29 -0500
Lars Ingebrigtsen wrote:

> set-variable: Value `1e+19' does not match type integer of scroll-conservatively
>

I guess this is due to the feature whereby values too large for integers
are read as floats, eg

http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00181.html

If so, I guess it is impossible for lisp code to know whether the user
originally typed an integer or a float. Therefore it is impossible to do
anything about this. It frankly doesn't seem worth bothering about
anyway.




Added tag(s) wontfix. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 06 Feb 2014 01:42:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 06:11:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 6457 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Thu, 06 Feb 2014 08:10:45 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Wed, 05 Feb 2014 16:28:23 -0800
> Cc: 6457 <at> debbugs.gnu.org
> 
> "Drew Adams" <drew.adams <at> oracle.com> writes:
> 
> >> > The error message is this:
> >> >
> >> > Value `999999999.0' does not match type integer of
> >> > scroll-conservatively.
> >
> > That is still the (inappropriate) error message.
> >
> >> I can't reproduce this bug when I set to 999999999.
> >
> > Perhaps it is platform-specific.
> >
> >> When I tried a larger value "9999999999999999999",
> >> I get the following error:
> >> 
> >>   Arithmetic overflow error: "9999999999999999999"
> >
> > Perhaps the inappropriate error message is platform-specific.
> >
> > I definitely see that message with emacs -Q.
> 
> I get:
> 
> set-variable: Value `1e+19' does not match type integer of scroll-conservatively
> 
> So I can reproduce this bug.

Yes, you can, just in a slightly different way: the user didn't enter
1e+19, either.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 06:20:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6457 <at> debbugs.gnu.org
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Thu, 06 Feb 2014 08:19:24 +0200
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Wed, 05 Feb 2014 20:41:29 -0500
> 
> Lars Ingebrigtsen wrote:
> 
> > set-variable: Value `1e+19' does not match type integer of scroll-conservatively
> >
> 
> I guess this is due to the feature whereby values too large for integers
> are read as floats, eg
> 
> http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00181.html
> 
> If so, I guess it is impossible for lisp code to know whether the user
> originally typed an integer or a float. Therefore it is impossible to do
> anything about this. It frankly doesn't seem worth bothering about
> anyway.

Then "wontfix" it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 06:30:05 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 6457 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Wed, 05 Feb 2014 22:28:02 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> set-variable: Value `1e+19' does not match type integer of
>> scroll-conservatively
>> 
>> So I can reproduce this bug.
>
> Yes, you can, just in a slightly different way: the user didn't enter
> 1e+19, either.

Yeah, I said "can", not "can't".  >"?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 06:40:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 6457 <at> debbugs.gnu.org
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Wed, 05 Feb 2014 22:37:55 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> If so, I guess it is impossible for lisp code to know whether the user
>> originally typed an integer or a float. Therefore it is impossible to do
>> anything about this. It frankly doesn't seem worth bothering about
>> anyway.
>
> Then "wontfix" it.

I agree that it's a minor thing, but it's an "er what?" moment for the
user.  So if anybody has an idea for how to fix this in a manner that
works across everything that asks for an integer, that would be nice...

Or is this problem only present for `set-variable'?  Then it might not
be worth fixing.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 06:56:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 6457 <at> debbugs.gnu.org
Subject: RE: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Wed, 5 Feb 2014 22:55:07 -0800 (PST)
> Or is this problem only present for `set-variable'?  Then it might
> not be worth fixing.

No, it is a general problem.

It's a problem here because `read-from-minibuffer' reads an
integer numeral as input, and the value read is effectively a
floating-point number.

You can see the same thing happen for (format "%S" 999999999).
That returns the number 999999999.0.

IOW, it is the Lisp reader that reads an integer numeral and
returns a non-integer number: (not (integerp 999999999)).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 08:07:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 6457 <at> debbugs.gnu.org
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Thu, 06 Feb 2014 03:06:23 -0500
Lars Ingebrigtsen wrote:

> I agree that it's a minor thing, but it's an "er what?" moment for the
> user.

Realistically, how often do you expect people to try to customize
integer variables to values larger than most-positive-fixnum?
"I wonder what will happen if I set this to an absurdly large value"
does not count.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Thu, 06 Feb 2014 08:18:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 6457 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Thu, 06 Feb 2014 10:17:06 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: drew.adams <at> oracle.com,  6457 <at> debbugs.gnu.org
> Date: Wed, 05 Feb 2014 22:28:02 -0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> set-variable: Value `1e+19' does not match type integer of
> >> scroll-conservatively
> >> 
> >> So I can reproduce this bug.
> >
> > Yes, you can, just in a slightly different way: the user didn't enter
> > 1e+19, either.
> 
> Yeah, I said "can", not "can't".  >"?

Sorry, I didn't have enough caffeine in my blood when I wrote that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6457; Package emacs. (Fri, 23 Aug 2019 05:29:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 6457 <at> debbugs.gnu.org
Subject: Re: bug#6457: 24.0.50; Inappropriate error msg for set-variable
Date: Fri, 23 Aug 2019 07:28:35 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

>> Or is this problem only present for `set-variable'?  Then it might
>> not be worth fixing.
>
> No, it is a general problem.
>
> It's a problem here because `read-from-minibuffer' reads an
> integer numeral as input, and the value read is effectively a
> floating-point number.
>
> You can see the same thing happen for (format "%S" 999999999).
> That returns the number 999999999.0.
>
> IOW, it is the Lisp reader that reads an integer numeral and
> returns a non-integer number: (not (integerp 999999999)).

I think this has been fixed once and for all in Emacs 27 with the new
bignum support, so I'm closing this bug report.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 23 Aug 2019 05:29:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 6457 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 23 Aug 2019 05:29: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. (Fri, 20 Sep 2019 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 212 days ago.

Previous Next


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