From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Set the HOME environment variable in Emacs package debug script instead of using it on command line. Date: Tue, 26 Oct 2021 10:01:19 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19014"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 26 04:02:23 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfBnD-0004iK-Bx for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 26 Oct 2021 04:02:23 +0200 Original-Received: from localhost ([::1]:57286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfBnB-00035M-Ud for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 25 Oct 2021 22:02:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfBmR-00035E-RE for help-gnu-emacs@gnu.org; Mon, 25 Oct 2021 22:01:36 -0400 Original-Received: from mail-ua1-x932.google.com ([2607:f8b0:4864:20::932]:34743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfBmO-00058X-Ec for help-gnu-emacs@gnu.org; Mon, 25 Oct 2021 22:01:35 -0400 Original-Received: by mail-ua1-x932.google.com with SMTP id h4so26129606uaw.1 for ; Mon, 25 Oct 2021 19:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=lv+V/kJiJPi3mqmYkKmfpSaVMP40Ri4cYlbZQLAaBOA=; b=n5rvJO23eSToHlja1T290TCrI2LJrRxBYihZlJYkV19wgG1F5gDnRwM+viUNPwJmNs qXj5kaQYjjJ76IR1U/pw7nibD1Y06maNbOEKkH58GKpq7HScx3WJjOvjQecHFSoTW3Qi d7hRxl4O3A0wYAWzq7QtLP1Jw85dokLpytNWBlKENVzXszlAis3EsAGm7MFjBcR6ypPw 20lOdXDrlDVGbqz1ZbBQe2dCk4S+6YMiVE/17/L8XfOifhpRA2JH4SBIFnyoZ6S6DmN6 djvSzBx+EswR9Q3lWYrDT2ldnDHzbKBbIv1EROiwEpAkuXsUEH7TtWxpCMaH37Galn4z 4zBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lv+V/kJiJPi3mqmYkKmfpSaVMP40Ri4cYlbZQLAaBOA=; b=Jt8hYu5ruyox+nBywpp8CKGh4h/oUWUSrqIC/41RETiMaAuSo8VBw2DL2vCNrHrPnU Pb6tvRMxmG7yHi89A1uPaSyRO19k5B84zinqSfFw3tkN4ukv9VM4utihGc+SSdr35Fs/ 6Le6QemUTQrb6oc529LmDiupuN4m7ZZjut7YLArhBaquKp4dnSr8i7j/8LL27EA4cAxq 4MMBaRJR53CuEpYII7x9y1pkjp4fCgmzlHlxHYE616lGRpMXNzANa3G+MpATc510ILV0 zm2+ER6gOfzr5aQjl4DHbPEOR1xwZKtptK26tF7Yhly6I7tVY8b+ZGHILKZatBK15IVJ F5Bg== X-Gm-Message-State: AOAM530JOi90f/xaaMitd+OaRATy8bCEBqIvi5SPqmYieT/DKovruX7b 6N/WXqE5WrN29q8ybWXbK4ygeoR6orBPTQHlSnzTGPUKIWnieYJL X-Google-Smtp-Source: ABdhPJyY5BZyB5m6kf/ztns89oBd7O0Yqg6w1XxE2fzuQs1vPgU0LVGMzDtGZaVPV0hFmxAFB5udTWFjQ1TkYi/eAMs= X-Received: by 2002:a67:f1ca:: with SMTP id v10mr17329854vsm.55.1635213690748; Mon, 25 Oct 2021 19:01:30 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::932; envelope-from=hongyi.zhao@gmail.com; helo=mail-ua1-x932.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134169 Archived-At: 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