From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#23777: 25.0.95; Throwing (error "Selecting deleted buffer") in timer Date: Sat, 09 Jul 2016 17:34:15 -0400 Message-ID: <87y45ah4x4.fsf@users.sourceforge.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468100128 9571 80.91.229.3 (9 Jul 2016 21:35:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2016 21:35:28 +0000 (UTC) Cc: 23777@debbugs.gnu.org To: Jiege Chen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 09 23:35:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLzu5-0001LP-VZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2016 23:35:14 +0200 Original-Received: from localhost ([::1]:52479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLzu5-0000Pj-8K for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2016 17:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLztz-0000NS-67 for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:35:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLztv-0000fC-2f for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:35:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLztu-0000ev-Ua for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLztu-0002hW-Pu for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 17:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jul 2016 21:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23777 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23777-submit@debbugs.gnu.org id=B23777.146810006510279 (code B ref 23777); Sat, 09 Jul 2016 21:35:02 +0000 Original-Received: (at 23777) by debbugs.gnu.org; 9 Jul 2016 21:34:25 +0000 Original-Received: from localhost ([127.0.0.1]:44419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLztI-0002fi-Qu for submit@debbugs.gnu.org; Sat, 09 Jul 2016 17:34:24 -0400 Original-Received: from mail-io0-f179.google.com ([209.85.223.179]:35137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLztG-0002fQ-Ns for 23777@debbugs.gnu.org; Sat, 09 Jul 2016 17:34:23 -0400 Original-Received: by mail-io0-f179.google.com with SMTP id f30so71086651ioj.2 for <23777@debbugs.gnu.org>; Sat, 09 Jul 2016 14:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=aO8PocRUUpSqgrVUxbWnbbaWiIyoRs04Mwi1tI12+TA=; b=m6/zCDE51jRHPKmIuTVaqtTcyBUKNgXRRCw/1SfN4ful4o3W+3ALRHKsWY7Zo1F2Bg MKFX7fbKWIcpT2JYeCe0Oqf2Q/+LsPYPMgyn95FkHbMkwWMsX4GwveuOX7sYQ8iGg/rY JI0bIozNmTgxIkSA6xwyp5XEUcjZm93+HSHLtsgTFQqQzROL5GyWNIUbHLIMktMJuyHU v0eiga6rQXUftgnPqvOSkKVfeYoNHmEzyA+qNZW36ZbuPfGjs3oo/QfTNQmSyISCpNJH Cwqu0+gOugpvA00aSxh3/Vbi/SA0n+Pu4YfbUGwesPogt8UwC2eKRUO731uLXlHpTE7Y 2tpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=aO8PocRUUpSqgrVUxbWnbbaWiIyoRs04Mwi1tI12+TA=; b=h/GiWx/OoT6prPF2xMSvfJ2oUyFSuZoVRWlAG+xobRK3jrk8sijAVzVWVMQOmwFmRJ 7mwoYlrM12EB6LrO4RPcSak59YkPrB/cfVjmh9EJH1e/Hi/pkN2bCSJGxYY+2S3dYHaL xUqiS6BWldFp3VNccjmN3tGIjJxDuMjl067eoGzHyO08PExJhYyafEBmCmPHD5VIDk5X YcZXfYS4pAcmi2XYN7rRbMDuOlT6bJwR7yT3vRhK+ieNDnzIad+jHFCY5N1BfBh0D7gd jQ24LdfpbCrZjIGPyxc/YQnZ78azbY+hN8KJ0uh7G3ilLDcRQvgPqfLe/oHjRNSBH3Ci fS5w== X-Gm-Message-State: ALyK8tI99JIcKY3W3DQm9ze9b/jRQ+ZuuHTwtYW9dEh0hmV6yxnhT6mLpVXvFYRqSPnWMA== X-Received: by 10.107.10.35 with SMTP id u35mr13348236ioi.92.1468100057094; Sat, 09 Jul 2016 14:34:17 -0700 (PDT) Original-Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id o139sm4154419ito.4.2016.07.09.14.34.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Jul 2016 14:34:16 -0700 (PDT) In-Reply-To: (Jiege Chen's message of "Tue, 28 Jun 2016 13:37:38 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120720 Archived-At: Jiege Chen 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"))))