From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Shahid Newsgroups: gmane.emacs.help Subject: Re: call-process and incremental display of output Date: Wed, 26 Dec 2018 12:47:12 -0500 Message-ID: <87muosmb8f.fsf@gmail.com> References: <87y3ay2fcy.fsf@oldenburg.str.redhat.com> <87ftx5x9bv.fsf@oldenburg.str.redhat.com> <87tvlh3991.fsf@gmail.com> <87sh113360.fsf@gmail.com> <871s8ji62a.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1545846358 18370 195.159.176.226 (26 Dec 2018 17:45:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Dec 2018 17:45:58 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: help-gnu-emacs To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 26 18:45:54 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcDFh-0004gB-7C for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Dec 2018 18:45:53 +0100 Original-Received: from localhost ([127.0.0.1]:47634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcDHn-00029A-R1 for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Dec 2018 12:48:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcDHD-00024Y-M3 for help-gnu-emacs@gnu.org; Wed, 26 Dec 2018 12:47:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcDH8-0000bQ-Un for help-gnu-emacs@gnu.org; Wed, 26 Dec 2018 12:47:27 -0500 Original-Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:46876) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcDH5-0000Vc-Ih for help-gnu-emacs@gnu.org; Wed, 26 Dec 2018 12:47:20 -0500 Original-Received: by mail-qt1-x835.google.com with SMTP id y20so17883396qtm.13 for ; Wed, 26 Dec 2018 09:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=6pfFyQHTABd5rMJlyt+ls9bXIEagUXL9zAJ9dFMJLao=; b=Nc7ujKu8aalrMs5GgARyUTpY5ShjS/yechNeekt1Be1qgLEYhtTT6NDPxsRDFYF3Ni CCeJ/hWL0RD0xJ4kOvLVN4+03XlMPc7lcPebJ0mSwQCzodswvfuUK5iADgW1kn1aDoTL vzd8X76Asnk884H1DYZaNMy1aiBSeeHJBl1ty5smj7wf/TQVhdBpyUR20p//EBUUcPv6 ON4HzpdcRGToxXhITbQwNwwr5fwCso8wCVh+Z3tbBiNRbaxOwVBk/udnGT3x8ZPhDepE K/2t/Giq93hIMfJJ6xHr8MPQRu3+M0RgoUktlmswdu16I9X4l4Ye7iXcZc9Cf1qLwt0n Lp3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=6pfFyQHTABd5rMJlyt+ls9bXIEagUXL9zAJ9dFMJLao=; b=fncSMhFghk/I8HGoQSU2/6kUP8pC/spdqimwpprCI5BdbnjyTxwoHwQeQSp2c/dVFd wEZ6z10UM/QgZUjTnyUVMesxPyDiEL29kuZm3ddZB+QRhNyCAGj+1IejRUg2B4PikBBJ ancAtUxN9bAgJ5m2iDaRJMJtVYCUdSMGhF5NPp/59cnLB0Le2b1GMPd2UL+oBD221w6L D7UQUW4V9PO4JArzhdZH9MMltlwopeNFyDIo8ORSSr68bqO15yK2d4jJ203nhdshmVw8 9vb0g0etwwjhCG2LeaGPPz9mvIFwB2wuh0C1YtgYHEDfyxYbIKEZIwZQA3Li5RBwLlRp QsYA== X-Gm-Message-State: AJcUukdH59UQR4x+I5XiFI5ZoxLp7VRYwYdgeTWVbVC61qdd0hU0qQs/ J3PDjjCFSLMua8J+DIPKtOZUZCY2YVE= X-Google-Smtp-Source: ALg8bN7hfsRolQWR07w3XPOyuVovliCl+KLt7MDz8zdTEfjajEkiJZR8FT1SqDuqOlcDI7KmZqDvdQ== X-Received: by 2002:a0c:f184:: with SMTP id m4mr19099505qvl.178.1545846437258; Wed, 26 Dec 2018 09:47:17 -0800 (PST) Original-Received: from amun (cpe-104-162-86-217.nyc.res.rr.com. [104.162.86.217]) by smtp.gmail.com with ESMTPSA id u45sm14259799qtk.33.2018.12.26.09.47.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Dec 2018 09:47:15 -0800 (PST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::835 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119047 Archived-At: FYI, I have been using this patch without any noticeable issues. Not sure if we should merge it. Stefan Monnier writes: >> Sounds good. I'll make the change locally and test it for a month or >> two and report back. > > FWIW, I'm running with the following change now: > > diff --git a/src/editfns.c b/src/editfns.c > index e995b38a44..db95a8a20a 100644 > --- a/src/editfns.c > +++ b/src/editfns.c > @@ -782,6 +782,12 @@ save_excursion_save (union specbinding *pdl) > { > eassert (pdl->unwind_excursion.kind == SPECPDL_UNWIND_EXCURSION); > pdl->unwind_excursion.marker = Fpoint_marker (); > + /* Suggested by John Shahid in the "call-process and > + * incremental display of output" thread of help-gnu-emacs. > + * This matches the manually-created behavior of compile.el's process filter > + * and probably others like comint as well. */ > + XMARKER (pdl->unwind_excursion.marker)->insertion_type > + = !NILP (Vwindow_point_insertion_type); > /* Selected window if current buffer is shown in it, nil otherwise. */ > pdl->unwind_excursion.window > = (EQ (XWINDOW (selected_window)->contents, Fcurrent_buffer ()) > > I haven't double checked that it does what I think it does, to be > honest, but at least after a mere 48h of normal use I haven't noticed > anything weird yet. > > > Stefan