From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Flymake refactored Date: Thu, 05 Oct 2017 09:11:02 -0400 Message-ID: References: <87h8vmj3tr.fsf@lolita> <1507138648.1972.0@smtp.gmail.com> <874lre2von.fsf@gmail.com> <87mv566yjx.fsf@udel.edu> <87shex276r.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1507209089 14555 195.159.176.226 (5 Oct 2017 13:11:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Oct 2017 13:11:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: jwiegley@gmail.com, emacs-devel@gnu.org, Mark Oteiza , Simen =?windows-1252?Q?Heggest=F8yl?= , dgutov@yandex.ru, Steve Purcell , sdl.web@gmail.com To: joaotavora@gmail.com (=?windows-1252?B?Sm/jbyBU4XZvcmE=?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 05 15:11:21 2017 Return-path: Envelope-to: ged-emacs-devel@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 1e05vp-0002ZA-Ns for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 15:11:17 +0200 Original-Received: from localhost ([::1]:39810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e05vw-0005mL-Tq for ged-emacs-devel@m.gmane.org; Thu, 05 Oct 2017 09:11:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e05vk-0005lw-NQ for emacs-devel@gnu.org; Thu, 05 Oct 2017 09:11:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e05vg-0001Vd-OY for emacs-devel@gnu.org; Thu, 05 Oct 2017 09:11:12 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:36404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e05vg-0001VH-IL for emacs-devel@gnu.org; Thu, 05 Oct 2017 09:11:08 -0400 Original-Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v95DB2MZ006282; Thu, 5 Oct 2017 09:11:02 -0400 Original-Received: by lechazo.home (Postfix, from userid 20848) id AEE7A61789; Thu, 5 Oct 2017 09:11:02 -0400 (EDT) In-Reply-To: <87shex276r.fsf@gmail.com> (=?windows-1252?Q?=22Jo=E3o_T=E1vo?= =?windows-1252?Q?ra=22's?= message of "Thu, 05 Oct 2017 11:57:32 +0100") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6130=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6130> : inlines <6109> : streams <1765949> : uri <2511623> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219119 Archived-At: >> :sentinel >> (lambda (p _ev) > One of the things you must do here is check if your process is obsolete, > i.e. if Flymake decided to launch another one in the meantime. A good > way to do this is to check if 'p' is 'eq' to the buffer-local value of > clang-flymake--procress. While I agree that it should check whether `p` is obsolete (just in case something went wrong elsewhere), `p` should have been killed when the other process was launched, so this sentinel should only be called with an obsolete `p` in response to such a kill. BTW, it should also check `ev` in case the event is just that someone suspended/resumed the background process. Stefan