all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.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 16:01:01 +0300	[thread overview]
Message-ID: <83imrqnu9e.fsf@gnu.org> (raw)
In-Reply-To: <875znqctzy.fsf@mouse.gnus.org> (message from Lars Ingebrigtsen on Thu, 25 Jul 2019 12:02:09 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  abliss@gmail.com,  36591@debbugs.gnu.org
> Date: Thu, 25 Jul 2019 12:02:09 +0200
> 
> Noam Postavsky <npostavs@gmail.com> writes:
> 
> >> On the master branch we should clean up the confusing set of if
> >> clauses, both in set-process-filter and in connect_network_socket.
> >> Perhaps Lars could describe his reasoning for making the change which
> >> introduced set_process_filter_masks and what problem it tried to
> >> solve.  (Btw, the log message for that change seems to imply that
> >> set-process-filter should not have called set_process_filter_masks,
> >> something that the change itself disagrees with.  An omission?)
> >
> > Hmm, true, I didn't pay that close attention to the log message.
> > Maybe "we may not have a socket yet" refers to the already existing
> > 'if (p->infd >= 0)' check?
> 
> Let's see...  this was part of the patch series that allowed for
> asynchronous connection setup?
> 
> 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?  IOW, what was missing from this code in
connect_network_socket, which already existed and manipulated some of
the same flags and descriptor bits:

  if (p->is_non_blocking_client)
    {
      /* We may get here if connect did succeed immediately.  However,
	 in that case, we still need to signal this like a non-blocking
	 connection.  */
      if (! (connecting_status (p->status)
	     && EQ (XCDR (p->status), addrinfos)))
	pset_status (p, Fcons (Qconnect, addrinfos));
      if ((fd_callback_info[inch].flags & NON_BLOCKING_CONNECT_FD) == 0)
	add_non_blocking_write_fd (inch);
    }
  else
    /* A server may have a client filter setting of Qt, but it must
       still listen for incoming connects unless it is stopped.  */
    if ((!EQ (p->filter, Qt) && !EQ (p->command, Qt))
	|| (EQ (p->status, Qlisten) && NILP (p->command)))
      add_process_read_fd (inch);

And in what use case did you see the need for the additional handling
in set_process_filter_masks?  I'd like to have a good understanding of
this, so that we could make this code less confusing on the master
branch.

TIA





  reply	other threads:[~2019-07-25 13:01 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 [this message]
2019-07-25 16:58               ` Lars Ingebrigtsen
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=83imrqnu9e.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36591@debbugs.gnu.org \
    --cc=abliss@gmail.com \
    --cc=larsi@gnus.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.