From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Date: Fri, 07 Oct 2016 00:12:57 +0800 Message-ID: References: <83twcrks7q.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1475771213 1452 195.159.176.226 (6 Oct 2016 16:26:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Oct 2016 16:26:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (macOS 10.12) Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 06 18:26:47 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsBVC-0006Tt-Qy for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Oct 2016 18:26:35 +0200 Original-Received: from localhost ([::1]:57774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsBVE-0008J7-6W for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Oct 2016 12:26:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsBJ8-0006Ie-TX for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2016 12:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsBJ5-0004go-K7 for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2016 12:14:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsBJ5-0004gJ-H5 for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2016 12:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bsBJ5-00055O-7S for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2016 12:14:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Oct 2016 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24585-submit@debbugs.gnu.org id=B24585.147577039119477 (code B ref 24585); Thu, 06 Oct 2016 16:14:02 +0000 Original-Received: (at 24585) by debbugs.gnu.org; 6 Oct 2016 16:13:11 +0000 Original-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 Original-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 Original-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) Original-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) 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= In-Reply-To: <83twcrks7q.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Oct 2016 13:25:45 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124121 Archived-At: 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