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: Mon, 01 Sep 2014 12:00:01 +0200 Organization: Sebastien Vauban Message-ID: <86oauzhd9a.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 1409565689 28866 80.91.229.3 (1 Sep 2014 10:01:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2014 10:01:29 +0000 (UTC) Cc: 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 Mon Sep 01 12:01:23 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 1XOOQM-0003hO-BG for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 12:01:22 +0200 Original-Received: from localhost ([::1]:59045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOOQM-00066B-17 for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 06:01:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOOQ7-00064c-V4 for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Mon, 01 Sep 2014 06:01:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOOQ3-0008LW-0Q for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Mon, 01 Sep 2014 06:01:07 -0400 Original-Received: from dd5e0353a.access.telenet.be ([213.224.53.58]:6408 helo=mail.missioncriticalit.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOOQ2-0008L3-QG for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Mon, 01 Sep 2014 06:01:02 -0400 Original-Received: from MUNDANEUM.i-did-not-set--mail-host-address--so-tickle-me (unknown [10.10.10.51]) by mail.missioncriticalit.com (Postfix) with ESMTPSA id 4AB1F500902; Mon, 1 Sep 2014 12:00:59 +0200 (CEST) X-Url: Under construction... X-Archive: encrypt In-Reply-To: (Sebastien Vauban's message of "Thu, 28 Aug 2014 20:35:06 +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:99556 Archived-At: Hallo Sebastian, Sebastien Vauban wrote: > 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. >>> >>> 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. >>> >>> 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? Right. >> 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: > > ;;; .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 > > 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'. Any idea why the local var `flycheck-emacs-lisp-initialize-packages' seems to have no effect? Best regards, Seb --=20 Sebastien Vauban