spacemacs/core
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
..
aprilfool Happy New Year 2018! 2018-01-04 02:00:25 -05:00
banners Add inverted Dogemacs banner for dark themes 2019-06-02 21:42:32 +02:00
gnupg [core] Update spacemacs GPG public key 2019-08-23 12:39:22 -04:00
info core: change scope of elpa stable variables 2017-11-01 23:23:34 -04:00
libs [core] Environment variable caching fixes 2019-11-03 22:25:05 +01:00
templates [core] Add lsp layer to .spacemacs template 2019-09-30 00:50:01 -04:00
core-command-line.el dump: add command line parameter --force-dump 2018-05-20 03:58:48 -04:00
core-configuration-layer.el [core] Fix layer dependencies based on layer variables 2019-09-30 02:00:48 -04:00
core-custom-settings.el custom setting: don't write to dotfile before loading all of them 2019-02-18 14:21:06 -05:00
core-debug.el Fix various typos 2018-05-23 22:12:30 -04:00
core-display-init.el Happy New Year 2018! 2018-01-04 02:00:25 -05:00
core-documentation.el fix links 2019-05-18 13:25:44 +03:00
core-dotspacemacs.el Update references to macOS 2019-10-13 12:04:40 +02:00
core-dumper.el Fix regular loading of Emacs (i.e. without a dump file) 2019-07-26 23:20:18 -04:00
core-emacs-backports.el [core] Better work-around for GnuTLS bug with emacs 26.1 and 26.2 2019-09-14 22:15:53 -04:00
core-env.el [core] Environment variable caching fixes 2019-11-03 22:25:05 +01:00
core-fonts-support.el Add properties for mode-line theme, remove powerline-scale 2018-01-16 22:59:29 -05:00
core-funcs.el Optimise spacemacs/last-error further 2019-11-03 20:35:49 +01:00
core-hooks.el core: fix potential undefined function error with transient hooks 2018-07-04 15:38:15 -04:00
core-jump.el core: add reference handler as per jump handler 2019-07-15 12:28:04 +02:00
core-keybindings.el Happy New Year 2018! 2018-01-04 02:00:25 -05:00
core-load-paths.el core: rework environment variables and PATH management 2018-06-25 02:55:28 -04:00
core-micro-state.el Propose a couple of spelling corrections 2018-08-02 00:20:06 +03:00
core-progress-bar.el core: refactor the progress bar 2018-06-10 02:32:29 -04:00
core-release-management.el Propose a couple of spelling corrections 2018-08-02 00:20:06 +03:00
core-spacemacs-buffer.el Revert "colorized files and folders in spacemacs buffer lists" 2019-07-22 00:08:58 +02:00
core-spacemacs.el Revert "Improve theme handling to support themes using spacemacs-theme custom api" 2019-08-17 11:07:48 +02:00
core-themes-support.el Revert "[themes-megapack] Add ewal-spacemacs-themes to themes-megapack layer." 2019-08-26 19:58:34 +02:00
core-toggle.el Add toggle key docs to docstring and which-key mouseover 2019-08-06 23:38:53 +02:00
core-transient-state.el Rename spacemacs/mplist-get functions to be more descriptive 2018-06-14 00:15:49 -04:00
core-use-package-ext.el Rename spacemacs/mplist-get functions to be more descriptive 2018-06-14 00:15:49 -04:00
core-versions.el dump: revert minimum version to 25.1 2018-05-20 03:58:48 -04:00