From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: abliss@gmail.com, 36591@debbugs.gnu.org, npostavs@gmail.com
Subject: bug#36591: 26.2; Term's pager seems broken
Date: Thu, 25 Jul 2019 18:58:29 +0200 [thread overview]
Message-ID: <m3h87acaq2.fsf@gnus.org> (raw)
In-Reply-To: <83imrqnu9e.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Jul 2019 16:01:01 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> I think Noam is right -- the "we may not have the socket yet" refers to
>> this bit:
>>
>> if (p->infd >= 0)
>> set_process_filter_masks (p);
>
> So you are saying that the commit log message wanted to explain the
> code which existed there already? Because the condition that tested
> p->infd was already there before you refactored the code into
> set_process_filter_masks.
>
> That's somewhat strange, but I guess is OK. However, I still wonder
> what was the rationale for making the code change in the first place.
> It seems to me that the real reason was the addition of the call to
> set_process_filter_masks in connect_network_socket, but why was that
> necessary?
Yes, it was refactored out into its own function so that we can call it
from connect_network_socket, too.
I think the logic is slowly coming back to me... Lisp programs
typically call `set-process-filter' after calling
`make-network-process' -- even when opening an asynchronous connection.
This worked before because the connection wouldn't really be all that
synchronous -- it would do name resolution, and then open the socket, so
when `make-network-process' had returned, then p->infd would (almost)
always be valid.
When `make-network-process' was made more asynchronous, then p->infd
typically not be initialised yet, so `set-process-filter' would not do
the main bit any more. To avoid having to rewrite all the callers of
`set-process-filter' with async connections, I just made it do the
filter setup in connect_network_socket, by which time we really have a
p->infd.
Logically speaking, it would make more sense if nobody called
`set-process-filter' until we have a connection, but that wouldn't be
backwards compatible.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-07-25 16:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 0:06 bug#36591: 26.2; Term's pager seems broken Adam Bliss
2019-07-23 13:53 ` Noam Postavsky
2019-07-23 17:40 ` Eli Zaretskii
2019-07-23 22:33 ` Adam Bliss
2019-07-24 2:07 ` Noam Postavsky
2019-07-24 15:07 ` Eli Zaretskii
2019-07-25 0:55 ` Noam Postavsky
2019-07-25 10:02 ` Lars Ingebrigtsen
2019-07-25 13:01 ` Eli Zaretskii
2019-07-25 16:58 ` Lars Ingebrigtsen [this message]
2019-07-25 13:01 ` Noam Postavsky
2019-07-25 17:01 ` Lars Ingebrigtsen
2019-07-25 17:28 ` Noam Postavsky
2019-07-25 17:44 ` Lars Ingebrigtsen
2019-07-25 17:57 ` Noam Postavsky
2019-07-25 13:11 ` Eli Zaretskii
2019-07-25 22:38 ` Noam Postavsky
2020-08-21 12:58 ` Lars Ingebrigtsen
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=m3h87acaq2.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=36591@debbugs.gnu.org \
--cc=abliss@gmail.com \
--cc=eliz@gnu.org \
--cc=npostavs@gmail.com \
/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.