unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24585@debbugs.gnu.org, monnier@IRO.UMontreal.CA
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	[thread overview]
Message-ID: <m1wphle9rq.fsf@gmail.com> (raw)
In-Reply-To: <83twcrks7q.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Oct 2016 13:25:45 +0300")

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





  reply	other threads:[~2016-10-06 16:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02  4:56 bug#24585: 25.1; avoid hack in ggtags.el to run compilation-auto-jump timer Leo Liu
2016-10-02 20:35 ` Stefan Monnier
2016-10-03  3:01   ` Leo Liu
2016-10-03 13:24     ` Stefan Monnier
2016-10-03 15:22       ` Leo Liu
2016-10-03 18:45         ` Stefan Monnier
2016-10-04 13:08           ` Leo Liu
2016-10-04 16:18             ` Stefan Monnier
2016-10-05  7:39               ` Leo Liu
2016-10-05 10:25                 ` Eli Zaretskii
2016-10-06 16:12                   ` Leo Liu [this message]
2016-10-06 18:10                     ` Stefan Monnier
2016-10-06 18:31                       ` Leo Liu
2016-10-06 18:37                         ` Eli Zaretskii
2016-10-07  1:21                           ` Leo Liu
2016-10-07  2:27                             ` Leo Liu
2016-10-07  8:02                               ` Eli Zaretskii
2016-10-07 12:46                               ` Stefan Monnier
2016-10-07 17:07                                 ` Leo Liu
2016-10-07 18:10                                   ` Stefan Monnier
2016-10-08 18:10                                     ` Leo Liu
2020-09-04 12:47                                       ` Lars Ingebrigtsen
2020-09-04 14:29                                         ` Stefan Monnier
2020-09-04 15:02                                           ` Lars Ingebrigtsen
2020-09-04 15:45                                             ` Stefan Monnier
2020-09-05 12:32                                               ` Lars Ingebrigtsen
2020-10-07  3:30                                                 ` Lars Ingebrigtsen
2016-10-07  7:59                             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1wphle9rq.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=24585@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).