* bug#15433: 24.3.50; wrong-type-argument wholenump -3
@ 2013-09-21 18:13 ` Drew Adams
2013-09-21 21:39 ` Alan Mackenzie
2014-02-10 4:27 ` Lars Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2013-09-21 18:13 UTC (permalink / raw)
To: 15433
This regression is from Emacs 24.1 onward. No such problem before that.
emacs -Q
M-x set-variable debug-on-error t
M-x M-- 3 f
Debugger entered--Lisp error: (wrong-type-argument wholenump -3)
self-insert-command(-3)
call-interactively(self-insert-command nil nil)
command-execute(self-insert-command)
read-from-minibuffer("M-x " nil (keymap (10 . minibuffer-complete-and-exi=
t) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Mi=
nibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete=
as far as possible") (space menu-item "Complete Word" minibuffer-complete-=
word :help "Complete at most one word") (63 menu-item "List Completions" mi=
nibuffer-completion-help :help "Display all possible completions") "Minibuf=
")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completion=
s) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . m=
inibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (prev=
ious menu-item "Previous History Item" previous-history-element :help "Put =
previous minibuffer history element in the minibuffer") (next menu-item "Ne=
xt History Item" next-history-element :help "Put next minibuffer history el=
ement in the minibuffer") (isearch-backward menu-item "Isearch History Back=
ward" isearch-backward :help "Incrementally search minibuffer history backw=
ard") (isearch-forward menu-item "Isearch History Forward" isearch-forward =
:help "Incrementally search minibuffer history forward") (return menu-item =
"Enter" exit-minibuffer :key-sequence "..." :help "Terminate input and exit=
minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort inpu=
t and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minib=
uffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) =
(9 . self-insert-command) (XF86Back . previous-history-element) (up . previ=
ous-history-element) (prior . previous-history-element) (XF86Forward . next=
-history-element) (down . next-history-element) (next . next-history-elemen=
t) (27 keymap (114 . previous-matching-history-element) (115 . next-matchin=
g-history-element) (112 . previous-history-element) (110 . next-history-ele=
ment))) nil extended-command-history nil nil)
completing-read-default("M-x " [widget-field-validate menu-path easy-menu=
-filter-return cl-cdadr widget-default-button-face-get :buttons semantic-mo=
des gnus-summary-format cl-member-if-not custom-group-reset-current file-or=
-data widget-key-sequence-map erc-log :custom-form docs ns-drag-color widge=
t-field-value-create iso-8859-13-dos vc-backend-subdirectory-name comment-u=
se-syntax mm-decode custom-field-keymap Custom-no-edit texinfo cl--random-t=
ime org-clock prefix-face :custom-mark-to-reset-standard widget-regexp-vali=
date dired-before-readin-hook custom-modified erc-replace font-lock-choose-=
keywords gnus-dired gnus-html widget-info-link-action question-mark cl-acon=
s vhdl-naming tooltip-strip-prompt TGA Custom-help choice-item custom-promp=
t-variable register widget-children-value-delete view-register cl-callf2 :a=
ction custom-group-sample-face-get ...] commandp t nil extended-command-his=
tory nil nil)
completing-read("M-x " [widget-field-validate menu-path easy-menu-filter-=
return cl-cdadr widget-default-button-face-get :buttons semantic-modes gnus=
-summary-format cl-member-if-not custom-group-reset-current file-or-data wi=
dget-key-sequence-map erc-log :custom-form docs ns-drag-color widget-field-=
value-create iso-8859-13-dos vc-backend-subdirectory-name comment-use-synta=
x mm-decode custom-field-keymap Custom-no-edit texinfo cl--random-time org-=
clock prefix-face :custom-mark-to-reset-standard widget-regexp-validate dir=
ed-before-readin-hook custom-modified erc-replace font-lock-choose-keywords=
gnus-dired gnus-html widget-info-link-action question-mark cl-acons vhdl-n=
aming tooltip-strip-prompt TGA Custom-help choice-item custom-prompt-variab=
le register widget-children-value-delete view-register cl-callf2 :action cu=
stom-group-sample-face-get ...] commandp t nil extended-command-history)
read-extended-command()
byte-code("..." [current-prefix-arg read-extended-command] 2)
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
of 2013-09-20 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG=
=3D1'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15433: 24.3.50; wrong-type-argument wholenump -3
2013-09-21 18:13 ` bug#15433: 24.3.50; wrong-type-argument wholenump -3 Drew Adams
@ 2013-09-21 21:39 ` Alan Mackenzie
2014-02-10 4:27 ` Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2013-09-21 21:39 UTC (permalink / raw)
To: gnu-emacs-bug
Drew Adams <drew.adams@oracle.com> wrote:
> This regression is from Emacs 24.1 onward. No such problem before that.
You forget to say what the problem is. It isn't obvious.
> emacs -Q
> M-x set-variable debug-on-error t
> M-x M-- 3 f
It appears you are trying to enter -3 f's. This is nonsensical. If
this isn't what you're trying to do, what is it? Why is that error
message not the right thing to do?
> Debugger entered--Lisp error: (wrong-type-argument wholenump -3)
> self-insert-command(-3)
> call-interactively(self-insert-command nil nil)
.....
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15433: 24.3.50; wrong-type-argument wholenump -3
[not found] ` <<l1l3lt$11hl$1@colin.muc.de>
@ 2013-09-22 1:20 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2013-09-22 1:20 UTC (permalink / raw)
To: Alan Mackenzie, gnu-emacs-bug
> > This regression is from Emacs 24.1 onward. No such problem before that.
>
> You forget to say what the problem is. It isn't obvious.
I didn't forget that. It should be obvious.
The problem is that Emacs gives the user a wrong-type-argument error
in this context. That's a low-level error and message. If the
command raises an error at all in this context then it should show
a user-friendly msg - a message specific to the command.
> > emacs -Q
> > M-x set-variable debug-on-error t
> > M-x M-- 3 f
>
> It appears you are trying to enter -3 f's. This is nonsensical.
Yes. Yes.
> If this isn't what you're trying to do, what is it? Why is that
> error message not the right thing to do?
This is the user providing a prefix arg, which is perfectly normal.
This is not faulty code somewhere providing an arg of the wrong type.
It is a user error to provide a negative prefix arg here.
In Emacs before 24.1, this particular user error was simply ignored.
A better behavior is to raise a reasonable, helpful error for the user.
Pretty much *any* command that does things based on a numeric prefix
arg (or any prefix arg, for that matter), should check whether the
prefix arg value provided by the user makes sense for that command.
The command itself should check. It should not just fall back on
some low-level error handling.
If a numeric prefix arg N is required by some command to be
non-negative, or an odd number, or a power of seven, or whatever,
then any other N that a user provides should result in a reasonable
error message from that command.
Preferably the message would help the user by saying what the command
expects/requires (e.g., N must be a power of seven that is a power of
two).
A user should never, or at least almost never, see a wrong-type-arg msg.
At a minimum, s?he should not see such a msg for cases where it is
easy for Emacs to DTRT and be helpful, i.e., command-specific, with
its message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15433: 24.3.50; wrong-type-argument wholenump -3
2013-09-21 18:13 ` bug#15433: 24.3.50; wrong-type-argument wholenump -3 Drew Adams
2013-09-21 21:39 ` Alan Mackenzie
@ 2014-02-10 4:27 ` Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-10 4:27 UTC (permalink / raw)
To: Drew Adams; +Cc: 15433
Drew Adams <drew.adams@oracle.com> writes:
> This regression is from Emacs 24.1 onward. No such problem before that.
>
> emacs -Q
>
> M-x set-variable debug-on-error t
>
> M-x M-- 3 f
>
> Debugger entered--Lisp error: (wrong-type-argument wholenump -3)
> self-insert-command(-3)
This has been fixed earlier.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-10 4:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.2673.1379787326.10748.bug-gnu-emacs@gnu.org>
2013-09-21 18:13 ` bug#15433: 24.3.50; wrong-type-argument wholenump -3 Drew Adams
2013-09-21 21:39 ` Alan Mackenzie
2014-02-10 4:27 ` Lars Ingebrigtsen
[not found] <<mailman.2673.1379787326.10748.bug-gnu-emacs@gnu.org>
[not found] ` <<l1l3lt$11hl$1@colin.muc.de>
2013-09-22 1:20 ` Drew Adams
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.