unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: phillip.lord@russet.org.uk (Phillip Lord)
Cc: 24051@debbugs.gnu.org
Subject: bug#24051: 24.5; doc of `external-debugging-output'
Date: Sun, 28 Jan 2018 18:22:41 -0500	[thread overview]
Message-ID: <87lgghk1q6.fsf@users.sourceforge.net> (raw)
In-Reply-To: <871t2jyqj0.fsf@russet.org.uk> (Phillip Lord's message of "Sun, 24 Jul 2016 17:00:51 +0100")

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

phillip.lord@russet.org.uk (Phillip Lord) writes:

> Drew Adams <drew.adams@oracle.com> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1609 bytes --]

From e670ceada77e094cc42732a131a2fea8e782fd71 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
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


  reply	other threads:[~2018-01-28 23:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 16:01 bug#24051: 24.5; doc of `external-debugging-output' Drew Adams
2016-07-24 16:00 ` Phillip Lord
2018-01-28 23:22   ` Noam Postavsky [this message]
2018-01-28 23:49     ` Drew Adams
2018-01-29  0:24       ` Noam Postavsky
2018-01-29 14:47         ` Drew Adams
2018-01-30 13:52           ` Eli Zaretskii
2018-01-29 17:26         ` Eli Zaretskii
2018-01-30  0:38           ` Noam Postavsky
2018-01-30  8:22             ` Michael Albinus
2018-01-30 13:29               ` Eli Zaretskii
2018-01-30 14:00             ` Eli Zaretskii
2018-01-31  3:43               ` Noam Postavsky
     [not found]                 ` <87a7wtkecz.fsf@russet.org.uk>
2018-01-31 19:38                   ` Phillip Lord
     [not found]         ` <<bf7223d4-212a-417f-a39b-8835e2778168@default>
     [not found]           ` <<83k1vzh2rq.fsf@gnu.org>
2018-01-30 15:09             ` Drew Adams
2018-01-29 17:14     ` Eli Zaretskii

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=87lgghk1q6.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=24051@debbugs.gnu.org \
    --cc=phillip.lord@russet.org.uk \
    /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).