From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: Waiting on compilation to finish before executing another function Date: Thu, 15 Aug 2013 23:14:00 +0200 Message-ID: <871u5ur71j.fsf@zigzag.favinet> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1376601102 6040 80.91.229.3 (15 Aug 2013 21:11:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Aug 2013 21:11:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Rami A Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 15 23:11:43 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VA4pa-0003UX-3x for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Aug 2013 23:11:42 +0200 Original-Received: from localhost ([::1]:55556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA4pZ-00064f-9K for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Aug 2013 17:11:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA4pG-000631-3d for help-gnu-emacs@gnu.org; Thu, 15 Aug 2013 17:11:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VA4p8-00087N-PD for help-gnu-emacs@gnu.org; Thu, 15 Aug 2013 17:11:22 -0400 Original-Received: from smtp208.alice.it ([82.57.200.104]:46940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA4p8-00087D-FE for help-gnu-emacs@gnu.org; Thu, 15 Aug 2013 17:11:14 -0400 Original-Received: from zigzag.favinet (62.211.148.14) by smtp208.alice.it (8.6.060.28) id 51F2833B04588448; Thu, 15 Aug 2013 23:11:12 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1VA4rx-00047O-9p; Thu, 15 Aug 2013 23:14:09 +0200 In-Reply-To: (Rami A.'s message of "Thu, 15 Aug 2013 10:36:21 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.104 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92913 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Rami A () Thu, 15 Aug 2013 10:36:21 -0700 (PDT) I tried experimenting with compilation-finish-functions but found out that the functions added to the list will be executed after "every" compilation. Since I use compile to search IDs "gid" I don't want to refresh opened files on every search. For the compilation that does the pull, set a buffer-local variable to note the case. Then add to =E2=80=98compilation-finish-function=E2=80= =99 a function that does =E2=80=98revert-all-buffers=E2=80=99 only if indicated by that va= riable. Actually, =E2=80=98compile=E2=80=99 normally sets a bunch of buffer-local v= ariables itself. For instance, you could check =E2=80=98compilation-arguments=E2=80= =99. =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlINRJsACgkQZwMiJEyAdQLAEgCgrpTF8L5F3ErzKb7RGy9lb1MK /eoAn0GlMVXtBUgZM7k68sRmJwtf01kh =iNmw -----END PGP SIGNATURE----- --=-=-=--