GNU bug report logs -
#22069
25.0.50; bogus %S in cl-no-applicable-method message
Previous Next
Reported by: stephen_leake <at> stephe-leake.org
Date: Tue, 1 Dec 2015 17:15:02 UTC
Severity: normal
Found in version 25.0.50
Fixed in version 25.1
Done: Glenn Morris <rgm <at> gnu.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 22069 in the body.
You can then email your comments to 22069 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22069
; Package
emacs
.
(Tue, 01 Dec 2015 17:15:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
stephen_leake <at> stephe-leake.org
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 01 Dec 2015 17:15:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In emacs-25 branch, starting from emacs -Q, eval in *scratch*:
(progn
(require 'xref)
(setq xref-backend-functions (lambda () 'my-xref-backend))
(xref-find-definitions "foo"))
The first time gives a *Backtrace* buffer; don't quit, run it again to
get the error message:
cl-no-applicable-method: No applicable method for %S: xref-backend-definitions, my-xref-backend, "foo"
The %S is not used as a `format' argument.
This comes from cl-generic.el line 803:
(define-error 'cl-no-applicable-method "No applicable method for %S"
'cl-no-method)
which is used on line 812:
(cl-defgeneric cl-no-applicable-method (generic &rest args)
"Function called when a method call finds no applicable method."
(signal 'cl-no-applicable-method `(,(cl--generic-name generic) ,@args)))
Apparently `signal' does not use the error-message string as a `format'
argument, but just a plain string.
In GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
of 2015-11-30
Repository revision: ca6edca2429c01dd7905c0de835bbdb23754b754
Windowing system distributor 'Microsoft Corp.', version 6.3.9600
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: cp1252
Major mode: Emacs-Lisp
Minor modes in effect:
diff-auto-refine-mode: t
project-ml-xref-mode: t
global-ede-mode: t
ede-minor-mode: t
other-frame-window-mode: t
display-time-mode: t
delete-selection-mode: t
icomplete-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Mark set
Mark saved where search started
Mark set
Mark saved where search started
Mark set [2 times]
Mark saved where search started
Auto-saving...
Mark set [2 times]
Saving file c:/home/stephe/projects.text...
Wrote c:/home/stephe/projects.text
Load-path shadows:
c:/home/stephe/.emacs.d/elpa/ada-ref-man-2012.0/ada-ref-man hides /Projects/org.emacs.ada-mode/ada-ref-man
/Projects/org.emacs.ada-mode/ada-xref hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-xref
/Projects/org.emacs.ada-mode/ada-stmt hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-stmt
/Projects/org.emacs.ada-mode/ada-prj hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-prj
/Projects/org.emacs.ada-mode/ada-mode hides c:/Projects/emacs/scratch/stephe-25/lisp/progmodes/ada-mode
Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils pp xmtn-dvc
xmtn-conflicts xmtn-ids dvc-persistence dvc-config xmtn-automate
xmtn-run xmtn-match xmtn-basic-io xmtn-base dvc-status dvc-diff
dvc-log-edit ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff add-log gpr-query make-mode rect debug
sh-script smie executable copyright character-fold misearch
multi-isearch pulse vc-git diff-mode map semantic/wisent/grammar
semantic/bovine semantic/grammar semantic/idle semantic/grammar-wy
semantic/format semantic/tag-ls semantic/find semantic/ctxt
semantic/lex-spp vc vc-dispatcher vc-mtn project-settings ede/generic
semantic/db ede/shell ede/config eieio-opt ada-project xref-ada ada-skel
ada-skeletons skeleton ada-compiler ada-gnat-compile ada-xref-tool
ada-gnat-xref gnat-core ada-indent-engine ada-wisi
ada-indent-user-options ada-grammar-wy wisi-compile wisi wisi-parse
wisi-compat-24.2 semantic/wisent semantic/wisent/wisent ada-fix-error
ada-build ada-mode-compat-24.2 ada-mode find-file align
project-multi-lang xref-patches semantic/symref semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
project-menu project-patches ede/emacs ede/speedbar ede/files ede
ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar
speedbar sb-image ezimage dframe eieio-custom cedet etags seq
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m
org-mode-keys org org-macro org-footnote org-pcomplete pcomplete
org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar
cal-loaddefs xgit-core xmtn-minimal dvc-autoloads dvc-unified ffap
thingatpt url-parse auth-source gnus-util mm-util help-fns mail-prsvr
password-cache url-vars dvc-fileinfo dvc-core dvc-buffers dvc-ui
dvc-register dvc-utils ewoc dvc-emacs dvc-defs other-frame-window time
delsel cus-start cus-load color-theme edmacro kmacro wid-edit cl
noutline outline easy-mmode xref cl-seq project eieio byte-opt bytecomp
byte-compile cl-extra help-mode cconv eieio-core whitespace dired-x
dired-aux dired compile comint ansi-color ring cl-macs gv uniquify-files
path-iterator cl-loaddefs pcase cl-lib icomplete finder-inf info package
easymenu epg-config time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)
Memory information:
((conses 16 488326 85520)
(symbols 56 41558 0)
(miscs 48 460 1287)
(strings 32 107084 16234)
(string-bytes 1 2782558)
(vectors 16 44569)
(vector-slots 8 1552193 152910)
(floats 8 865 479)
(intervals 56 7417 1456)
(buffers 976 47))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22069
; Package
emacs
.
(Tue, 01 Dec 2015 18:31:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 22069 <at> debbugs.gnu.org (full text, mbox):
stephen_leake <at> stephe-leake.org writes:
> This comes from cl-generic.el line 803:
>
> (define-error 'cl-no-applicable-method "No applicable method for %S"
> 'cl-no-method)
This patch fixes the problem for me, and seems appropriate for Emacs 25.
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 9e6102c..23d53ac 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -797,23 +797,24 @@ methods.")
;;; Define some pre-defined generic functions, used internally.
-(define-error 'cl-no-method "No method for %S")
-(define-error 'cl-no-next-method "No next method for %S" 'cl-no-method)
-(define-error 'cl-no-primary-method "No primary method for %S" 'cl-no-method)
-(define-error 'cl-no-applicable-method "No applicable method for %S"
+(define-error 'cl-no-method "No method")
+(define-error 'cl-no-next-method "No next method" 'cl-no-method)
+(define-error 'cl-no-primary-method "No primary method" 'cl-no-method)
+(define-error 'cl-no-applicable-method "No applicable method"
'cl-no-method)
(cl-defgeneric cl-no-next-method (generic method &rest args)
"Function called when `cl-call-next-method' finds no next method."
- (signal 'cl-no-next-method `(,(cl--generic-name generic) ,method ,@args)))
+ (signal 'cl-no-next-method (append (list (format "%S" (cl--generic-name generic)) method) args)))
(cl-defgeneric cl-no-applicable-method (generic &rest args)
"Function called when a method call finds no applicable method."
- (signal 'cl-no-applicable-method `(,(cl--generic-name generic) ,@args)))
+ (signal 'cl-no-applicable-method
+ (append (list (format "%S" (cl--generic-name generic))) args)))
(cl-defgeneric cl-no-primary-method (generic &rest args)
"Function called when a method call finds no primary method."
- (signal 'cl-no-primary-method `(,(cl--generic-name generic) ,@args)))
+ (signal 'cl-no-primary-method (append (list (format (cl--generic-name generic))) args)))
(defun cl-call-next-method (&rest _args)
"Function to call the next applicable method.
--
-- Stephe
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22069
; Package
emacs
.
(Tue, 01 Dec 2015 21:26:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 22069 <at> debbugs.gnu.org (full text, mbox):
> cl-no-applicable-method: No applicable method for %S: xref-backend-definitions, my-xref-backend, "foo"
> The %S is not used as a `format' argument.
Indeed, I was confused.
> (define-error 'cl-no-applicable-method "No applicable method for %S"
> 'cl-no-method)
This should just be
(define-error 'cl-no-applicable-method "No applicable method"
'cl-no-method)
> -(define-error 'cl-no-method "No method for %S")
> -(define-error 'cl-no-next-method "No next method for %S" 'cl-no-method)
> -(define-error 'cl-no-primary-method "No primary method for %S" 'cl-no-method)
> -(define-error 'cl-no-applicable-method "No applicable method for %S"
> +(define-error 'cl-no-method "No method")
> +(define-error 'cl-no-next-method "No next method" 'cl-no-method)
> +(define-error 'cl-no-primary-method "No primary method" 'cl-no-method)
> +(define-error 'cl-no-applicable-method "No applicable method"
> 'cl-no-method)
Looks good.
> (cl-defgeneric cl-no-next-method (generic method &rest args)
> "Function called when `cl-call-next-method' finds no next method."
> - (signal 'cl-no-next-method `(,(cl--generic-name generic) ,method ,@args)))
> + (signal 'cl-no-next-method (append (list (format "%S" (cl--generic-name generic)) method) args)))
>
> (cl-defgeneric cl-no-applicable-method (generic &rest args)
> "Function called when a method call finds no applicable method."
> - (signal 'cl-no-applicable-method `(,(cl--generic-name generic) ,@args)))
> + (signal 'cl-no-applicable-method
> + (append (list (format "%S" (cl--generic-name generic))) args)))
>
> (cl-defgeneric cl-no-primary-method (generic &rest args)
> "Function called when a method call finds no primary method."
> - (signal 'cl-no-primary-method `(,(cl--generic-name generic) ,@args)))
> + (signal 'cl-no-primary-method (append (list (format (cl--generic-name generic))) args)))
>
> (defun cl-call-next-method (&rest _args)
> "Function to call the next applicable method.
No, these should stay as they are, I think.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22069
; Package
emacs
.
(Tue, 01 Dec 2015 21:36:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.1, send any further explanations to
22069 <at> debbugs.gnu.org and stephen_leake <at> stephe-leake.org
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 03 Dec 2015 18:24: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
.
(Sat, 02 Jan 2016 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.