From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathan Trapuzzano Newsgroups: gmane.emacs.bugs Subject: bug#13446: 24.2; Fix loop test in linum.el Date: Sun, 27 Oct 2013 15:36:07 -0400 Message-ID: <87r4b68q1k.fsf@nbtrap.com> References: <87y5fvp7ti.fsf@nbtrap.com> <874n85cqxj.fsf@nbtrap.com> <87y55fapz8.fsf@nbtrap.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382902638 14098 80.91.229.3 (27 Oct 2013 19:37:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Oct 2013 19:37:18 +0000 (UTC) Cc: 13446@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 27 20:37:21 2013 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 1VaW9H-00078T-SZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2013 20:37:20 +0100 Original-Received: from localhost ([::1]:38746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaW9H-0000zj-FL for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2013 15:37:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaW98-0000zY-FF for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 15:37:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaW92-0004ld-FO for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 15:37:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaW90-0004lT-Bm for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 15:37:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VaW8z-0002PH-OH for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 15:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nathan Trapuzzano Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2013 19:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13446 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13446-submit@debbugs.gnu.org id=B13446.13829025769197 (code B ref 13446); Sun, 27 Oct 2013 19:37:01 +0000 Original-Received: (at 13446) by debbugs.gnu.org; 27 Oct 2013 19:36:16 +0000 Original-Received: from localhost ([127.0.0.1]:47727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaW8F-0002OH-TE for submit@debbugs.gnu.org; Sun, 27 Oct 2013 15:36:16 -0400 Original-Received: from oproxy12-pub.mail.unifiedlayer.com ([50.87.16.10]:51541) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1VaW8D-0002O7-2D for 13446@debbugs.gnu.org; Sun, 27 Oct 2013 15:36:14 -0400 Original-Received: (qmail 29694 invoked by uid 0); 27 Oct 2013 19:36:11 -0000 Original-Received: from unknown (HELO host393.hostmonster.com) (66.147.240.193) by oproxy12.mail.unifiedlayer.com with SMTP; 27 Oct 2013 19:36:11 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbtrap.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=4MJwS7KM96fjATGhBFfwXktJmnRL7ykp39PM2B9MjHM=; b=TJiLhEigNjlyBcY6ZjUM3yjFOg39JorKAHoBwIQZBF1Kqh5Z1Yc4vUNgAcIXrCp/fQaRbGr67IR0+3BQJW/LqqQsOn70vomaAic4MC/ahJW9ju5fC+I/6jX5hUDksxJm; Original-Received: from [50.90.253.209] (port=53962 helo=Nathan-GNU) by host393.hostmonster.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1VaW8B-0007wn-9T; Sun, 27 Oct 2013 13:36:11 -0600 In-Reply-To: (Stefan Monnier's message of "Sun, 27 Oct 2013 09:39:41 -0400") User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) X-Identified-User: {1585:host393.hostmonster.com:nbtrapco:nbtrap.com} {sentby:smtp auth 50.90.253.209 authed with nbtrap@nbtrap.com} X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79704 Archived-At: The behavior you describe is actually doable using a combination of `linum-before-numbering-hook' and `linum-format'. (In particular, I'm talking about setting `linum-format' to a symbol, which will cause linum to call the function with that symbol's name to retrieve the line number as a string.) I know because I've implemented it, or something very similar to it, myself. Indeed, given these two variables, linum is actually very capable. On the other hand, one seeminly irreparable problem with linum is _when_ it applies the overlays--or when it doesn't. I'm not sure if there's a bug report for this, but faily often linum won't display the overlays at all, or will only display the line numbers on some of the lines in the window. This happens especially frequently when bouncing on balanced parens/brackets via `forward-' and `backward-sexp'. If something is going to replace linum, I'd be very interested to know whether it fixes this problem. Do you happen to know? Stefan Monnier writes: > BTW, in nlinum-mode, the default behavior is half-way between the two: > we don't try to accommodate the largest line number there can be > (partly to avoid scanning the whole buffer, which can be a performance > problem in itself), so we grow the margin only when we display a larger > number, but we don't shrink it back when moving back to the beginning of > the file with shorter line numbers.