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: Flycheck reports are never satisfying!? Date: Thu, 28 Aug 2014 14:05:14 +0200 Organization: Sebastien Vauban Message-ID: <86ha0w95vp.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409227826 27385 80.91.229.3 (28 Aug 2014 12:10:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2014 12:10:26 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Aug 28 14:10:21 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 1XMyWy-00018C-6J for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 14:10:20 +0200 Original-Received: from localhost ([::1]:36230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMyWx-0006Br-I9 for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 08:10:19 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 100 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="10371"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX1/kqHgB0Oj6JjolflMCDL/K" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (windows-nt) X-Url: Under construction... X-Archive: encrypt Cancel-Lock: sha1:wyPdQXIxpar6t40iwTkeWWlYDdk= sha1:VNjXbDsFS7apsg8OWZBL93Qeldo= Original-Xref: usenet.stanford.edu gnu.emacs.help:207182 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:99459 Archived-At: Hello, Trying to use, since short, Flycheck on all my prog modes; hence, on my Emacs configuration file as well. Though, as you can see on http://screencast.com/t/gfzLGy2h6fH, it never is satisfying: there are always reports of errors or warnings, while my code is completely clean (IMO). Two ECM follow, showing what happens for all packages which I load and customize. Note that, here, I took an extract from Flycheck's configuration itself, but the problem is the same with every third party package... 1. With an explicit package require: --8<---------------cut here---------------start------------->8--- ;;; .emacs-minimal.el --- Test file ;;; Commentary: ;;; Code: (add-to-list 'load-path "~/.emacs.d/elpa/flycheck-20140824.731/") (require 'flycheck) ;; modern on-the-fly syntax checking (when (try-require 'flycheck) ;; indicate errors and warnings via icons in the left fringe (setq flycheck-indication-mode 'left-fringe) ;; enable Flycheck mode in all buffers (add-hook 'after-init-hook 'global-flycheck-mode)) (provide '.emacs-minimal) ;;; .emacs-minimal.el ends here --8<---------------cut here---------------end--------------->8--- Flycheck reports one ERROR: --8<---------------cut here---------------start------------->8--- 9 1 error Cannot open load file: no such file or directory, flycheck (emacs-lisp) --8<---------------cut here---------------end--------------->8--- 2. With an implicit package require (call to function `try-require'): --8<---------------cut here---------------start------------->8--- ;;; .emacs-minimal2.el --- Test file ;;; Commentary: ;;; Internal function: (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 "Missing package `%s'!" feature) nil))) ;;; Code: (add-to-list 'load-path "~/.emacs.d/elpa/flycheck-20140824.731/") ;; modern on-the-fly syntax checking (when (try-require 'flycheck) ;; indicate errors and warnings via icons in the left fringe (setq flycheck-indication-mode 'left-fringe) ;; enable Flycheck mode in all buffers (add-hook 'after-init-hook 'global-flycheck-mode)) (provide '.emacs-minimal2) ;;; .emacs-minimal2.el ends here --8<---------------cut here---------------end--------------->8--- Flycheck reports one warning: --8<---------------cut here---------------start------------->8--- 25 9 warning assignment to free variable `flycheck-indication-mode' (emacs-lisp) --8<---------------cut here---------------end--------------->8--- How am I supposed to do, if Flycheck reports things that shouldn't be reported? Best regards, Seb -- Sebastien Vauban