From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#24051: 24.5; doc of `external-debugging-output' Date: Sun, 28 Jan 2018 18:22:41 -0500 Message-ID: <87lgghk1q6.fsf@users.sourceforge.net> References: <871t2jyqj0.fsf@russet.org.uk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1517183665 12615 195.159.176.226 (28 Jan 2018 23:54:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 Jan 2018 23:54:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 24051@debbugs.gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 29 00:54:21 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efwm8-0002cT-UN for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jan 2018 00:54:17 +0100 Original-Received: from localhost ([::1]:46343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwo8-0001GG-38 for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jan 2018 18:56:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwHy-00088F-KM for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2018 18:23:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efwHu-0006ZE-KI for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2018 18:23:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efwHu-0006Z6-EW for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2018 18:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1efwHu-0004ff-8u for bug-gnu-emacs@gnu.org; Sun, 28 Jan 2018 18:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jan 2018 23:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24051-submit@debbugs.gnu.org id=B24051.151718177417923 (code B ref 24051); Sun, 28 Jan 2018 23:23:02 +0000 Original-Received: (at 24051) by debbugs.gnu.org; 28 Jan 2018 23:22:54 +0000 Original-Received: from localhost ([127.0.0.1]:46909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efwHl-0004f1-Sd for submit@debbugs.gnu.org; Sun, 28 Jan 2018 18:22:54 -0500 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:35089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efwHi-0004ek-J2 for 24051@debbugs.gnu.org; Sun, 28 Jan 2018 18:22:52 -0500 Original-Received: by mail-it0-f50.google.com with SMTP id e1so7272565ita.0 for <24051@debbugs.gnu.org>; Sun, 28 Jan 2018 15:22:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Y4u92BTuz4P+jr1frbB3WZTDXwAKCTrOWjl5La43U/k=; b=m9duSZRMf4lPGl5a3Ci3eCSm0ZNhYMFFjq7Y75+dW7UmmBzgcU1oSdSBiZxlAseGeC cOWZTwqh8L6Oen4jGmr5uTnk20Jj6d4kD3BkZm02D66wA52drh+wJqDTlBbvIEL5RQXI DL5Rlj2vsIRhJdFz4YxaE9xEUCLdo6HRO8nbjVZ0QeH3P7HLcg/k+zyljNw4S/eNZhEf 88qhUufl1MlewNt08hvIyJodvFLaRyZlVSL2FznZvLcCoUWB0WR7yde8QCsPz5+lP9B+ 91o9d875gvYKXgUyBL2hy9EQBSHwqwZs4Rpeswip3PwsBPRgbKSwfZImY//LW+FxuFig 6kLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=Y4u92BTuz4P+jr1frbB3WZTDXwAKCTrOWjl5La43U/k=; b=sTn8osmCkbUI9bFQyimOZV5WUBVXuvdTA1YicFZjSJj4o4oSguoA3lnqyeUfUghkLz T6ckwZaa0R2oVfU+r7dFPpB0hLUoWDkvfBhgzM2rNlOb6fIS76g49A1D8MmK8fgtcq2q bd5zH7jnWEU0D9F+bnIxK5GpuLNmGKINTJV32F3JZv9dA+TR4cqOMphJNbydhvpc/vve ohK0wcVb7piv8twAL1uYJaQ9C/DORio4B7VVUVnDvIcZxbt2R4wPqIcY9sgsYk5AHJSw cHrb4fLXkikfUH9zOPDMuE5ZbgeLudBrMttKoUjW+o0qWc8Jh8U+fbUjp/yBbicKBAJK fGYg== X-Gm-Message-State: AKwxytfdR3qmThP1zIZhNNmsDrYH5h+LzaCVS1B49U9mstEooNo4ImCu g60wUQUwkM8dTe5H2MelvPdoAw== X-Google-Smtp-Source: AH8x226WquSEmLjuQ+xkRssuBaO3BDN2oE10fUDQR4BFkpMYv5Ih+eCBi0MX2gdtTOaDCqP5jL8m6g== X-Received: by 10.36.129.130 with SMTP id q124mr24295763itd.24.1517181764696; Sun, 28 Jan 2018 15:22:44 -0800 (PST) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id o73sm6754374ito.4.2018.01.28.15.22.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jan 2018 15:22:43 -0800 (PST) In-Reply-To: <871t2jyqj0.fsf@russet.org.uk> (Phillip Lord's message of "Sun, 24 Jul 2016 17:00:51 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142629 Archived-At: --=-=-= Content-Type: text/plain phillip.lord@russet.org.uk (Phillip Lord) writes: > Drew Adams writes: > >> 1. Please consider documenting this in the Elisp manual, e.g., where we >> document `print'. >> >> 2. The doc string should enclose "print" in `...': >> >> Write CHARACTER to stderr. >> You can call `print' while debugging emacs, and pass it this function >> to make it write to the debugging output. > > > And also where we document "streams". Personally, I like the idea of > adding "stderr" as an alias... Yeah, I think it's already occured to me twice at least where I couldn't remember the name of this function, and I ended up searching through src/print.c. I don't think it fits under "Output Functions" though, as it says: This section describes the Lisp functions for printing Lisp objects--converting objects into their printed representation. It's rather an example of an output stream, so it should go in the previous section: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Document-external-debugging-output-in-the-Elisp-M.patch Content-Description: patch >From e670ceada77e094cc42732a131a2fea8e782fd71 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 28 Jan 2018 18:16:48 -0500 Subject: [PATCH v1] Document external-debugging-output in the Elisp Manual (Bug#24051) * doc/lispref/streams.texi (Output Streams): List external-debugging-output. * src/print.c (Fexternal_debugging_output): Quote `print' in docstring. --- doc/lispref/streams.texi | 6 ++++++ src/print.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index a25a5bfe84..8501466af6 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -530,6 +530,12 @@ Output Streams Calling @code{concat} converts the list to a string so you can see its contents more clearly. +@findex stderr +@defun external-debugging-output character +This function can be useful as an output stream when debugging. It +writes @var{character} to the standard error stream. +@end defun + @node Output Functions @section Output Functions diff --git a/src/print.c b/src/print.c index 6cf3c37e5e..64fc7eda31 100644 --- a/src/print.c +++ b/src/print.c @@ -748,7 +748,7 @@ DEFUN ("print", Fprint, Sprint, 1, 2, 0, DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, doc: /* Write CHARACTER to stderr. -You can call print while debugging emacs, and pass it this function +You can call `print' while debugging emacs, and pass it this function to make it write to the debugging output. */) (Lisp_Object character) { -- 2.11.0 --=-=-=--