Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various counsel-compile cleanups #1963

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 9 additions & 10 deletions counsel.el
Expand Up @@ -5236,16 +5236,15 @@ The optional BLDDIR is useful for other helpers that have found
(defun counsel-compile-get-filtered-history (&optional dir)
"Return a compile history relevant to current project."
(let ((root (or dir (funcall counsel-compile-root-function)))
(kept-history))
(mapc
(lambda (hist)
(let ((srcdir (get-text-property 0 'srcdir hist))
(blddir (get-text-property 0 'blddir hist)))
(when (or (and srcdir (string-match srcdir root))
(and blddir (string-match blddir root)))
(push hist kept-history))))
counsel-compile-history)
kept-history))
history)
(dolist (item counsel-compile-history)
(let ((srcdir (get-text-property 0 'srcdir item))
(blddir (get-text-property 0 'blddir item)))
;; FIXME: File names are not regexps!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we should fix this. You could merge with c653867?

(when (or (and srcdir (string-match-p srcdir root))
(and blddir (string-match-p blddir root)))
(push item history))))
history))

(defun counsel--get-compile-candidates (&optional dir)
"Return the list of compile commands.
Expand Down