Commit Graph

418 Commits

Author SHA1 Message Date
Maxi Wolff e71a68633b [core] Hotfix org version mismatch during startup
this is caused by the home buffer loading build-in
org which conflicts with elpa org.

We actually want to use elpa org exclusively so we have
to make sure to redraw the spacemacs buffer only
after we have finished loading the layers.

In addition latest org version 9.6 and the behaviour
on emacs 29 has also changed so that org is autoloaded
much earlier than before. This is what actually did
make this bug show up.

However this behaviour was in place since a long time
and could be the cause for a lot of unreproducible
bugs as the actual conflicts are dependent on the
distribution specific emacs version.

Known issues:
This is a hotfix it solves the original issue but
introduces a new, hopefully less dangerous issue,
this is for now the start buffer is not configurable.

I will add a follow up PR to remove this issue however
I think this is far less annoying than a set of random
conflicts caused by loading elisp files from different org
sources.
2023-01-03 08:01:48 +01:00
Lin Sun 3be65c7354 * core: enhance the code to reduce flycheck warnings 2022-12-10 06:37:22 +01:00
Lin Sun 9305824171 core/core-configuration-layer: avoid loading the dependence layers
multiple times in (configuration-layer/declare-layer-dependencies)
2022-10-18 17:31:20 +02:00
lin.sun 26a975d69a
* core/core-configuration-layer.el: fix log for rshadow relationship (#15685) 2022-08-06 22:32:07 +00:00
Lucius Hu 2e897fcc89
fixup! core-configuration-layer: fix quelpa on opensuse 2022-07-23 04:40:37 -04:00
Lucius Hu d428d71a1f
core-configuration-layer: fix quelpa on opensuse
`quelpa-build-explicit-tar-format-p` needs to be non-nil so `tar` uses `--format=gnu`.
This is necessary on OpenSuse
2022-07-20 02:20:48 +00:00
Lin Sun fbe05e3e08 [core] fix error msg from byte-compiling core-configuration-layer.el 2022-06-21 00:12:05 +02:00
Arif Er 00f9ab19ac chore: update copyright headers to 2022
The script used to identify and update the change is added into the GitHub
workflows script directory. A workflow action can be created to trigger the
script to update the headers on the first of every new year. Possibly a task for
a consequent PR.
2022-06-03 17:32:20 +02:00
Thanh Vuong b8f471dc1c
[core] new recipe :fetcher local
with this curent (package :location local) can be replaced with (package
:location (recipe :fetcher local)) then quelpa will install local pacakge. We
have the benefit of bytecompile and autoload

[packages] use new fetcher for local
2022-05-29 15:58:19 +02:00
Thanh dd1e077c5d [core] enable lexical binding for all 2022-05-11 19:48:17 +02:00
Dan Kessler b316ee936f
reinstate cfgl-layer docstring fix (#15376) 2022-02-23 16:01:30 -05:00
Evan Klitzke 4625745a8b Change core-configuration-layer.el to not use obsolete defmethod 2022-01-03 22:59:11 +01:00
Lucius Hu d7f9eb6342 Update minimum supported emacs version to 27.1 2022-01-01 14:32:46 +01:00
Daniel Nicolai 58ca8bd879
Fix package update for emacs versions < 26.2 (issue #15212) (#15215) 2021-12-17 17:44:25 -05:00
Daniel Nicolai 8b895fe290 Fix #15186, broken package update due to commit cac0105 2021-12-07 17:36:53 +01:00
Daniel Nicolai cac0105553 Add option to select packages for update
This commit changes the yes-or-no-p to a read-answer with three options y, s and
n (for yes, some and no. This of course could be a, s, c for 'all',
'some/select' and 'cancel', but I decided to keep yes no as users are already
familiar with the y and n).

Finally the user can select packages by answer for each package in the list a
yes-or-no-p (pressing y or n, if you upgrade regularly the list usually is not
too long. It is anyway better than having only the options all or none).

The `nonc` construction is just a non cl alternative to cl-remove-if (I've added
the comment with the explanation).
2021-11-12 15:38:49 +01:00
Daniel Nicolai 548edefcce Install org from ELPA instead of Org ELPA
From org version 9.5 org will not be distributed from Org ELPA but from
ELPA (see https://list.orgmode.org/87lfa7tc9v.fsf@gnu.org/t/). This commit makes
Spacemacs use/install org from ELPA.

Besides that, this commit removes some 'hack' that seemed to have no effect. As
org comes with Emacs `package-installed-p 'org` will always return t. Also
activating org via `configuration-layer//activate-package` seems to have no
effect.

Finally, the package is declared including a :min-version because appending only
`:location melpa` seems to have no effect (this can probably be considered a
bug).
I am almost certain that the information that was added when making org install
from Org ELPA is still relevant also for installing org from ELPA so I have just
adapted the version number from 0.104 to 0.300.

As the "org" archive has been removed, the `ert-deftest` for it can be removed
also.
2021-11-06 14:34:18 +01:00
Lin Sun 497c767036 [core] Support packing elisp to *.elc and *.el.gz files
Support packing elisp to *.elc and *.el.gz like vallina Emacs.
2021-09-29 22:15:38 +02:00
Markus Bertheau eda7e19370
Don't fail hard when trying to delete a non-existing package (#14821) 2021-06-04 03:57:26 +00:00
Richard Kim 63197014cc
use org and org-contrib packages rather than org-plus-contrib
setup org-contrib in org layer rather than spacemacs-org layer

follow-on fix for spacemacs-org layer
2021-05-29 21:10:21 +02:00
Lucius Hu bc27203615
Removed legacy codes for emacs-version < 25.1 (#14497) 2021-04-28 05:04:53 +00:00
Mihaly Barasz bebf5c4a07 Use the standard elpa gpg homedir
Closes #13738
2021-04-12 20:15:46 +00:00
duianto ef1ad4ecee Check package updates from Spacemacs home buffer
problem:
`SPC f e U` checks if packages have updates.
But if the current buffer isn't the Spacemacs home buffer,
then the minibuffer just shows:
>Do you want to update 1 package(s)? (y or n)

There's no information about which packages have updates.

Canceling the prompt with: `n`
and switching to the messages buffer `SPC b m`, does list them.
>(Spacemacs) --> Found 1 package(s) to update:
>
>(Spacemacs) dap-mode

But it doesn't work to switch to the home buffer,
because that information was erased when the home buffer was refreshed.

solution:
Switch to the home buffer before checking for updates.
2021-04-09 21:40:19 +02:00
syl20bnr 97cd83e169 Apply GPLv3 terms explicitly to all elisp files 2021-03-25 22:59:32 -04:00
syl20bnr d55a9e2e67 Update header for year 2021 2021-03-25 22:59:32 -04:00
Aaron L. Zeng 454e729ef0 In SPC h d P, print :toggle expression using Elisp syntax
This prints out an expression in valid Lisp syntax, so that, e.g.,
strings in the expression are quoted.
2021-03-19 09:48:44 +01:00
JAremko 0f2df2727d Validate .spacemacs variables. 2021-03-18 15:47:02 +02:00
Thanh Vuong ae65f3cedd
Fix #14213 remove dash and ht from core libs
- delete dash and ht in core
- reimplemented all ht functions we need in `spacemacs-ht.el` and use them
- add dash to spacemacs-bootstrap
2021-02-07 22:22:39 +01:00
duianto b4922325c7 [core] Shorten package update restart message
problem:
When the Emacs frame has the default window width (80 characters).

Then the current restart to update message:
Emacs has to be restarted to actually install the new version of the packages (SPC q r)

is cut off at the Emacs frames right edge:
Emacs has to be restarted to actually install the new version of the packages (S

solution:
Shortening the message:
Restart Emacs to install the updated packages. (SPC q r)

says the same thing, and keeps it within 80 characters.
2021-01-24 21:56:14 +01:00
duianto c0f61fa035 [core] Fix package update restart message
Problem:
When the restart-emacs package is being updated.

The update packages restart message, still shows the (SPC q r) key binding even
though it doesn't work.

Cause:
The member function compared a string against a list of symbols.

A possible improvement:
Explain that the key binding won't work this time.

Before:
Emacs has to be restarted to actually install the new version of the packages (SPC q r).

After:
Emacs has to be restarted to actually install the new version of the packages
(SPC q r) won't work this time, because the restart-emacs package is being updated.
2020-12-08 20:14:52 +01:00
Brandon T. Willard ac3c3546a2 Fix misc. compilation warnings 2020-10-15 23:49:33 +02:00
Robert O'Connor 82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
syl20bnr 52ec07bb44 [core] Fix installation of unused layer dependencies after SPC h SPC
Fix bug where layer dependencies of all layers (even the unused ones)
are installed after SPC h SPC and then SPC f e R
2020-08-29 21:51:52 -04:00
syl20bnr b5f673e0a7 [core] Update message when force dumping 2020-08-29 21:51:52 -04:00
Maximilian Wolff c43b9ea104
[core] Revise "do not delete system package" check
Fixed some smaller issues and added the missing
logging feature.
2020-07-13 00:55:23 +02:00
William Cedervall 52d5d9d98f
Only remove non system pkg
Added "configuration-layer//system-package?" based on package-delete
(pretty much a direct partial copy-paste) so that
"configuration-layer//package-delete" can check if package is a
system package

No crash on spacemacs boot (with unused system-package present).
Though right now "configuration-layer//package-delete" only ignores system
packages instead of reporting them. Not entierly what @nbraud proposed,
but insufficient err-logging is a significantly smaller issue.

Fixes #11160
2020-07-13 00:55:23 +02:00
Mihaly Barasz 0f7693c4d5 Fix spacelpa public key file name
This fixes the issue that users have to import the public key manually
to pass spacelpa archive verification. See #12652
2020-07-01 21:11:33 +02:00
Aaron Jensen 840b431cf6
configuration: fix redundant update checking
Fixes #13114
2020-02-09 19:23:19 +00:00
Ag Ibragimov 7f92a4388d fix: ignore nil values in dotspacemacs-configuration-layers
otherwise it throws warnings when layers introduced imperatively, e.g.:

dotspacemacs-configuration-layers
`(
  ,(when (eq system-type 'darwin) 'osx)
  ,(when (eq system-type 'gnu/linux) 'exwm))
2020-02-05 20:54:13 +01:00
duianto 623ca354fe
Fix home buffer version and banner
- Removed the first line deletion.
This required the banners to have an empty first line.

- Removed the empty first line from the banners.

- Made sure that there is a single empty line between:
  - The Version and Banner.
  - Banner and Buttons ([?] [Homepage] ...).
  - Version and Buttons (when the banner is hidden).

- Reordered the backend version insertion function call
to match the frontend Spacemacs buffer order.
  - version
  - banner
  - buttons

Before it added:
- the banner
- then the buffers first line was removed
- then the version was added to the first line
- then the buttons were added at the bottom of the buffer
(there are more things added after the buttons,
but they haven't been changed by this commit).

- Removed the version insertion call in:
core/core-spacemacs-buffer.el

The changes above caused the version to appear twice
in the Spacemacs home buffer on startup.

I'm not sure if it has/had other uses.

This seems to be where it was first added to:
core-configuration-layer.el:
core: restore default mode line in home buffer
77161bd591

It was slightly modified in this commit:
core: defer distro insertion in home buffer
cd50d9c069

Here it was joined with the banner:
Fix version injection in home buffer
  Don't inject version if banner is nil
a764eb4eb9

core: condensed versions into one string in left-hand side
  spacemacs-version@emacs-version (distribution)
627e934453

- I had not seen that the version was joined with the
banner on purpose until now.

It seemed useful to still be able to see the versions
if one just wanted to hide the banner.

Therefore I opened this PR (it's been cherry-picked):
Uncouple version from banner in spacemacs buffer #11901
https://github.com/syl20bnr/spacemacs/pull/11901

If there's a good reason to combine them again,
then the changes can be reverted.
2019-12-03 20:44:22 +00:00
syl20bnr 584392bd92 [core] Fix layer dependencies based on layer variables
There was a edge case with the declaration of the `lsp` layer in `layers.el`
files.
The `hy` layer depends on the `python` layer which in turn depends on the `lsp`
layer if and only if the `python-backend` layer variable is set to `lsp`.
When the `hy` layer was declared first then it declares the `python` layer
without its layer variables, thus the `lsp` layer was not declared because the
`python-backend` variable was not set.

The fix is to gather all the layer dependencies and resolve them only after all
the used layers have been declared.

* new function `configuration-layer/declare-layer-dependencies`
* replace all calls to `configuration-layer/declare-layer` by the new function
  except for distribution layers (we declare layer dependencies right away in
  distribution layers)
2019-09-30 02:00:48 -04:00
syl20bnr cfb12e9bd5 [core] Improve spacelpa archive verification
* modified function configuration-layer//stable-elpa-verify-archive

Add a `fatal-err` variable to handle critical erros that prevent the
verification to be attempted.
Use the function `epg-verify-file` instead of `epg-verify-string` which seems
to give more reliable results.
2019-08-24 22:50:39 -04:00
syl20bnr 512a1e3b0c [core] Fix some typos in stable ELPA verification prompts 2019-08-23 13:16:39 -04:00
syl20bnr c975fc64ca [core] Improve spacelpa verification and error detection
* modified function configuration-layer//stable-elpa-verify-archive

Gather errors along the verification steps and make a single call to
configuration-layer//stable-elpa-ask-to-continue at the end of the function.

Improve the scope of catched errors so now the users should be prompted when
GPG is not available on the system.
2019-08-23 12:12:51 -04:00
syl20bnr f21abcdcf3 [core] Rewrite of the stable ELPA initialization code
* new function configuration-layer//stable-elpa-disable-repository
* new function configuration-layer//stable-elpa-update-version-file
* new function configuration-layer//stable-elpa-delete-temporary-files
* new function configuration-layer//stable-elpa-ask-to-continue
* new function configuration-layer//stable-elpa-verify-archive
* new function configuration-layer//stable-elpa-disable-repository
* rename function configuration-layer/stable-elpa-download-tarball to
                  configuration-layer//stable-elpa-download-tarball
* new function configuration-layer/stable-elpa-init
* make the function configuration-layer/stable-elpa-version interactive

configuration-layer/stable-elpa-init is called from init.el.
This function then calls the other new function in more clear fashion than the
previous complicated configuration-layer/stable-elpa-download-tarball

The users are now prompt if they want to install the stable ELPA repository when
the verification of the archive failed.
2019-08-23 00:51:21 -04:00
syl20bnr 4a8a8b04af [core] Remove unecessary check for gzip executable on Windows
Turns out we don't use it at all. Also tar.exe is part of the standard
MS Windows 10 distribution, it is installed in system32 directory.
2019-08-21 22:44:32 -04:00
syl20bnr b800694d32 [core] Add function for generic error about not found executable
* new function configuration-layer//executable-not-found-error
* use new function for tar and gzip not found errors
2019-08-21 22:30:24 -04:00
syl20bnr cfc1057af0 core: fix spacelpa support
* new variable configuration-layer-stable-elpa-archive
* add missing sub-directory "packages"
* update .lock file with above changes and bump to archive version 0.400
2019-08-21 19:53:58 -04:00
syl20bnr 0c39f63c66 [dump] Move some code to dump-init.el 2019-07-26 22:44:11 -04:00
syl20bnr f51fc8e13b [core] Add pre-dump for layers and function spacemacs/dump-modes 2019-07-26 16:32:27 -04:00