GNU bug report logs -
#3971
23.1.50; linum-mode kills right margin
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3971 in the body.
You can then email your comments to 3971 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3971
; Package
emacs
.
(Thu, 30 Jul 2009 04:45:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lennart Borgman <lennart.borgman <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 30 Jul 2009 04:45:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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'
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3971
; Package
emacs
.
(Thu, 30 Jul 2009 05:30:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lennart Borgman <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 30 Jul 2009 05:30:03 GMT)
Full text and
rfc822 format available.
Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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 <at> 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'
>
>
>
>
Reply sent
to
Juanma Barranquero <lekktu <at> gmail.com>
:
You have taken responsibility.
(Tue, 22 Sep 2009 00:20:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Lennart Borgman <lennart.borgman <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 22 Sep 2009 00:20:06 GMT)
Full text and
rfc822 format available.
Message #15 received at 3971-done <at> emacsbugs.donarmstrong.com (full text, mbox):
On Thu, Jul 30, 2009 at 07:24, Lennart Borgman
<lennart.borgman <at> 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
Message #16 received at 3971-done <at> emacsbugs.donarmstrong.com (full text, mbox):
On Tue, Sep 22, 2009 at 2:09 AM, Juanma Barranquero <lekktu <at> gmail.com> wrote:
> On Thu, Jul 30, 2009 at 07:24, Lennart Borgman
> <lennart.borgman <at> 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.
Thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Tue, 20 Oct 2009 14:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.