* Does map-y-or-n-p works in trunk?
@ 2013-07-12 7:26 Fabrice Popineau
2013-07-12 8:40 ` Stephen Berman
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fabrice Popineau @ 2013-07-12 7:26 UTC (permalink / raw)
To: emacs-devel
Hi,
I get this backtrace when trying to use map-y-or-n-p:
Debugger entered--Lisp error: (wrong-type-argument stringp #[257
"\301\300@\x02\"\207" [(#1) format] 4 "
(fn OBJECT)"])
format(#[257 "\301\300@\x02\"\207" [(#0) format] 4 "\n\n(fn OBJECT)"] 1)
#[257 "\301\300@\x02\"\207" [(#0) format] 4 "\n\n(fn OBJECT)"](1)
map-y-or-n-p("Even ?" (lambda (x) (evenp x)) (1 2 3 4 5 6))
eval((map-y-or-n-p "Even ?" (function (lambda (x) (evenp x))) (quote (1 2 3
4 5 6))) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
(This is from 'emacs -Q')
Is it a subtle bug specific to me?
Thanks,
Fabrice
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does map-y-or-n-p works in trunk?
2013-07-12 7:26 Does map-y-or-n-p works in trunk? Fabrice Popineau
@ 2013-07-12 8:40 ` Stephen Berman
2013-07-12 9:02 ` Thierry Volpiatto
2013-07-12 9:05 ` Thierry Volpiatto
2013-07-12 9:35 ` Andreas Schwab
2 siblings, 1 reply; 6+ messages in thread
From: Stephen Berman @ 2013-07-12 8:40 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: emacs-devel
On Fri, 12 Jul 2013 07:26:20 +0000 (UTC) Fabrice Popineau <fabrice.popineau@gmail.com> wrote:
> Hi,
>
> I get this backtrace when trying to use map-y-or-n-p:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp #[257
> "\301\300@\"\207" [(#1) format] 4 "
>
> (fn OBJECT)"])
> format(#[257 "\301\300@\"\207" [(#0) format] 4 "\n\n(fn OBJECT)"] 1)
> #[257 "\301\300@\"\207" [(#0) format] 4 "\n\n(fn OBJECT)"](1)
> map-y-or-n-p("Even ?" (lambda (x) (evenp x)) (1 2 3 4 5 6))
> eval((map-y-or-n-p "Even ?" (function (lambda (x) (evenp x))) (quote (1 2 3
> 4 5 6))) nil)
> eval-last-sexp-1(nil)
> eval-last-sexp(nil)
> call-interactively(eval-last-sexp nil nil)
> command-execute(eval-last-sexp)
>
> (This is from 'emacs -Q')
> Is it a subtle bug specific to me?
I've gotten the same kind of error several times recently on typing `q'
in the Gnus *Group* buffer. I haven't gotten a full backtrace, so I've
only seen the top wrong-type-argument error message, which is the same
as yours. I think I've only gotten this when there's a live *Summary*,
but I can't reliably reproduce it.
Steve Berman
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does map-y-or-n-p works in trunk?
2013-07-12 8:40 ` Stephen Berman
@ 2013-07-12 9:02 ` Thierry Volpiatto
0 siblings, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2013-07-12 9:02 UTC (permalink / raw)
To: emacs-devel
This patch fix it, however, the prompt need to be "Even %s ?" and not
"Even ?", this should be fixed too.
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el
index 1919d47..0d56222 100644
--- a/lisp/emacs-lisp/map-ynp.el
+++ b/lisp/emacs-lisp/map-ynp.el
@@ -131,8 +131,7 @@ Returns the number of actions taken."
(unwind-protect
(progn
(if (stringp prompter)
- (setq prompter (lambda (object)
- (format prompter object))))
+ (setq prompter `(lambda (object) (format ,prompter object))))
(while (funcall next)
(setq prompt (funcall prompter elt))
(cond ((stringp prompt)
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Does map-y-or-n-p works in trunk?
2013-07-12 7:26 Does map-y-or-n-p works in trunk? Fabrice Popineau
2013-07-12 8:40 ` Stephen Berman
@ 2013-07-12 9:05 ` Thierry Volpiatto
2013-07-12 9:35 ` Andreas Schwab
2 siblings, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2013-07-12 9:05 UTC (permalink / raw)
To: emacs-devel
Fabrice Popineau <fabrice.popineau@gmail.com> writes:
> Hi,
>
> I get this backtrace when trying to use map-y-or-n-p:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp #[257
> "\301\300@\"\207" [(#1) format] 4 "
>
> (fn OBJECT)"])
> format(#[257 "\301\300@\"\207" [(#0) format] 4 "\n\n(fn OBJECT)"] 1)
> #[257 "\301\300@\"\207" [(#0) format] 4 "\n\n(fn OBJECT)"](1)
> map-y-or-n-p("Even ?" (lambda (x) (evenp x)) (1 2 3 4 5 6))
> eval((map-y-or-n-p "Even ?" (function (lambda (x) (evenp x))) (quote (1 2 3
> 4 5 6))) nil)
> eval-last-sexp-1(nil)
> eval-last-sexp(nil)
> call-interactively(eval-last-sexp nil nil)
> command-execute(eval-last-sexp)
>
> (This is from 'emacs -Q')
> Is it a subtle bug specific to me?
I can reproduce it, however:
(map-y-or-n-p #'(lambda (x) (format "Evenp `%s'? " x))
#'(lambda (x) (evenp x)) (quote (1 2 3 4 5 6)))
is working as expected.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Does map-y-or-n-p works in trunk?
2013-07-12 7:26 Does map-y-or-n-p works in trunk? Fabrice Popineau
2013-07-12 8:40 ` Stephen Berman
2013-07-12 9:05 ` Thierry Volpiatto
@ 2013-07-12 9:35 ` Andreas Schwab
2013-07-12 11:10 ` Fabrice Popineau
2 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2013-07-12 9:35 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: emacs-devel
Fixed.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-12 11:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-12 7:26 Does map-y-or-n-p works in trunk? Fabrice Popineau
2013-07-12 8:40 ` Stephen Berman
2013-07-12 9:02 ` Thierry Volpiatto
2013-07-12 9:05 ` Thierry Volpiatto
2013-07-12 9:35 ` Andreas Schwab
2013-07-12 11:10 ` Fabrice Popineau
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.