[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: completing on makefile targets

From: Stephen Leake
Subject: Re: completing on makefile targets
Date: Fri, 13 Sep 2019 17:55:51 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

Stefan Monnier <address@hidden> writes:

>> Yeah, but I hate making assumptions like that; the relevant Makefile
>> could easily be somewhere else.
> For the general pcomplete functionality to work, it's necessary for the
> minibuffer's default-directory to be the same as that where the command
> will be run.  So, in the pcomplete/make function you *can* presume that
> the default-directory is the one where `make` will run (and hence follow
> `make`s rule about how to find the appropriate makefile).

Hmm. Looking at the current pcomplete/make in pcmpl-gnu.el, that's what
it does. It even handles the 'make' -f option. So I could just use that

Hmm. pcomplete-completions-at-point is already in
shell-dynamic-complete-functions, so maybe that's why completion on
makefile targets was working, sometimes. So now I could try to figure
out why it stopped working.

I've now written a completion-at-point function that also handles
targets in included makefiles, which I've wanted for a long time. I'll
test that for a while, then look into adding that (with a controlling
option) to pcomplete/make.

-- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]