GNU bug report logs - #32350
26.1; Disabling flymake from file-local eval is buggy

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Thu, 2 Aug 2018 21:03:01 UTC

Severity: minor

Found in version 26.1

To reply to this bug, email your comments to 32350 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32350; Package emacs. (Thu, 02 Aug 2018 21:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlos Pita <carlosjosepita <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 Aug 2018 21:03:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; Disabling flymake from file-local eval is buggy
Date: Thu, 02 Aug 2018 18:02:10 -0300
Just try putting this in test.el and reopening it:

    ;; -*- eval: (flymake-mode -1) -*-

    (1 1)

Flymake will be off, it won't write anything to the modeline but the
fringe and in-buffer underline indicators will still be there.

If you eval the same expression using M-: after the buffer is loaded
flymake mode is fully turned off as expected.

---


In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-05 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12000000
Recent messages:
Ignoring unknown mode ‘(flymake-mode -1)-mode’
Malformed mode-line: "(flymake-mode -1)" [2 times]
next-line: End of buffer
Saving file /tmp/test.el...
Wrote /tmp/test.el
next-line: End of buffer
Mark set
Mark activated
previous-line: Beginning of buffer
next-line: End of buffer
Quit
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  whitespace-mode: t
  display-line-numbers-mode: t
  pdf-occur-global-minor-mode: t
  diff-auto-refine-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  xclip-mode: t
  winner-mode: t
  show-paren-mode: t
  ido-ubiquitous-mode: t
  ido-everywhere: t
  global-company-mode: t
  company-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: yas--auto-fill
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail cl-print eieio-opt speedbar sb-image
ezimage dframe autoload lisp-mnt vc-git whitespace server
display-line-numbers checkdoc pdf-occur ibuf-ext ibuffer
ibuffer-loaddefs tablist tablist-filter semantic/wisent/comp
semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet dired
dired-loaddefs pdf-isearch let-alist pdf-misc imenu pdf-tools pdf-view
bookmark pp jka-compr pdf-cache pdf-info tq pdf-util image-mode
org-protocol org-element avl-tree generator org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table
ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs cl-extra yasnippet
elec-pair highlight-indentation flymake-proc flymake warnings help-fns
radix-tree help-mode elpy find-file-in-project ivy delsel colir color
ivy-overlay ffap thingatpt windmove diff-mode easy-mmode elpy-shell
pyvenv esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg
esh-groups eshell esh-module esh-mode esh-util elpy-profile elpy-django
elpy-refactor subr-x python tramp-sh tramp tramp-compat tramp-loaddefs
trampver ucs-normalize shell pcomplete parse-time format-spec advice
json map grep compile comint ansi-color files-x doom-themes-org
doom-tomorrow-night-theme doom-themes doom-themes-common company-oddmuse
company-keywords company-etags etags xref project company-gtags
company-dabbrev-code company-dabbrev company-files company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-bbdb xclip winner ring paren
ido-completing-read+ memoize s cus-edit minibuf-eldef ido gnus nnheader
gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums time-date
mail-utils mm-util mail-prsvr wid-edit company edmacro kmacro pcase
cus-start cus-load finder-inf info package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 652735 28267)
 (symbols 48 44899 1)
 (miscs 40 358 449)
 (strings 32 132698 3516)
 (string-bytes 1 3796567)
 (vectors 16 68717)
 (vector-slots 8 1139230 20802)
 (floats 8 525 343)
 (intervals 56 1048 157)
 (buffers 992 30))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32350; Package emacs. (Thu, 02 Aug 2018 21:16:02 GMT) Full text and rfc822 format available.

Message #8 received at 32350 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: 32350 <at> debbugs.gnu.org
Date: Thu, 2 Aug 2018 18:15:31 -0300
I think this could be due an async check being active at the time
flymake-delete-own-overlays is, too early, called. Indeed the overlays
appear perceptibly after the buffer was loaded.

It probably can happen when flymake is manually disabled but, I assume
due to timing issues, I'm unable to reproduce the same effect by hand.

I'm speculating here but I believe the routine that is writing the
overlays should first check that flymake is still enabled, since it
could have been disabled in the meantime.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32350; Package emacs. (Thu, 04 Oct 2018 15:05:01 GMT) Full text and rfc822 format available.

Message #11 received at 32350 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 32350 <at> debbugs.gnu.org
Subject: Re: bug#32350: 26.1; Disabling flymake from file-local eval is buggy
Date: Thu, 04 Oct 2018 16:04:16 +0100
Carlos Pita <carlosjosepita <at> gmail.com> writes:

> Just try putting this in test.el and reopening it:
>
>     ;; -*- eval: (flymake-mode -1) -*-
>
>     (1 1)
>
> Flymake will be off, it won't write anything to the modeline but the
> fringe and in-buffer underline indicators will still be there.
>
> If you eval the same expression using M-: after the buffer is loaded
> flymake mode is fully turned off as expected.

Hi Carlos,

Perhaps the best way to turn off flymake on a file-by-file basis is to
use the flymake-diagnostic-functions local variable instead, with the
added benefit that it won't be risky if you set it to a null value.

    flymake-diagnostic-functions is a variable defined in `flymake.el'.
    Its value is nil
     
      This variable may be risky if used as a file-local variable.
      This variable is safe as a file local variable if its value
      satisfies the predicate `null'.

I don't know how hard it is to make mode-specific eval's work properly
from file-local-variables but I would suspect flymake-mode isn't the
only mode affected by this.

João




This bug report was last modified 6 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.