From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: msys2 build path problems + copy-paste english results in chinese characters Date: Thu, 02 Dec 2021 20:05:30 +0200 Message-ID: <83bl1yanmd.fsf@gnu.org> References: <83a6hks26v.fsf@gnu.org> <83pmqgqi6e.fsf@gnu.org> <87czmghqui.fsf@telefonica.net> <834k7rqxru.fsf@gnu.org> <8735nbibqe.fsf@telefonica.net> <83lf13pbib.fsf@gnu.org> <87tufrgglg.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40845"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 02 19:08:21 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 1msqVI-000ARp-Tz for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Dec 2021 19:08:21 +0100 Original-Received: from localhost ([::1]:52830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msqVH-0006jP-BU for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Dec 2021 13:08:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msqSl-00050C-MW for emacs-devel@gnu.org; Thu, 02 Dec 2021 13:05:43 -0500 Original-Received: from [2001:470:142:3::e] (port=54866 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msqSk-00071J-Vk; Thu, 02 Dec 2021 13:05:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=vOFbdnNX2pqPjPoEU87QZbFuyygnu/Wy33NpwAb+tVE=; b=NOPJpsuZRYN8mu3g5CiD FbcHFBdPVeNFqIwqSF5kikfIkC1Ij1qGThMRiC1PHIfipmGLUHCboUunr7MtjTVqWRJDySIMJKr2Y 81MpjEZMmckPbFXCE7B0MvO2lCL25chOIY16OxIP+Dk1qXsNBBXdXP2cf8drRBKN0DdyEd8wz/+fQ MAOWzBH9TJUX6S8ePcYYu1AGsccAVpT8JDZAxVQQtcjoyqkIyek+hI3NPho4Yu4Py3DA/2crB6/Dh aSO6Ytk5SQ1ZjvJxgXdo3gjRBM0VikhuJVx1M5QLvwqDbBnug9FAvNKBMZi4k6NXDNKYiGhSA8pu0 JifedqoH6LCgxQ==; Original-Received: from [87.69.77.57] (port=2364 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msqSk-0000ZJ-OG; Thu, 02 Dec 2021 13:05:43 -0500 In-Reply-To: <87tufrgglg.fsf@telefonica.net> (message from =?utf-8?Q?=C3=93scar?= Fuentes on Thu, 02 Dec 2021 16:40:43 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:280772 Archived-At: > From: Óscar Fuentes > Date: Thu, 02 Dec 2021 16:40:43 +0100 > > >> If you know a better approach > > > > Yes, change PATH outside of Emacs. Then live happily ever after. > > That's precisely what I prefer to avoid. There's no need to avoid it. > > One failure is that you put directories with forward slashes into the > > environment of the programs you invoke, and not all of them like that > > (although most do cope with that). > > Maybe if an application parses PATH on a broken way. So far I found > none. I've definitely seen a few in the past. > > Another problem is that after this, PATH used by Emacs and PATH used > > by sub-processes is different. > > I don't know how this could be a problem, even less when emacs.exe lives > in the directory added to PATH. It could be a problem because sub-processes will be able to find programs that Emacs might not find. > > Yet another problem, specific to invoking MSYS2 commands, is that the > > directory might be incorrectly encoded (if it includes non-ASCII > > characters), since MSYS2 programs expect UTF-8 encoding AFAIK, whereas > > Emacs encodes it using the system codepage. > > Well, adding directories containing MSYS2/Cygwin applications to PATH is > risky, something to avoid. Fortunately, on a MSYS2 setup MSYS2 and > mingw-w64 binaries are strictly separated. But the OP definitely wanted MSYS2 executables, that's why he invoked Emacs from Bash (which is an MSYS2 program).