From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.devel Subject: Re: [feature/internal-msys] thoughts of a more function windows package Date: Mon, 25 Jan 2021 20:01:56 +0000 Message-ID: References: <87pn2dq3xv.fsf@russet.org.uk> <83ft39hnk1.fsf@gnu.org> <87h7nppzjy.fsf@russet.org.uk> <838s90hhb6.fsf@gnu.org> <87zh1gircl.fsf@russet.org.uk> <83turofw8r.fsf@gnu.org> <87sg6v76fd.fsf_-_@russet.org.uk> <83czxy7530.fsf@gnu.org> <87zh12grzh.fsf@russet.org.uk> <83wnw659kw.fsf@gnu.org> <87o8higedm.fsf@russet.org.uk> <83sg6t5t86.fsf@gnu.org> <87bldh7xue.fsf@russet.org.uk> <83bldg6h0o.fsf@gnu.org> <87a6sygf0s.fsf@russet.org.uk> <83lfch2gd4.fsf@gnu.org> 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="30758"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Development , Phillip Lord To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 25 21:07:54 2021 Return-path: Envelope-to: ged-emacs-devel@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 1l489S-0007nS-A1 for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jan 2021 21:07:54 +0100 Original-Received: from localhost ([::1]:34504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l489R-0002vN-9e for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Jan 2021 15:07:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l484F-0001DX-9A for emacs-devel@gnu.org; Mon, 25 Jan 2021 15:02:31 -0500 Original-Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:43737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4848-0006wg-U0; Mon, 25 Jan 2021 15:02:27 -0500 Original-Received: by mail-ej1-x62a.google.com with SMTP id a10so19813065ejg.10; Mon, 25 Jan 2021 12:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UjlsLXoSjGoZAVU+c8b+CWqmj357P3G6eSKTUyt7oMs=; b=EgXPvjJyTAhZB7KNJGokSmZO2pdXaYUNocp7Wb4tdmmZk0KQK7cFhaR6IS3UE00OcD 1Q/EeQR63uzC+HJSPVBDha3TWiQks+6/zD+xgIrH5hQdAAEA5qOu8bB4d/CnapmBpq1F lkMMhdQZsV+xiNfJhIZ7VGb/WTlE/QTyk3E44llnX8iwTaTapnPvP246rmBG8eoETfWO 5EgktsqMGrRqfcJHfgX1SdgzrjH+egB4CZtdqcIsBRdnBZ0aG6Dt4Msh49mJfASCGEE0 08C1Wi+lSIBXXe0GX84UYnetgCp78c3c25wRSQG4u+PLOGYAk07dK/wl7xAHrOencWfB qvQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UjlsLXoSjGoZAVU+c8b+CWqmj357P3G6eSKTUyt7oMs=; b=dCnly4j8c++tVvCdhHP4K5FArQ1YgU82K+FkHBm5DfmW9qMUxB4N97sjv8HMFwrnnc JAckLFmfWpKqXkSPYj/kutb+iX0DLCBSIYZpX7Wl5wqL6MJJX2krhXYEXhWvmxZZNFWi bQKxBIUCLH6SFzjoj6SSVmmHTJjEZ5dHofFTFeQHm+9HV6AfrZfuL4MqXUU0zT5IlleI dcgThgnIgVtgg9WCHvG5XsF7VCWetDC6rBgRMglU2riE5aoQcMjlrhy5aZYYbTMImtFX 94MOkOqY0lC4QIU0j+HUdBpqn1rz3y6VCf0U0+DEhAsQtTj47A+HfA2XsK50oe4+7lGz duHQ== X-Gm-Message-State: AOAM531wWUersPD7fSIiOKLsianplc5QMENyC6PlCt0YQ4+zpbqOmO5B M/6k5LuHCd6X/AP7HnAncySlDj7atClLy4dkQglfN+vH28w= X-Google-Smtp-Source: ABdhPJydE6w8xmQ6yPGucKgAxdUPR4fHZV4wtZEPN56oMw6fqwTZKm1yFn3W+GhkZL9cQjH0XrWc7C97+46nL9tPVJM= X-Received: by 2002:a17:906:86cf:: with SMTP id j15mr1393215ejy.216.1611604942651; Mon, 25 Jan 2021 12:02:22 -0800 (PST) In-Reply-To: <83lfch2gd4.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=rcopley@gmail.com; helo=mail-ej1-x62a.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: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263417 Archived-At: On Mon, 25 Jan 2021 at 15:21, Eli Zaretskii wrote: > > From: Phillip Lord > > Eli Zaretskii writes: > > >> Would it be easier to have Emacs allow me to successfully update PATH > > >> during run? > > > > > > Update how? > > > > Using some magic that doesn't exist at the current time. I mean a way > > like did (by fiddling with setenv) that doesn't suffer the problems that > > it causes. > > I don't think this magic can exist. But if someone knows, let them > speak up. No magic is needed. Just change exec-path and the PATH environment variable matching values, not forgetting to add Emacs' libexec dir to exec-path. I have code in my init file to select different paths, because different toolchains that I want to run in Emacs require different incompatible paths. It doesn't cause any problems, and everything behaves as you expect. This works for me because I install emacs into the /mingw64/bin directory of MSYS2 (which is what "make install" does by default, in the MSYS2/MINGW64 shell), so emacs can never fail to find its required DLLs at runtime, nor find the wrong ones. (The LoadLibrary function always searches the exe's directory and the System32 directory.) The installer should make sure all the necessary DLLs are in the same directory as emacs.exe, too, for the same reason. When running emacs from the /src directory, features that load DLLs at runtime don't work properly unless the correct DLLs are found on the path, but there's nothing mysterious, magical or unexpected about that. By the way, the MSYS2 builds of Emacs no longer apply any significant patches. There's just one, which is intended to disable ImageMagick, and which is superfluous but harmless. I hope we don't do anything that breaks the ability to build and install Emacs into an existing MSYS2 tree using "./autogen.sh && ./configure && make && make install", as their PKGBUILD script does.