unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: fix for bug#34330 breaks makefile target complete in `compile' prompt
Date: Sun, 15 Sep 2019 17:05:52 -0400	[thread overview]
Message-ID: <jwv7e69nuo8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86tv9dnx1a.fsf@stephe-leake.org> (Stephen Leake's message of "Sun, 15 Sep 2019 13:07:29 -0700")

>> No.  The idea rather is to decide on the completion-table to use only
>> based on *where* we are.  You can't easily know whether there are
>> any completions (because it depends on completion-styles).
> Hmm. Why don't we know the style? Won't completion-try-completion, using
> the candidate completion table, return the right result?

You could try and do that, but it might make things too slow
(completion-at-point-functions is also called at times with no
intention to actually perform the completion, but rather just to know
if we're still in the same completion-spot as before, e.g. to know when
to pop-down the *Completions* buffer).

> comint-complete (although I think that means adding pcomplete/ls etc, so
> it knows it's looking for a file).

I don't think pcomplete/ls would help in any way.  The issue is with
*all* commands: we want to complete file-names by default (i.e. the
absence of any other information).

Also I think it makes sense to allow file-name completion for make
arguments, since even if not listed explicitly in the Makefile, it's
likely that "make <file>" can be a valid&useful command.

> Setting pcomplete-default-completion-function to 'ignore might work (ie,
> "don't guess if you are not sure"). That could be done in
> pcomplete-completions-at-point, so it doesn't affect the normal
> operation of pcomplete.

Oh, wait.  When you said `pcomplete` before were you sometimes talking
about the specific `pcomplete` command rather than about the
pcomplete.el functionality in general?
Nowadays the `pcomplete` command should basically not be used any more
(the pcomplete functionality should be used from completion-at-point via
pcomplete-completions-at-point instead).


        Stefan




      reply	other threads:[~2019-09-15 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15  9:12 fix for bug#34330 breaks makefile target complete in `compile' prompt Stephen Leake
2019-09-15 12:50 ` Stefan Monnier
2019-09-15 20:07   ` Stephen Leake
2019-09-15 21:05     ` Stefan Monnier [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=jwv7e69nuo8.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.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).