Giter Site home page Giter Site logo

use-package-ensure-git-repo's Introduction

use-package-ensure-git-repo

About

“use-package-ensure-git-repo” is an extension for the Emacs package “use-package” https://github.com/jwiegley/use-package.

It add new keyword ”:ensure-git-repo” to “use-package”, to support to install elisp package from git repository.

Installation

Clone this git repo to “${user-emacs-directory}/packages/use-package-ensure-git-repo”, and add folowing lines to your Emacs config file:

(use-package use-package-ensure-git-repo
  :defer t
  :ensure nil ; it is github package
  ;; If the path is relative, it is expanded within `user-emacs-directory'
  :load-path "packages/use-package-ensure-git-repo"
  :custom
  ;; (use-package-ensure-git-repo-always-update nil)
  :init
  (let ((pkg-name "use-package-ensure-git-repo"))
    (ignore-errors
      (package-generate-autoloads pkg-name
                                  (expand-file-name (concat "packages/" pkg-name)
                                                    user-emacs-directory)))
    (load (concat pkg-name "-autoloads.el")))
  )

Usage

Use the keyword ”:ensure-git-repo” in use-package to specify which git repo is used for installation

Such as, if to install Emacs package “fd-dired” from GitHub repo https://github.com/leuven65/fd-dired, it can be configured as:

(use-package fd-dired
  :ensure-git-repo "https://github.com/leuven65/fd-dired"
  )

It will:

  1. clone the git repo for the 1st time, or pull from the remote git repo.
    The local directory is ”${user-emacs-directory}/packages/${package-name}
  2. generate ”*-autoloads.el” file.
  3. byte compile all the ”.el” file.
  4. Add ”${user-emacs-directory}/packages/${package-name}” to load-path.
  5. load the autoload file ”*-autoloads.el”.

Variable ”use-package-ensure-git-repo-always-update

By default, ”use-package-ensure-git-repo-always-update” is “t”, so that ”:ensure-git-repo” will pull from the remote git repo and update local git repo. You can set to “nil” to disable updating.

use-package-ensure-git-repo's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.