unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3971: 23.1.50; linum-mode kills right margin
@ 2009-07-30  4:38 ` Lennart Borgman
  2009-07-30  5:24   ` Lennart Borgman
  2009-09-22  0:20   ` bug#3971: marked as done (23.1.50; linum-mode kills right margin) Emacs bug Tracking System
  0 siblings, 2 replies; 3+ messages in thread
From: Lennart Borgman @ 2009-07-30  4:38 UTC (permalink / raw)
  To: emacs-pretest-bug

linum-mode kills the right margin. It should not touch it since it
does not use it. The following patch fixes this:

Index: linum.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/linum.el,v
retrieving revision 1.11
diff -c -b -r1.11 linum.el
*** linum.el	18 Jan 2009 01:45:38 -0000	1.11
--- linum.el	30 Jul 2009 04:35:10 -0000
***************
*** 108,114 ****
    (mapc #'delete-overlay linum-overlays)
    (setq linum-overlays nil)
    (dolist (w (get-buffer-window-list (current-buffer) nil t))
!     (set-window-margins w 0)))

  (defun linum-update-current ()
    "Update line numbers for the current buffer."
--- 108,114 ----
    (mapc #'delete-overlay linum-overlays)
    (setq linum-overlays nil)
    (dolist (w (get-buffer-window-list (current-buffer) nil t))
!     (set-window-margins w 0 (cdr (window-margins w)))))

  (defun linum-update-current ()
    "Update line numbers for the current buffer."
***************
*** 163,169 ****
              (overlay-put ov 'linum-str str))))
        (forward-line)
        (setq line (1+ line)))
!     (set-window-margins win width)))

  (defun linum-after-change (beg end len)
    ;; update overlays on deletions, and after newlines are inserted
--- 163,169 ----
              (overlay-put ov 'linum-str str))))
        (forward-line)
        (setq line (1+ line)))
!     (set-window-margins win width (cdr (window-margins win)))))

  (defun linum-after-change (beg end len)
    ;; update overlays on deletions, and after newlines are inserted



In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-06-30
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#3971: 23.1.50; linum-mode kills right margin
  2009-07-30  4:38 ` bug#3971: 23.1.50; linum-mode kills right margin Lennart Borgman
@ 2009-07-30  5:24   ` Lennart Borgman
  2009-09-22  0:20   ` bug#3971: marked as done (23.1.50; linum-mode kills right margin) Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2009-07-30  5:24 UTC (permalink / raw)
  To: emacs-pretest-bug

Or, maybe it is better to redefine set-window-margins so that a nil
argument for a margin means "don't touch"...?


On Thu, Jul 30, 2009 at 6:38 AM, Lennart
Borgman<lennart.borgman@gmail.com> wrote:
> linum-mode kills the right margin. It should not touch it since it
> does not use it. The following patch fixes this:
>
> Index: linum.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/linum.el,v
> retrieving revision 1.11
> diff -c -b -r1.11 linum.el
> *** linum.el    18 Jan 2009 01:45:38 -0000      1.11
> --- linum.el    30 Jul 2009 04:35:10 -0000
> ***************
> *** 108,114 ****
>    (mapc #'delete-overlay linum-overlays)
>    (setq linum-overlays nil)
>    (dolist (w (get-buffer-window-list (current-buffer) nil t))
> !     (set-window-margins w 0)))
>
>  (defun linum-update-current ()
>    "Update line numbers for the current buffer."
> --- 108,114 ----
>    (mapc #'delete-overlay linum-overlays)
>    (setq linum-overlays nil)
>    (dolist (w (get-buffer-window-list (current-buffer) nil t))
> !     (set-window-margins w 0 (cdr (window-margins w)))))
>
>  (defun linum-update-current ()
>    "Update line numbers for the current buffer."
> ***************
> *** 163,169 ****
>              (overlay-put ov 'linum-str str))))
>        (forward-line)
>        (setq line (1+ line)))
> !     (set-window-margins win width)))
>
>  (defun linum-after-change (beg end len)
>    ;; update overlays on deletions, and after newlines are inserted
> --- 163,169 ----
>              (overlay-put ov 'linum-str str))))
>        (forward-line)
>        (setq line (1+ line)))
> !     (set-window-margins win width (cdr (window-margins win)))))
>
>  (defun linum-after-change (beg end len)
>    ;; update overlays on deletions, and after newlines are inserted
>
>
>
> In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
>  of 2009-06-30
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --no-opt --cflags
> -Ic:/g/include -fno-crossjumping'
>
>
>
>





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#3971: marked as done (23.1.50; linum-mode kills right margin)
  2009-07-30  4:38 ` bug#3971: 23.1.50; linum-mode kills right margin Lennart Borgman
  2009-07-30  5:24   ` Lennart Borgman
@ 2009-09-22  0:20   ` Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2009-09-22  0:20 UTC (permalink / raw)
  To: Juanma Barranquero

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

Your message dated Tue, 22 Sep 2009 02:09:43 +0200
with message-id <f7ccd24b0909211709l2c1f9093g589cc838e137b8f6@mail.gmail.com>
and subject line Re: bug#3971: 23.1.50; linum-mode kills right margin
has caused the Emacs bug report #3971,
regarding 23.1.50; linum-mode kills right margin
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3971: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3971
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4617 bytes --]

From: Lennart Borgman <lennart.borgman@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.50; linum-mode kills right margin
Date: Thu, 30 Jul 2009 06:38:26 +0200
Message-ID: <e01d8a50907292138u3a5c148fqd90abe3fdf388b51@mail.gmail.com>

linum-mode kills the right margin. It should not touch it since it
does not use it. The following patch fixes this:

Index: linum.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/linum.el,v
retrieving revision 1.11
diff -c -b -r1.11 linum.el
*** linum.el	18 Jan 2009 01:45:38 -0000	1.11
--- linum.el	30 Jul 2009 04:35:10 -0000
***************
*** 108,114 ****
    (mapc #'delete-overlay linum-overlays)
    (setq linum-overlays nil)
    (dolist (w (get-buffer-window-list (current-buffer) nil t))
!     (set-window-margins w 0)))

  (defun linum-update-current ()
    "Update line numbers for the current buffer."
--- 108,114 ----
    (mapc #'delete-overlay linum-overlays)
    (setq linum-overlays nil)
    (dolist (w (get-buffer-window-list (current-buffer) nil t))
!     (set-window-margins w 0 (cdr (window-margins w)))))

  (defun linum-update-current ()
    "Update line numbers for the current buffer."
***************
*** 163,169 ****
              (overlay-put ov 'linum-str str))))
        (forward-line)
        (setq line (1+ line)))
!     (set-window-margins win width)))

  (defun linum-after-change (beg end len)
    ;; update overlays on deletions, and after newlines are inserted
--- 163,169 ----
              (overlay-put ov 'linum-str str))))
        (forward-line)
        (setq line (1+ line)))
!     (set-window-margins win width (cdr (window-margins win)))))

  (defun linum-after-change (beg end len)
    ;; update overlays on deletions, and after newlines are inserted



In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
 of 2009-06-30
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'


[-- Attachment #3: Type: message/rfc822, Size: 2757 bytes --]

From: Juanma Barranquero <lekktu@gmail.com>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: 3971-done@emacsbugs.donarmstrong.com
Subject: Re: bug#3971: 23.1.50; linum-mode kills right margin
Date: Tue, 22 Sep 2009 02:09:43 +0200
Message-ID: <f7ccd24b0909211709l2c1f9093g589cc838e137b8f6@mail.gmail.com>

On Thu, Jul 30, 2009 at 07:24, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> Or, maybe it is better to redefine set-window-margins so that a nil
> argument for a margin means "don't touch"...?

I think that would be cleaner, because 0 is already available to set a
margin to "no margin".

But that's an interface change, so for now I've installed your change,
which fixes the bug.

    Juanma

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-22  0:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <f7ccd24b0909211709l2c1f9093g589cc838e137b8f6@mail.gmail.com>
2009-07-30  4:38 ` bug#3971: 23.1.50; linum-mode kills right margin Lennart Borgman
2009-07-30  5:24   ` Lennart Borgman
2009-09-22  0:20   ` bug#3971: marked as done (23.1.50; linum-mode kills right margin) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).