all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Set the HOME environment variable in Emacs package debug script instead of using it on command line.
@ 2021-10-26  2:01 Hongyi Zhao
  2021-10-26  5:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 10+ messages in thread
From: Hongyi Zhao @ 2021-10-26  2:01 UTC (permalink / raw)
  To: help-gnu-emacs

I've writtent the following Emacs package debug script which can be
run by `$ bash /home/werner/.emacs.d/debug/.emacs.d/init.el`:

```emacs-lisp
#!/usr/bin/env bash
:;# $ realpath init.el
:;# /home/werner/.emacs.d/debug/.emacs.d/init.el
:; HOME=$(dirname $(dirname $(realpath -e $0))) proxychains-ng-socks5
/usr/local/bin/emacs -- "$@"; exit

;;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))
```
I want to set the HOME environment variable in the lisp code, so it
will not disturb the system environment variable settings.

Any tips for achieving this goal?

Regards,
HZ



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-10-27  0:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-26  2:01 Set the HOME environment variable in Emacs package debug script instead of using it on command line Hongyi Zhao
2021-10-26  5:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26  9:57   ` Hongyi Zhao
2021-10-26 11:25     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 12:37       ` Hongyi Zhao
2021-10-26 12:49         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-26 13:39           ` Hongyi Zhao
2021-10-26 13:58             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-27  0:40               ` Hongyi Zhao
2021-10-27  0:52                 ` Emanuel Berg via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.