unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: completing on makefile targets
Date: Fri, 13 Sep 2019 17:55:51 -0700	[thread overview]
Message-ID: <86r24jpug8.fsf@stephe-leake.org> (raw)
In-Reply-To: <jwvd0g5f935.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 12 Sep 2019 18:26:05 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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
function.

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	other threads:[~2019-09-14  0:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 18:24 completing on makefile targets Stephen Leake
2019-09-12 19:41 ` Stefan Monnier
2019-09-12 21:38   ` Stephen Leake
2019-09-12 22:26     ` Stefan Monnier
2019-09-14  0:55       ` Stephen Leake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86r24jpug8.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).