[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23777: 25.0.95; Throwing (error "Selecting deleted buffer") in timer
From: |
npostavs |
Subject: |
bug#23777: 25.0.95; Throwing (error "Selecting deleted buffer") in timer |
Date: |
Sat, 09 Jul 2016 17:34:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) |
Jiege Chen <jiegec@qq.com> writes:
> I removed that call in my init code, and the error is gone,
> at the price of some display inconsistency which is acceptable.
> There is room for improvement in nlinum--flush.
How about this instead:
(defun my-nlinum-mode-hook ()
(when nlinum-mode
(setq-local nlinum-format
(concat "%" (number-to-string
(ceiling (log (max 1 (count-lines (point-min)
(point-max)))
10)))
"d"))))
(add-hook 'nlinum-mode-hook #'my-nlinum-mode-hook)
Actually, I think count-lines will be slow on big files, so you may want
to approximate with something like
(defun my-nlinum-mode-hook ()
(when nlinum-mode
(setq-local nlinum-format
(concat "%" (number-to-string
(ceiling (log (max 1 (/ (buffer-size) 80)) 10)))
"d"))))
- bug#23777: 25.0.95; Throwing (error "Selecting deleted buffer") in timer,
npostavs <=