GNU bug report logs - #20674
linum-mode overwrites existing margin width

Previous Next

Package: emacs;

Reported by: "Paul W. Rankin" <hello <at> paulwrankin.com>

Date: Wed, 27 May 2015 15:37:02 UTC

Severity: minor

Tags: fixed

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Paul W. Rankin" <hello <at> paulwrankin.com>
To: bug-gnu-emacs <at> gnu.org
Subject: linum-mode overwrites existing margin width
Date: Wed, 27 May 2015 17:56:03 +1000
I set the window left margin to 25 columns, then activated linum-mode,
which sets the left margin to 3 columns (to accommodate the number of
figures in the total line numbers).

Expected behaviour:

linum-mode should only expand left margin as needed, not
overwrite/shrink it.

Example steps to reproduce:

$ emacs -Q

;; in *scratch* buffer

M-: (set-window-margins (selected-window) N) ;; where N is any number > 1

;; window margins are set to N columns.

M-x linum-mode

;; left window margin is reduced to 1 column

Suggestions to remedy:

Either linum-mode.el ~ L167 should be changed to accommodate existing
margin width, setting width to the maximum of existing or calculated
value, or the function should test whether the calculated width exceeds
the current margin width, and only update the window if necessary.




This bug report was last modified 7 years and 198 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.