From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 02 00:57:02 2016 Received: (at submit) by debbugs.gnu.org; 2 Oct 2016 04:57:02 +0000 Received: from localhost ([127.0.0.1]:41436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqYph-0008Fu-Su for submit@debbugs.gnu.org; Sun, 02 Oct 2016 00:57:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqYpf-0008Fc-Op for submit@debbugs.gnu.org; Sun, 02 Oct 2016 00:57:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqYpZ-0000Yk-Ey for submit@debbugs.gnu.org; Sun, 02 Oct 2016 00:56:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqYpZ-0000YW-BZ for submit@debbugs.gnu.org; Sun, 02 Oct 2016 00:56:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqYpW-0001jY-T6 for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 00:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqYpS-0000Wy-PO for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 00:56:49 -0400 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]:34436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqYpS-0000Wn-IT for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2016 00:56:46 -0400 Received: by mail-pa0-x241.google.com with SMTP id r9so6065752paz.1 for ; Sat, 01 Oct 2016 21:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=8+qrl9pL48acv/U/4VhuC+WNEDOBd26dMgzQ51AV4go=; b=eRNW60ZLEg8X+pFn0zdkCTzBcwP3kgTmX+wuWT4/jeftY/RVXvSwa/4onD7Jr/oOHc 1Oip5unZjcQPYihLbjDBNDe/gCeWyy44rVqPQ0xSU3ae0i1NBeD/WayAeiFomGMypyYF tQ9/YlnPqOa58KRYJ7YPiCQQC60QeyS6DQcfdfyyPZVlBP6WzNzXeU3sVzsv/ZEXa4yU zybFPTOjOjtR0rO1HtiywffI1AR87RNWJXuXWw7oFm0y/C8q8oH1WEUl6VbTki4VZL4v HWWwAPeSWBNHW5QkdCKPC93y8EDeuXOxPc9jRAMvzgZbCOraHwvmaXHzgyfINw08YjTj C9HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=8+qrl9pL48acv/U/4VhuC+WNEDOBd26dMgzQ51AV4go=; b=bs3lFrUFXxDEBA259U2oqN8WzpRNKWRsk6znfVGENP/v1QvxD1u1U3VXLJ8G5+Rv5h FSltmQe6PPaQUtneQzf1+sV1I/tHoFSdTKOUF2V6iIVMLRU6Tsl3E4d/MdbZV0+EUqP0 Nn8lq2URMquyvbvKQH+kXF/nQuaPsgx8q0GnpS9OuDXaDz3wlFpovCYzOfhD2kNmVmsr SDMufQBTQghzobQ6a9n4mwZwtNIPqrJFJpj8TgyOiPxAd4PJJQ6D7XE6NcBMQGz+Wnl1 8unEPlnPU4Y2KPhCMhRUdyL2Zg4TOYYdhXYQ5WidKlHGl8/IyQsX+jxjFuSrf1siO++m DZmw== X-Gm-Message-State: AA6/9RmN5zf6sEky3qGs7eW3QZIJrRoDgIVV1TOfftqD/6SfWLd/qfavEhfWtgsmuhmaaw== X-Received: by 10.66.132.79 with SMTP id os15mr13583272pab.84.1475384205057; Sat, 01 Oct 2016 21:56:45 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id e21sm37952939pfb.96.2016.10.01.21.56.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Oct 2016 21:56:44 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer X-Debbugs-CC: Stefan Monnier Date: Sun, 02 Oct 2016 12:56:40 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) ,----[ Stefan Monnier ] | > + ;; Manually run the `compilation-auto-jump' timer. Hackish but | > + ;; everything else seems unreliable. See: | > + ;; | > + ;; - http://debbugs.gnu.org/13829 | > + ;; - http://debbugs.gnu.org/23987 | > + ;; - https://github.com/leoliu/ggtags/issues/89 | > + ;; | > + (pcase (cl-find 'compilation-auto-jump timer-list :key #'timer--function) | > + (`nil ) | > + (timer (timer-event-handler timer))) | | I think this deserves a bug report, where we try to figure out how to | make it possible for ggtags.el to work properly without resorting to such | a hideous and brittle hack. | | A hack will probably have to stay for compatibility with older Emacsen, | but we should come up with a better solution for the future. `---- The hack is due to difficulty in making sure one timer is run before another that run nearly at the same time. And it's made harder because timer.el prepends a timer to existing timers running at the same time, which looks like a mistake. I think the hack in ggtags.el may be removed by the following patch to correct the said mistake: diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index c01ea497..337e1049 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -130,9 +130,9 @@ floating point number." (setq delta (time-add delta (list 0 0 (or usecs 0) (or psecs 0))))) (time-add time delta))) -(defun timer--time-less-p (t1 t2) +(defun timer--time-less-or-equal-p (t1 t2) "Say whether time value T1 is less than time value T2." - (time-less-p (timer--time t1) (timer--time t2))) + (not (time-less-p (timer--time t2) (timer--time t1)))) (defun timer-inc-time (timer secs &optional usecs psecs) "Increment the time set in TIMER by SECS seconds, USECS microseconds, @@ -172,7 +172,7 @@ fire repeatedly that many seconds apart." (let ((timers (if idle timer-idle-list timer-list)) last) ;; Skip all timers to trigger before the new one. - (while (and timers (timer--time-less-p (car timers) timer)) + (while (and timers (timer--time-less-or-equal-p (car timers) timer)) (setq last timers timers (cdr timers))) (if reuse-cell From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 02 16:36:06 2016 Received: (at 24585) by debbugs.gnu.org; 2 Oct 2016 20:36:06 +0000 Received: from localhost ([127.0.0.1]:42269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqnUU-0005DQ-3E for submit@debbugs.gnu.org; Sun, 02 Oct 2016 16:36:06 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:39778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqnUS-0005Cu-HB for 24585@debbugs.gnu.org; Sun, 02 Oct 2016 16:36:05 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BHAgALW9BX/4Pjr2xdGwEBAQMBAQGDLQEBAQEBHoRNhVCEZasRggOGFgQCAoFpORQBAgEBAQEBAQFeJ4RiAQEDAVYjBQsLDiYSFBgNJC6IJwi8VQEBAQEBBQIlin2KHAWZWYkkj2mGC48NgT4eNoJoG4FpIIYKAQEB X-IPAS-Result: A0BHAgALW9BX/4Pjr2xdGwEBAQMBAQGDLQEBAQEBHoRNhVCEZasRggOGFgQCAoFpORQBAgEBAQEBAQFeJ4RiAQEDAVYjBQsLDiYSFBgNJC6IJwi8VQEBAQEBBQIlin2KHAWZWYkkj2mGC48NgT4eNoJoG4FpIIYKAQEB X-IronPort-AV: E=Sophos;i="5.30,296,1470715200"; d="scan'208";a="274367420" Received: from 108-175-227-131.dsl.teksavvy.com (HELO ceviche.home) ([108.175.227.131]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Oct 2016 16:35:57 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 3642F6621B; Sun, 2 Oct 2016 16:35:57 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: Date: Sun, 02 Oct 2016 16:35:57 -0400 In-Reply-To: (Leo Liu's message of "Sun, 02 Oct 2016 12:56:40 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I think the hack in ggtags.el may be removed by the following patch to > correct the said mistake: IIUC this patch just changes the ordering for same-time timers. Relying on either ordering is itself a hack. We need a better solution. What are those two timers whose relative execution order matters? Why do they care in which order they're run? Stefan > diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el > index c01ea497..337e1049 100644 > --- a/lisp/emacs-lisp/timer.el > +++ b/lisp/emacs-lisp/timer.el > @@ -130,9 +130,9 @@ floating point number." > (setq delta (time-add delta (list 0 0 (or usecs 0) (or psecs 0))))) > (time-add time delta))) > -(defun timer--time-less-p (t1 t2) > +(defun timer--time-less-or-equal-p (t1 t2) > "Say whether time value T1 is less than time value T2." > - (time-less-p (timer--time t1) (timer--time t2))) > + (not (time-less-p (timer--time t2) (timer--time t1)))) > (defun timer-inc-time (timer secs &optional usecs psecs) > "Increment the time set in TIMER by SECS seconds, USECS microseconds, > @@ -172,7 +172,7 @@ fire repeatedly that many seconds apart." > (let ((timers (if idle timer-idle-list timer-list)) > last) > ;; Skip all timers to trigger before the new one. > - (while (and timers (timer--time-less-p (car timers) timer)) > + (while (and timers (timer--time-less-or-equal-p (car timers) timer)) > (setq last timers > timers (cdr timers))) > (if reuse-cell From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 02 23:01:14 2016 Received: (at 24585) by debbugs.gnu.org; 3 Oct 2016 03:01:14 +0000 Received: from localhost ([127.0.0.1]:42386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqtVC-0000VC-FM for submit@debbugs.gnu.org; Sun, 02 Oct 2016 23:01:14 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:33914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqtVA-0000Ux-UE for 24585@debbugs.gnu.org; Sun, 02 Oct 2016 23:01:13 -0400 Received: by mail-pa0-f54.google.com with SMTP id rz1so1662737pab.1 for <24585@debbugs.gnu.org>; Sun, 02 Oct 2016 20:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=FKlYndwov5TcK/yv7COenIdTQXx32k779XgSrIT4XZs=; b=MLovz45a1TcUPb3I6Dqr0/6/4Xp8jfV5O2WiwVSNCmbzr6B8unRIHxk4R0teaO+Ja0 8oGY0FSy5DIaPiA4Wz3aX9YGayXDxEEt1UHoI/WlEne4lrUtMIv7sjZc3mnOxFE3luI8 cRDoM7dh/H1BjVzUFCLlV3P+k/TDOK6dUPtuKekxYmkdt7MCzliK36uhoZl81APooFKk Qi5RDEq793GsbWproLjcP3L4RwovH5+RhpA2r1MZCvCRYocstQ7uCN2j+vhPJTcDmWHT 23GLmgxsvQ+JrsQUxIbpyY8QudlSWR9XZq5/B6YTpVFCoO60Hdtw3Y8lKa7RZk7lYlXL fVcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=FKlYndwov5TcK/yv7COenIdTQXx32k779XgSrIT4XZs=; b=dEbdWU2NLO27H7m6ckIaxx1XExQ/K5n9HNWFzHuTmUcI3v7RLjoZeFIKqvwk5XbQak YROV6Pb16s+CQ75vGswoCfQEE24gZAbcoIqQXVVd6e0qTl8t0D20/3GGpHeCNiwaMcre 85NfJvsoc9AZw7o7sY3r0V/i+qF0MiajzIaoaFbQIqVI0t/8qWlHMjT/TS1weHP9lCqL XMHEzwV6ct/OUPa65EJtId7pZi7UCVXX1w1Nxjasvdn1Hk9jO6dYjIbV1+8pj413bM+d LiZU0l72HavqnB2l19ytdsVOSbzKRix3Ops9VUwjdER4cX/rKjxy3CNa7lEIMXCB1hOx M/ug== X-Gm-Message-State: AA6/9RmHOvmL9IIGfmXZ1umwlsww/FampABCWqf2qKi3+wYAFYRRfA3rcyVrNBzZ+W3low== X-Received: by 10.66.156.5 with SMTP id wa5mr219701pab.149.1475463667120; Sun, 02 Oct 2016 20:01:07 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id v24sm42732562pfd.1.2016.10.02.20.01.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Oct 2016 20:01:06 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0 nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+ U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs 3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C YII= Date: Mon, 03 Oct 2016 11:01:02 +0800 In-Reply-To: (Stefan Monnier's message of "Sun, 02 Oct 2016 16:35:57 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 2016-10-02 16:35 -0400, Stefan Monnier wrote: > IIUC this patch just changes the ordering for same-time timers. > Relying on either ordering is itself a hack. We need a better solution. If you eval (progn (run-with-timer 0 ...) ; timer 1 (run-with-timer 0 ...)) ; timer 2 you expect timer 1 to be triggered first, no? > What are those two timers whose relative execution order matters? > Why do they care in which order they're run? The first timer is compilation-auto-jump which is installed (by compile) at the start of compilation. The second timer is a cleanup timer which is installed (by ggtags) when compilation finishes and there is 0 or 1 match. The second timer kills the buffer (among other things) that the first timer depends on. Leo From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 03 09:24:56 2016 Received: (at 24585) by debbugs.gnu.org; 3 Oct 2016 13:24:56 +0000 Received: from localhost ([127.0.0.1]:42671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1br3El-0005DW-S6 for submit@debbugs.gnu.org; Mon, 03 Oct 2016 09:24:56 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:48800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1br3Ej-0005DN-9c for 24585@debbugs.gnu.org; Mon, 03 Oct 2016 09:24:54 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u93DPmvI032731; Mon, 3 Oct 2016 09:25:49 -0400 Received: by ceviche.home (Postfix, from userid 20848) id E1F5E6622D; Mon, 3 Oct 2016 09:24:50 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: Date: Mon, 03 Oct 2016 09:24:50 -0400 In-Reply-To: (Leo Liu's message of "Mon, 03 Oct 2016 11:01:02 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5816=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5816> : inlines <5303> : streams <1710368> : uri <2300690> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) >> IIUC this patch just changes the ordering for same-time timers. >> Relying on either ordering is itself a hack. We need a better solution. > If you eval (progn (run-with-timer 0 ...) ; timer 1 > (run-with-timer 0 ...)) ; timer 2 > you expect timer 1 to be triggered first, no? Not really. I think any code which relies on such a property will sooner suffer. >> What are those two timers whose relative execution order matters? >> Why do they care in which order they're run? > The first timer is compilation-auto-jump which is installed (by compile) > at the start of compilation. > The second timer is a cleanup timer which is installed (by ggtags) when > compilation finishes and there is 0 or 1 match. > The second timer kills the buffer (among other things) that the first > timer depends on. So we can fix the bug by making the timer's code check if the buffer is still live? Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 03 11:22:38 2016 Received: (at 24585) by debbugs.gnu.org; 3 Oct 2016 15:22:38 +0000 Received: from localhost ([127.0.0.1]:43127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1br54g-00011s-1L for submit@debbugs.gnu.org; Mon, 03 Oct 2016 11:22:38 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:35114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1br54e-00011X-GL for 24585@debbugs.gnu.org; Mon, 03 Oct 2016 11:22:36 -0400 Received: by mail-pf0-f178.google.com with SMTP id s13so64872731pfd.2 for <24585@debbugs.gnu.org>; Mon, 03 Oct 2016 08:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=+Z8Vm+7Bz1MfVB4rR/oGo9i+xtQNNEQoT55P3NHNirU=; b=r50/duLXxd1F7J3U+h1rzj53UuULXwpCWBCoQIs39VP2N5giwXzRNdOfgBfs+oFzvc zmP9IJrL32rQwbJKOOTAoIn1WaInFoZ+qLXLxYu5HVFOEtJbpiMPScNYMeCwAuDs1+Xh JrX7AhJIdgdjtBMw6NgHRz12zRZ4H1y+SuLX48+WkgVIQrYP+/C1zr1nDsbNWR3xiG5z 4Fa7mPU2ictza3dz+LfyRC0XB7KFm1/MNmuyetWjwcQyDJQrNwZp3LVnUfta6kQvNyBF KiLSg2yUIOOTAIPx9ptt4Izyo6pTCpJ7mRJGtoTvAmAzFDmc4hp7M52VAGW70K4Egoxt X4cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=+Z8Vm+7Bz1MfVB4rR/oGo9i+xtQNNEQoT55P3NHNirU=; b=ZeIWUCYh1CGRpP/ZYJ4hAgqTnM9rU/U49h//H72sOggK2vP/lTfZD1p44GHbX7uVSh fZ9Hhgb/0HO0CLZ1lj/e7T0QmHMzCfwSfN3DOXXe9wQvOnIZtWCEgSXu2RTj8stuQ7UR ilpEXV3T7lklRTuVI0NricT8II1CV51eyUhR4Kr1ej0a+st5YDiU2c9OQw4FoFqeTqWR KmszZ56sODjlfJWuxuRZQqDiyPDuQb/n/vtDCuMqY+DhbGJIYJuIXLdzeSZUZuCpDeb1 tMmzsdeXbQU2U9Zle32j095Gbgm6dgU3LzCs5Iw3nXdYFHaSrHih95r9JcHBNN75/pNy Ab7g== X-Gm-Message-State: AA6/9Rkh7maISQAsP9nj+2DVxHviHSxdCiggBbjH2+60MTuriO5G8FeYWoCv/zoWYHFkdA== X-Received: by 10.98.76.9 with SMTP id z9mr24874680pfa.75.1475508150442; Mon, 03 Oct 2016 08:22:30 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id i8sm18028977pfj.67.2016.10.03.08.22.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Oct 2016 08:22:29 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAElBMVEUAAAAAAP+LRRP0pGC+ vr7///+7mT1iAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMO DhglKe4AAAEsSURBVCjPbZNBboQwDEV/Cd4X9QJRThApmn0XYW+Jyf2v0m+HhqDBgiAe9rcTG7QH w/1Vn2Ar8gBb/ocywSN3qK9T3z4eFDB4eApocBpeBs1RSykoJd8gQcm8pGmHXFso3ajnmsqV0TnY DQkOfXUfN5NwaI7AWTVOyEhcu1aHmdWItHddUVUcUgUBCkitu8V6ditHVOVdqzl2EQ1ZVGTbdK0V 7cqn8vWzoU5Q/bF9Y/Y0cRU1xwkys5dJ+Dt6pBDWifcNQml8Gh2JVmPSoQzo7en0grswkxrUGYJ7 0hSxxAGr7ZMwYcHIzprpi7TENEE1xtiYxixRlCfPBsUUrwHD7uGIwATrbnODJcVrPpVn3hxiGloe m/S+z3CtuzUSMo83N4DPH+F0evwR3P4A2k+75838OKQAAAAASUVORK5CYII= Date: Mon, 03 Oct 2016 23:22:24 +0800 In-Reply-To: (Stefan Monnier's message of "Mon, 03 Oct 2016 09:24:50 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 2016-10-03 09:24 -0400, Stefan Monnier wrote: >> The first timer is compilation-auto-jump which is installed (by compile) >> at the start of compilation. >> The second timer is a cleanup timer which is installed (by ggtags) when >> compilation finishes and there is 0 or 1 match. >> The second timer kills the buffer (among other things) that the first >> timer depends on. > > So we can fix the bug by making the timer's code check if the buffer is > still live? No. We still want compilation-auto-jump to happen first. Otherwise we just find 1 match and clean up without jumping to the match. Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 04 07:47:18 2016 Received: (at 24585) by debbugs.gnu.org; 4 Oct 2016 11:47:18 +0000 Received: from localhost ([127.0.0.1]:43844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brOBp-0002S6-TV for submit@debbugs.gnu.org; Tue, 04 Oct 2016 07:47:18 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:22450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brOBn-0002Rn-2g for 24585@debbugs.gnu.org; Tue, 04 Oct 2016 07:47:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DeBQALW9BX/7nwSC1dGwEBAQMBAQGDLQEBAQEBHoRNhVCxeYYWBAICgWk8EQECAQEBAQEBAV4nhGIBAQMBViMQCw4mEhQYDSSIVQi8VQEBAQEGAiWKfYocAQSZWZkNhguQSzQghGwghgoBAQE X-IPAS-Result: A0DeBQALW9BX/7nwSC1dGwEBAQMBAQGDLQEBAQEBHoRNhVCxeYYWBAICgWk8EQECAQEBAQEBAV4nhGIBAQMBViMQCw4mEhQYDSSIVQi8VQEBAQEGAiWKfYocAQSZWZkNhguQSzQghGwghgoBAQE X-IronPort-AV: E=Sophos;i="5.30,296,1470715200"; d="scan'208";a="274560279" Received: from 45-72-240-185.cpe.teksavvy.com (HELO pastel.home) ([45.72.240.185]) by smtp.teksavvy.com with ESMTP; 04 Oct 2016 07:47:08 -0400 Received: by pastel.home (Postfix, from userid 20848) id 118FF64BE1; Mon, 3 Oct 2016 14:45:57 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: Date: Mon, 03 Oct 2016 14:45:57 -0400 In-Reply-To: (Leo Liu's message of "Mon, 03 Oct 2016 23:22:24 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>> The first timer is compilation-auto-jump which is installed (by compile) >>> at the start of compilation. >>> The second timer is a cleanup timer which is installed (by ggtags) when >>> compilation finishes and there is 0 or 1 match. >>> The second timer kills the buffer (among other things) that the first >>> timer depends on. >> So we can fix the bug by making the timer's code check if the buffer is >> still live? > No. We still want compilation-auto-jump to happen first. Otherwise we > just find 1 match and clean up without jumping to the match. [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>> The first timer is compilation-auto-jump which is installed (by compile) >>> at the start of compilation. >>> The second timer is a cleanup timer which is installed (by ggtags) when >>> compilation finishes and there is 0 or 1 match. >>> The second timer kills the buffer (among other things) that the first >>> timer depends on. >> So we can fix the bug by making the timer's code check if the buffer is >> still live? > No. We still want compilation-auto-jump to happen first. Otherwise we > just find 1 match and clean up without jumping to the match. [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 DATE_IN_PAST_12_24 Date: is 12 to 24 hours before Received: date -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders >>> The first timer is compilation-auto-jump which is installed (by compile) >>> at the start of compilation. >>> The second timer is a cleanup timer which is installed (by ggtags) when >>> compilation finishes and there is 0 or 1 match. >>> The second timer kills the buffer (among other things) that the first >>> timer depends on. >> So we can fix the bug by making the timer's code check if the buffer is >> still live? > No. We still want compilation-auto-jump to happen first. Otherwise we > just find 1 match and clean up without jumping to the match. Then why does the second timer kill the buffer so hastily? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 04 09:08:20 2016 Received: (at 24585) by debbugs.gnu.org; 4 Oct 2016 13:08:20 +0000 Received: from localhost ([127.0.0.1]:43879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brPSG-0004ST-Ay for submit@debbugs.gnu.org; Tue, 04 Oct 2016 09:08:20 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brPSE-0004SE-Fi for 24585@debbugs.gnu.org; Tue, 04 Oct 2016 09:08:18 -0400 Received: by mail-pa0-f53.google.com with SMTP id cd13so69365864pac.0 for <24585@debbugs.gnu.org>; Tue, 04 Oct 2016 06:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=dl2g9JcJotAnafuYRL0pA0qE+Mk+Y/1rGBCesA3rKD8=; b=aDRmz4iPaHwleDuW4yWddanQBZIzIYrMP2uAP4d/G2B3GQBEdenZrVMNhtAYJUJ+gH Kt0QYegnXP/m9Z+guvELx9KPujvhBgT1YJ/tZ5Ot3crKZ3M2E6HhB0bp6TmjWOh7PhcC yHThKoRw1JHCJKVyK70wuQ3k79ftfHNC30AW6+cfpJhpW+tGR3PDxQQ6PULrWPeQLNTz Bz0w+wAhrgz5KFdfvaK6ZJ2btIICIPPBiDhbJW5EiDW3l2IYV1JJnOGmAhuXaeTgYh5u xcHOCQi0Rpqkf5RJFa3nf59aV4udOmw6Y8lfEYF7k2RAyutPL4QvufmQ2o09JX9YVyNL zdLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=dl2g9JcJotAnafuYRL0pA0qE+Mk+Y/1rGBCesA3rKD8=; b=ZKVnsMH8CC2XVUwMJq06koOBX8XNvJyzWkn61HUUPkLct1T0YCIamvciSGEyMo+Ui9 +BdIjN0vJWUtAUo2zPvGAXM6hVx2v1pn9rsSUec2d+35PaUzzfOAsomX8JHQkg2mFhkf mZcBUxeXTpnZeQlCYrqCO8P+yvaoTLUg/HnDRbo+fPAO4jSaBlR5s52zElW2IsEMNlCt va5Jbir8CMRQT7Jt8OBOHMVl4DhWkB114DXIVRoluDgyRAD7T0Nam10fjcXLE1CU5Zg2 FuMmGMsX0fs+kk6DEKge2aYaTJvAlpZInpMmu91FJK836Rvqsp01VGnd3b77o8aWCk1Z crsQ== X-Gm-Message-State: AA6/9RlnHlyYPRRNJN9R2X383Et7M1hCloO0vmEiOY+06/tRmCJkXX7vUAfQ2nR9zAMz9w== X-Received: by 10.66.189.194 with SMTP id gk2mr4841903pac.211.1475586492575; Tue, 04 Oct 2016 06:08:12 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id d85sm41711524pfj.57.2016.10.04.06.08.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Oct 2016 06:08:11 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0 nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+ U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs 3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C YII= Date: Tue, 04 Oct 2016 21:08:07 +0800 In-Reply-To: (Stefan Monnier's message of "Mon, 03 Oct 2016 14:45:57 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 2016-10-03 14:45 -0400, Stefan Monnier wrote: > Then why does the second timer kill the buffer so hastily? > > > Stefan ggtags-navigation-mode-cleanup unhides the window popped up by compilation-auto-jump. If we postpone it we see the window configuration on the frame messed up, which is kinda annoying. Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 04 12:18:26 2016 Received: (at 24585) by debbugs.gnu.org; 4 Oct 2016 16:18:26 +0000 Received: from localhost ([127.0.0.1]:44733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brSQD-0002iP-UL for submit@debbugs.gnu.org; Tue, 04 Oct 2016 12:18:26 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:43014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brSQC-0002iG-8T for 24585@debbugs.gnu.org; Tue, 04 Oct 2016 12:18:24 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u94GHsMN005300; Tue, 4 Oct 2016 12:17:55 -0400 Received: by pastel.home (Postfix, from userid 20848) id 74EB160098; Tue, 4 Oct 2016 12:18:22 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: Date: Tue, 04 Oct 2016 12:18:22 -0400 In-Reply-To: (Leo Liu's message of "Tue, 04 Oct 2016 21:08:07 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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, RV5817=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5817> : inlines <5311> : streams <1710971> : uri <2301397> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) >> Then why does the second timer kill the buffer so hastily? > ggtags-navigation-mode-cleanup unhides the window popped up by > compilation-auto-jump. If we postpone it we see the window configuration > on the frame messed up, which is kinda annoying. That would explain why you want to remove the buffer from specific windows (i.e. hide the buffer), but not why you need to kill it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 03:39:15 2016 Received: (at 24585) by debbugs.gnu.org; 5 Oct 2016 07:39:15 +0000 Received: from localhost ([127.0.0.1]:45171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brgnL-0005lU-92 for submit@debbugs.gnu.org; Wed, 05 Oct 2016 03:39:15 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brgnJ-0005lC-6L for 24585@debbugs.gnu.org; Wed, 05 Oct 2016 03:39:13 -0400 Received: by mail-pf0-f178.google.com with SMTP id e6so29125412pfk.1 for <24585@debbugs.gnu.org>; Wed, 05 Oct 2016 00:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=UDjFCRXtKv96ldGrLLEG1ULC0no81JPKfmuV2pLVdpM=; b=BduBnrQuaQkP9g8ccdkNOKVWB/DB4oal7iYHLKolBMD5s7ccreJy5M+8nXBI850/AE Iw7UflIdZ/6tu8+shljU4YEsJ61j+e21YLqxnQvBNkTO0sYn11qbY3W7nkznsxm/wDDb QNmG1HRTwN5DtXEs9Sn58OgCyYrPux4VGVw69YRgklwsAJQqAPxQ3vbdtl5m2Q3J20EP NtHiyi3nLsyWtSofzxPla//m1yfUp0I7Vv4YxeC2ZgiXnqFJvpEPxjEd1KlmifCGhCdd qsnh5HmwApvYT63WfaP5Hz95i7Q2uuSb4sXE4sseS8aZ0GTKldjzcWBDFHSxWyKjBpKY XJGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=UDjFCRXtKv96ldGrLLEG1ULC0no81JPKfmuV2pLVdpM=; b=CgLkhWPIRdxSonESuAbwUNvX+SS6B0weWL76NHEQgW7e9f+oAELd3AEws7NsXQXtY4 AFpSCstS4n8PCR29LJs3paHZ469dnwlO4VTtWsdJqsFe9wVABPURUiSwJINtk4No/wXt lFGbywKnE/mKZSV674nsAfjS2oRSqNS7pPowyS2kU/NSZt5aZ5OukXpsDNqcbkQmlaqJ t7LhC8mAm2DJzJrNODxDndIWbOzsniGoiNLZ6Lbdykxrahb3KBYhjccpF3ewnUwcadvc c6RQepHvgeE5uxGQ5Hc/CBX6s7hott4W8CXvKnQpfofX0kC9zvZeKz6j5kkU70ESEBPW D2zA== X-Gm-Message-State: AA6/9RnNo8fr58ZVcefpd4SsT3F1WkdpRy+xVmX9nleizXIJFVvgjOSWeLmeo1zRYL0TyA== X-Received: by 10.98.79.200 with SMTP id f69mr13524962pfj.51.1475653147439; Wed, 05 Oct 2016 00:39:07 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id qd12sm2217919pab.22.2016.10.05.00.39.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Oct 2016 00:39:06 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAG1BMVEUAAAA9Cgm3Hx1WWFWA gn+WmJWsrqv4+vcCAwCRl2MkAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAYoA AAGKATOXMFgAAAAHdElNRQfXAQwDNR+ZJmElAAABIklEQVQoz22SPW+DQAyGWUq65qasd9PNUSX4 AZHK2C1rJy5jpDS4IwRVup9dn7GNafpKIPPgzztXFSujqq1eM2n8h22oMkvxI/i9C97kRfMRUN55 dS3BrsAwBXUtMLAO4lryh8kTjOxKpQNniNxAgZOEe4bZwsDTFhKdqZRLNII4OQNHhEuq/RMkm6Cj TnnEA/fk0BorcYn5qA3oaeAxbaBOLrX+9G48NZ2Fzc2tzDM8Q+tMypEOqYHh8mAWaaK3U/cDMOT5 aMZMABgPXc7zPMs1A8DXO756GFJ/4fMEq47hTsAdn5avoxZ4ywl0c2w4Flu2Ybeyb3S+EqxX2DYA H8veJGEDTnHnrXvRaPyt+2kSfK6rfBZ2tUtfP/mR+pR6sX8BUZ/cDV7tvkoAAAAASUVORK5CYII= Date: Wed, 05 Oct 2016 15:39:02 +0800 In-Reply-To: (Stefan Monnier's message of "Tue, 04 Oct 2016 12:18:22 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 2016-10-04 12:18 -0400, Stefan Monnier wrote: > That would explain why you want to remove the buffer from specific > windows (i.e. hide the buffer), but not why you need to kill it. The buffer is not needed by ggtags so kill was chosen. I could change it to not kill but this won't fix the crux of the issue i.e. If compilation-auto-jump is run after cleanup it will mess up things for example pop up windows. Leo From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 05 06:26:10 2016 Received: (at 24585) by debbugs.gnu.org; 5 Oct 2016 10:26:10 +0000 Received: from localhost ([127.0.0.1]:45186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brjOs-0002Or-26 for submit@debbugs.gnu.org; Wed, 05 Oct 2016 06:26:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brjOp-0002OB-7P for 24585@debbugs.gnu.org; Wed, 05 Oct 2016 06:26:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brjOg-0007hF-VD for 24585@debbugs.gnu.org; Wed, 05 Oct 2016 06:26:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brjOg-0007gu-Rw; Wed, 05 Oct 2016 06:25:58 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4844 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1brjOd-0003MU-68; Wed, 05 Oct 2016 06:25:57 -0400 Date: Wed, 05 Oct 2016 13:25:45 +0300 Message-Id: <83twcrks7q.fsf@gnu.org> From: Eli Zaretskii To: Leo Liu In-reply-to: (message from Leo Liu on Wed, 05 Oct 2016 15:39:02 +0800) Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.7 (-------) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.7 (-------) > From: Leo Liu > Date: Wed, 05 Oct 2016 15:39:02 +0800 > Cc: 24585@debbugs.gnu.org > > On 2016-10-04 12:18 -0400, Stefan Monnier wrote: > > That would explain why you want to remove the buffer from specific > > windows (i.e. hide the buffer), but not why you need to kill it. > > The buffer is not needed by ggtags so kill was chosen. I could change it > to not kill but this won't fix the crux of the issue i.e. > > If compilation-auto-jump is run after cleanup it will mess up things > for example pop up windows. Instead of adding another timer, and then dealing with their order issues, is it possible to reuse the same time for both jobs? IOW, just _add_ the new/additional function you need to be done to whatever the single timer does. If you do that, you get to control the order in which things are done by the single timer, because you write the code of the timer function(s). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 12:13:11 2016 Received: (at 24585) by debbugs.gnu.org; 6 Oct 2016 16:13:11 +0000 Received: from localhost ([127.0.0.1]:46788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsBIF-000544-Ff for submit@debbugs.gnu.org; Thu, 06 Oct 2016 12:13:11 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:34594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsBIE-00053s-Li for 24585@debbugs.gnu.org; Thu, 06 Oct 2016 12:13:10 -0400 Received: by mail-pf0-f171.google.com with SMTP id e6so11330580pfk.1 for <24585@debbugs.gnu.org>; Thu, 06 Oct 2016 09:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=MQ9A3FxPGPU4B5O9ym6Twqf+u+4TiLJkFkTsQHZMMGM=; b=mVUq8n9CcF0HT0xRhvyWw1pdOXKZxWjj+tlDOIhImc/ofNVdtLNp72kz1/4N+WgFW5 pAsHJYXPIyf4DJ6vd+EPJFTwIk/WpH7/bGva73SOnxdoTI07mUfdc2W6q48XfUsiX5R+ XfqhYmIoFH76FsmYuAhnqWqQ/kWgCaLqyq8rJy7RO47us4xIiVcK7khZdeYZKB/GdOxn x5sSa7sRtizRN7e4a6QtcOQ+giqSI0HYQw6owUNhJcvtVemOEs4BFSMHy2rQ6M6wHGl2 yak2luWZyXDveFMuSdYPFuVB4VxL+WPM18OrmgZvGojEHPs9Gy7okhtzEYx5KO/Bgb6z dW2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=MQ9A3FxPGPU4B5O9ym6Twqf+u+4TiLJkFkTsQHZMMGM=; b=eTzxgLCA0qwJg20wE0aYQcZhmZjO73BsHASyF+h3DTPILEjTz5Em507VBMm20atzgd FcUgB8Yz9N3ocED58r7jKUytLuJjcgEras4kr3pkoSrD5cbk6345GA55PnxGdKToXj/v D1HrsJnzqGu9ehCmNdzcpR8dCOfZIBM12lcoQZBvLBswMzIZZAHEik8QaG5huK00vFrS zbOM/fpjtu50XWoPgU95PgJ6BgiF9RTu7FsZPLPK9MA8leOsWzVVHZaUyexMaaV+E00j sZmd2ce++nR0ZqsC7tcuSsHx4xc9pWoQQYQMe3Rlqx5ZIbAy6DV84O7bNx6+sF1nNOny YWXg== X-Gm-Message-State: AA6/9Rn7W4iMOW7nZ0Yh6UqZ0WWp9DmO5T5nqf39Gc5R0oejONBK2q5ZQ6wI6yTGKEvEEQ== X-Received: by 10.98.36.213 with SMTP id k82mr27324088pfk.172.1475770385039; Thu, 06 Oct 2016 09:13:05 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id ao5sm23936928pad.1.2016.10.06.09.13.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Oct 2016 09:13:04 -0700 (PDT) From: Leo Liu To: Eli Zaretskii Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Fri, 07 Oct 2016 00:12:57 +0800 In-Reply-To: <83twcrks7q.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Oct 2016 13:25:45 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2016-10-05 13:25 +0300, Eli Zaretskii wrote: > Instead of adding another timer, and then dealing with their order > issues, is it possible to reuse the same time for both jobs? IOW, > just _add_ the new/additional function you need to be done to whatever > the single timer does. If you do that, you get to control the order > in which things are done by the single timer, because you write the > code of the timer function(s). probably not. ggtags-global-handle-exit needs to consider these situations: 1. when matches are large jump to first match should not wait until compilation finishes 2. on failure keep the compilation window popped-up so users can see the errors 3. 0 matches, nothing to show so clean up 4. 1 match, wait until compilation-auto-jump and clean up A solution has to cover all of them. I think this could work: 1. In compilation-error-properties save the jump pos like this (setq-local compilation-auto-jump-pos (match-beginning 0)) (run-with-timer 0 nil 'compilation-auto-jump (current-buffer) compilation-auto-jump-pos) 2. Make compilation-auto-jump do nothing if the buffer is killed. WDYT? Leo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 14:10:43 2016 Received: (at 24585) by debbugs.gnu.org; 6 Oct 2016 18:10:43 +0000 Received: from localhost ([127.0.0.1]:46843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsD7z-0007sB-5l for submit@debbugs.gnu.org; Thu, 06 Oct 2016 14:10:43 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:41409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsD7x-0007s3-6B for 24585@debbugs.gnu.org; Thu, 06 Oct 2016 14:10:41 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u96IADUj014700; Thu, 6 Oct 2016 14:10:13 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3D728600BA; Thu, 6 Oct 2016 14:10:40 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: <83twcrks7q.fsf@gnu.org> Date: Thu, 06 Oct 2016 14:10:40 -0400 In-Reply-To: (Leo Liu's message of "Fri, 07 Oct 2016 00:12:57 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV5819=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5819> : inlines <5327> : streams <1712098> : uri <2302696> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) > 2. Make compilation-auto-jump do nothing if the buffer is killed. > WDYT? I thought that's what I had proposed, so yes, I think that's a good solution. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 14:31:52 2016 Received: (at 24585) by debbugs.gnu.org; 6 Oct 2016 18:31:52 +0000 Received: from localhost ([127.0.0.1]:46853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsDSS-0008OA-9W for submit@debbugs.gnu.org; Thu, 06 Oct 2016 14:31:52 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsDSR-0008Ny-GJ for 24585@debbugs.gnu.org; Thu, 06 Oct 2016 14:31:51 -0400 Received: by mail-pf0-f193.google.com with SMTP id 190so1513726pfv.1 for <24585@debbugs.gnu.org>; Thu, 06 Oct 2016 11:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=zeFRf/g5VUKHnNHFp4Rd53RxSZVPVmEXbzIidnlX7gs=; b=QFEBJZOhU2Ksh8rvlPqgtwkt7JBfqnxwVDPZjlKaZNIQr87KHspd3IkQhOrSUbXqSw GNvP3ghcp3X2vYyGtirsH1f+AyDTDPWtIcxOgftzBO6WP2PPNkVcuXXaOWj75UY1VYXE Scxp3S1b9GaxkvnE40oXjsKc4jwo0W+XTUAODqMDrEjPdyt/XAyTAMMYkCLJEFiIKP27 Xxl+uxCtCJZmlABKbFlv4gl09bZL6xuAPQYQ8USLQLvBc9x8J9eYy4mhwL7zLXydfuYH hF+neKS0naCncybjXhG8LxRMlJNauxkvhPBVBpLdSMjhpvq6TfSJGuRYkpnlGICXzOPA a6aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=zeFRf/g5VUKHnNHFp4Rd53RxSZVPVmEXbzIidnlX7gs=; b=kKcKHGgnLU03SkoqrOWMh8gZ8oHHzkZ2z6Y4ClFVVI2WY++jxysPwHK2bHV9pVhb53 p+OqYidXXvQeseL2270Gq1lwsjmYlCSASYuf4PgWIWLz8E7Upqvz4dAYcim21PBNpjaA F/uF1CI8tSOyXeok4Yz/yUvorxERonqDoK772jqgLxIYTPBgJbyW2GGzMbpz3OCJvQ1Q epj37UqiKVFwC2QCT/ZvsqjUaFZ7HYAyZ1aIFIjWGPhN1Qb+uJ29XYGvsKQ673w0u4c/ J2bWGhPx8QR/JszC6HO/Z9hLvRzioYdrHtxggegA/am1spJR64vwRRRXUQABw7e+UHbK 6m7g== X-Gm-Message-State: AA6/9Rl1UzQydo1AtyVeFaMlHPrEBDct14lh9ZhX7luTUO3Yvb7Zyh7aI81XZLs/0sUhLw== X-Received: by 10.98.194.133 with SMTP id w5mr21554680pfk.4.1475778705658; Thu, 06 Oct 2016 11:31:45 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id af17sm24575595pac.14.2016.10.06.11.31.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Oct 2016 11:31:45 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Fri, 07 Oct 2016 02:31:39 +0800 In-Reply-To: (Stefan Monnier's message of "Thu, 06 Oct 2016 14:10:40 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2016-10-06 14:10 -0400, Stefan Monnier wrote: > I thought that's what I had proposed, so yes, I think that's > a good solution. By exposing the position I can change ggtags not to depend on the order of auto-jump and clean up. The patch could look like this. Any objection to installing it in emacs-25? diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f2e397a4..a7804fd7 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1052,13 +1052,16 @@ POS and RES.") l2 (setcdr l1 (cons (list ,key) l2))))))) +(defvar-local compilation-auto-jump-pos nil) + (defun compilation-auto-jump (buffer pos) - (with-current-buffer buffer - (goto-char pos) - (let ((win (get-buffer-window buffer 0))) - (if win (set-window-point win pos))) - (if compilation-auto-jump-to-first-error - (compile-goto-error)))) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (goto-char pos) + (let ((win (get-buffer-window buffer 0))) + (if win (set-window-point win pos))) + (if compilation-auto-jump-to-first-error + (compile-goto-error))))) ;; This function is the central driver, called when font-locking to gather ;; all information needed to later jump to corresponding source code. @@ -1126,8 +1129,9 @@ POS and RES.") (when (and compilation-auto-jump-to-next (>= type compilation-skip-threshold)) (kill-local-variable 'compilation-auto-jump-to-next) + (setq compilation-auto-jump-pos (match-beginning 0)) (run-with-timer 0 nil 'compilation-auto-jump - (current-buffer) (match-beginning 0))) + (current-buffer) compilation-auto-jump-pos)) (compilation-internal-error-properties file line end-line col end-col type fmt))) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 14:37:27 2016 Received: (at 24585) by debbugs.gnu.org; 6 Oct 2016 18:37:27 +0000 Received: from localhost ([127.0.0.1]:46857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsDXq-0008WC-TZ for submit@debbugs.gnu.org; Thu, 06 Oct 2016 14:37:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsDXq-0008Vz-1C for 24585@debbugs.gnu.org; Thu, 06 Oct 2016 14:37:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsDXh-0004Pj-NK for 24585@debbugs.gnu.org; Thu, 06 Oct 2016 14:37:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsDXh-0004Pf-Jd; Thu, 06 Oct 2016 14:37:17 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4237 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bsDXc-0003lC-Ls; Thu, 06 Oct 2016 14:37:17 -0400 Date: Thu, 06 Oct 2016 21:37:01 +0300 Message-Id: <83int5jpde.fsf@gnu.org> From: Eli Zaretskii To: Leo Liu In-reply-to: (message from Leo Liu on Fri, 07 Oct 2016 02:31:39 +0800) Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.7 (-------) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.7 (-------) > From: Leo Liu > Cc: Eli Zaretskii , 24585@debbugs.gnu.org > Date: Fri, 07 Oct 2016 02:31:39 +0800 > > The patch could look like this. Any objection to installing it in > emacs-25? That depends on how long is this problem present. Can you tell? From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 21:21:24 2016 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2016 01:21:24 +0000 Received: from localhost ([127.0.0.1]:47070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsJql-0006T8-V9 for submit@debbugs.gnu.org; Thu, 06 Oct 2016 21:21:24 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsJql-0006Sx-5w for 24585@debbugs.gnu.org; Thu, 06 Oct 2016 21:21:23 -0400 Received: by mail-pf0-f176.google.com with SMTP id i85so16651226pfa.3 for <24585@debbugs.gnu.org>; Thu, 06 Oct 2016 18:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=rpFKDOzgj48pZaBE66/s3UIBM29NX54XSegowNgIAng=; b=g1QATjXiNkhHW7nD42UvzbuZRi9PFA3BUZz4LscZaXZp0aKTrwvO+GuHAvgfZ48if/ VzcQ+t7jl8Txn3hhik8HZe6VrDUvGjndjOTbdOHLzTYnvFTggR+YhRMo2c3At6ZkwD/M Mp1wVpiIEtq6BwfPXFjHOTpdgv9CQ2WY51YUv+0jvf+NT3wJF97Sqv5S7zjY/YWc/xJE ZBzC4Cm/mFwzygfamHrnffdAXrfP2ZH7bqJvROuhONkybjGP8zIW/tGIXzDYXC8ETHhw axF4lJjxLH9O0BPiy2iMKr//Rntwik+oMeeuyIFGtQ6MHEXZzAzoRc5fo0KGx4aH2iNr A6yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=rpFKDOzgj48pZaBE66/s3UIBM29NX54XSegowNgIAng=; b=IbUwliKBcpMJZlnASc12VUOnrg7dVtvHjQgHYmX5O8SMhI+81RLrptypqtcHVzdZVi j/J7CtT/UP/CnW3IO5vITQi/coNXyOeRNzw3jmDh+bsZ97leGzz1k7SeNm6ky3aefZh2 aYDA0tbDCUzu/qh9PM9gwj9NRLdxm8/+KkTbdOpqCFFySuArhP932N88HiPdPtOWjDf5 llZo9tJmo3anYfZrBFe68fGzpve/7fTW29uGE+99qtsOaHT1Z/42+unoHlWGFIKpiihN SJiNDDGS6piAt9l4gqyd91fmWFAJqMlfNtqPTMrw/WT6s9vvIG3FibGCVHNUA2R6a/ru +ZRg== X-Gm-Message-State: AA6/9RnOIrHBy8vIblPHnTi7cTLxYjhXSSrDj9maKIgCMA+W9eB6UoQLXqe9cvQNRt58Zg== X-Received: by 10.98.6.5 with SMTP id 5mr31142880pfg.88.1475803277483; Thu, 06 Oct 2016 18:21:17 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id b77sm8761973pfl.25.2016.10.06.18.21.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Oct 2016 18:21:16 -0700 (PDT) From: Leo Liu To: Eli Zaretskii Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC Date: Fri, 07 Oct 2016 09:21:12 +0800 In-Reply-To: <83int5jpde.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Oct 2016 21:37:01 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 2016-10-06 21:37 +0300, Eli Zaretskii wrote: > That depends on how long is this problem present. Can you tell? Originally I thought by inserting a (sit-for 0) I fixed the problem but people have reported otherwise https://github.com/leoliu/ggtags/issues/89 (which is 20 months old) Leo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 22:28:06 2016 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2016 02:28:06 +0000 Received: from localhost ([127.0.0.1]:47082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsKtK-00089u-Ic for submit@debbugs.gnu.org; Thu, 06 Oct 2016 22:28:06 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:33038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsKtI-00089I-Er for 24585@debbugs.gnu.org; Thu, 06 Oct 2016 22:28:04 -0400 Received: by mail-pf0-f170.google.com with SMTP id 190so17358741pfv.0 for <24585@debbugs.gnu.org>; Thu, 06 Oct 2016 19:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=d+Gk4zStvy+dJF671r9T9mhkNERpmFrZ45tR9cpoaSs=; b=kTrVongsaVYfaeqsZ+VgQQtNF604UI8vp03tNa8cgyxfGsog5cDqYrglJZ8HAq41Of XnNB1E/ueQgpp/5QzpYlSSllLyEhj/EUgIlnrhaj0v9xVaz13lJMTuVf5fwjjJsbYWJd tpoWLXvIDHanJq7vyf9wVjca4JkGzzk1V4fHjSKzDWIC44POGA2xS+srN5mcYfK8cdgK eLS+7dWnSbLGL8jUGvZrwhXuoLjtCOLorsaeynO+Ok3nOvWKqjySP06eJ4CkCdiirkIm Il8w/4rpdW0obYlhTG/TeIp0IG0lwe6QV8SOAot/+mvs1KnwwE3yuJXL2Fi7aQ5e7g/S tKuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=d+Gk4zStvy+dJF671r9T9mhkNERpmFrZ45tR9cpoaSs=; b=Xo9uPb8Ghjj2Y8by2sP9oeFoGb7OIKxEWbcW4ANOFV4Qo9QkxmXkbCQ2pkyl87TUz4 ApVAXYmpka5G2Ra7RA8R1hlou6kZSxuOoq5QSWcQifK4u3YlPF/Jw2xEql5bnuKMic3Z WGzo91kYN8gS5E8t1ioWt12tLrqzE9muMl7MZHFkGv57DPsUNu6aRu+yjMjtcfYGqFXi 1z4MFZLkOa5iPiCuR7UjLOU4nYKtf1pIVTAwE93V0Y3fp8yo0pLX1rpGw+PJvL8GttQW FaMveOG5JQVC2slnPTjf0Qm2cr/BX3WGTZlUfTXQT5A1YpDghP8waQ/NPTVvKB1ZnQcq FA6A== X-Gm-Message-State: AA6/9RnPRH7VEA9qVMR/iYyXxhVVndSAo5Zw+TjZHN9xf2ETgWms/qIFbmiXIngNprai+w== X-Received: by 10.98.0.193 with SMTP id 184mr24627385pfa.20.1475807278366; Thu, 06 Oct 2016 19:27:58 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id d19sm8952504pfd.59.2016.10.06.19.27.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Oct 2016 19:27:57 -0700 (PDT) From: Leo Liu To: Eli Zaretskii Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Fri, 07 Oct 2016 10:27:49 +0800 In-Reply-To: (Leo Liu's message of "Fri, 07 Oct 2016 09:21:12 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) On 2016-10-07 09:21 +0800, Leo Liu wrote: > On 2016-10-06 21:37 +0300, Eli Zaretskii wrote: >> That depends on how long is this problem present. Can you tell? > > Originally I thought by inserting a (sit-for 0) I fixed the problem but > people have reported otherwise > https://github.com/leoliu/ggtags/issues/89 (which is 20 months old) > > Leo After some experiments the proposed patch might not work at all. compilation-auto-jump timer is fired by the font-locking engine. By my observation it is possible that compilation-finish-functions (from a process sentinel) are executed before font-locking even by inserting (compilation--ensure-parse (point-max)) in ggtags-global-handle-exit. Do you see any anomaly in the observation? The hack that is now in ggtags.el may not work either. None of the people that reported https://github.com/leoliu/ggtags/issues/89 have confirmed the fix. And I personally don't know how to reproduce it. Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 07 04:00:07 2016 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2016 08:00:07 +0000 Received: from localhost ([127.0.0.1]:47217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsQ4c-0008UV-I9 for submit@debbugs.gnu.org; Fri, 07 Oct 2016 04:00:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsQ4Y-0008Se-E3 for 24585@debbugs.gnu.org; Fri, 07 Oct 2016 04:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsQ4R-0002vk-Pq for 24585@debbugs.gnu.org; Fri, 07 Oct 2016 03:59:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsQ4K-0002pV-SY; Fri, 07 Oct 2016 03:59:48 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4907 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bsQ4J-0008CV-P2; Fri, 07 Oct 2016 03:59:48 -0400 Date: Fri, 07 Oct 2016 10:59:52 +0300 Message-Id: <8337k8k2rr.fsf@gnu.org> From: Eli Zaretskii To: Leo Liu In-reply-to: (message from Leo Liu on Fri, 07 Oct 2016 09:21:12 +0800) Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.7 (-------) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.7 (-------) > From: Leo Liu > Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA > Date: Fri, 07 Oct 2016 09:21:12 +0800 > > On 2016-10-06 21:37 +0300, Eli Zaretskii wrote: > > That depends on how long is this problem present. Can you tell? > > Originally I thought by inserting a (sit-for 0) I fixed the problem but > people have reported otherwise > https://github.com/leoliu/ggtags/issues/89 (which is 20 months old) Thanks. That's when the problem was reported, not when it was introduced. However, it does mean the problem existed even before Feb 2015, which means it existed in Emacs 24.5. OTOH, the fix seems quite safe. So yes, please push to emacs-25. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 07 04:03:02 2016 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2016 08:03:02 +0000 Received: from localhost ([127.0.0.1]:47221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsQ7S-00007p-Da for submit@debbugs.gnu.org; Fri, 07 Oct 2016 04:03:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsQ7N-000075-Mw for 24585@debbugs.gnu.org; Fri, 07 Oct 2016 04:03:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsQ7G-0006dT-KX for 24585@debbugs.gnu.org; Fri, 07 Oct 2016 04:02:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsQ7B-0006Rb-3x; Fri, 07 Oct 2016 04:02:45 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4908 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bsQ79-0005Sb-5F; Fri, 07 Oct 2016 04:02:43 -0400 Date: Fri, 07 Oct 2016 11:02:48 +0300 Message-Id: <831szsk2mv.fsf@gnu.org> From: Eli Zaretskii To: Leo Liu In-reply-to: (message from Leo Liu on Fri, 07 Oct 2016 10:27:49 +0800) Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.7 (-------) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.7 (-------) > From: Leo Liu > Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA > Date: Fri, 07 Oct 2016 10:27:49 +0800 > > compilation-auto-jump timer is fired by the font-locking engine. By my > observation it is possible that compilation-finish-functions (from a > process sentinel) are executed before font-locking even by inserting > > (compilation--ensure-parse (point-max)) > > in ggtags-global-handle-exit. > > Do you see any anomaly in the observation? Not in these general terms, no. > The hack that is now in ggtags.el may not work either. None of the > people that reported https://github.com/leoliu/ggtags/issues/89 have > confirmed the fix. And I personally don't know how to reproduce it. So what is your proposal? From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 07 08:46:18 2016 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2016 12:46:18 +0000 Received: from localhost ([127.0.0.1]:47401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsUXa-00029y-E9 for submit@debbugs.gnu.org; Fri, 07 Oct 2016 08:46:18 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:32220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsUXY-00029i-PK for 24585@debbugs.gnu.org; Fri, 07 Oct 2016 08:46:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DyAQALW9BX/7EYNJ1dGgEBAQECAQEBAYMtAQEBAQEehE2FUIRlqxGCA4YWBAICgWk5FAECAQEBAQEBAV4nhGIBAQMBViMFCwsOJhIUGA0kiFUIvFUBAQEBBgIlin2KHAEEmVmZDYYLkEseNoRsIIYKAQEB X-IPAS-Result: A0DyAQALW9BX/7EYNJ1dGgEBAQECAQEBAYMtAQEBAQEehE2FUIRlqxGCA4YWBAICgWk5FAECAQEBAQEBAV4nhGIBAQMBViMFCwsOJhIUGA0kiFUIvFUBAQEBBgIlin2KHAEEmVmZDYYLkEseNoRsIIYKAQEB X-IronPort-AV: E=Sophos;i="5.30,296,1470715200"; d="scan'208";a="274906339" Received: from 157-52-24-177.cpe.teksavvy.com (HELO pastel.home) ([157.52.24.177]) by smtp.teksavvy.com with ESMTP; 07 Oct 2016 08:46:10 -0400 Received: by pastel.home (Postfix, from userid 20848) id 552F0627FF; Fri, 7 Oct 2016 08:46:10 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> Date: Fri, 07 Oct 2016 08:46:10 -0400 In-Reply-To: (Leo Liu's message of "Fri, 07 Oct 2016 10:27:49 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > compilation-auto-jump timer is fired by the font-locking engine. Not sure what you mean by "fired", but in any case, no: font-lock is not used for that (tho it has been used at some point before compilation-auto-jump was introduced, IIRC). Instead, it's done via syntax-propertize (which can be triggered in all kinds of ways, including font-lock). How 'bout something like the following: - Add a new var compilation-pending-auto-jump set buffer-locally to non-nil when compilation-error-properties calls run-with-timer. - in compilation-auto-jump, check this var before doing anything and set it back to nil. - in ggtags, call compilation-auto-jump to make sure this timer is run before yours. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 07 13:07:43 2016 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2016 17:07:43 +0000 Received: from localhost ([127.0.0.1]:48023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsYcZ-0001om-9b for submit@debbugs.gnu.org; Fri, 07 Oct 2016 13:07:43 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:36349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsYcX-0001oa-FK for 24585@debbugs.gnu.org; Fri, 07 Oct 2016 13:07:41 -0400 Received: by mail-pf0-f181.google.com with SMTP id i85so26086999pfa.3 for <24585@debbugs.gnu.org>; Fri, 07 Oct 2016 10:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=sDE+rJHYE1tIqvMB7pW3J3y7euiSRVMxUL7rFB3UByo=; b=X75L8Dh6f0n54SUtpLYqKqNCHmt15smT5GABjxdfIOOA68bGuOA0cZNPf7OGpdmloK fIy65k9KfZJyTicbFba5R3CSbDt0H0z/hI/6AzJBW6IM6q//B2DY2HurjaitHhPkwlcN Y3XiHWBi8da5xS2R2iJlMqNk2reiv6FNuccjDblQPpwOUfE1SUvcZUrO7MIgiEhBN5ie WbhugfvvzlJD+fSB3tvZsXsgD8p2Vft6j5mwR86QrkbChAadIfHlxJPZxpEWVyHKaFFy +pN4n5KMunx4fSjR06L8tOFUVsdmKlR8lVkFseDbG12fwsZe39+0+MRkIIGtBjvKkEl5 ZxLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=sDE+rJHYE1tIqvMB7pW3J3y7euiSRVMxUL7rFB3UByo=; b=KDubL4YNNGRPPnag475TLWBwyzWqlMJxDts9hwqp3ZYKu6/dH01ehkwGUe6buMqFGs xFk3N5tHCPwY4HAFxgYLfR7UasjTqty/3TWKZT7nqIaOya+rU40JSy0/zFsvf9n8+e/j k5nx4tOrpgSROIRtmwoBvyGj838Z9p3w1F7Y1B8f/oYX28OB2If4m4ZL62YzYhQDBPUp PgZJhAH8KqUMSkkEv8saAX5n2poqT7DdQUIAl1oyg+Hg814lx7vRJNx+tQfDg1Sur4+H 0iAqaU5Hs97YA3u0muTweHWGMGLqErIs5xYkqCPk8OuVh5ZYKkilVa+oDPhO8huABiCP XCzw== X-Gm-Message-State: AA6/9RmTgxzWz1IDJ72htlZlS6XMVKGSBlSETQbrqgo0GdbN9p7AQsUWvKg/bRKeqpwUsQ== X-Received: by 10.98.94.5 with SMTP id s5mr37667631pfb.126.1475860055852; Fri, 07 Oct 2016 10:07:35 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id sv8sm17991151pab.18.2016.10.07.10.07.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Oct 2016 10:07:34 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAElBMVEUAAAAAAP+LRRP0pGC+ vr7///+7mT1iAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMO DhglKe4AAAEsSURBVCjPbZNBboQwDEV/Cd4X9QJRThApmn0XYW+Jyf2v0m+HhqDBgiAe9rcTG7QH w/1Vn2Ar8gBb/ocywSN3qK9T3z4eFDB4eApocBpeBs1RSykoJd8gQcm8pGmHXFso3ajnmsqV0TnY DQkOfXUfN5NwaI7AWTVOyEhcu1aHmdWItHddUVUcUgUBCkitu8V6ditHVOVdqzl2EQ1ZVGTbdK0V 7cqn8vWzoU5Q/bF9Y/Y0cRU1xwkys5dJ+Dt6pBDWifcNQml8Gh2JVmPSoQzo7en0grswkxrUGYJ7 0hSxxAGr7ZMwYcHIzprpi7TENEE1xtiYxixRlCfPBsUUrwHD7uGIwATrbnODJcVrPpVn3hxiGloe m/S+z3CtuzUSMo83N4DPH+F0evwR3P4A2k+75838OKQAAAAASUVORK5CYII= Date: Sat, 08 Oct 2016 01:07:30 +0800 In-Reply-To: (Stefan Monnier's message of "Fri, 07 Oct 2016 08:46:10 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2016-10-07 08:46 -0400, Stefan Monnier wrote: > Not sure what you mean by "fired", but in any case, no: font-lock is not > used for that (tho it has been used at some point before > compilation-auto-jump was introduced, IIRC). Instead, it's done via > syntax-propertize (which can be triggered in all kinds of ways, > including font-lock). This (defun compilation-mode-font-lock-keywords () "Return expressions to highlight in Compilation mode." (append '((compilation--ensure-parse)) compilation-mode-font-lock-keywords)) and the only place in compile.el that mentions syntax-propertize is in a comment. > How 'bout something like the following: > > - Add a new var compilation-pending-auto-jump set buffer-locally to > non-nil when compilation-error-properties calls run-with-timer. > - in compilation-auto-jump, check this var before doing anything and set > it back to nil. > - in ggtags, call compilation-auto-jump to make sure this timer is run > before yours. I think the issue is compilation-error-properties can happen after compilation-finish-functions. And calling compilation--ensure-parse in ggtags-global-handle-exit doesn't seem to help. Leo From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 07 14:10:56 2016 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2016 18:10:56 +0000 Received: from localhost ([127.0.0.1]:48038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsZbk-0003JX-HC for submit@debbugs.gnu.org; Fri, 07 Oct 2016 14:10:56 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:58582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsZbi-0003JP-LV for 24585@debbugs.gnu.org; Fri, 07 Oct 2016 14:10:55 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u97IARDw003044; Fri, 7 Oct 2016 14:10:27 -0400 Received: by pastel.home (Postfix, from userid 20848) id AF9466008A; Fri, 7 Oct 2016 14:10:53 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> Date: Fri, 07 Oct 2016 14:10:53 -0400 In-Reply-To: (Leo Liu's message of "Sat, 08 Oct 2016 01:07:30 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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, RV5820=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5820> : inlines <5329> : streams <1712644> : uri <2303305> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) >> Not sure what you mean by "fired", but in any case, no: font-lock is not >> used for that (tho it has been used at some point before >> compilation-auto-jump was introduced, IIRC). Instead, it's done via >> syntax-propertize (which can be triggered in all kinds of ways, >> including font-lock). > > This > > (defun compilation-mode-font-lock-keywords () > "Return expressions to highlight in Compilation mode." > (append > '((compilation--ensure-parse)) > compilation-mode-font-lock-keywords)) > > and the only place in compile.el that mentions syntax-propertize is in a > comment. Duh! Indeed, sorry, I mis-remembered. Indeed, after first (ab)using syntax-propertize I changed it to use the same approach but without using syntax-propertize. The point is the same, tho: the parse can be triggered by other things than font-lock. That's important because font-lock may be turned off. >> How 'bout something like the following: >> >> - Add a new var compilation-pending-auto-jump set buffer-locally to >> non-nil when compilation-error-properties calls run-with-timer. >> - in compilation-auto-jump, check this var before doing anything and set >> it back to nil. >> - in ggtags, call compilation-auto-jump to make sure this timer is run >> before yours. > I think the issue is compilation-error-properties can happen after > compilation-finish-functions. And calling compilation--ensure-parse in > ggtags-global-handle-exit doesn't seem to help. Hmm... calling compilation--ensure-parse *should* help. More specifically, if you call compilation--ensure-parse up to point-max from compilation-finish-functions, I can't think of any reason why compilation-error-properties should be called afterwards. If you can get a backtrace of when that happens, it would help. E.g. set a buffer-local var from compilation-finish-functions after calling compilation--ensure-parse, and then add an assert in compilation-error-properties to check that that var is not set yes. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 08 14:10:13 2016 Received: (at 24585) by debbugs.gnu.org; 8 Oct 2016 18:10:13 +0000 Received: from localhost ([127.0.0.1]:48954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsw4b-00012j-LA for submit@debbugs.gnu.org; Sat, 08 Oct 2016 14:10:13 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:33079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsw4Z-00012U-O8 for 24585@debbugs.gnu.org; Sat, 08 Oct 2016 14:10:12 -0400 Received: by mail-pf0-f172.google.com with SMTP id 190so36902605pfv.0 for <24585@debbugs.gnu.org>; Sat, 08 Oct 2016 11:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version; bh=aO+XQRBVj0zI/lPmlHp38zJuCGReBIPJ8BVQvia5hIY=; b=KOvuS4tyXt3C62vSdUpp2oPXtxgU04MmupeahrhJFLKK0wCUjuFVFB1RtOz0SrYt3U f7nSm3EX+zxNXhcpvWPShOy0REeHjUT8PHkqkBbbXrEZ9KvNR45DxDwWKR6UofoYAQ6y Jk35cva2F2uSRY0vZTt2OVI79IbjGdoD11C6zkwwsbHB53sx/gaApnvBNP0PtfMykcY6 zIDz4d4DKcOxcWUgy33xpS3KL+kDhCg4aDeVn+3ZjuKpOTL/ew3KqQBGXJ3YDc/ztzCC DKz6ujEfMTKvn4YUi0swSojd+7UrTaK6ymTlSWc8GcsKX/5bpuS96hoIQewzJKH1a5sY fHdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:face:date :in-reply-to:message-id:user-agent:mime-version; bh=aO+XQRBVj0zI/lPmlHp38zJuCGReBIPJ8BVQvia5hIY=; b=g0ghxdFMaUJPkGm3szeFF7Das5UuQce6Lch+lJ55GB7l0R9JEuZfkM+wZCxCmLsRM0 sg6XyBPf7jVB0tWFgAmPzRnBnIbTaJTB3Yr8EMTBRVS9vSJqh9NuD2HUEPvJKkZ+EIq9 ECk5gQs/cOnrcC/Y4Y/DUEEqxLSHEyPdgRHjrv9FmU8EWT2NkuNduiL8M3DJMsBkIYeO pMxNmw/H87OFFz317jsPOnKuMlx6QOl0knksh+rJQWEodqhpqb15VfdkJR25mS/ksO8A pt4OgfLRRr+m1VPKQcc81dMh9qgttC2BXaSo5BHF903W6kzUmUR9Dn3xbXFdg6p6rQgQ 3Mcg== X-Gm-Message-State: AA6/9RlAc2M38HcJ+G+jwED6/JhNrUGbPjVBSFzZH41DkqgBF4Cuxhvh2ARZY1V9QKB1aw== X-Received: by 10.98.222.3 with SMTP id h3mr39056978pfg.168.1475950205745; Sat, 08 Oct 2016 11:10:05 -0700 (PDT) Received: from zeuss-MacBook-Pro.local ([139.59.241.182]) by smtp.gmail.com with ESMTPSA id m83sm22787827pfg.48.2016.10.08.11.10.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Oct 2016 11:10:04 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Sun, 09 Oct 2016 02:10:00 +0800 In-Reply-To: (Stefan Monnier's message of "Fri, 07 Oct 2016 14:10:53 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 2016-10-07 14:10 -0400, Stefan Monnier wrote: > Hmm... calling compilation--ensure-parse *should* help. > More specifically, if you call compilation--ensure-parse up to point-max > from compilation-finish-functions, I can't think of any reason why > compilation-error-properties should be called afterwards. If you can > get a backtrace of when that happens, it would help. > > E.g. set a buffer-local var from compilation-finish-functions after > calling compilation--ensure-parse, and then add an assert in > compilation-error-properties to check that that var is not set yes. To the best of my knowledge that seems to work with change like this to compile.el: diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f2e397a4..3a4f4b8b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1052,13 +1052,18 @@ POS and RES.") l2 (setcdr l1 (cons (list ,key) l2))))))) -(defun compilation-auto-jump (buffer pos) - (with-current-buffer buffer - (goto-char pos) - (let ((win (get-buffer-window buffer 0))) - (if win (set-window-point win pos))) - (if compilation-auto-jump-to-first-error - (compile-goto-error)))) +(defvar-local compilation-pending-auto-jump nil) + +(defun compilation-auto-jump (buffer) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (when compilation-pending-auto-jump + (goto-char compilation-pending-auto-jump) + (let ((win (get-buffer-window buffer 0))) + (if win (set-window-point win compilation-pending-auto-jump))) + (setq compilation-pending-auto-jump nil) + (if compilation-auto-jump-to-first-error + (compile-goto-error)))))) ;; This function is the central driver, called when font-locking to gather ;; all information needed to later jump to corresponding source code. @@ -1126,8 +1131,8 @@ POS and RES.") (when (and compilation-auto-jump-to-next (>= type compilation-skip-threshold)) (kill-local-variable 'compilation-auto-jump-to-next) - (run-with-timer 0 nil 'compilation-auto-jump - (current-buffer) (match-beginning 0))) + (setq compilation-pending-auto-jump (match-beginning 0)) + (run-with-timer 0 nil 'compilation-auto-jump (current-buffer))) (compilation-internal-error-properties file line end-line col end-col type fmt))) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 08:47:16 2020 Received: (at 24585) by debbugs.gnu.org; 4 Sep 2020 12:47:17 +0000 Received: from localhost ([127.0.0.1]:37902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEB7c-00005F-KP for submit@debbugs.gnu.org; Fri, 04 Sep 2020 08:47:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEB7b-0008WT-G3 for 24585@debbugs.gnu.org; Fri, 04 Sep 2020 08:47:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GH6yfkA7rp2AdJkuC04ndqekFjBkd9ksXeYajPMSTME=; b=Pq+9RY1s1wmbn2eD3Wkw8ir1qR pTBjNoKwxakgn1unAuPmQX8QEbMsQ8xHc5RrYly+49KpwYTU6y4vAEvgjBhN0vtibcOSVyq8dP9R5 SQj1TwrUuLyZNs1v1cHSz4130Ln0F1N69CHe7noZJ9jCGs305xg+X/K1HqGZJQDQzOXA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEB7Q-0007eH-Tb; Fri, 04 Sep 2020 14:47:08 +0200 From: Lars Ingebrigtsen To: Leo Liu Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> X-Now-Playing: Meg Baird & Mary Lattimore's _Ghost Forests_: "Damaged Sunset" Date: Fri, 04 Sep 2020 14:47:03 +0200 In-Reply-To: (Leo Liu's message of "Sun, 09 Oct 2016 02:10:00 +0800") Message-ID: <87imctbtfc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Leo Liu writes: > On 2016-10-07 14:10 -0400, Stefan Monnier wrote: >> Hmm... calling compilation--ensure-parse *should* help. >> More specifically, if you call compilation--ensure-parse up to point-max >> from compil [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Leo Liu writes: > On 2016-10-07 14:10 -0400, Stefan Monnier wrote: >> Hmm... calling compilation--ensure-parse *should* help. >> More specifically, if you call compilation--ensure-parse up to point-max >> from compilation-finish-functions, I can't think of any reason why >> compilation-error-properties should be called afterwards. If you can >> get a backtrace of when that happens, it would help. >> >> E.g. set a buffer-local var from compilation-finish-functions after >> calling compilation--ensure-parse, and then add an assert in >> compilation-error-properties to check that that var is not set yes. > > To the best of my knowledge that seems to work with change like this to > compile.el: [...] This was the final message in this bug report, but looking at the patch that supposedly fixes the problem, I don't understand how it makes a difference: Putting (match-beginning) in a buffer-local variable instead of passing it in directly seems like a no-op? Checking whether the buffer is alive in compilation-auto-jump seems like a good idea, though (any async function that switches to a buffer should check whether it's alive first). > -(defun compilation-auto-jump (buffer pos) > - (with-current-buffer buffer > - (goto-char pos) > - (let ((win (get-buffer-window buffer 0))) > - (if win (set-window-point win pos))) > - (if compilation-auto-jump-to-first-error > - (compile-goto-error)))) > +(defvar-local compilation-pending-auto-jump nil) > + > +(defun compilation-auto-jump (buffer) > + (when (buffer-live-p buffer) > + (with-current-buffer buffer > + (when compilation-pending-auto-jump > + (goto-char compilation-pending-auto-jump) > + (let ((win (get-buffer-window buffer 0))) > + (if win (set-window-point win compilation-pending-auto-jump))) > + (setq compilation-pending-auto-jump nil) > + (if compilation-auto-jump-to-first-error > + (compile-goto-error)))))) > > ;; This function is the central driver, called when font-locking to gather > ;; all information needed to later jump to corresponding source code. > @@ -1126,8 +1131,8 @@ POS and RES.") > (when (and compilation-auto-jump-to-next > (>= type compilation-skip-threshold)) > (kill-local-variable 'compilation-auto-jump-to-next) > - (run-with-timer 0 nil 'compilation-auto-jump > - (current-buffer) (match-beginning 0))) > + (setq compilation-pending-auto-jump (match-beginning 0)) > + (run-with-timer 0 nil 'compilation-auto-jump (current-buffer))) > > (compilation-internal-error-properties > file line end-line col end-col type fmt))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 10:29:24 2020 Received: (at 24585) by debbugs.gnu.org; 4 Sep 2020 14:29:24 +0000 Received: from localhost ([127.0.0.1]:40259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECiS-0005jt-9x for submit@debbugs.gnu.org; Fri, 04 Sep 2020 10:29:24 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECiR-0005jh-Fj for 24585@debbugs.gnu.org; Fri, 04 Sep 2020 10:29:23 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0CBFB10025D; Fri, 4 Sep 2020 10:29:18 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BF6D3100241; Fri, 4 Sep 2020 10:29:15 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1599229755; bh=IT+TLBPTHNXZwPAKDyf++tqqOGik35SGfUmde4yxVu4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=KxP2qnvkJAajM27QkCqnLQP7cF3W7X5qZJ9bSLASrdeFpyAXEhYTEU1/hcu93tmIa +k+lu4XV7bGPcdShsfeLtYKISbXTJ9uIfOq7NbzpbnNU3iIoycCeKcQ18tvM4gJZwS IEsJ+JQ5akPrl2/QJ3yli+kAbvUTDn29LsNUiDLLqZ0lcDSFS9xWgqEKQk+bVF3L3s vB/GT1A7heGyfP6Oy6XsePhImViei7WFP0nlWmJ6ArxocfgBB/BoeU6TTIuoFSpr9B PJkroBC+yFWg3uQ9At++QyWGSl7CQFSkbtPNx5pQmHY1wBR5hy+AfBf2NxbwWopXxK 9ADXVPvY56BYg== Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9406C1203FD; Fri, 4 Sep 2020 10:29:15 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> <87imctbtfc.fsf@gnus.org> Date: Fri, 04 Sep 2020 10:29:15 -0400 In-Reply-To: <87imctbtfc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 04 Sep 2020 14:47:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.049 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > This was the final message in this bug report, but looking at the patch > that supposedly fixes the problem, I don't understand how it makes a > difference: Putting (match-beginning) in a buffer-local variable > instead of passing it in directly seems like a no-op? This was too long ago and got moved to write-only swap space, and I haven't had time to dig into it now to recover the lost context, but I can see a potential case where it makes a difference, which is if the timer is set multiple times before it gets a chance to be run: with the new code only one of the timers will actually be executed. > Checking whether the buffer is alive in compilation-auto-jump seems like > a good idea, though (any async function that switches to a buffer should > check whether it's alive first). Indeed, Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 11:02:21 2020 Received: (at 24585) by debbugs.gnu.org; 4 Sep 2020 15:02:21 +0000 Received: from localhost ([127.0.0.1]:40357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEDEL-0006aW-JE for submit@debbugs.gnu.org; Fri, 04 Sep 2020 11:02:21 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEDEJ-0006aI-Bo for 24585@debbugs.gnu.org; Fri, 04 Sep 2020 11:02:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KJZw5EcwFGllHWRH3hq4l03g2DywNLimIj1yUpMzEW0=; b=klgBlvIt1kw2J2xV4PDcZiZvgh bwYvL4XdaefVB9DDUBltocEQDHjJt1JblpMfmqpZNVrc0XSTtKBwWaQp/xPbS3dgXJpdqSE/l4fs1 bofqbg3XEebOtXDfcU6i4+BC1KiT+JgWvWzGJVzJ2QQ8svqSo28B6wV7zUeB/EgLt/rg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEDE2-0001dH-7R; Fri, 04 Sep 2020 17:02:12 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> <87imctbtfc.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEVUUE1hXVjNybjb 2MWJhXuoo5Xu7Nb9/etEQD/BvKtva2aCfnVBPT3///+oZfybAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+QJBA0uGj3OZRcAAADySURBVDjLY2BAAEYBRgZBIA2kwDSylCAQgEh0CbAMWBZdAiwmgEUCohqL BANOCUaSJYCewSEBk8IiIcCIQwJiE3YJbP6A6GCESygpO4CosDRFqGEwifTyCCDJWl5ehGaEWnkA kGQuDysTQJXghOpQq2RAlwjgCg3hSi8vwZRgLa9kLncuX4ApUVYqXr643AFVohNouaAgU3k5uuWs aSBXMU5L00LzBzyQGIgEHLgkRJcuEQllCQkNcQ3dgCKxLFxp0aQmI6VMtWkBKBKLZwpNDT2qqaka FIQqAXSdAJAAJmdGhlEwtAAsXwsgmAsFV61aBQBdBy4XxoN/QAAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMC0wOS0wNFQxMzo0NjoyNiswMDowMLoZC5IAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDkt MDRUMTM6NDY6MjYrMDA6MDDLRLMuAAAAAElFTkSuQmCC X-Now-Playing: Various's _1-8 Split Series_: "Speedranch^Jansky Noise - To Abandon, Eliminate & Destroy A Spontaneous Trait Transference In The Key Of C Minor" Date: Fri, 04 Sep 2020 17:02:00 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 04 Sep 2020 10:29:15 -0400") Message-ID: <87lfhp8u1j.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > This was too long ago and got moved to write-only swap space, and > I haven't had time to dig into it now to recover the lost context, but > I can see a potential case where it makes a difference, w [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: > This was too long ago and got moved to write-only swap space, and > I haven't had time to dig into it now to recover the lost context, but > I can see a potential case where it makes a difference, which is if the > timer is set multiple times before it gets a chance to be run: with the > new code only one of the timers will actually be executed. That's true; I didn't think about that. But wouldn't a more obvious fix be to cancel the previous timer, if there's already a timer in-flight? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 11:45:48 2020 Received: (at 24585) by debbugs.gnu.org; 4 Sep 2020 15:45:48 +0000 Received: from localhost ([127.0.0.1]:40400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEDuN-0007dD-Up for submit@debbugs.gnu.org; Fri, 04 Sep 2020 11:45:48 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEDuM-0007cz-7o for 24585@debbugs.gnu.org; Fri, 04 Sep 2020 11:45:46 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8129E440B5B; Fri, 4 Sep 2020 11:45:40 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BAB16440B31; Fri, 4 Sep 2020 11:45:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1599234338; bh=UVeBcf7jmppsEcdB90XYZkcvJr79Dv9NEWxiAC2pmW4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ArYTf+uuceAl8yAJ85/BYP5vP13++rdL/hC8TVfQ9dE05EcyK26K7GnnagkIkJVNb I5bFygxvFIdcxsnmsyFbb58kdsMgG2mM5FcpOrRBsWbv4XdNNIMNt4XWIEGpLY0BI+ dCNzlZLx019EyAKAaRFzYsJU+mqaI0b6hym00KD+uB3gWp/w8WPipgdNqaxiZ5YLh9 SnTxZeduQKJBFCqwl0kKp5qNSh95gz+b73pO7V7JGjRZvOLE+EFvwl6pJCtLFypdIM NiphsVD06uwpwNKrM4eIlEARxELfNWOhpGFVUvpZ/vc7QBrLtQ7s00wqvfKc8xxPJE k0ndq4yw2cSnQ== Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4C5AB12078F; Fri, 4 Sep 2020 11:45:38 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Message-ID: References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> <87imctbtfc.fsf@gnus.org> <87lfhp8u1j.fsf@gnus.org> Date: Fri, 04 Sep 2020 11:45:31 -0400 In-Reply-To: <87lfhp8u1j.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 04 Sep 2020 17:02:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.034 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> This was too long ago and got moved to write-only swap space, and >> I haven't had time to dig into it now to recover the lost context, but >> I can see a potential case where it makes a difference, which is if the >> timer is set multiple times before it gets a chance to be run: with the >> new code only one of the timers will actually be executed. > > That's true; I didn't think about that. But wouldn't a more obvious fix > be to cancel the previous timer, if there's already a timer in-flight? Could be. I don't even know if this effect was the one intended in any case. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 05 08:33:10 2020 Received: (at 24585) by debbugs.gnu.org; 5 Sep 2020 12:33:10 +0000 Received: from localhost ([127.0.0.1]:41762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEXNV-0003V1-Ql for submit@debbugs.gnu.org; Sat, 05 Sep 2020 08:33:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEXNU-0003Um-EF for 24585@debbugs.gnu.org; Sat, 05 Sep 2020 08:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QYnEP/7hOc0c2wKxm8l8cWLR7VD2nd96Zsl75o66aVY=; b=KzHGwrHP1tyZ9INj1fIZMNObIu HsYy/WKDBYJ9sO9VUF5SSPmt1TX6gk4uxxH1sMCr8G9tSwmf8jCsAe5WCdIziDzrduYcPciLqiOiJ XNf3FXbvcAXlniBxhBdTANLIXt/b6FofikLRPmyYZgkMcHwWk7JXomQ3Qo9vTOYj9E2M=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEXNL-0003cW-4O; Sat, 05 Sep 2020 14:33:01 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> <87imctbtfc.fsf@gnus.org> <87lfhp8u1j.fsf@gnus.org> X-Now-Playing: Thomas Mery's _Les couleurs, les ombres_: "Aux =?utf-8?Q?fe?= =?utf-8?Q?n=C3=AAtre?= immenses" Date: Sat, 05 Sep 2020 14:32:57 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 04 Sep 2020 11:45:31 -0400") Message-ID: <87a6y4769y.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: >>> This was too long ago and got moved to write-only swap space, and >>> I haven't had time to dig into it now to recover the lost context, but >>> I can see a potential case where it makes a differe [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >>> This was too long ago and got moved to write-only swap space, and >>> I haven't had time to dig into it now to recover the lost context, but >>> I can see a potential case where it makes a difference, which is if the >>> timer is set multiple times before it gets a chance to be run: with the >>> new code only one of the timers will actually be executed. >> >> That's true; I didn't think about that. But wouldn't a more obvious fix >> be to cancel the previous timer, if there's already a timer in-flight? > > Could be. I don't even know if this effect was the one intended in > any case. Me neither. I've now applied the + (when (buffer-live-p buffer) part of the patch, but not the rest. Perhaps Leo can chime in with that the patch was trying to achieve. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 05 08:33:18 2020 Received: (at control) by debbugs.gnu.org; 5 Sep 2020 12:33:18 +0000 Received: from localhost ([127.0.0.1]:41765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEXNe-0003VM-4u for submit@debbugs.gnu.org; Sat, 05 Sep 2020 08:33:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEXNc-0003V9-I3 for control@debbugs.gnu.org; Sat, 05 Sep 2020 08:33:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jTv26TWzibS5+bt2r9PSO1YVWbg3KvX5RYPWEwSQCo0=; b=tj2S5ehqICY878P775mQ5EWwho oYHKid7hvMXmoW6RkbNAAtCRHgK37jimNpn0PaKLpjItxa0LtgG3fsixwQg3tCb1ap7S8AamqAako HPyLgAsxuJ4x+fjXv3bzgUDrw4985AUaPQZHrEPhL8OvoywTOYNnxJGB80bp1HpcCJzo=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEXNU-0003ci-OW for control@debbugs.gnu.org; Sat, 05 Sep 2020 14:33:11 +0200 Date: Sat, 05 Sep 2020 14:33:07 +0200 Message-Id: <878sdo769o.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #24585 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 24585 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 24585 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 06 23:31:02 2020 Received: (at 24585) by debbugs.gnu.org; 7 Oct 2020 03:31:02 +0000 Received: from localhost ([127.0.0.1]:54712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ0AP-0005VM-Lh for submit@debbugs.gnu.org; Tue, 06 Oct 2020 23:31:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ0AN-0005Ol-O5 for 24585@debbugs.gnu.org; Tue, 06 Oct 2020 23:31:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TQIx0pOV1HYdY0UuJrgUoOXQLNW4MxMQoiTdgRnrr9s=; b=ehElME0ovqLf8LbxwaZtqi2naB iSEYN7ourFJwCshlzOU+64jqhNv1S9G1NEKxWzkoWI0ueW8zo2iSUq3gp4+pdhuqvT7dyQxCru2VR +WpVoZ8GxLV1USlZfHOsRVRWAq4qAQQICfP5MusSiLtXQCB0l7wkOGCAZwQCeFOg+17I=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQ0A9-0000an-M5; Wed, 07 Oct 2020 05:30:48 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer References: <83twcrks7q.fsf@gnu.org> <83int5jpde.fsf@gnu.org> <87imctbtfc.fsf@gnus.org> <87lfhp8u1j.fsf@gnus.org> <87a6y4769y.fsf@gnus.org> X-Now-Playing: Spektrum's _Enter The Spektrum_: "Freakbox" Date: Wed, 07 Oct 2020 05:30:44 +0200 In-Reply-To: <87a6y4769y.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 05 Sep 2020 14:32:57 +0200") Message-ID: <877ds27lwb.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Me neither. I've now applied the > > + (when (buffer-live-p buffer) > > part of the patch, but not the rest. Perhaps Leo can chime in with that > the patch was trying to achieve. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24585 Cc: 24585@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Me neither. I've now applied the > > + (when (buffer-live-p buffer) > > part of the patch, but not the rest. Perhaps Leo can chime in with that > the patch was trying to achieve. This was a month ago, but there was no response, so I'm closing this bug report. If there's more to be done here, a new bug report could perhaps be opened. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 06 23:31:01 2020 Received: (at control) by debbugs.gnu.org; 7 Oct 2020 03:31:01 +0000 Received: from localhost ([127.0.0.1]:54710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ0AP-0005V7-Ca for submit@debbugs.gnu.org; Tue, 06 Oct 2020 23:31:01 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQ0AN-0005OY-GQ for control@debbugs.gnu.org; Tue, 06 Oct 2020 23:30:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8QENvJskktK33c2gb4JAijaTQrQ3mOY060vPk/Fpgyw=; b=rZEn/mYzar/ymAHRkSql8rVGnD 9MgyGFX9w/7dpJpw6zcLknGpjVkC6o2nBkd/EaIdVKzRriVvfX0+8Vilz0pyWyRdraMvMilFFgl0k pefFXL2PzRwUjnbcWxjQuMDPXxyMoGa8O8dkMBnn6Hv9y1k9mqCN/5N60SZslPBFJe2w=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQ0AF-0000as-O8 for control@debbugs.gnu.org; Wed, 07 Oct 2020 05:30:53 +0200 Date: Wed, 07 Oct 2020 05:30:50 +0200 Message-Id: <875z7m7lw5.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #24585 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 24585 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 24585 quit From unknown Thu Jun 19 14:22:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 04 Nov 2020 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator