From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.devel Subject: Fix for the ,show REPL meta-command Date: Sun, 30 Jan 2011 17:14:58 +0100 Message-ID: <87pqrexta5.fsf@rotty.yi.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1296404175 32119 80.91.229.12 (30 Jan 2011 16:16:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2011 16:16:15 +0000 (UTC) To: Guile Development Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jan 30 17:16:11 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjZwe-0007RM-2v for guile-devel@m.gmane.org; Sun, 30 Jan 2011 17:16:11 +0100 Original-Received: from localhost ([127.0.0.1]:43482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjZwa-0005tX-Ry for guile-devel@m.gmane.org; Sun, 30 Jan 2011 11:16:04 -0500 Original-Received: from [140.186.70.92] (port=60625 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjZvi-0005S9-UX for guile-devel@gnu.org; Sun, 30 Jan 2011 11:15:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjZvg-0004GL-Ta for guile-devel@gnu.org; Sun, 30 Jan 2011 11:15:10 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:51616) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PjZvg-0004Fe-Hu for guile-devel@gnu.org; Sun, 30 Jan 2011 11:15:08 -0500 Original-Received: (qmail invoked by alias); 30 Jan 2011 16:15:04 -0000 Original-Received: from 83-215-154-5.hage.dyn.salzburg-online.at (EHLO nathot.lan) [83.215.154.5] by mail.gmx.net (mp005) with SMTP; 30 Jan 2011 17:15:04 +0100 X-Authenticated: #3102804 X-Provags-ID: V01U2FsdGVkX19FxrxTB85F9r7rPlbU9mMHx6kGGrMHwp77yBeKe4 TMM1FREolUbYB/ Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by nathot.lan (Postfix) with ESMTP id 271DE3A6B8 for ; Sun, 30 Jan 2011 17:15:04 +0100 (CET) Original-Received: from nathot.lan ([127.0.0.1]) by localhost (nathot.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x3exWneh+phJ for ; Sun, 30 Jan 2011 17:14:59 +0100 (CET) Original-Received: from delenn.lan (delenn.lan [192.168.3.11]) by nathot.lan (Postfix) with ESMTP id 5FF163A6A5 for ; Sun, 30 Jan 2011 17:14:59 +0100 (CET) Original-Received: by delenn.lan (Postfix, from userid 1000) id 089CE2C0083; Sun, 30 Jan 2011 17:14:58 +0100 (CET) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.165.64.23 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11430 Archived-At: --=-=-= Content-Type: text/plain Hi! As indicated by Mark Harig[0], the ,show REPL meta-command is broken (my fault, oversight in 8fdd85f83..). The attached patch should make it work again. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=fix-show-meta-commands.diff From: Andreas Rottmann Subject: Fix `show' REPL meta-command * module/system/repl/command.scm (warranty, copying, version): Use `define-meta-command' to define these procedures, so they are entered into the *command-infos* table. --- module/system/repl/command.scm | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm index 2897b9b..d4b3e4a 100644 --- a/module/system/repl/command.scm +++ b/module/system/repl/command.scm @@ -311,19 +311,23 @@ Without any argument, a list of topics is displayed." (else (format #t "Bad arguments: ~A~%" args)))) -(define (warranty repl) +;;; `warranty', `copying' and `version' are "hidden" meta-commands, only +;;; accessible via `show'. They have an entry in *command-infos* but not +;;; in *command-table*. + +(define-meta-command (warranty repl) "show warranty Details on the lack of warranty." (display *warranty*) (newline)) -(define (copying repl) +(define-meta-command (copying repl) "show copying Show the LGPLv3." (display *copying*) (newline)) -(define (version repl) +(define-meta-command (version repl) "show version Version information." (display *version*) -- tg: (074c414..) t/fix-show-meta-commands (depends on: master) --=-=-= Content-Type: text/plain Regarding the other issues pointed out in Mark's mail, here's a quick analysis: - Error 2, ",statistics": This seems to be due to the ,statistics meta-command expecting the result of invoking `repl-gc-stats' (which is based on `gc-stats') to carry several fields that are not present with current Guile. For example, the ,statistics code references these fields in the gc-stats alist: `cells-allocated', `cell-heap-size', `cells-marked', `cells-swept', etc. None of these are present anymore: scheme@(guile-user)> (gc-stats) $1 = ((gc-time-taken . 0) (heap-size . 12034048) (heap-free-size . 167936) (heap-total-allocated . 12935072) (protected-objects . 95) (gc-times . 7)) So the solution would be to significantly cut down the implementation of ,statistics, to make use only of the fields that are currently present. I assume that none of the now-missing fields can be reinstated, since BDW-GC doesn't provide that information, right? If this is correct, I can give this bug a whirl, hopefully providing a fix by Wednesday. - Errors 3-11: These are not really "errors" in my view, but rather suboptimal presentation of the doc-strings associated with the meta-commands by ,help. Probably the docstrings should be changed not to duplicate the summary (which is the first line) in the rest of the docstring; another possible way to fix this would be to not show theq summary if there's more documentation after the first line. Thoughts? [0] http://lists.gnu.org/archive/html/bug-guile/2011-01/msg00070.html Regards, Rotty -- Andreas Rottmann -- --=-=-=--