[Top][All Lists]

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

Re: 23.0.50; Cannot run calculator on TTY

From: martin rudalics
Subject: Re: 23.0.50; Cannot run calculator on TTY
Date: Tue, 09 Oct 2007 19:07:17 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

I finally isolated the cause of this problem.


In short, if a buffer has a header-line set  i.e. non-nil value
for header-line-format,
then launching calculator there boms with the error shown

Specifically, compare the following two forms:
;;; no error:
(let ((header-line-format nil)
      (window-min-height 2))
  (split-window-vertically -2))

;;; Errors:
(let ((header-line-format "Foo")
      (window-min-height 2))
  (split-window-vertically -2))

Basically when header-line-format is set, the  smallest window
you can make needs 3 lines.

When you're splitting windows, yes.

The fix might be to set header-line-format to nil in the
top-level let form in calculator.

Alternatively we could do something like

  ;; If the modeline might interfere with the calculator buffer,
  ;; use 3 lines instead.
  (- (if (and (fboundp 'face-attr-construct)
                (plist-get (face-attr-construct 'modeline) :overline)))
         -3 -2)
     (if header-line-format 1 0))))

in calculator.  The problem is that `calculator' should do all those
fancy calculations it does for the mode-line for the header-line too.
What do you prefer?  Is a header-line of any use for calculator?

reply via email to

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