From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: completing on makefile targets Date: Thu, 12 Sep 2019 14:38:37 -0700 Message-ID: <86muf96vqa.fsf@stephe-leake.org> References: <86r24l74ph.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="138174"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 12 23:38:53 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i8Wnk-000ZqH-Np for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 23:38:53 +0200 Original-Received: from localhost ([::1]:38960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8Wnj-0001FH-Hl for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 17:38:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33134) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8Wnd-0001F7-Eo for emacs-devel@gnu.org; Thu, 12 Sep 2019 17:38:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8Wnb-0003fp-R1 for emacs-devel@gnu.org; Thu, 12 Sep 2019 17:38:44 -0400 Original-Received: from gateway31.websitewelcome.com ([192.185.143.40]:26317) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i8Wnb-0003fJ-JD for emacs-devel@gnu.org; Thu, 12 Sep 2019 17:38:43 -0400 Original-Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 243571755 for ; Thu, 12 Sep 2019 16:38:42 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 8WnZiaZuN3Qi08WnZiCtUb; Thu, 12 Sep 2019 16:38:42 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc: 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=tk3diNph++M+ZOtSiz565yfIIJxSxtNg+M2tVUUL9Kk=; b=SDnZS2Y/Ya3xEPlzlVkD/V5fs eG14i0SiqPg+nB18PhbZU72CHO9pwqLBGfNm7zahQz11r3vk9tNxwM7L+t5mPCzP8SH1lhqP94S8t t0VXMLJp7JaRCXJX/zGTt2mUjKgpIyfOCq2l1xzvVeVsBHvlzggRhZz8rFQ18eKKzFkz1ePbyhZoN KodI4CSbsjE3p/EdKPpsYhwrb5UoKSn86OLvAnvWcD8kze2AGcGOtFFbW2+qjZEdIFcbAVmK/ZnbH FiIJ5zCHycU0FBmwvvCt1WtXLCvl+TraZ80qIAXuhHQoCYthD/rXryhsO60C7VzDdzATVAqIu41Vt B5h7h0ONw==; Original-Received: from [76.77.182.20] (port=53482 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i8WnZ-000tNv-An for emacs-devel@gnu.org; Thu, 12 Sep 2019 15:38:41 -0600 In-Reply-To: (Stefan Monnier's message of "Thu, 12 Sep 2019 15:41:23 -0400") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1i8WnZ-000tNv-An X-Source-Sender: (Takver4) [76.77.182.20]:53482 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 1 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.143.40 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240005 Archived-At: Stefan Monnier writes: >> Why does let-binding `makefile-target-table' work in >> `sal-makefile-completions-at-point', but not in `make-compile'? > > Because makefile-target-table is buffer-local, so the let-binding in > `make-compile` only affects the buffer-local value of that var. And the Makefile is current when make-compile is called, but the minibuffer is current when completion-at-point and sal-makefile-completions-at-point are called. Ok, I thought it was something like that, but could not sort out the logic. > BTW, an alternative approach is to add a pcomplete/make function which > will compute the completions for `make` (regardless if called > from`make-compile` or from, say, M-!) by looking at the Makefile in the > current directory. Yeah, but I hate making assumptions like that; the relevant Makefile could easily be somewhere else. >> That requires knowing the "source" buffer while in the minibuffer; is >> there a standard way to get that? > > I think you want `minibuffer-selected-window` ok, thanks. I'd like to get the same completion in the *compilation* buffer, but I don't see anything in compilation-start that remembers the calling buffer. I'll have to add a global variable, or store it in the current project. -- -- Stephe