bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20299: 25.0.50; File notification is not working


From: Sean McAfee
Subject: bug#20299: 25.0.50; File notification is not working
Date: Fri, 10 Apr 2015 17:39:48 -0700

I recently started a new job, where I have been supplied with the laptop
I'm now using.  I noticed that magit-auto-revert-mode was not having any
effect; checking out a new branch using Magit did not revert any of the
buffers visiting files which were different on the previous branch.

I dug into the source and found that the culprit is the function
auto-revert-handler, and specifically the _expression_:

(or (not auto-revert-use-notify)
  auto-revert-notify-modified-p)

auto-revert-use-notify had a value of t, and yet
auto-revert-notify-modified-p was nil even in buffers whose associated
files had changed out from under them.  I verified this visiting a file,
then repeatedly issuing the shell command "echo foo >> my-file" and then
evaluating the _expression_ (auto-revert-handler) with M-:, but the file
never got reverted.

I found a note to the effect that this feature would only be active if
Emacs had been compiled with file notification support.  I would have
expected auto-revert-use-notify to be given a suitable default value
depending on whether such support was available, but in any case I went
to my local emacs git repo, pulled down the latest changes, and
recompiled after providing the --with-file-notification=inotify flag to
configure.  Even after this change, though, file notification still
isn't working.

I can just set auto-revert-use-notify to nil going forward, but it would
be nice to get file notification working as intended.



In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2015-04-10 on sean-Latitude-E7440
Repository revision: f55ea05bdf60e24c09f9064fc0d2e8a114d6e358
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description:    Ubuntu 14.10

Configured using:
 `configure --with-file-notification=inotify'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  recentf-mode: t
  projectile-global-mode: t
  projectile-mode: t
  global-anzu-mode: t
  anzu-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  google-this-mode: t
  global-flycheck-mode: t
  minibuffer-depth-indicate-mode: t
  ido-everywhere: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  override-global-mode: t
  show-paren-mode: t
  electric-pair-mode: t
  savehist-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent messages:
Cleaning up the recentf list...done (2 removed)
~/emacs-src
Template key:
Clipboard pasted as level 4 subtree
C-c C-g is undefined
ad-handle-definition: `bookmark-jump' got redefined
Saving bookmarks to file ~/.emacs.d/bookmarks...
Wrote /home/sean/.emacs.d/bookmarks
Saving bookmarks to file ~/.emacs.d/bookmarks...done
Wrote /home/sean/done.org

Load-path shadows:
~/emacs/japanese hides /usr/local/share/emacs/25.0.50/lisp/language/japanese

Features:
(shadow sort mail-extr emacsbug sendmail bookmark tabify org-datetree
org-capture pcmpl-unix recentf tree-widget eww mm-url url-queue shr dom
browse-url js-mode-expansions js imenu cc-mode-expansions cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs sh-script smie executable restclient conf-mode cap-words
superword subword scala-mode2 scala-mode2-imenu scala-mode2-sbt
scala-mode2-map scala-mode2-fontlock scala-mode2-indent
scala-mode2-paragraph scala-mode2-lib html-mode-expansions sgml-mode
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view image-mode org-bibtex bibtex org-bbdb org-w3m
the-org-mode-expansions org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu
calendar cal-loaddefs gnus-dired jka-compr vc vc-dispatcher vc-git
projectile ibuf-ext ibuffer elisp-slime-nav etags xref anzu mule-util
magit-key-mode magit view tramp tramp-compat tramp-loaddefs trampver
shell pcomplete epa epg diff-mode autorevert filenotify git-rebase-mode
git-commit-mode log-edit message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader pcvs-util add-log google-this
flycheck find-func rx subr-x cyberpunk-theme ensime ensime-ui
ensime-semantic-highlight ensime-doc ensime-scalex url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source eieio eieio-core cl-generic
password-cache mailcap ensime-search ensime-undo ensime-startup
ensime-refactor ensime-popup ensime-notes ensime-model ensime-mode
ensime-inspector ensime-goto-testfile ensime-editor ensime-debug gdb-mi
bindat json gud ensime-stacktrace ensime-inf ensime-sbt sbt-mode
sbt-mode-rgrep grep sbt-mode-comint sbt-mode-buffer sbt-mode-project
ensime-company yasnippet help-mode company ensime-auto-complete
ensime-completion-util scala-mode2-syntax ensime-config ensime-vars s
ucs-normalize ensime-util auto-complete popup flymake hideshow pp
arc-mode archive-mode dash url-gw url-vars ensime-client derived
ensime-macros warnings gnus gnus-ems nnheader gnus-util mail-utils
mm-util mail-prsvr wid-edit mb-depth ido dired-details+ dired
dired-details anchored-transpose change-inner expand-region
text-mode-expansions er-basic-expansions expand-region-core
expand-region-custom org-bullets multiple-cursors
mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core byte-opt advice rect undo-tree diff
ack compile comint ansi-color ring paredit edmacro kmacro use-package
diminish bytecomp byte-compile cl-extra seq cconv bind-key easy-mmode
finder-inf info easymenu package epg-config paren elec-pair savehist
desktop frameset server thingatpt help-fns perl-mode cl-macs cl gv
cl-loaddefs pcase cl-lib time-date tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev 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
make-network-process dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 567561 51984)
 (symbols 48 51197 0)
 (miscs 40 2332 364)
 (strings 32 121532 20169)
 (string-bytes 1 3675027)
 (vectors 16 75299)
 (vector-slots 8 1788518 105160)
 (floats 8 456 780)
 (intervals 56 4135 309)
 (buffers 976 64)
 (heap 1024 54594 2035))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]