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: fix for bug#34330 breaks makefile target complete in `compile' prompt
Date: Sun, 15 Sep 2019 02:12:52 -0700	[thread overview]
Message-ID: <8636gxq5wr.fsf@stephe-leake.org> (raw)

bug#34330 (now closed) was about completing file names with special
chars in the shell. The fix was to move `pcomplete-completions-at-point'
to last in `shell-dynamic-complete-functions'.

However, that now breaks completing on makefile targets in the prompt
for `compile'.

The problem is that `comint-filename-completion' returns non-nil even
when there are no filename completions for the word at point.

One fix would be to make `comint--complete-file-name-data' return nil if
`try-completion' returns nil.

The real cause for bug#34330 is that pcomplete uses
`pcomplete-default-completion-function' in this case (there is no
pcomplete/ls), and it also returns a non-nil result even when there are
no completions.

The doc string for `completion-at-point-functions' says, in part:

    should return either nil, meaning it is not applicable at point,

It's not clear from this if "applicable" means "there are actual
completions", but it appears that it should.

So should these functions be fixed to return nil when there are no completions?

--
-- Stephe



             reply	other threads:[~2019-09-15  9:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-15  9:12 Stephen Leake [this message]
2019-09-15 12:50 ` fix for bug#34330 breaks makefile target complete in `compile' prompt Stefan Monnier
2019-09-15 20:07   ` Stephen Leake
2019-09-15 21:05     ` Stefan Monnier

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=8636gxq5wr.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).