emacs-devel
[Top][All Lists]
Advanced

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

Re: project--completing-read-strict breaks ada-mode project completion t


From: Stephen Leake
Subject: Re: project--completing-read-strict breaks ada-mode project completion table
Date: Sun, 20 Jan 2019 11:34:40 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)

Stephen Leake <address@hidden> writes:

> There's a bug in path-iterator; I've set :ignore-function to ignore any
> dir under ".git", but they are showing up anyway. But that demonstrates
> how non-unique file names are handled, so it's good for this demo.

The bug was not in path-iterator but in the ignore function; args to
string-match are reversed. In addition, the function can be simplified,
since if dir is ignored, no children of dir will be passed to the
function:

(defun emacs-project-ignore-dir (dir)
  "Return non-nil if 'dir' should be ignored in file-completion-table."
  ;; If DIR is ignored, no children of DIR will be passed to this function.
  (string-equal ".git" (file-name-nondirectory dir)))

--
-- Stephe



reply via email to

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