unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42818: 28.0.50; Repeated 'Reread from disk?' dialog box
@ 2020-08-11 21:50 Richard Copley
  2020-10-17  8:22 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Copley @ 2020-08-11 21:50 UTC (permalink / raw)
  To: 42818

In a shell, cd to an empty temporary directory and:

git init
echo a >x
git add x
git commit -mtest
emacs -Q x
echo b >x

In Emacs,

M-x which-function-mode
C-x v D

A GUI dialog box pops up, "File x changed on disk. Reread from disk?"
Click the No button. After about 500 ms. The dialog box pops up again.
Repeat.

To escape, click No and quickly kill the diff buffer, or click Yes.

The dialog should certainly not be shown more than once.

In GNU Emacs 28.0.50 (build 3, x86_64-w64-mingw32)
 of 2020-08-11 built on MACHINE
Repository revision: b5b7f6eb88d6588f6150c34e1405457f062538bb
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19041
System Description: Microsoft Windows 10 Pro (v10.0.2004.19041.388)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Which-Function mode enabled
You can run the command ‘which-function-mode’ with M-x w-funct RET
Which-Function mode enabled
Finding changes in c:/temp/test/...done

Configured using:
 'configure --config-cache --with-modules --without-pop
 --without-compress-install --without-dbus --without-gconf
 --without-gsettings 'CFLAGS=-Og -ggdb3'
 PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Fundamental

Minor modes in effect:
  which-function-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-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
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt
gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils smerge-mode diff cl-seq vc
vc-dispatcher add-log cus-start cus-load which-func imenu vc-git
diff-mode easymenu easy-mmode cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer 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
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 threads w32notify w32
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 63722 10753)
 (symbols 48 7949 1)
 (strings 32 21947 1613)
 (string-bytes 1 653255)
 (vectors 16 12244)
 (vector-slots 8 166374 14252)
 (floats 8 31 298)
 (intervals 56 223 0)
 (buffers 992 12))





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#42818: 28.0.50; Repeated 'Reread from disk?' dialog box
  2020-08-11 21:50 bug#42818: 28.0.50; Repeated 'Reread from disk?' dialog box Richard Copley
@ 2020-10-17  8:22 ` Lars Ingebrigtsen
  2020-10-17  8:30   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-17  8:22 UTC (permalink / raw)
  To: Richard Copley; +Cc: 42818

Richard Copley <rcopley@gmail.com> writes:

> A GUI dialog box pops up, "File x changed on disk. Reread from disk?"
> Click the No button. After about 500 ms. The dialog box pops up again.
> Repeat.
>
> To escape, click No and quickly kill the diff buffer, or click Yes.
>
> The dialog should certainly not be shown more than once.

The problem here is that which-function-mode tries to use
diff-find-source-location (via add-log-current-defun).
diff-find-source-location is called with a noprompt because of this, but
it's really an interactive command that's been pressed into service by
which-function-mode.

And diff-find-source-location really wants to re-visit the file, which
means that you get this prompt over and over again.

I don't really know how to fix this...  it'd be nice if
diff-find-source-location could just give up instead of re-loading the
file in this situation.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#42818: 28.0.50; Repeated 'Reread from disk?' dialog box
  2020-10-17  8:22 ` Lars Ingebrigtsen
@ 2020-10-17  8:30   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-17  8:30 UTC (permalink / raw)
  To: Richard Copley; +Cc: 42818

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I don't really know how to fix this...  it'd be nice if
> diff-find-source-location could just give up instead of re-loading the
> file in this situation.

Actually, that was pretty trivial.  The NOPROMPT flag is only present
when called from which-func, and we don't need to reload files just for
that, so I've now fixed this on the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-17  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 21:50 bug#42818: 28.0.50; Repeated 'Reread from disk?' dialog box Richard Copley
2020-10-17  8:22 ` Lars Ingebrigtsen
2020-10-17  8:30   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).