all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "T. V. Raman" <raman@users.sf.net>
To: rudalics@gmx.at
Cc: emacs-pretest-bug@gnu.org, raman@users.sf.net
Subject: Re: 23.0.50; Cannot run calculator on TTY
Date: Mon, 1 Oct 2007 20:13:46 -0700	[thread overview]
Message-ID: <18177.46954.59945.891659@gargle.gargle.HOWL> (raw)
In-Reply-To: <4701153E.7010408@gmx.at>



>>>>> "martin" == martin rudalics <rudalics@gmx.at> writes:
    >> Apologies about the Ad-orig -- that's because everything
    >> has been advised by Emacspeak.
    martin> 
    martin> I understand.  The problem is that apparently
    martin> 
    martin>    ad-Orig-calculator()
    martin> 
    martin> wants to do
    martin> 
    martin>    split-window-vertically(-2)

The problem is in the calculator.el code.
My advice is benign --(will attach it here)
but it's the original code, i.e. ad-Orig-calculator that is
ending up with the bizarre -2.
I tried to understand the code in calculator.el that does this
but failed.

Here is the advice I have on calculator:
(defadvice calculator (after emacspeak pre act comp)
  "Speech enable calculator."
  (when (interactive-p)
    (emacspeak-auditory-icon 'open-object)
    (message "Welcome to the pocket calculator.")))

All the above does is to speak a message and play a sound after
the calculator is up.

The problem lines in calculator.el appear to be:
;;; starting on line 734:

(let ((split-window-keep-point nil)
               (window-min-height 2))
           ;; maybe leave two lines for our window because of the normal
           ;; `raised' modeline in Emacs 21
           (select-window
            (split-window-vertically
             ;; If the modeline might interfere with the calculator buffer,
             ;; use 3 lines instead.
             (if (and (fboundp 'face-attr-construct)
                      (let* ((dh (plist-get (face-attr-construct 'default) :height))
                             (mf (face-attr-construct 'modeline))
                             (mh (plist-get mf :height)))
                        ;; If the modeline is shorter than the default,
                        ;; stick with 2 lines.  (It may be necessary to
                        ;; check how much shorter.)
                        (and
                         (not
                          (or (and (integerp dh)
                                   (integerp mh)
                                   (< mh dh))
                              (and (numberp mh)
                                   (not (integerp mh))
                                   (< mh 1))))
                         (or
                          ;; If the modeline is taller than the default,
                          ;; use 3 lines.
                          (and (integerp dh)
                               (integerp mh)
                               (> mh dh))
                          (and (numberp mh)
                               (not (integerp mh))
                               (> mh 1))
                          ;; If the modeline has a box with non-negative line-width,
                          ;; use 3 lines.
                          (let* ((bx (plist-get mf :box))
                                 (lh (plist-get bx :line-width)))
                            (and bx
                                 (or
                                  (not lh)
                                  (> lh 0))))
                          ;; If the modeline has an overline, use 3 lines.
                          (plist-get (face-attr-construct 'modeline) :overline)))))
               -3 -2)))
           (switch-to-buffer calculator-buffer))

Notice the call to split-window-vertically above, and the
somewhat complex code that determines the numeric argument being
passed to that call.


    martin> 
    martin> which eventually has `split-window' complain.  If you
    martin> bind `window-min-height' to 2 around this the
    martin> complaints should go away, hopefully.
Not sure what you mean.
I got the code to work by deleting the split-window-vertically
    martin> call in my copy of calculator --which is not
    martin> completely right -- because  
obviously, I then end up with the calculator taking the whole
    martin> screen.

    martin> 
    >> window-min-height is 4 -- I've not changed it.
    martin> 
    martin> Did you change it earlier?
No, I dont touch it.

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs

  reply	other threads:[~2007-10-02  3:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-01  2:35 23.0.50; Cannot run calculator on TTY raman
2007-10-01  6:16 ` martin rudalics
2007-10-01 13:17   ` T. V. Raman
2007-10-01 15:41     ` martin rudalics
2007-10-02  3:13       ` T. V. Raman [this message]
2007-10-02  7:32         ` martin rudalics
2007-10-02 13:23           ` T. V. Raman
2007-10-02 17:51             ` martin rudalics
2007-10-03  1:49               ` T. V. Raman
2007-10-03  6:21                 ` martin rudalics
     [not found]                   ` <18179.41840.532732.664369@gargle.gargle.HOWL>
     [not found]                     ` <18187.33374.913139.901742@gargle.gargle.HOWL>
2007-10-09 17:07                       ` martin rudalics
2007-10-11  4:21                         ` T. V. Raman
2007-10-11  8:50                           ` martin rudalics
2007-10-11 13:30                             ` T. V. Raman
2007-10-12  9:23                               ` martin rudalics
2007-10-13  0:18                                 ` Richard Stallman
2007-10-13  9:02                                   ` martin rudalics
2007-10-13 19:47                                     ` Richard Stallman
2007-10-26 21:03                                       ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18177.46954.59945.891659@gargle.gargle.HOWL \
    --to=raman@users.sf.net \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.