all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-29 8bf4cdcf79: Avoid recursive process filters in lisp/jsonrpc.el (bug#60088)
Date: Fri, 16 Dec 2022 14:46:42 +0000	[thread overview]
Message-ID: <CALDnm50ko733h8GDC2BCy0aKwGQRDKMjdXf7CpNPgmiFpJJHXw@mail.gmail.com> (raw)
In-Reply-To: <jwvv8mb2ze9.fsf-monnier+emacs@gnu.org>

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

On Fri, Dec 16, 2022 at 2:36 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> >     Avoid recursive process filters in lisp/jsonrpc.el (bug#60088)
>
> BTW, this has bitten us in various other cases, we should fix it once
> and for all in the C code by marking the process as "busy" while we're
> running the filters so we never run filters recursively.
> [ If we ever bump into a case where recursive filters are needed, we
>   can then add some function to remove the "busy" mark.
>   Calling (accept-process-output PROC) should naturally mark PROC as
>   not-busy.  ]


I thought about that too, but I don't know what other implications
it might have. If it's somehow feasible, isn't it easier to just change
process-send-input to _not_ accept output?  That's the
only output-accepting primitive that makes sense to call from
within a process filter (and that's what happened here).  I can't
see how sit-for is useful from within a process-filter and neither
accept-process-output.  Almost certainly a bug, right? So why
can't we make it so that they just error when called under those
circumstances?

João

[-- Attachment #2: Type: text/html, Size: 1354 bytes --]

  reply	other threads:[~2022-12-16 14:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <167118072395.30479.8819833637573037468@vcs2.savannah.gnu.org>
     [not found] ` <20221216085204.43B07C04961@vcs2.savannah.gnu.org>
2022-12-16 14:36   ` emacs-29 8bf4cdcf79: Avoid recursive process filters in lisp/jsonrpc.el (bug#60088) Stefan Monnier
2022-12-16 14:46     ` João Távora [this message]
2022-12-16 14:56       ` Stefan Monnier
2022-12-17  5:37     ` F. Jason Park
2022-12-17 15:37       ` Stefan Monnier
2022-12-17 21:39         ` João Távora
2022-12-18  1:57           ` Stefan Monnier
2022-12-18  4:08             ` João Távora
2022-12-18 14:32               ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALDnm50ko733h8GDC2BCy0aKwGQRDKMjdXf7CpNPgmiFpJJHXw@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.