I'm using spacemacs devel.

I've added following private layer using M-x configuration-layer/create-layer

(setq irony-packages
        ;; flycheck-irony ;; I'm not using it.

(defun irony/init-irony ()
  (use-package irony
    :defer t
    :commands (irony-mode irony-install-server)
      (add-hook 'c-mode-hook 'irony-mode)
      (add-hook 'c++-mode-hook 'irony-mode))
      (setq irony-user-dir (f-slash (f-join user-home-directory "bin" "irony")))
      (setq irony-server-install-prefix irony-user-dir)
      (add-hook 'c++-mode-hook (lambda () (setq irony-additional-clang-options '("-std=c++11"))))
      (defun irony/irony-mode-hook ()
        (define-key irony-mode-map [remap completion-at-point] 'irony-completion-at-point-async)
        (define-key irony-mode-map [remap complete-symbol] 'irony-completion-at-point-async))

      (add-hook 'irony-mode-hook 'irony/irony-mode-hook)
      (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))))

(when (configuration-layer/layer-usedp 'auto-completion)
  (defun irony/init-company-irony ()
    (use-package company-irony
      :if (configuration-layer/package-usedp 'company)
      :defer t
      :commands company-irony
        ;;(add-to-list 'company-backends 'company-irony)
        (add-hook 'irony-mode-hook 'company-irony-setup-begin-commands)))))

(when (configuration-layer/layer-usedp 'auto-completion)
  (defun irony/init-company-irony-c-headers ()
    (use-package company-irony-c-headers
      :if (configuration-layer/package-usedp 'company)
      :defer t
      :commands company-irony-c-headers
      (push 'company-irony-c-headers company-backends-c-mode-common))))

(when (configuration-layer/layer-usedp 'syntax-checking)
  (defun irony/init-flycheck-irony ()
    (use-package flycheck-irony
      :if (configuration-layer/package-usedp 'flycheck)
      :defer t
      :init (add-hook 'irony-mode-hook 'flycheck-irony-setup))))

(defun irony/init-irony-eldoc ()
  (use-package irony-eldoc
    :commands (irony-eldoc)
    (add-hook 'irony-mode-hook 'irony-eldoc)))

then added irony to dotspacemacs-configuration-layers. After restart all is working well.

What I need to do is to use my github versions of all the packages listed above: company-irony company-irony-c-headers irony irony-eldoc

So what I did.

  1. removed irony from dotspacemacs-configuration-layers.
  2. restared emacs. This removed all the 4 irony packages from my system, which is OK.
  3. edited dotspacemacs-additional-packages, then restared emacs:

dotspacemacs-additional-packages '(w3m google-c-style flycheck-google-cpplint ;; I added the following. (irony :location (recipe :fetcher github :repo "vibrys/irony-mode")) (company-irony :location (recipe :fetcher github :repo "vibrys/company-irony")) (company-irony-c-headers :location (recipe :fetcher github :repo "vibrys/company-irony-c-headers")) (irony-eldoc :location (recipe :fetcher github :repo "vibrys/irony-eldoc")) )

Messages log tells the following about the source of packages' installation:

(Spacemacs) --> installing package: company-irony@dotfile... [1/4] Fetcher: github Source: vibrys/company-irony

(Spacemacs) --> installing package: company-irony-c-headers@dotfile... [2/4] Fetcher: github Source: vibrys/company-irony-c-headers

(Spacemacs) --> installing package: irony@dotfile... [3/4] ;; this on does NOT go from github.com. THis is my problem.

(Spacemacs) --> installing package: irony-eldoc@dotfile... [4/4] Fetcher: github Source: vibrys/irony-eldoc

The problem is that irony@dotfile does NOT go from github. It is taken from standard repository.

What am I doing wrong?



when I left only irony within the following

dotspacemacs-additional-packages '(w3m google-c-style flycheck-google-cpplint (irony :location (recipe :fetcher github :repo "vibrys/irony-mode")) )

and layer packages.el file is also left with irony, ie:

(setq irony-packages '( irony))

then emacs restart installs it from github. messages tells:

(Spacemacs) --> installing package: irony@irony... [1/1]

Fetcher: github

Source: vibrys/irony-mode

So maybe the problem is that in case all four irony packages are going to be installed, then this irony package is already contained within one of the three thus installed earlier.

I changed the sequence of packages in packages.el then, so that:

(setq irony-packages '( irony irony-eldoc company-irony-c-headers company-irony ))

and changed sequence within dotspacemacs-additional-packages

dotspacemacs-additional-packages '(w3m google-c-style flycheck-google-cpplint (irony :location (recipe :fetcher github :repo "vibrys/irony-mode")) (irony-eldoc :location (recipe :fetcher github :repo "vibrys/irony-eldoc")) (company-irony-c-headers :location (recipe :fetcher github :repo "vibrys/company-irony-c-headers")) (company-irony :location (recipe :fetcher github :repo "vibrys/company-irony")) )

, then restarted emacs, and I've noticed that company mode is fetched just after company-irony has been fetched, even if it is installed in step [3/4]. This time the source is: Sarcasm/irony-mode, not: vibrys/irony-mode:

(Spacemacs) --> installing package: company-irony@irony... [1/4]

Fetcher: github

Source: vibrys/company-irony


Fetcher: github

Source: Sarcasm/irony-mode


(Spacemacs) --> installing package: company-irony-c-headers@irony... [2/4]

Fetcher: github

Source: vibrys/company-irony-c-headers

(Spacemacs) --> installing package: irony@irony... [3/4]

(Spacemacs) --> installing package: irony-eldoc@irony... [4/4]

Fetcher: github

Source: vibrys/irony-eldoc


|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.