GNU bug report logs - #17365
24.3; Visiting tags table in combination with fill column indicator causes Emacs to hang

Previous Next

Package: emacs;

Reported by: Jon Dufresne <jon.dufresne <at> gmail.com>

Date: Mon, 28 Apr 2014 20:58:01 UTC

Severity: normal

Found in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Forwarded to https://github.com/alpaker/Fill-Column-Indicator/issues/49

Full log


View this message in rfc822 format

From: Jon Dufresne <jon.dufresne <at> gmail.com>
To: Alp Aker <alptekin.aker <at> gmail.com>
Cc: 17365 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#17365: 24.3; Visiting tags table in combination with fill column indicator causes Emacs to hang
Date: Tue, 29 Apr 2014 12:16:30 -0700
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"))
---




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.