emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ruler-mode is broken


From: David PONCE
Subject: Re: ruler-mode is broken
Date: Wed, 8 Oct 2003 14:28:07 +0200 (CEST)

> I think the bug in set-fringe-style is not related to the bug in
> ruler mode.  set-fringe-style sometimes sets the fringes to the
> wrong width, but window-fringes seems to return the widths to which
> the fringes are actually set.  So if ruler mode uses window-fringes
> to compute the fringe widths, it should work properly.
> 
> By the way, on my Emacs, both the minimal and the half style of
> fringe-mode set the actual fringes to:
> 
> (window-fringes) => (5 6 nil)
> 
> So maybe you can reproduce the bug in ruler mode by using these
> values.

I tried these values and ruler-mode worked fine here.
Perhaps another window's related value is not the one expected?

The ruler string size is given by this function:

(defsubst ruler-mode-full-window-width ()
  "Return the full width of the selected window."
  (let ((edges (window-edges)))
    (- (nth 2 edges) (nth 0 edges))))

So what does `window-edges' return with different values of fringes?

Here is a sample I run on my NT box (with ruler-mode enabled in the
*scratch* buffer):

(mapcar '(lambda (f)
           (apply 'set-window-fringes nil f)
           (message "set-w-fringes=%S, w-fringes=>%S, w-edges=>%S"
                    f (window-fringes) (window-edges)))
        '((nil nil nil)
          (0 0 nil)
          (1 0 nil)
          (0 1 nil)
          (4 4 nil)
          (0 4 nil)
          (4 0 nil)
          ))

And the result:

("set-w-fringes=(nil nil nil), w-fringes=>(8 8 nil), w-edges=>(0 0 100 34)"
 "set-w-fringes=(0 0 nil), w-fringes=>(0 0 nil), w-edges=>(0 0 100 34)"
 "set-w-fringes=(1 0 nil), w-fringes=>(1 0 nil), w-edges=>(0 0 100 34)"
 "set-w-fringes=(0 1 nil), w-fringes=>(0 1 nil), w-edges=>(0 0 100 34)"
 "set-w-fringes=(4 4 nil), w-fringes=>(4 4 nil), w-edges=>(0 0 100 34)"
 "set-w-fringes=(0 4 nil), w-fringes=>(0 4 nil), w-edges=>(0 0 100 34)"
 "set-w-fringes=(4 0 nil), w-fringes=>(4 0 nil), w-edges=>(0 0 100 34)")

Thanks!
David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]