unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "João Távora" <joaotavora@gmail.com>,
	"Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: aqua0210@foxmail.com, 61014@debbugs.gnu.org
Subject: bug#61014: 29.0.60; flymake-mode stderr warning is confusing when edit the init.el or eary-init.el
Date: Sat, 28 Jan 2023 13:21:14 +0200	[thread overview]
Message-ID: <83r0veaor9.fsf@gnu.org> (raw)
In-Reply-To: <87fsbxlf54.fsf@gmail.com> (message from João Távora on Thu, 26 Jan 2023 11:16:39 +0000)

> From: João Távora <joaotavora@gmail.com>
> Cc: Eason Huang <aqua0210@foxmail.com>,  61014@debbugs.gnu.org
> Date: Thu, 26 Jan 2023 11:16:39 +0000
> 
> 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.

How about disabling this warning in non-interactive sessions?  That
should be easy, and I don't see why we would want to emit such a
warning in non-interactive sessions anyway.

Stefan, am I missing something?





  reply	other threads:[~2023-01-28 11:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23  2:15 bug#61014: 29.0.60; flymake-mode stderr warning is confusing when edit the init.el or eary-init.el Eason Huang
2023-01-23 13:09 ` Eli Zaretskii
2023-01-26 11:16   ` João Távora
2023-01-28 11:21     ` Eli Zaretskii [this message]
2023-02-02 10:25       ` Eli Zaretskii
2023-02-02 10:50         ` João Távora
2023-02-02 16:01       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-02 17:15         ` Eli Zaretskii
2023-02-12 12:22         ` Eli Zaretskii
2023-02-12 14:45           ` Eason Huang
2023-02-12 14:50             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r0veaor9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=61014@debbugs.gnu.org \
    --cc=aqua0210@foxmail.com \
    --cc=joaotavora@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).