unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42438: 26.3; calc: Entering .. results in [Bad format] error
@ 2020-07-20  6:08 Allen Li
  2020-07-21  9:00 ` Mattias Engdegård
  0 siblings, 1 reply; 4+ messages in thread
From: Allen Li @ 2020-07-20  6:08 UTC (permalink / raw)
  To: 42438

In calc mode (C-x * *), pressing:

[ 1 RET ..

should result in an incomplete interval object on the calc stack.

However, pressing the second dot causes a [Bad format] message in the
minibuffer.  Pressing dot a third time produces the expected behavior.

In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
 of 2020-05-19 built on felixonmars2
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description:	Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-wide-int
 --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix





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

* bug#42438: 26.3; calc: Entering .. results in [Bad format] error
  2020-07-20  6:08 bug#42438: 26.3; calc: Entering .. results in [Bad format] error Allen Li
@ 2020-07-21  9:00 ` Mattias Engdegård
  2020-07-22  4:07   ` Allen Li
  0 siblings, 1 reply; 4+ messages in thread
From: Mattias Engdegård @ 2020-07-21  9:00 UTC (permalink / raw)
  To: Allen Li; +Cc: 42438

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

Thanks for reporting this! Does the attached patch help?


[-- Attachment #2: calc-bug42438.diff --]
[-- Type: application/octet-stream, Size: 472 bytes --]

diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 4e4fb67173..09b4962107 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -2429,7 +2429,7 @@ calcDigit-key
 	  (if (and (memq last-command-event '(?@ ?o ?h ?\' ?m))
 		   (string-match " " calc-hms-format))
 	      (insert " "))
-	(if (and (eq this-command last-command)
+	(if (and (memq last-command '(calcDigit-start calcDigit-key))
 		 (eq last-command-event ?.))
 	    (progn
 	      (require 'calc-ext)

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

* bug#42438: 26.3; calc: Entering .. results in [Bad format] error
  2020-07-21  9:00 ` Mattias Engdegård
@ 2020-07-22  4:07   ` Allen Li
  2020-07-22  9:31     ` Mattias Engdegård
  0 siblings, 1 reply; 4+ messages in thread
From: Allen Li @ 2020-07-22  4:07 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 42438

Mattias Engdegård <mattiase@acm.org> writes:

> Thanks for reporting this! Does the attached patch help?

Yes, that works.





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

* bug#42438: 26.3; calc: Entering .. results in [Bad format] error
  2020-07-22  4:07   ` Allen Li
@ 2020-07-22  9:31     ` Mattias Engdegård
  0 siblings, 0 replies; 4+ messages in thread
From: Mattias Engdegård @ 2020-07-22  9:31 UTC (permalink / raw)
  To: Allen Li; +Cc: 42438-done

22 juli 2020 kl. 06.07 skrev Allen Li <darkfeline@felesatra.moe>:

> Yes, that works.

Thank you, pushed to master.






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

end of thread, other threads:[~2020-07-22  9:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  6:08 bug#42438: 26.3; calc: Entering .. results in [Bad format] error Allen Li
2020-07-21  9:00 ` Mattias Engdegård
2020-07-22  4:07   ` Allen Li
2020-07-22  9:31     ` Mattias Engdegård

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