GNU bug report logs - #8379
The width of linum window is not adjusted after face-remapping

Previous Next

Package: emacs;

Reported by: nixie <onixie <at> gmail.com>

Date: Wed, 30 Mar 2011 01:49:02 UTC

Severity: normal

Merged with 1255, 10960

Fixed in version 25.1

Done: Alan J Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: nixie <onixie <at> gmail.com>
To: 8379 <at> debbugs.gnu.org
Subject: bug#8379: The width of linum window is not adjusted after face-remapping
Date: Wed, 30 Mar 2011 10:43:49 +0900
Hi,

I am green hand in emacs, and starting using GNU Emacs since 23.1.

I found that the width of linum window is not changed with
(text-scale-increase) or (text-scale-decrease) function. 
This is annoying especially when I increase the text size, because the
line number can not be fully viewed.

currently, I use some alleviating code like below to solve this problem.
But I think it does not have generality.

Does someone have any good suggestion on it? Or it can be solved in a
more elegant and general way. I wish that it would be solved in future
version of GNU Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun rescale-window-margin-by-faceremapping (win)
  (let ((width (car (window-margins)))
	(scale (cadr (assoc ':height 
			    (assoc 'default 
				   face-remapping-alist)))))
    (if (numberp scale)
	(progn
	  (set-window-margins win (ceiling (* width scale)) (cdr
(window-margins win)))
	  (force-window-update))
      nil)))

(defadvice linum-update-window (after scaling-margin-width last (win)
activate)
  (rescale-window-margin-by-faceremapping win)
  ad-return-value)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Thanks for any help.


-- 
nixie <onixie <at> gmail.com>





This bug report was last modified 9 years and 130 days ago.

Previous Next


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