[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Flycheck reports are never satisfying!?
From: |
Sebastien Vauban |
Subject: |
Re: Flycheck reports are never satisfying!? |
Date: |
Mon, 01 Sep 2014 12:00:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (windows-nt) |
Hallo Sebastian,
Sebastien Vauban wrote:
> Sebastian Wiesner wrote:
>> Am 28.08.2014 um 17:39 schrieb Sebastien Vauban <sva-news@mygooglest.com>:
>>> 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 “shared” 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
--
Sebastien Vauban
- Re: Flycheck reports are never satisfying!?,
Sebastien Vauban <=