GNU bug report logs - #41814
defmethod cl-print-object is not entirely reliable

Previous Next

Package: emacs;

Reported by: akater <nuclearspace <at> gmail.com>

Date: Thu, 11 Jun 2020 20:29:01 UTC

Severity: normal

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: akater <nuclearspace <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: defmethod cl-print-object is not entirely reliable
Date: Thu, 11 Jun 2020 20:05:38 +0000
[Message part 1 (text/plain, inline)]
I'm on Emacs 28.0.50.  I believe cl-print-object method code is not used when it
should be.

emacs -Q

C-x b *scratch* RET

(require 'eieio) C-x C-e RET

(defclass test nil nil) C-x C-e RET

(defmethod cl-print-object ((x test) s) (princ "#<test>" s)) C-x C-e RET

(make-feature 'test) RET C-u C-x C-e

For me, this prints like a structure (?): #s(test)

Now,

C-x 3

M-x ielm RET

(make-feature 'test) RET

This does make use of cl-print-object method:

#<test>

Structure method seems to also be used in org-babel evaluations.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 342 days ago.

Previous Next


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