From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Brieiev Newsgroups: gmane.emacs.bugs Subject: bug#48452: 28.0.50; flymake for elisp does not respect `load-path` Date: Thu, 14 Jul 2022 12:22:53 +0300 Message-ID: <87sfn4caky.fsf@gmail.com> References: <8735unafob.fsf@gmail.com> <877d4hs084.fsf@gnus.org> <87v8s1untg.fsf@gmail.com> <874jzlp12v.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8941"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 48452@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 14 11:31:04 2022 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 1oBvBY-00027N-9N for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 11:31:04 +0200 Original-Received: from localhost ([::1]:36936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBvBX-0003sN-3F for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 05:31:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBv4k-0005WJ-U3 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 05:24:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBv4k-00056N-LZ for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 05:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBv4k-00022f-GN for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 05:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Max Brieiev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2022 09:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 48452-submit@debbugs.gnu.org id=B48452.16577905857780 (code B ref 48452); Thu, 14 Jul 2022 09:24:02 +0000 Original-Received: (at 48452) by debbugs.gnu.org; 14 Jul 2022 09:23:05 +0000 Original-Received: from localhost ([127.0.0.1]:48767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBv3o-00021Q-LN for submit@debbugs.gnu.org; Thu, 14 Jul 2022 05:23:04 -0400 Original-Received: from mail-lf1-f49.google.com ([209.85.167.49]:34807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBv3m-00020i-Ne for 48452@debbugs.gnu.org; Thu, 14 Jul 2022 05:23:03 -0400 Original-Received: by mail-lf1-f49.google.com with SMTP id n18so1836279lfq.1 for <48452@debbugs.gnu.org>; Thu, 14 Jul 2022 02:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version; bh=SoTgQ0Y9ktr1Ew+UriVuFhy8RjaLRIM8n7hcisV292g=; b=qZYS7N7ASfVBFhmgghNNLBFudOwYzr6sPxY0zH+KN54nY3nujJzXcyYLWct2lxvAwi Xa3XyMIUhB4GLx40qbRIpGJu8Sl/YI8SSO0oFd63ZIODeBU5vc/hvoVXx+Xmd7AJ6TJM hWrXQZEshaEN7OMDsAFa8bs5IReBoHUVn/ks0EeINXrF0P66X95umd1htG456inzdWsz iVbvQa2xO0Pba9ExDJuc2cnZ57YY4PLXFde3vBmo2CiC5JOFu45yfxpGITSX9qV5/YyR x+w+rPuraElp4V35Xbvn07mmC47yfV9HkOd2h/pwVH5M4gqUTEOsOmNWNfqC9pDoVU+l YU0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version; bh=SoTgQ0Y9ktr1Ew+UriVuFhy8RjaLRIM8n7hcisV292g=; b=oFo0pc5a/CFndJfsd/l2CDWcHZt4lJYDozrJ7LwMpBIb2B9KSp0boxP5ZMJmFQfqqJ 0vU1a7fd9TvcfOFnkV9U8KYUzWLATOYC1TmZHrBrcgrfICP7oxcpwO940ZuJx5cSXN9p 0D1jI5Wp5RqIwzIqTSvIDjKB9OxxxuqHIzUoblMP9eu8t4wFzjvv+sDqRrYIA0wgCH8n s+kBnCK0rQEKwKlPr8MMYsIzM1Ms7Z+c3ZJ+6pTTebZPs7cTT/ADhKkYQzFBc1EZiOGp yn4yIGPLPGYE3xkRdhvuSd5I6g+49Zs3e4P37Pe2FonACA/8HiI0QDhrK8hkyMPyGtVA M7Gg== X-Gm-Message-State: AJIora/tx5/uFprPKIPOW+KnXEzw98Zcj7cY+xr/fIij/ehKCpnbiP7A s5jrIE87cwNihjFZIf8fhWR5uDWMv3w= X-Google-Smtp-Source: AGRyM1sZhsnM74anDkYRmyHCYLKMv14mJ+8AJ6MjcuiacAwWjoLjwCDkW8+73edXdqNkZ0CYAtX3jw== X-Received: by 2002:a05:6512:3f89:b0:489:e611:5533 with SMTP id x9-20020a0565123f8900b00489e6115533mr4311995lfa.624.1657790576086; Thu, 14 Jul 2022 02:22:56 -0700 (PDT) Original-Received: from thinkmax (host-176-37-1-68.b025.la.net.ua. [176.37.1.68]) by smtp.gmail.com with ESMTPSA id b2-20020a196442000000b00478f2f2f043sm258212lfj.147.2022.07.14.02.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 02:22:55 -0700 (PDT) In-Reply-To: <874jzlp12v.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 13 Jul 2022 15:57:28 +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" Xref: news.gmane.io gmane.emacs.bugs:236973 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Do you have a complete step by step recipe that demonstrates the > problem? I tried the original instructions, but got no messages from > flymake (except complaining that the .emacs file doesn't start with ;;; > Commentary). `elisp-flymake-byte-compile' is a flymake backend for the elisp-mode. It runs emacs in batch mode with -Q flag as a child process to provide diagnostics for the current buffer. In this case the `load-path' of the child process includes only builtin packages, while the `load-path' of the parent process includes all the directories added by the normal bootstrap process. The load-path for the child process is controlled with `elisp-flymake-byte-compile-load-path'. By default, it contains only current directory. The following hack "fixed" the issue for me: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=elisp-mode.el.diff diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 0c4a9bfdbe..db3592b903 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -2145,7 +2145,7 @@ current buffer state and calls REPORT-FN when done." "--batch" ;; "--eval" "(setq load-prefer-newer t)" ; for testing ,@(mapcan (lambda (path) (list "-L" path)) - elisp-flymake-byte-compile-load-path) + load-path) "-f" "elisp-flymake--batch-compile-for-flymake" ,temp-file) :connection-type 'pipe --=-=-= Content-Type: text/plain Can we add some user-friendly knobs to control this behavior of flymake? --=-=-=--