From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): Date: Sun, 11 Apr 2010 15:21:50 -0400 Message-ID: <87r5ml3icx.fsf@gnu.org> References: <4BBF536E.4090702@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1271013867 13010 80.91.229.12 (11 Apr 2010 19:24:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Apr 2010 19:24:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 11 21:24:23 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O12la-0004y8-Tf for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 21:24:23 +0200 Original-Received: from localhost ([127.0.0.1]:50349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O12lZ-0003eT-RY for ged-emacs-devel@m.gmane.org; Sun, 11 Apr 2010 15:24:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O12jH-0002nM-U9 for emacs-devel@gnu.org; Sun, 11 Apr 2010 15:22:00 -0400 Original-Received: from [140.186.70.92] (port=41459 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O12jG-0002ms-L3 for emacs-devel@gnu.org; Sun, 11 Apr 2010 15:21:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O12jF-0004lf-5x for emacs-devel@gnu.org; Sun, 11 Apr 2010 15:21:58 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:53983) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O12jB-0004l2-Tj; Sun, 11 Apr 2010 15:21:53 -0400 Original-Received: by vws15 with SMTP id 15so1133573vws.0 for ; Sun, 11 Apr 2010 12:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:user-agent:mail-copies-to:return-receipt-to :x-attribution:x-disclaimer:date:message-id:mime-version :content-type; bh=HYUgtiDm12jk+/Kejp3bU3H9DAPIuIu66Qk+RJFT88A=; b=heHHOLXXxTZ0Ca9OEphCNgWQWqXLyfk9KR3mhTj3hJFZPTzttwxuWoVD3jRSKe6uI2 Libtv67UJfyhLywiNr8pfZ7a4+IE27AgOAXotYOn6u29Nj+wKDI5V0aBxVUpg+hoH2l9 Qy14CqOKk313Z2GdaIjEh3y36Xz7GtXZ/S3QY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:user-agent :mail-copies-to:return-receipt-to:x-attribution:x-disclaimer:date :message-id:mime-version:content-type; b=nH7aue68QRH3yv2Xwv/8wAq9U47BWnpvRTmFaia9n4zAJJM1K9ysbL+oll+IxkVPwT ku6RQZ/MKZxlx5UErBmYUAuPooPJCYbdGxiYbjB1UQUeyTN/MPRuqIbOlU61ELmIKKX+ GAkXto59polQEntpe0RmDy6kjlYtUfW5CRZgU= Original-Received: by 10.220.107.104 with SMTP id a40mr1458243vcp.67.1271013710749; Sun, 11 Apr 2010 12:21:50 -0700 (PDT) Original-Received: from sysu76 (ool-182f80f7.dyn.optonline.net [24.47.128.247]) by mx.google.com with ESMTPS id 22sm81319704vws.3.2010.04.11.12.21.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 11 Apr 2010 12:21:49 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 09 Apr 2010 21:04:37 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Mail-Copies-To: never X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123495 Archived-At: > * Stefan Monnier [2010-04-09 21:04:37 -0400]: > >>>>> - I like where this is going, but I'm not sure this is enough. >>>>> Could you explain how you see it being used? >>>> if you edit a huge file which is expensive to save, you do not want it >>>> to be saved whenever you start a compilation elsewhere. >>> ;-) that part I understand of course. >>> But I mean what value do you expect users to use it with? >>> Would they globally set it to save one particular directory of theirs? >>> What if they have more than one project? >> this is problematic because compile does not announce what it's working >> directory is. > > Any reason why we can't fix that? no, and here is a solution: >> I can add a variable compile-default-directory which will be nil globally >> and bound to default-directory in compile and recompile; then the users will >> be able to set compilation-save-buffers-predicate to >> (lambda () >> (string-prefix-p >> (locate-dominating-file compile-default-directory "foo") >> (file-truename (buffer-file-name)))) >> so that only files located in the currently compiled project are saved. >> here "foo" should identify the project root, it can be, e.g., "configure" or >> "COPYING" or "README" or "OMakeroot" or "ANNOUNCE". >> we can also use "bzr root"/"hg root" instead of locate-dominating-file. >> this, however, becomes more and more expensive. > > How 'bout this: > - we provide some way for the user to explain to compile.el how to find > her projects's root directories (e.g. a list of tell-tale file names). this is tricky: some files might be ordinary for some projects and the tell-tale for others. > - and we can also provide an option to "cd to project's root before > running the command". I doubt the value of this. > How does that sound? fine. gonna do it? -- Sam Steingold (http://sds.podval.org/) on Ubuntu 9.10 (karmic) http://mideasttruth.com http://honestreporting.com http://jihadwatch.org http://dhimmi.com http://ffii.org http://pmw.org.il I want Tamagochi! -- What for? Your pet hamster is still alive!