unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Francis Wright <francis.j.wright@gmail.com>,
	f.j.wright@live.co.uk, 30529@debbugs.gnu.org
Subject: bug#30529: 26.0.91; minibuffer errors change standard-output
Date: Sun, 29 Nov 2020 15:29:03 +0000	[thread overview]
Message-ID: <87360sdvwg.fsf@tcd.ie> (raw)
In-Reply-To: <874klcql7u.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 26 Nov 2020 14:52:21 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Francis Wright <francis.j.wright@gmail.com> writes:
>
>> A user-error in the minibuffer can change the value of standard-output
>> (to t) within the environment that invoked the minibuffer, whereas I
>> think the minibuffer should rebind standard-output locally and not
>> change its global value. Here is a simple way to illustrate this
>> problem. Evaluate the following:
>>
>> (defun STANDARD-LISP ()
>>   "Run Standard LISP with input via the minibuffer and output via a buffer."
>>   (interactive)
>>   (switch-to-buffer (get-buffer-create "*Standard LISP*"))
>>   (let (value
>> 		(standard-output (current-buffer)))
>> 	(while t
>> 	  (terpri)
>> 	  (princ "Eval: ")
>> 	  (setq value (read))
>> 	  ;; (read) errors change standard-output to *Messages* buffer,
>> 	  ;; so...
>> 	  ;; (setq standard-output (current-buffer))
>> 	  (prin1 value) (terpri)
>> 	  (setq value (eval value))
>> 	  (terpri)
>> 	  (princ "====> ") (princ value) (terpri))))
>
> (This bug report unfortunately got no response at the time.)
>
> This problem is still present in Emacs 28.  I tried following the code
> logic for a couple of minutes to see just what it is that's (re)setting
> `standard-output' here, but was unable to locate the location.
>
> Anybody know?

Just from a quick grep, could it be recursive_edit_1?

Does error handling invoke a recursive edit e.g. for entering the
debugger?

-- 
Basil





  reply	other threads:[~2020-11-29 15:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 16:04 bug#30529: 26.0.91; minibuffer errors change standard-output Francis Wright
2020-11-26 13:52 ` Lars Ingebrigtsen
2020-11-29 15:29   ` Basil L. Contovounesios [this message]
2020-11-30  9:41     ` Lars Ingebrigtsen
2021-08-12 14:34     ` Lars Ingebrigtsen
2021-08-12 15:04       ` Andreas Schwab
2021-08-13 11:22         ` Lars Ingebrigtsen
2021-08-12 15:58       ` 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=87360sdvwg.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=30529@debbugs.gnu.org \
    --cc=f.j.wright@live.co.uk \
    --cc=francis.j.wright@gmail.com \
    --cc=larsi@gnus.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).