From debbugs-submit-bounces@debbugs.gnu.org Wed May 16 21:46:17 2012 Received: (at submit) by debbugs.gnu.org; 17 May 2012 01:46:17 +0000 Received: from localhost ([127.0.0.1]:58318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUpnF-0003kD-Af for submit@debbugs.gnu.org; Wed, 16 May 2012 21:46:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59331) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUpnC-0003ju-Na for submit@debbugs.gnu.org; Wed, 16 May 2012 21:46:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUpmt-0004zj-Lg for submit@debbugs.gnu.org; Wed, 16 May 2012 21:45:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:48094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUpmt-0004zF-GB for submit@debbugs.gnu.org; Wed, 16 May 2012 21:45:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUpmr-0006pz-TL for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 21:45:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUpmq-0004x1-0L for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 21:45:53 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:34824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUpmp-0004vC-Hl for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 21:45:51 -0400 Received: by yhr47 with SMTP id 47so1728915yhr.0 for ; Wed, 16 May 2012 18:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=Qh7BY/yvqeQGBSPkaRLNSlIthkroVSJYqd6FWsfvcuc=; b=AymKlyaguEN8Ue/DTG3tF/aJBhRcQyM5TTFsWNQ68Qs0z1uXZk7+trGzeoyyRppVFj 7REbjMXxDZd74OftNxNybdte4S3I611C8+NFGXQ3Z25G6WGwHFYqvmozHSF30kPne1YW lbDtzxGYqY5TXE0E19PMUkFLAPIzJW+aoUfAHG3msH6wdJPqOOe5Q8o3mPo1EynquWB7 VJ+APGvmNv05Y/ot+EfJt0IEXe40rRJnkvLPrRrdy1lqlHIRuvvC4uSoKB+Fei+B4ObE wHgFKyDQfKc7RXOPmQJRC8vBasWfrrk4uP5KZjTcX+z/wUrKati15sDPYiZof+FVcxmm iB+g== Received: by 10.42.88.135 with SMTP id c7mr3174953icm.57.1337219148313; Wed, 16 May 2012 18:45:48 -0700 (PDT) Received: from MARVIN (174-29-203-252.hlrn.qwest.net. [174.29.203.252]) by mx.google.com with ESMTPS id fk6sm5371175igc.5.2012.05.16.18.45.47 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 May 2012 18:45:47 -0700 (PDT) From: Christoph Scholtes To: bug-gnu-emacs@gnu.org Subject: 24.1.50; Line numbers are not redrawn correctly in linum-mode Date: Wed, 16 May 2012 19:45:30 -0600 Message-ID: <86likr37id.fsf@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Start with emacs -Q. Don't maximize frame. Open a file that has more lines than the current frame. M-x linum-mode Maximize frame. Line numbers are only drawn where the original, visible frame boundary was. Press down arrow key. Line numbers are redrawn for the entire frame. The same thing happens when narrowing on a function and then widen again. Only the narrowed piece has the new line numbers until the next explicit redraw. In GNU Emacs 24.1.50.1 (i386-mingw-nt6.1.7601) of 2012-05-16 on MARVIN Bzr revision: 108249 eggert@cs.ucla.edu-20120516022253-altheqksrkjfoosr Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2' From debbugs-submit-bounces@debbugs.gnu.org Wed May 16 22:41:01 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 02:41:02 +0000 Received: from localhost ([127.0.0.1]:58363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUqeC-0005pL-TE for submit@debbugs.gnu.org; Wed, 16 May 2012 22:41:01 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:18515) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUqeA-0005p7-UJ for 11496@debbugs.gnu.org; Wed, 16 May 2012 22:40:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjIKACxOgk9FpZcD/2dsb2JhbABDtheCDAOBDIEIggkBAQQBViMFCwsOJhIUGA0kiBwFtjKLYYR5BI5slVmBXYMD X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="el'?scan'208";a="180649028" Received: from 69-165-151-3.dsl.teksavvy.com (HELO pastel.home) ([69.165.151.3]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 May 2012 22:40:40 -0400 Received: by pastel.home (Postfix, from userid 20848) id 378515979C; Wed, 16 May 2012 22:40:39 -0400 (EDT) From: Stefan Monnier To: Christoph Scholtes Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode Message-ID: References: <86likr37id.fsf@googlemail.com> Date: Wed, 16 May 2012 22:40:39 -0400 In-Reply-To: <86likr37id.fsf@googlemail.com> (Christoph Scholtes's message of "Wed, 16 May 2012 19:45:30 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11496 Cc: 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) --=-=-= Content-Type: text/plain > Start with emacs -Q. > Don't maximize frame. > Open a file that has more lines than the current frame. > M-x linum-mode > Maximize frame. > Line numbers are only drawn where the original, visible frame boundary > was. > Press down arrow key. > Line numbers are redrawn for the entire frame. > The same thing happens when narrowing on a function and then widen > again. Only the narrowed piece has the new line numbers until the next > explicit redraw. You may have more luck with my reimplementation of linum which uses jit-lock, which hopefully fixes those problems (tho it may come with others of course). Stefan --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=nlinum.el Content-Transfer-Encoding: quoted-printable ;;; nlinum.el --- Show line numbers in the margin -*- lexical-binding: t -= *- ;; Copyright (C) 2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: convenience ;; Version: 0.1 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; This is like linum-mode, but uses jit-lock. ;;; Code: (eval-when-compile (require 'cl)) (require 'linum) ;For its face. (defvar nlinum--width 2) (make-variable-buffer-local 'nlinum--width) ;; (defvar nlinum--desc "") ;;;###autoload (define-minor-mode nlinum-mode "Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. Linum mode is a buffer-local minor mode." :lighter nil ;; (" NLinum" nlinum--desc) (jit-lock-unregister #'nlinum--region) (remove-hook 'window-configuration-change-hook #'nlinum--setup-window t) (remove-overlays (point-min) (point-max) 'nlinum t) (kill-local-variable 'nlinum--width) (when nlinum-mode (add-hook 'window-configuration-change-hook #'nlinum--setup-window nil = t) (jit-lock-register #'nlinum--region t)) (nlinum--setup-windows)) (defun nlinum--setup-window () (set-window-margins nil (if nlinum-mode nlinum--width) (cdr (window-margins)))) (defun nlinum--setup-windows () (dolist (win (get-buffer-window-list nil nil t)) (with-selected-window win (nlinum--setup-window)))) (defun nlinum--new-width () (nlinum--setup-windows) (remove-overlays (point-min) (point-max) 'nlinum t) (run-with-timer 0 nil (lambda (buf) (with-current-buffer buf (with-silent-modifications (remove-text-properties (point-min) (point-max) '(fontified))))) (current-buffer))) (defun nlinum--ol-count () (let ((i 0)) (dolist (ol (overlays-in (point-min) (point-max))) (when (overlay-get ol 'nlinum) (incf i))) i)) (defun nlinum--region (start limit) (save-excursion ;; Text may contain those nasty intangible properties, but ;; that shouldn't prevent us from counting those lines. (let ((inhibit-point-motion-hooks t)) (goto-char start) (unless (bolp) (forward-line 1)) (remove-overlays (point) limit 'nlinum t) (let ((line (line-number-at-pos)) (fmt (format "%%%dd" nlinum--width))) (while (and (not (eobp)) (< (point) limit) (let* ((ol (make-overlay (point) (1+ (point)))) (str (format fmt line)) (width (string-width str))) (when (< nlinum--width width) (setq nlinum--width width) (nlinum--new-width)) (overlay-put ol 'nlinum t) (overlay-put ol 'evaporate t) (overlay-put ol 'before-string (propertize " " 'display `((margin left-margin) ,(propertize str 'face 'linum)))) (setq line (1+ line)) (zerop (forward-line 1)))))))) nil) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20 (provide 'nlinum) ;;; nlinum.el ends here --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 16 23:02:37 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 03:02:37 +0000 Received: from localhost ([127.0.0.1]:58372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUqz4-00076R-DL for submit@debbugs.gnu.org; Wed, 16 May 2012 23:02:35 -0400 Received: from mail-yx0-f172.google.com ([209.85.213.172]:57704) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUqz1-00076E-9s for 11496@debbugs.gnu.org; Wed, 16 May 2012 23:02:32 -0400 Received: by yenq13 with SMTP id q13so1368350yen.3 for <11496@debbugs.gnu.org>; Wed, 16 May 2012 20:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=y0vvtFQA0KbsRdHwaIfkN9AiOPNpYNcjdDhzsZfMMIs=; b=dcjh/4Cn2cd9JkgcNBfVIR45vYmXvC0/CrGj1QelB5WAyH87hSVBwmds1JgfkV954z WxsA5WzgRBGc1caU6A2wgCAIEQJ6NV0s5ZIrlqtwk2jscniFsNAONKxFSLEJRqm8peRS SBDeQaeOnC0mXuKYczRudXAHsbY4kiSqNUTybnf+xb/jJjRzVBJgOLp+tjUVKwQG3I4j muFd8feaV0lqvu8H/CY8E0TyM3VKL5ryC4zqmPXr/k58WKJKPk0Cp/9uShqteDeloD8f e2xuRKsiPOMipy204LzWohNhZN5hdQUdQHRDRh2wU0whSW0SPgy4Q8MR2ZVNPSGUNGkw bhww== Received: by 10.50.222.202 with SMTP id qo10mr12114568igc.0.1337223731771; Wed, 16 May 2012 20:02:11 -0700 (PDT) Received: from [192.168.1.5] (174-29-203-252.hlrn.qwest.net. [174.29.203.252]) by mx.google.com with ESMTPS id wp4sm17155533igc.3.2012.05.16.20.02.10 (version=SSLv3 cipher=OTHER); Wed, 16 May 2012 20:02:10 -0700 (PDT) Message-ID: <4FB46A30.8070703@gmail.com> Date: Wed, 16 May 2012 21:02:08 -0600 From: Christoph Scholtes User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode References: <86likr37id.fsf@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11496 Cc: 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) On 5/16/2012 8:40 PM, Stefan Monnier wrote: > You may have more luck with my reimplementation of linum which uses > jit-lock, which hopefully fixes those problems (tho it may come with > others of course). Sweet! Works like it should. Thank you. :) Would it be hard to add the "relative line number" feature with your code? Like this: 4 foo 3 bar 2 foo 1 baz 0 -> point 1 foo 2 bla 3 zupp I used vim recently and found this pretty handy to move around with prefix arguments. Thanks, Christoph From debbugs-submit-bounces@debbugs.gnu.org Wed May 16 23:51:07 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 03:51:07 +0000 Received: from localhost ([127.0.0.1]:58438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUrk3-0008CQ-81 for submit@debbugs.gnu.org; Wed, 16 May 2012 23:51:07 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:39515) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUrk0-0008Br-RN for 11496@debbugs.gnu.org; Wed, 16 May 2012 23:51:05 -0400 Received: by dacx6 with SMTP id x6so1721474dac.3 for <11496@debbugs.gnu.org>; Wed, 16 May 2012 20:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=mDGfIoZbwn7yr5fqdA0WZNkitIAO2KAAXHrreFJRfNQ=; b=k4ivE5hNZWyGghYXXtxlU2/wQ+WZRHf7nF5QE2aYjqrRVH6RBgIkl9qiFOh4mEVXSA UES5WIS2Yv3DJ033V1ElqlJIiNt5Ahs23Yq5jXrMiGRO7GGMVIQgUjoI7IZMsxYfDtm9 th0Ezv1BoTG3P7s/+F4eRWfspUcdSl4TywEWndj5TnM/N15UFlz5Esm35zGcguegn64O Wl6wE4be1ZJ1SNfIsumboDlF2IqrOiAx/gGIqFQoQAGqlnGlGilT6cMuMSmo0Rg04CUB 27ZPihi2PC9kjUcH5w1tk4H9j+f/IcUP6fpZO0aIC9kHUdwbypLR3OQwGfQUCTEFKnVP 0I/g== Received: by 10.68.223.37 with SMTP id qr5mr22878532pbc.159.1337226645624; Wed, 16 May 2012 20:50:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.156.10 with HTTP; Wed, 16 May 2012 20:50:05 -0700 (PDT) In-Reply-To: References: <86likr37id.fsf@googlemail.com> From: Juanma Barranquero Date: Thu, 17 May 2012 05:50:05 +0200 Message-ID: Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11496 Cc: Christoph Scholtes , 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Thu, May 17, 2012 at 4:40 AM, Stefan Monnier wrote: > You may have more luck with my reimplementation of linum which uses > jit-lock, which hopefully fixes those problems (tho it may come with > others of course). The first one is that it displays the line numbers using only as many columns as needed for the largest line number it has already shown; it does not take into account the number of lines in the buffer. This is quite noticeable, for example, in emacs -Q -f view-emacs-news -f linum-mode vs. emacs -Q -f view-emacs-mode -l nlinum -f nlinum-mode Also, linum mode's linum-before-numbering-hook and linum-format are quite useful for non-standard line numbering. Equivalent functionality would be nice. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu May 17 05:10:25 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 09:10:26 +0000 Received: from localhost ([127.0.0.1]:58599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUwj3-0007Fx-O6 for submit@debbugs.gnu.org; Thu, 17 May 2012 05:10:25 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:60158) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SUwij-0007F4-8M for 11496@debbugs.gnu.org; Thu, 17 May 2012 05:10:24 -0400 Received: (qmail invoked by alias); 17 May 2012 09:09:44 -0000 Received: from 62-47-35-195.adsl.highway.telekom.at (EHLO [62.47.35.195]) [62.47.35.195] by mail.gmx.net (mp016) with SMTP; 17 May 2012 11:09:44 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18IjgFqF8YIqlMt4Otal1Z+KuU7Jn6AZZK4TiJ9Zb QDfeAQ4hEVisGe Message-ID: <4FB4C056.7070206@gmx.at> Date: Thu, 17 May 2012 11:09:42 +0200 From: martin rudalics MIME-Version: 1.0 To: Christoph Scholtes Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode References: <86likr37id.fsf@googlemail.com> In-Reply-To: <86likr37id.fsf@googlemail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11496 Cc: 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Start with emacs -Q. > Don't maximize frame. > Open a file that has more lines than the current frame. > M-x linum-mode > Maximize frame. > Line numbers are only drawn where the original, visible frame boundary > was. > Press down arrow key. > Line numbers are redrawn for the entire frame. A trivial bug: linum should run `linum-after-config' when the window configuration changes. > The same thing happens when narrowing on a function and then widen > again. Only the narrowed piece has the new line numbers until the next > explicit redraw. That's a different issue. martin From debbugs-submit-bounces@debbugs.gnu.org Thu May 17 06:12:31 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 10:12:31 +0000 Received: from localhost ([127.0.0.1]:58677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUxh8-0000CK-EU for submit@debbugs.gnu.org; Thu, 17 May 2012 06:12:30 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:55653) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SUxh6-0000C5-AK for 11496@debbugs.gnu.org; Thu, 17 May 2012 06:12:29 -0400 Received: (qmail invoked by alias); 17 May 2012 10:12:07 -0000 Received: from 62-47-35-195.adsl.highway.telekom.at (EHLO [62.47.35.195]) [62.47.35.195] by mail.gmx.net (mp032) with SMTP; 17 May 2012 12:12:07 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19yTF8RguByWNEGYllsZA88oP8JArmG8PRs88d9ro U6BuQRDgWWRHJI Message-ID: <4FB4CEFA.6010406@gmx.at> Date: Thu, 17 May 2012 12:12:10 +0200 From: martin rudalics MIME-Version: 1.0 To: Christoph Scholtes Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode References: <86likr37id.fsf@googlemail.com> <4FB4C056.7070206@gmx.at> In-Reply-To: <4FB4C056.7070206@gmx.at> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11496 Cc: 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > A trivial bug: linum should run `linum-after-config' when the window > configuration changes. I was misguided. While linum should update all windows when the window configuration changes, it won't help in this specific case. martin From debbugs-submit-bounces@debbugs.gnu.org Thu May 17 09:08:57 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 13:08:57 +0000 Received: from localhost ([127.0.0.1]:58831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV0Rt-0005NT-6I for submit@debbugs.gnu.org; Thu, 17 May 2012 09:08:57 -0400 Received: from smtprelay-b11.telenor.se ([62.127.194.20]:44945) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV0RY-0005Mu-Re for 11496@debbugs.gnu.org; Thu, 17 May 2012 09:08:56 -0400 Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 7DE44DC81 for <11496@debbugs.gnu.org>; Thu, 17 May 2012 15:08:15 +0200 (CEST) X-SMTPAUTH-B2: [bocjoh] X-SENDER-IP: [85.229.0.223] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AntxAAb4tE9V5QDfPGdsb2JhbABEiXaoJgOBIRkBAQEBNzSCFQEBBAFWIwULCyElDwEEGAEMChoTiAkJvAuLcYR5A6kl X-IronPort-AV: E=Sophos;i="4.75,610,1330902000"; d="scan'208";a="121506025" Received: from c-df00e555.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.229.0.223]) by ipb3.telenor.se with ESMTP; 17 May 2012 15:08:14 +0200 Received: by muon.localdomain (Postfix, from userid 1000) id 86E776AC1B3; Thu, 17 May 2012 15:08:13 +0200 (CEST) From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= To: Stefan Monnier Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode References: <86likr37id.fsf@googlemail.com> Mail-Copies-To: never Date: Thu, 17 May 2012 15:08:13 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 16 May 2012 22:40:39 -0400") Message-ID: <877gwblzuq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11496 Cc: Christoph Scholtes , 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Stefan Monnier writes: > You may have more luck with my reimplementation of linum which uses > jit-lock, which hopefully fixes those problems (tho it may come with > others of course). A question: Why doesn't linum-mode (nor anything else) use `window-text-change-functions', since that hook was added specifically to support linum? (See old threads in emacs-devel.) From debbugs-submit-bounces@debbugs.gnu.org Thu May 17 09:49:21 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 13:49:21 +0000 Received: from localhost ([127.0.0.1]:58869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV14y-0006HE-Pw for submit@debbugs.gnu.org; Thu, 17 May 2012 09:49:20 -0400 Received: from relais.videotron.ca ([24.201.245.36]:14200) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV14w-0006H5-Qk for 11496@debbugs.gnu.org; Thu, 17 May 2012 09:49:19 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from fmsmemgm.homelinux.net ([184.161.23.35]) by VL-VM-MR003.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0M4600LW66DPL160@VL-VM-MR003.ip.videotron.ca> for 11496@debbugs.gnu.org; Thu, 17 May 2012 09:49:01 -0400 (EDT) Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 7C0EEAE0E5; Thu, 17 May 2012 09:49:01 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode Message-id: References: <86likr37id.fsf@googlemail.com> Date: Thu, 17 May 2012 09:49:01 -0400 In-reply-to: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11496 Cc: Christoph Scholtes , 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > The first one is that it displays the line numbers using only as many > columns as needed for the largest line number it has already shown; it > does not take into account the number of lines in the buffer. Yes, that's a difference. I don't see why it would be considered a problem. > Also, linum mode's linum-before-numbering-hook and linum-format are > quite useful for non-standard line numbering. Equivalent functionality > would be nice. ;-) Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu May 17 10:00:25 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 14:00:25 +0000 Received: from localhost ([127.0.0.1]:59344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV1Fg-0006dU-PA for submit@debbugs.gnu.org; Thu, 17 May 2012 10:00:25 -0400 Received: from relais.videotron.ca ([24.201.245.36]:25263) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV1Fc-0006dL-TI for 11496@debbugs.gnu.org; Thu, 17 May 2012 10:00:21 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from fmsmemgm.homelinux.net ([184.161.23.35]) by VL-VM-MR003.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0M4600LGM6VWL180@VL-VM-MR003.ip.videotron.ca> for 11496@debbugs.gnu.org; Thu, 17 May 2012 09:59:56 -0400 (EDT) Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 3B1CBAE0E5; Thu, 17 May 2012 09:59:55 -0400 (EDT) From: Stefan Monnier To: Christoph Scholtes Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode Message-id: References: <86likr37id.fsf@googlemail.com> <4FB46A30.8070703@gmail.com> Date: Thu, 17 May 2012 09:59:55 -0400 In-reply-to: <4FB46A30.8070703@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11496 Cc: 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Would it be hard to add the "relative line number" feature with your code? Depends on how badly you want it and how reliable you want it. `jit-lock' is not triggered by mere cursor movement, so you need to use another hook to detect when we move to another line, after which you'll have to flush all the nlinum overlays and recompute them, and since we want jit-lock to recompute them (so that all (but only) visible parts of the buffer get recomputed), that means telling jit-lock to redo the buffer, which will make it re-font-lock as well. So it'll be a bit costly. IOW, you need to hook into nlinum.el's display so it puts relative numbers (easy), and then add something like (add-hook 'post-command-hook (lambda () (if (current-line-number-changed-p) (remove-text-properties (point-min) (point-max) '(fontified nil))))) And of course, post-command-hook will not always be sufficient. Stefan PS: And of course, there's the problem (also present in the linum.el hack) that the cursor position is a window-property so when the buffer is shown in various windows the relative line numbers may not make that much sense in other buffers. So maybe you'd really want this relative numbering to be different for every window. From debbugs-submit-bounces@debbugs.gnu.org Thu May 17 12:13:57 2012 Received: (at 11496) by debbugs.gnu.org; 17 May 2012 16:13:57 +0000 Received: from localhost ([127.0.0.1]:59489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV3Ku-0001HJ-RE for submit@debbugs.gnu.org; Thu, 17 May 2012 12:13:57 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:43379) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SV3Ks-0001H3-Cg for 11496@debbugs.gnu.org; Thu, 17 May 2012 12:13:55 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M4600800D07GB00@a-mtaout22.012.net.il> for 11496@debbugs.gnu.org; Thu, 17 May 2012 19:13:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M46008H9D2G9M20@a-mtaout22.012.net.il>; Thu, 17 May 2012 19:13:29 +0300 (IDT) Date: Thu, 17 May 2012 19:15:46 +0300 From: Eli Zaretskii Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode In-reply-to: <4FB4CEFA.6010406@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83mx56okb1.fsf@gnu.org> References: <86likr37id.fsf@googlemail.com> <4FB4C056.7070206@gmx.at> <4FB4CEFA.6010406@gmx.at> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11496 Cc: cschol2112@googlemail.com, 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Thu, 17 May 2012 12:12:10 +0200 > From: martin rudalics > Cc: 11496@debbugs.gnu.org > > > A trivial bug: linum should run `linum-after-config' when the window > > configuration changes. > > I was misguided. While linum should update all windows when the window > configuration changes, it won't help in this specific case. It looks like some problem with redisplay, or maybe linum-mode is not forcing redisplay when it should. In any case, similar problems exist in Emacs 23.3, so this is not exactly a regression. I will try to take a closer look when I have time (it's tricky to debug this because any command that causes redisplay makes the problem disappear). Ideas are welcome. From debbugs-submit-bounces@debbugs.gnu.org Fri May 18 13:59:53 2012 Received: (at 11496) by debbugs.gnu.org; 18 May 2012 17:59:54 +0000 Received: from localhost ([127.0.0.1]:33074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVRSz-0007xW-Cw for submit@debbugs.gnu.org; Fri, 18 May 2012 13:59:53 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:58423) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVRSx-0007xI-Rm for 11496@debbugs.gnu.org; Fri, 18 May 2012 13:59:52 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgFAOMAh09FpZld/2dsb2JhbAA3oRSCLoEIgXUBAQQBViMQCzQSFBgNJIgTohGLeA4YRgwDgz4DBwEGAwyDUwSjY4RY X-IronPort-AV: E=Sophos;i="4.73,1,1325480400"; d="scan'208";a="181019742" Received: from 69-165-153-93.dsl.teksavvy.com (HELO pastel.home) ([69.165.153.93]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 May 2012 13:59:23 -0400 Received: by pastel.home (Postfix, from userid 20848) id A06D459577; Fri, 18 May 2012 13:59:23 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#11496: 24.1.50; Line numbers are not redrawn correctly in linum-mode Message-ID: References: <86likr37id.fsf@googlemail.com> <4FB4C056.7070206@gmx.at> <4FB4CEFA.6010406@gmx.at> <83mx56okb1.fsf@gnu.org> Date: Fri, 18 May 2012 13:59:23 -0400 In-Reply-To: <83mx56okb1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 May 2012 19:15:46 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 11496 Cc: cschol2112@googlemail.com, martin rudalics , 11496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> > A trivial bug: linum should run `linum-after-config' when the window >> > configuration changes. >> I was misguided. While linum should update all windows when the window >> configuration changes, it won't help in this specific case. > It looks like some problem with redisplay, or maybe linum-mode is not > forcing redisplay when it should. In any case, similar problems exist > in Emacs 23.3, so this is not exactly a regression. I will try to > take a closer look when I have time (it's tricky to debug this because > any command that causes redisplay makes the problem disappear). Ideas > are welcome. I wouldn't waste too much time on it: linum.el suffers from the same kinds of problems as lazy-lock because it similarly combines several "somewhat related" hooks to try and cover most cases. I think that using jit-lock is a much better way to go about it since that hook is much better focused, hence my nlinum.el rewrite. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 07 21:01:46 2012 Received: (at control) by debbugs.gnu.org; 8 Oct 2012 01:01:46 +0000 Received: from localhost ([127.0.0.1]:60538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TL1j8-0002yr-C7 for submit@debbugs.gnu.org; Sun, 07 Oct 2012 21:01:46 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:54016 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TL1j6-0002yk-K2 for control@debbugs.gnu.org; Sun, 07 Oct 2012 21:01:45 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TL1ih-0001w6-PH for control@debbugs.gnu.org; Sun, 07 Oct 2012 21:01:19 -0400 Date: Sun, 07 Oct 2012 21:01:19 -0400 Message-Id: Subject: control message for bug 12600 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) merge 11496 12600 From unknown Mon Aug 18 14:26:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 07 Dec 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator