GNU bug report logs -
#17365
24.3; Visiting tags table in combination with fill column indicator causes Emacs to hang
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17365 in the body.
You can then email your comments to 17365 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Mon, 28 Apr 2014 20:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jon Dufresne <jon.dufresne <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 28 Apr 2014 20:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The following recipe causes Emacs to hang 100%.
0. Start in a mercurial repository directory.
1. Run "emacs -Q -l /path/to/test.el"
2. M-x project-compile-and-visit-tags-table
3. Wait for completion.
4. M-x project-compile-and-visit-tags-table
5. Receive prompt: "Tags file /path/to/TAGS has changed, read new
contents? (yes or no)"
6. Type "yes"
7. Emacs hangs, must send kill signal to close.
The goal of test.el is to re-compile and visit the TAGS file while
coexisting with fci-mode. If there is a better way to accomplish the
same thing, I'd be interested to know.
It is possible that this is a bug in fci-mode, however, it seems to me
that a buggy third party script should not be capable of freezing the
entire Emacs process, so I am filing it here. Removing fci-mode removes
the freezing.
The test.el:
---
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'fill-column-indicator)
(require 'fill-column-indicator)
(setq-default fci-rule-column 80)
(defun fci-mode-on ()
"Turn fci-mode on."
(fci-mode 1))
(define-globalized-minor-mode global-fci-mode
fci-mode
fci-mode-on)
(global-fci-mode 1)
(defun project-compile-and-visit-tags-table ()
"Compile TAGS file at the project ROOT directory."
(interactive)
(let ((root (project-root)))
(when root
(add-hook 'compilation-finish-functions #'project-visit-tags-table)
(compile (format "ctags -e -R --exclude=updates --languages=PHP -o %s %s"
(concat root "TAGS") root)))))
(defun project-visit-tags-table (buffer string)
"Tell tags commands to use tags table at the project root."
(when (string= string "finished\n")
(visit-tags-table (concat (project-root) "TAGS")))
(remove-hook 'compilation-finish-functions #'project-visit-tags-table))
(defun project-root ()
"Return the project's root directory."
(locate-dominating-file default-directory ".hg"))
---
In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.8)
of 2014-04-18 on buildvm-19.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11404000
System Description: Fedora release 20 (Heisenbug)
Configured using:
`configure '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--program-prefix='
'--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/var/lib'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus'
'--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
'--with-xft' '--with-xpm' '--with-x-toolkit=gtk3' '--with-gpm=no'
'build_alias=x86_64-redhat-linux-gnu'
'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''
Important settings:
value of $LANG: en_US.utf8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-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
Recent input:
M-x r e p o <tab> r <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode easymenu time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-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 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 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 14:10:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 17365 <at> debbugs.gnu.org (full text, mbox):
Jon Dufresne wrote:
> It is possible that this is a bug in fci-mode, however, it seems to me
> that a buggy third party script should not be capable of freezing the
> entire Emacs process, so I am filing it here.
As a general comment, an external package can break Emacs in an infinite
number of ways, including making it freeze. That's just how it is.
(I haven't checked your specific issue.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 16:28:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 17365 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 29, 2014 at 7:09 AM, Glenn Morris <rgm <at> gnu.org> wrote:
> As a general comment, an external package can break Emacs in an infinite
> number of ways, including making it freeze. That's just how it is.
I see, and understand.
I filed a ticket with the package maintainer as well which contains a
bit more information:
<https://github.com/alpaker/Fill-Column-Indicator/issues/49>
I have since tried this on trunk using the git mirror and the bug
still persists. In the end, if this is a bug in fci-mode and not
strictly Emacs, the package maintainer is very cooperative.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 16:30:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 17365 <at> debbugs.gnu.org (full text, mbox):
Jon Dufresne wrote:
> The following recipe causes Emacs to hang 100%.
>
> 0. Start in a mercurial repository directory.
> 1. Run "emacs -Q -l /path/to/test.el"
> 2. M-x project-compile-and-visit-tags-table
> 3. Wait for completion.
> 4. M-x project-compile-and-visit-tags-table
> 5. Receive prompt: "Tags file /path/to/TAGS has changed, read new
> contents? (yes or no)"
> 6. Type "yes"
> 7. Emacs hangs, must send kill signal to close.
I followed the recipe, but it doesn't hang for me.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 16:49:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 17365 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 29, 2014 at 9:29 AM, Glenn Morris <rgm <at> gnu.org> wrote:
> Jon Dufresne wrote:
>
>> The following recipe causes Emacs to hang 100%.
>>
>> 0. Start in a mercurial repository directory.
>> 1. Run "emacs -Q -l /path/to/test.el"
>> 2. M-x project-compile-and-visit-tags-table
>> 3. Wait for completion.
>> 4. M-x project-compile-and-visit-tags-table
>> 5. Receive prompt: "Tags file /path/to/TAGS has changed, read new
>> contents? (yes or no)"
>> 6. Type "yes"
>> 7. Emacs hangs, must send kill signal to close.
>
> I followed the recipe, but it doesn't hang for me.
Thanks for testing.
I have since done additional testing and the recipe, as stated is
insufficient. There is something specific in my working directory that
is causing this issue, and just any mercurial repository won't do. I
am currently trying to track down precisely what in the directory is
triggering the bug. When I have additional information I will report
it to this ticket. Unfortunately, I am unable to share the repository
required to trigger the issue.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 18:11:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 17365 <at> debbugs.gnu.org (full text, mbox):
> I have since done additional testing and the recipe, as stated is
> insufficient. There is something specific in my working directory that
> is causing this issue, and just any mercurial repository won't do. I
> am currently trying to track down precisely what in the directory is
> triggering the bug. When I have additional information I will report
> it to this ticket. Unfortunately, I am unable to share the repository
> required to trigger the issue.
Please (setq debug-on-event 'sigusr2) and then use "kill -USR2 <pid>"
while Emacs is frozen, so as to try and get a backtrace, which will help
us figure out what Emacs is doing while "frozen",
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 18:32:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 17365 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 29, 2014 at 11:10 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
> Please (setq debug-on-event 'sigusr2) and then use "kill -USR2 <pid>"
> while Emacs is frozen, so as to try and get a backtrace, which will help
> us figure out what Emacs is doing while "frozen",
Debugger entered--Lisp error: (quit)
fci-put-overlays-region(2807 7574591)
fci-redraw-region(2807 7574565 0)
insert-file-contents("/home/jon/devel/erezlife/development/TAGS" t nil nil t)
revert-buffer-insert-file-contents--default-function("/home/jon/devel/erezlife/development/TAGS"
nil)
revert-buffer--default(t t)
revert-buffer(t t)
tags-verify-table("/home/jon/devel/erezlife/development/TAGS")
visit-tags-table-buffer("~/devel/erezlife/development/TAGS")
visit-tags-table("~/devel/erezlife/development/TAGS")
(progn (visit-tags-table (concat (project-root) "TAGS")))
(if (string= string "finished\n") (progn (visit-tags-table (concat
(project-root) "TAGS"))))
project-visit-tags-table(#<buffer *compilation*> "finished\n")
run-hook-with-args(project-visit-tags-table #<buffer *compilation*>
"finished\n")
compilation-handle-exit(exit 0 "finished\n")
compilation-sentinel(#<process compilation> "finished\n")
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 19:11:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 17365 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Debugger entered--Lisp error: (quit)
>
> fci-put-overlays-region(2807 7574591)
> fci-redraw-region(2807 7574565 0)
> insert-file-contents("/home/jon/devel/erezlife/development/TAGS" t
nil nil t)
>
revert-buffer-insert-file-contents--default-function("/home/jon/devel/erezlife/development/TAGS"
> nil)
> revert-buffer--default(t t)
> revert-buffer(t t)
I'm the author of the package in question. This is, I think, a use case I
hadn't considered.
Jon, could you replace the definition of fci-redraw-region with the
following and try your recipe again?
(defun fci-redraw-region (start end _ignored)
(when (fci-get-buffer-windows t)
(save-match-data
(save-excursion
(let ((inhibit-point-motion-hooks t))
(goto-char end)
(setq end (line-beginning-position 2))
(fci-delete-overlays-region start end)
(fci-put-overlays-region start end))))))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 19:17:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 17365 <at> debbugs.gnu.org (full text, mbox):
On Tue, Apr 29, 2014 at 12:10 PM, Alp Aker <alptekin.aker <at> gmail.com> wrote:
> Jon, could you replace the definition of fci-redraw-region with the
> following and try your recipe again?
>
> (defun fci-redraw-region (start end _ignored)
> (when (fci-get-buffer-windows t)
> (save-match-data
> (save-excursion
> (let ((inhibit-point-motion-hooks t))
> (goto-char end)
> (setq end (line-beginning-position 2))
> (fci-delete-overlays-region start end)
> (fci-put-overlays-region start end))))))
>
>
This worked! After adding this function Emacs no longer hangs after
entering "yes".
Thank you very much for the prompt response.
The full working recipe now appears as follows:
---
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'fill-column-indicator)
(setq debug-on-event 'sigusr2)
(require 'fill-column-indicator)
(setq-default fci-rule-column 80)
(defun fci-mode-on ()
"Turn fci-mode on."
(fci-mode 1))
(define-globalized-minor-mode global-fci-mode
fci-mode
fci-mode-on)
(global-fci-mode 1)
(defun fci-redraw-region (start end _ignored)
(when (fci-get-buffer-windows t)
(save-match-data
(save-excursion
(let ((inhibit-point-motion-hooks t))
(goto-char end)
(setq end (line-beginning-position 2))
(fci-delete-overlays-region start end)
(fci-put-overlays-region start end))))))
(defun project-compile-and-visit-tags-table ()
"Compile TAGS file at the project ROOT directory."
(interactive)
(let ((root (project-root)))
(when root
(add-hook 'compilation-finish-functions #'project-visit-tags-table)
(compile (format "ctags -e -R --languages=PHP -o %s %s"
(concat root "TAGS") root)))))
(defun project-visit-tags-table (buffer string)
"Tell tags commands to use tags table at the project root."
(when (string= string "finished\n")
(visit-tags-table (concat (project-root) "TAGS")))
(remove-hook 'compilation-finish-functions #'project-visit-tags-table))
(defun project-root ()
"Return the project's root directory."
(locate-dominating-file default-directory ".hg"))
---
bug closed, send any further explanations to
17365 <at> debbugs.gnu.org and Jon Dufresne <jon.dufresne <at> gmail.com>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 29 Apr 2014 19:22:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17365
; Package
emacs
.
(Tue, 29 Apr 2014 20:39:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 17365-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> This worked! After adding this function Emacs no longer hangs after
> entering "yes".
Great. I'll follow up later with a real fix on the package's buglist
(since this isn't an Emacs bug).
Closing this.
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 28 May 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.