Commit graph

1546 commits

Author SHA1 Message Date
kimr da80634370
converted cl to cl-lib 2019-12-14 20:20:51 +00:00
duianto a52fc88b16
Fix SPC-TAB in spacemacs-base distribution
Problem:
The variable spacemacs-layouts-restrict-spc-tab is defined in:
~/.emacs.d/layers/+spacemacs/spacemacs-layouts/config.el
But the spacemacs-layouts layer isn't loaded by default in spacemacs-base.

Solution:
Check if the variable is bound.
2019-12-08 11:12:35 +01:00
duianto 7feed6215d
Prevent Spacemacs buffer redisplay in filetree window 2019-12-06 22:30:08 +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
Muneeb Shaikh f3f2db8315 Update the list of solarized themes
Upstream has added a blend of solaized themes with different color palettes.
2019-12-02 18:41:23 +01:00
Maximilian Wolff dd7a5d98be
Revise helm recompile package action and bind recompile-elpa
The newly introduced function to compile an elpa package
was very much redundant with the existing recompile-elpa function.

I have adapted recompile-elpa so that it can be used for the helm action too.

In addition I have bound recompile-elpa to `SPC c C-c` to allow users to
easily recompile their entire elpa directory if the need arises.

I have also removed the error handling in the helm action in favor of
standard error reporting via the *Compile-Log* buffer.
2019-11-24 02:07:15 +01:00
Gia Thanh Vuong 94de754504
[core] [helm] add action to recompile an elpa package
How to use: `SCP h p` select package then `F3` or `C-z` and choose `Recompile`

Motivation: Some packages when compiling need other packages to be loaded first.
The pacakage maintainers should make sure of this requirement but sommetimes
they don't. It also doesn't help when Spacemacs is lazy loading and compiles
updated pacakges on startup. So the manual fix for this problem is recompile the
package once Spacemacs has fully loaded. This requires user go to the package
install location to delete elc files and then do a `spacemacs/recompile-elpa`.
This commit will do that chore for them.

This will make fixing the problem with `org-plus-contrib` or `dumb-jump` update
every now and then easier.
2019-11-23 23:40:50 +01:00
Miciah Masters a55df96caa [core] Environment variable caching fixes
Fix several problems with environment variable caching.

First, if a shell printed extra output besides the command output,
spacemacs//init-spacemacs-env included the extra output in .spacemacs.env.
For example, a login shell could print a motd, which would be erroneously
included in .spacemacs.env.  To avoid this, spacemacs//init-spacemacs-env
now redirects the command output to a temporary file and then reads the
file.

Second, spacemacs//init-spacemacs-env sorted lines using the entire
"name=value" string for each line whereas the correct behavior is to sort
only on the "name" part.  To fix this, spacemacs//init-spacemacs-env now
uses sort-regexp-fields with an appropriate regexp to match the "name" part
and ignore the "value" part.

Third, although load-env-vars-set-env added all PATH settings in
.spacemacs.env to exec-path, it set PATH to the first PATH setting in
.spacemacs.env.  Now load-env-vars-set-env sets PATH from exec-path so that
it will reflect that combined value.

Fourth, load-env-vars-set-env set exec-path and PATH without consideration
to the operating system's directory separator.  Now load-env-vars-set-env
converts backslashes to forward slashes when adding path entries to
exec-path and converts forward slashes to backslashes when setting PATH on
platforms that use backslashes.

Fifth, load-env-vars-set-env now normalizes exec-path by deleting trailing
slashes from path entries, converting drive letters in path entries to
lower-case, and deleting duplicate path entries.

Sixth, Spacemacs no longer uses exec-path-from-shell, but a changelog entry
said that it did.  This commit corrects the changelog entry, deletes
another outdated entry, and merges two entries that covered the same
functionality.

Finally, this commit corrects several typos and tries to improve wording in
several docstrings, messages, and comments.

* CHANGELOG.develop: Delete mention of exec-path-from-shell, which
Spacemacs no longer uses by default.  Delete mention of
dotspacemacs-import-env-vars-from-shell and
dotspacemacs-import-env-vars-shell-file-name, which no longer exist.
Merge entries about synchronizing environment variables.
* core/core-env.el (spacemacs-ignored-environment-variables): Fix typos and
mention that the strings are regexps that are matched against the names of
environment variables.
(spacemacs//init-spacemacs-env): Use a temporary file rather than standard
output in order to avoid getting motd and other noise.  Sort lines using
only environment variables' names, not their values.  Better describe the
behavior with respect to spacemacs-ignored-environment-variables, duplicate
settings, and PATH.  Try to make wording clearer.
(spacemacs/edit-env): Fix typos in the docstring.
* core/libs/load-env-vars.el (load-env-vars-set-env): Fix typos in the
docstring.  Delete trailing slashes from path entries in exec-path, convert
drive letters to lower-case, delete duplicate path entries, and convert
backslashes to forward slashes when setting exec-path.  Set PATH from
exec-path, converting forward slashes to backslashes on platforms that use
backslashes.
2019-11-03 22:25:05 +01:00
smile13241324 5fdb89d61d Optimise spacemacs/last-error further
Noticed that I have used if instead of when
and added an obsolete progn.
2019-11-03 20:35:49 +01:00
smile13241324 e74fc70de8 Revise spacemacs/last-error function and change key binding 2019-11-03 20:14:10 +01:00
Benoit Coste 93ac5203b4 Add function 'spacemacs/last-error
Sometimes it is useful to go directly to the last error message in the buffer.
This function recursively calls 'spacemacs/next-error until the last error is
reached.
The binding "SPC e l" is associated with it
2019-11-03 20:14:10 +01:00
Miciah Masters 552fd5953c Update references to macOS
Apple renamed "Mac OS X" to "OS X" in 2012 and then to "macOS" in 2016.
Update references to use the current name.
2019-10-13 12:04:40 +02: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 c2443ef7d0 [core] Add lsp layer to .spacemacs template 2019-09-30 00:50:01 -04:00
syl20bnr 42cc5f25f3 [core] Better work-around for GnuTLS bug with emacs 26.1 and 26.2
Use the variable libgnutls-version.
Thanks to CJex.
2019-09-14 22:15:53 -04:00
smile13241324 48ffd37594 Revert "[themes-megapack] Add ewal-spacemacs-themes to themes-megapack layer."
This reverts commit 883cf97308.
2019-08-26 19:58:34 +02: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 efb2e3b96f [core] Update spacemacs GPG public key 2019-08-23 12:39:22 -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 81d08a6b35 [core] Make spacelpa archive sign verification the default 2019-08-22 15:46:56 -04:00
syl20bnr 427c01c27a [core] Offline work-around for GnuTLS Emacs bug
This assumes that gnutls-cli is available on the system. The work-around won't
be applied if this executable is not available.
2019-08-22 15:11:01 -04:00
syl20bnr 8e469cb391 [core] Remove outdated comment in .spacemacs.template 2019-08-22 13:21:30 -04:00
syl20bnr b12bc7c857 [core] Avoid graphical glitches with empty modeline
It is important that the stable elpa download message in the modeline is always
visible to the user as the donwload can take a while depending on the connection
speed.
2019-08-21 23:30:55 -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 e1e972ec7c core: add startup message for GnuTLS work-around 2019-08-21 19:58:09 -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
Dominic Pearson 5d01efbb6d doom-themes: correct theme entries.
Add/remove missing themes from core/core-themes-support.el.
2019-08-21 16:14:50 +02:00
syl20bnr 9fc43ee9cd Remove commented code from previous commit. 2019-08-20 22:47:53 -04:00
syl20bnr 1541f7f515 Make TLS error hack to work offline 2019-08-20 22:34:54 -04:00
syl20bnr 25f639e403 Better hack to prevent TLS issues with Emacs 26.1 and 26.2
Make a test request to check if the bug happens.
If the bug happens then set gnutls-algorithm-priority to a working value.
2019-08-20 15:32:47 -04:00
syl20bnr d19d91f173 Fix Package undo-tree is unavailable
Backport bug fix from 26.3
Fixes #12633
2019-08-19 14:25:22 -04:00
duianto ae51fd7a77 Revert "Improve theme handling to support themes using spacemacs-theme custom api"
This reverts commit 5f308b0306.

This message is shown on startup:
spacemacs/startup-hook: Symbol’s value as variable is void: spacemacs-theme-custom-colors
and it broke several things.
2019-08-17 11:07:48 +02:00
smile13241324 5f308b0306 Improve theme handling to support themes using spacemacs-theme custom api 2019-08-16 23:05:42 +02:00
Uros Perisic 883cf97308 [themes-megapack] Add ewal-spacemacs-themes to themes-megapack layer.
Currently, the theme also modifies `spacemacs-dark` if also loaded in
`dotspacemacs-themes`. A
[fix](https://github.com/nashamri/spacemacs-theme/pull/144) for this is on it's
way upstream to `spacemacs-theme`, but the maintainer already gave their
[blessing](https://github.com/nashamri/spacemacs-theme/issues/139).
2019-08-14 22:33:25 +02:00
Thanh Vuong 0e9866efce spacemacs-layout layer: limit commmands to work within layouts
Add options to restrict some functions to current layout's buffers

Thanks smile13241324 and duianto for suggestions and fixing typos
2019-08-12 21:41:12 +02:00
duianto fba9447cfe Add toggle key docs to docstring and which-key mouseover
Added spacemacs|add-toggle key binding documentation strings:
- To the toggle keys function docstring
- And to it's which-key mouseover minibuffer text
2019-08-06 23:38:53 +02:00
duianto 0d4803b1ea Fix formatting core/core-dotspacemacs.el
Fixed:
docstring indentation
limited lines to 80 chars
missing newline warnings
etc.
2019-08-06 17:59:06 +02:00
yqu212 53a0dd85bf Remove dotspacemacs-verbose-loading from .spacemacs.template 2019-08-05 19:10:48 +02:00
smile13241324 85fca8f323 Restore winner-mode auto start without breaking dumping
As winner-mode was moved from init.el to dump-init.el winner-mode
was not longer properly started for non-dumped emacs sessions.
Having winner-mode auto activate at startup did fix the issue
for non-dumping users but in turn broke the dumping process.

I have now moved the necessary winner-mode init to
spacemacs/setup-startup-hook which is only called
in the non-dumping case. To allow customizations I activate
winner-mode prior to loading user-init this will allow users
to deactivate winner-mode in the dotfile and fix ediff themselves
if this is wished for.
2019-08-04 14:49:10 +02:00
smile13241324 421feed1f8 Update spacemacs-theme to remove conflicts with newer themes 2019-08-02 20:20:53 +02:00
nshadov 0e0319968d Remove Unicode triple dot in favor of ASCII one
Remove Unicode triple dot in favor of ASCII one because it breaks
initialization with message:
"*temp file*" default encoding cannot encode
2019-07-30 17:25:42 +02:00
syl20bnr e074784237 Fix regular loading of Emacs (i.e. without a dump file) 2019-07-26 23:20:18 -04:00
syl20bnr b7266b38b5 [dump] Add functions to save and restore load-path 2019-07-26 23:00:47 -04:00
syl20bnr 244ae42d6a [dump] Add new macro to delay execution after dump is loaded
New macro spacemacs|unless-dumping-and-eval-after-loaded-dump
2019-07-26 22:45:12 -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
syl20bnr cfd2b110f2 Update documentation and parameters for the portable dumper 2019-07-26 15:36:08 -04:00