From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: completing on makefile targets Date: Thu, 12 Sep 2019 15:41:23 -0400 Message-ID: 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="189140"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 12 21:41:44 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 1i8UyN-000n5M-TE for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 21:41:44 +0200 Original-Received: from localhost ([::1]:37992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8UyL-0002fy-8p for ged-emacs-devel@m.gmane.org; Thu, 12 Sep 2019 15:41:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41894) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8UyA-0002fn-4D for emacs-devel@gnu.org; Thu, 12 Sep 2019 15:41:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8Uy8-0007Qk-GX for emacs-devel@gnu.org; Thu, 12 Sep 2019 15:41:29 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38684) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i8Uy8-0007QX-7n for emacs-devel@gnu.org; Thu, 12 Sep 2019 15:41:28 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7D69E100EB1; Thu, 12 Sep 2019 15:41:27 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 14363100DFD; Thu, 12 Sep 2019 15:41:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1568317286; bh=KtnE/Gb0gaI6c38ksX5lqIg6l3rv/yD2yO/RHqStsQ0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JfxotYWMiTVwrUDuBwdR5cf3a0HlDMbdFbSHGbo1xsMmC6qQ5RyDqhqVzKuZGyGzp Rsz8A//yiB+Qi5Zas26qT+0lYkK7Ts235dLqsXlgdyDx8uKSXdQuBiAaBsEdmr1F4W xEnxhFDTnFUOljrN4l932ZHzyvz9aFu+4gLBo/d2z1DWqEHgMr1fK/MEfx/rqcO9wZ W1J2HglMyDd8wD7UgNejsfyLYz2y/otEAejCGLlyeFOIMsv89kE6eHi+GA9OlrQ12O 6w6S031zZqYSf2fxJ25upSvevdbyBDTvbfdtxCjTHxb5kZVmZetEzVcPsifFGq2MCc d8ip2hDp1ABCg== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 000691205E5; Thu, 12 Sep 2019 15:41:25 -0400 (EDT) In-Reply-To: <86r24l74ph.fsf@stephe-leake.org> (Stephen Leake's message of "Thu, 12 Sep 2019 11:24:42 -0700") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:240002 Archived-At: > 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. 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. > 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` Stefan