From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: 17490@debbugs.gnu.org
Subject: bug#17490: 24.3.91; describe-function on some eieio class give (wrong-type-argument char-or-string-p nil)
Date: Wed, 14 May 2014 11:32:41 +0200 [thread overview]
Message-ID: <877g5ok8na.fsf@geodiff-mac3.ulb.ac.be> (raw)
Hi,
Eval the following snippet (taken from (info "(eieio) Quick Start"),
except that I removed the docstring in the method):
(progn
(defclass record ()
((name :initarg :name
:initform ""
:type string
:custom string
:documentation "The name of a person.")
(birthday :initarg :birthday
:initform "Jan 1, 1970"
:custom string
:type string
:documentation "The person's birthday.")
(phone :initarg :phone
:initform ""
:documentation "Phone number."))
"A single record for tracking people I know.")
(defmethod call-record ((rec record) &optional scriptname)
(message "Dialing the phone for %s" (oref rec name))
(shell-command (concat (or scriptname "dialphone.sh")
" "
(oref rec phone)))))
Then do C-h f record RET. This makes an error. Here's the backtrace:
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
eieio-help-class(record)
class = record
doc = (nil nil ((rec &optional scriptname)))
counter = 2
type = [":STATIC" ":BEFORE" ":PRIMARY" ":AFTER"]
methods = (call-record)
cur = ((rec &optional scriptname))
--dolist-tail-- = (((rec &optional scriptname)))
debugger-may-continue = t
inhibit-redisplay = nil
inhibit-debugger = t
eieio-help-constructor(record)
ctr = record
def = (lambda (newname &rest slots) "Create a new object with name NAME of class type record" (apply (quote constructor) record newname slots))
location = nil
run-hook-with-args(eieio-help-constructor record)
[no locals]
describe-function-1(record)
[no locals]
describe-function(record)
The error comes from this part of the code:
(insert " " (aref type counter) " "
(prin1-to-string (car cur) (current-buffer))
"\n"
(cdr cur))
(cdr cur) is nil and can't be inserted
FWIW I did this to fix it :
Modified lisp/emacs-lisp/eieio-opt.el
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index a502901..4e0470d 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -141,7 +141,7 @@ If CLASS is actually an object, then also display current values of that object.
(insert " " (aref type counter) " "
(prin1-to-string (car cur) (current-buffer))
"\n"
- (cdr cur)))
+ (or (cdr cur) " Undocumented")))
(setq counter (1+ counter))))
(insert "\n\n")
(setq methods (cdr methods))))))
In GNU Emacs 24.3.91.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2014-05-12 on geodiff-mac3
Windowing system distributor `The X.Org Foundation', version 11.0.11304000
System Description: Gentoo Base System release 2.2
Configured using:
`configure --with-x-toolkit=lucid --enable-checking 'CFLAGS= -O0 -g3''
Important settings:
value of $LANG: fr_FR.UTF-8
locale-coding-system: utf-8-unix
--
Nico.
next reply other threads:[~2014-05-14 9:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 9:32 Nicolas Richard [this message]
2014-05-14 20:58 ` bug#17490: 24.3.91; describe-function on some eieio class give (wrong-type-argument char-or-string-p nil) David Engster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g5ok8na.fsf@geodiff-mac3.ulb.ac.be \
--to=theonewiththeevillook@yahoo.fr \
--cc=17490@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).