[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Set the HOME environment variable in Emacs package debug script inst
From: |
Hongyi Zhao |
Subject: |
Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line. |
Date: |
Tue, 26 Oct 2021 17:57:10 +0800 |
On Tue, Oct 26, 2021 at 1:05 PM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > I want to set the HOME environment variable in the lisp
> > code, so it will not disturb the system environment
> > variable settings.
>
> Don't understand (don't want to :)) but there is `setenv' FYI.
I've set the new HOME with the following method, but it doesn't get
the same testing result as reported here [1]:
#!/usr/bin/env bash
:; env myhome=$(dirname $(dirname $(realpath -e $0)))
proxychains-ng-socks5 /usr/local/bin/emacs -Q --load $(realpath -e $0)
-- "$@"; exit
(setenv "HOME" (substitute-in-file-name "${myhome}"))
;;Bootstrap straight
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el"
user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
(use-package company
:demand t
:hook
(after-init . global-company-mode))
[1]
https://github.com/company-mode/company-mode/discussions/1248#discussioncomment-1535692
- Set the HOME environment variable in Emacs package debug script instead of using it on command line., Hongyi Zhao, 2021/10/25
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Emanuel Berg, 2021/10/26
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line.,
Hongyi Zhao <=
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Emanuel Berg, 2021/10/26
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Hongyi Zhao, 2021/10/26
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Emanuel Berg, 2021/10/26
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Hongyi Zhao, 2021/10/26
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Emanuel Berg, 2021/10/26
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Hongyi Zhao, 2021/10/26
- Re: Set the HOME environment variable in Emacs package debug script instead of using it on command line., Emanuel Berg, 2021/10/26