From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61014: 29.0.60; flymake-mode stderr warning is confusing when edit the init.el or eary-init.el Date: Thu, 26 Jan 2023 11:16:39 +0000 Message-ID: <87fsbxlf54.fsf@gmail.com> References: <831qnljt26.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34155"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eason Huang , 61014@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 26 12:16:15 2023 Return-path: Envelope-to: geb-bug-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 1pL0Ep-0008l3-0K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Jan 2023 12:16:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pL0Ed-0001F4-S8; Thu, 26 Jan 2023 06:16:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pL0Ec-0001Eg-5T for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 06:16:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pL0Eb-0000qn-U3 for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 06:16:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pL0Eb-0005FJ-J1 for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 06:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jan 2023 11:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61014 X-GNU-PR-Package: emacs Original-Received: via spool by 61014-submit@debbugs.gnu.org id=B61014.167473170820083 (code B ref 61014); Thu, 26 Jan 2023 11:16:01 +0000 Original-Received: (at 61014) by debbugs.gnu.org; 26 Jan 2023 11:15:08 +0000 Original-Received: from localhost ([127.0.0.1]:60878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL0Dj-0005Dq-GJ for submit@debbugs.gnu.org; Thu, 26 Jan 2023 06:15:07 -0500 Original-Received: from mail-wm1-f49.google.com ([209.85.128.49]:40547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL0Dh-0005Co-7u for 61014@debbugs.gnu.org; Thu, 26 Jan 2023 06:15:05 -0500 Original-Received: by mail-wm1-f49.google.com with SMTP id e19-20020a05600c439300b003db1cac0c1fso3020341wmn.5 for <61014@debbugs.gnu.org>; Thu, 26 Jan 2023 03:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XNw0vMHZTgg4+XxDvpoJ0XkF+a1exG4Jb49o+46ZhJA=; b=Ezt1bUogtQdDdYJu7BXvdv0P7VqCYdQ5RnN2NEz8nIPSJTQIHZYGbi6CCyEpVInj2O CYPERJk76QoNBmaPlHcodQ1eDW+UOzna7odUwzsrkeSUPJaGtKAQMKwZfMir53OoYM5u X2oI966g07Ob51anJ5Vr18YGGciel1JSYQaYZlSyrfYBmp6PLHoTF3vpynIELbjuBt8e ANsXd9sFjlE5z4tKV/PkF8t3RfEx7XDobgbDGj6PSAWtvcBhpdVMqFE6vV+8da4wyq46 OYqGHO6jykAALc7reeGqKaAGwJyC06xPPu8DfNqXnr9S8fjo1ELraFOx9UiWNxE2l5ve 1BBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XNw0vMHZTgg4+XxDvpoJ0XkF+a1exG4Jb49o+46ZhJA=; b=Wxal3onpRivgbbvhV4uz56JjWseroWNX3ta9SEMrm05hOhM3rMQQCkIku2ujl+vQJ1 jziWB8aGU688DcdZICtoMIgegNPLRT1X5nK+Nnk1yoY+ck0HkyNzKd/i8/wDXMalbkHP sqyywza3j0lCHolbbBxOCRP+oAkr9gGeQ8abBOG1sklenFkA+KFRrpjNw3XLKZ9uEZRP nhYJEaLOT0NTQEkVzovsgkRuMPP3QWIx2ArhhBFcss72KFy0k4oggwEeVSsah3lg6ziA kFxwrFw+IzS6/USjyQ8Kv0RMtO9qvnCZRf0XJD8QP4fZsUpTTQLiR+KynPz2epyP3arH cFAQ== X-Gm-Message-State: AFqh2kqREnH3nShogGgJZMgfsAii748FzR+29VFqTFIH/I53aQpeYZuq ljhP0bE0x+MlJ4PCou5A0Wy+pE62WlA= X-Google-Smtp-Source: AMrXdXuZHsXOHbquCI+bDJjO79b9FrXgiwXeiaAcgGJ8S/yyIlQjE+J/iaAe083k7QZxVdngUrgINA== X-Received: by 2002:a05:600c:b90:b0:3d8:e0d3:ee24 with SMTP id fl16-20020a05600c0b9000b003d8e0d3ee24mr35638862wmb.37.1674731698945; Thu, 26 Jan 2023 03:14:58 -0800 (PST) Original-Received: from krug ([87.196.72.119]) by smtp.gmail.com with ESMTPSA id i21-20020a1c5415000000b003dc23574bf4sm1181497wmb.7.2023.01.26.03.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 03:14:58 -0800 (PST) In-Reply-To: <831qnljt26.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Jan 2023 15:09:53 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254203 Archived-At: Eli Zaretskii writes: >> 1. create a new .emacs.d folder in the HOME directory >> 2. create an empty init.e and eary-init.el file in the .emacs.d folder >> 3. Start Emacs and C-x, C-f open the init.el or early.el >> 4. M-x flymake-mode, add some blank lines in the init.el or early.el >> 5. C-x b, Switch to buffer: *stderr of elisp-flymake-byte-compile* >> Now you will see the warnings. > > Jo=C3=A3o, any comments? The warning comes from startup.el, but it is > triggered by what Flymake does, AFAICT. Sorry for taking so long. Yes, I have comments. First of all, let's make it clear that this warning happens in a hidden Flymake buffer, an implementation detail which stores the stderr output of the subprocess(es) invoked. It does not appear in the interactive seeion's *Warnings* buffer. Unless I've missed something, the user is never confronted with it or hindered by it in any way. It seems to be largely benign. The warning only become visible when switching to a specific hidden buffer, like Eason did, and that operation is more accurately described as an introspection feature intended for developers, not for users. So, to summarize, the warning is coming from the subprocess non-interactive Emacs spawned by the interactive Emacs where flymake-mode is turned on. In the interactive Emacs session, nothing special is going on. The reason elisp-flymake-byte-compile-load-path has a default value of "./" is to help with the primary use case for the elisp-flymake-byte-compile Flymake backend: developing libraries that `require` other .el libraries. Such .el files often live in the same directory of the file/buffer you are editing with flymake-mode turned on. So when you're editing x/y/z/foo.el and you type (require 'foo-utils) elisp-flymake-byte-compile will understand that to syntax-check foo.el with the byte-compiler it needs to load "x/u/z/foo-utils.el". In Eason's case, the user happens to be editing a .el file in a special Emacs directory where such a use case is unlikely (though not impossible). So every few changes the user does to the buffer, flymake-mdoe will invoke a Emacs subprocess and give it this particular load-path initialization, that, in the specific acse of ~/.emacs.d, is slightly non-orthodox. And thus the subprocess emacs complains with this warning which is recorded in the special hidden buffer. If we're really worries about this, we could special-case this directory elisp-mode.el. But I also don't see what the harm could be. So my advice is to only do this when someone describes real harm. Jo=C3=A3o