From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastien Vauban Newsgroups: gmane.emacs.help Subject: Re: Flycheck reports are never satisfying!? Date: Thu, 28 Aug 2014 20:35:06 +0200 Organization: Sebastien Vauban Message-ID: <86ha0wh38l.fsf@somewhere.org> References: <86ha0w95vp.fsf@somewhere.org> <61C65218-4004-4FD5-ABE0-6C863E5F60A6@lunaryorn.com> <86bnr4wrmh.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409250987 18059 80.91.229.3 (28 Aug 2014 18:36:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2014 18:36:27 +0000 (UTC) Cc: Sebastien Vauban , help-gnu-emacs-mXXj517/zsQ@public.gmane.org To: Sebastian Wiesner Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Aug 28 20:36:22 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XN4YU-0001Fm-Pb for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 20:36:18 +0200 Original-Received: from localhost ([::1]:38529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN4YU-0004E0-D5 for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 14:36:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN4YF-0004Dv-P1 for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Thu, 28 Aug 2014 14:36:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN4YB-0000px-02 for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Thu, 28 Aug 2014 14:36:03 -0400 Original-Received: from dd5e0353a.access.telenet.be ([213.224.53.58]:19245 helo=mail.missioncriticalit.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN4YA-0000pq-Oi for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Thu, 28 Aug 2014 14:35:58 -0400 Original-Received: from MUNDANEUM.i-did-not-set--mail-host-address--so-tickle-me (ip-83-101-44-240.customer.schedom-europe.net [83.101.44.240]) by mail.missioncriticalit.com (Postfix) with ESMTPSA id 585DB5002C9; Thu, 28 Aug 2014 20:35:57 +0200 (CEST) X-Url: Under construction... X-Archive: encrypt In-Reply-To: (Sebastian Wiesner's message of "Thu, 28 Aug 2014 17:45:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 213.224.53.58 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:99480 Archived-At: Hallo Sebastian, Sebastian Wiesner wrote: > Am 28.08.2014 um 17:39 schrieb Sebastien Vauban : >> Sebastian Wiesner wrote: >>> However, as far as "init.el" is concerned, Flycheck should >>> automatically enable package.el for syntax checking. This doesn't >>> seem to work in your case, and indicates that there is something >>> unusual about your setup, so please open an issue in Flycheck's >>> issue tracker at https://github.com/flycheck/flycheck/issues >>=20 >> In my case, in fact, my init.el is just a stub with my really really >> personal settings. It calls another file with more general settings, >> which I share with colleagues. All my problems are in this last file, >> which is of course much bigger. >>=20 >> This particularity can explain that package is not enabled, right? > > I presume that this =E2=80=9Cshared=E2=80=9D file is not in "~/.emacs.d/"= , is it? In > that case, Flycheck can't know that it's part of your Emacs > configuration, and treats it as if it were any random Emacs Lisp file, > which means that packages aren't enabled. > > Add "flycheck-emacs-lisp-initialize-packages" to the file-local > variables of that file, with a value of t. This forces Flycheck to > enable packages when checking the file. I just tested this, on another MWE: --8<---------------cut here---------------start------------->8--- ;;; .emacs-minimal.el --- Test file ;;; Commentary: ;;; Code: (defun try-require (feature) "Attempt to load a FEATURE (or library). Return true if the library given as argument is successfully loaded. If not, just print a message." (condition-case err (progn (if (stringp feature) (load-library feature) (require feature)) t) (file-error (message "Requiring `%s'... missing" feature) nil))) (when (require 'idle-require nil t) (setq idle-require-idle-delay 5) (setq idle-require-load-break 2)) (when (try-require 'idle-require) (setq idle-require-idle-delay 5) (setq idle-require-load-break 2)) (provide '.emacs-minimal) ;; This is for the sake of Emacs. ;; Local Variables: ;; flycheck-emacs-lisp-initialize-packages: t ;; flyspell-mode: nil ;; End: ;;; .emacs-minimal.el ends here --8<---------------cut here---------------end--------------->8--- See the results on http://screencast.com/t/bnfoDJqBX: - I still have the variables from the package `idle-require' reported as unknown... - while that's a package which is under ELPA (right now in ~/.emacs.d/elpa/idle-require-20090716.3/) and I do have `flycheck-emacs-lisp-initialize-packages' set to `t'. Best regards, Seb PS- A funny thing (?) is that only the first occurrence of the variable is reported as unknown. --=20 Sebastien Vauban