Skip to content

If you don't have git installed, using M-p from counsel-find-file raises a user-error #1216

@oantolin

Description

@oantolin

On a computer where I don´t have git installed, every time I try to use M-p from counsel-find-file (which runs ivy-previous-history-element) I get an error message that says 'Required program "git" not found in your path'.

The reason this message occurs is that counsel adds counsel-emacs-url-p and counsel-github-url-p to the variable ivy-ffap-url-functions which is used by ivy--cd-maybe. Those functions use counsel-require-program to check that git is installed and produce an error message if it is not.

Is this really the best way to handle this? I'd prefer to have counsel-emacs-url-p and counsel-github-url-p just silently return nil if the use doesn't have git, rather than see an error message every time I try to use the history in counsel-find-file. Or maybe have counsel check for git before putting counsel-emacs-url-p and counsel-github-url-p in ivy-ffap-url-functions. The point is a gitless person should just not get the extra functionality instead of being constantly scolded. :P

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions