syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.58k stars 4.9k forks source link

Package deleted on init even if defined in dotspacemacs-additional-packages variable #11872

Open derdrdirk opened 5 years ago

derdrdirk commented 5 years ago

I added magic-latex-buffer to my dotspacemacs-additional-packages variables like so: dotspacemacs-additional-packages '(solidity-mode graphql-mode google-c-style color-theme-solarized emojify editorconfig magic-latex-buffer) I would expect it to be installed on the next start of emacs (like the other packages that I added to the dotspacemacs-addtional-packages variables), but it is not.

If I add it manually via the list-package + i + e commands it gets installed, but on the next start deleted:

(Spacemacs) --> deleting magic-latex-buffer... [1/1]
Package ‘magic-latex-buffer-20170531.5’ deleted.

I am using the latest develop branch ( spacemacs 0.300.0 ) and emacs version 26.1 installed by brew install emacs-plus.

singletS commented 5 years ago

I'm seeing this issue after doing an [Update Packages] on v.0.200.13 with emacs 26.1 on linux. I'm not convinced the Update Packages is the problem, though: Did a rollback. Added a new package to dotspacemacs-additional-packages but it doesn't get installed at restart, and it is deleted as an orphan if installed manually with list-packages. Oddly, packages that were added to dotspacemacs-additional-packages long ago seem to be working fine...??

ambirdsall commented 5 years ago

I'm having a similar issue. Even though my .spacemacs file contains

     dotspacemacs-additional-packages '(ac-html-angular
                                      add-node-modules-path
                                      angular-mode
                                      angular-snippets
                                      bart-mode
                                      dash-at-point
                                      doom-modeline
                                      doom-themes
                                      editorconfig
                                      evil-textobj-anyblock
                                      evil-textobj-line
                                      evil-replace-with-register
                                      exec-path-from-shell
                                      fireplace
                                      groovy-mode
                                      jasminejs-mode
                                      nvm
                                      outshine
                                      ob-typescript
                                      ox-hugo
                                      ox-tufte)

Every time I restart, ox-hugo gets deleted as an orphan. None of the others, though.

I also am using versions 0.300.0@26.1

Tonna commented 5 years ago

Having similar issue.

Have two packages: transpose-frame and company-quickhelp dotspacemacs-additional-packages '(transpose-frame company-quickhelp)

transpose-frame is processed fine. company-quickhelp is not installed on startup or gets deleted after manual installation.

OS: Debian 9 Spacemacs v.0.200.13 GNU Emacs 27.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2019-02-05 - built from sources

emdash-ie commented 4 years ago

For ox-hugo, this appears to happen because it’s already installed with the org layer, but behind a toggle, as described in #11382. I’m not sure about the others, but is there any chance they’re similarly included in a layer? (Maybe auto-completion for company-quickhelp?)

duianto commented 4 years ago

Searching for magic-latex-buffer in the Spacemacs repository finds this entry in the latex layer: https://github.com/syl20bnr/spacemacs/blob/fdd38eec9b7bcb5ed92404d3c30401791808e968/layers/%2Blang/latex/packages.el#L25

It means that magic-latex-buffer is enabled when the layer variable latex-enable-magic is t

The latex layers documentation also mentions additional magic-latex variables: https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/latex#magic-latex-buffer

undergroundquizscene is correct. ox-hugo is part of the org layer, it's layer variable is called: org-enable-hugo-support https://github.com/syl20bnr/spacemacs/tree/develop/layers/+emacs/org#hugo-support

And company-quickhelp is part of the auto-completion layer, it's layer variable is called: auto-completion-enable-help-tooltip https://github.com/syl20bnr/spacemacs/tree/develop/layers/+completion/auto-completion#tooltips

Since company-quickhelp isn't mentioned in the auto-completion layers documentation. I opened a PR which adds an entry for it in the features section: [auto-completion] List feature pkg company-quickhelp #12792


Packages that are not part of a layer will be removed as orphans, on restart, because the dotspacemacs-install-packages variable in .spacemacs is set to: 'used-only (by default)

If the variable is changed to 'used-but-keep-unused then the packages will remain if they were installed with M-x list-packages or if a layer is disabled (removed or commented out in the dotspacemacs-configuration-layers list near the top of .spacemacs).

rcgary commented 4 years ago

I was having this issue, and the solution can be found here Just do this in your .spacemacs.d

(setq-default dotspacemacs-configuration-layers '(
  (org :variables
       org-enable-trello-support t)))
usq commented 4 years ago

I was having this issue, and the solution can be found here Just do this in your .spacemacs.d

(setq-default dotspacemacs-configuration-layers '(
  (org :variables
       org-enable-trello-support t)))

Had the same issue and this solved it, thanks!

smile13241324 commented 4 years ago

@Knowledge91 I think there had been a workaround supplied can you double check whether this solved your issue and close it consequently if it does?

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

bechampion commented 2 years ago

If the packages are dupped because they exist in a layer they're marked as orphan , get into .emacs.d and grep for them

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

tidux commented 1 year ago

I think I figured it out. This is properly a documentation/UI bug. I could reproduce the problem with ox-epub and ox-hugo, but I found out that both of them are managed by the Org layer. Instead of simply "deleting orphan package", Spacemacs should warn the user "this package is managed by layer foo, please configure it that way" and then open a new window+buffer with the documentation for that layer.