* 23.0.50; Cannot run calculator on TTY
@ 2007-10-01 2:35 raman
2007-10-01 6:16 ` martin rudalics
0 siblings, 1 reply; 19+ messages in thread
From: raman @ 2007-10-01 2:35 UTC (permalink / raw)
To: emacs-pretest-bug
I can no longer run M-x calculator with emacs running on the
Linux console (outside X).
Error I get is:
ad-Orig-split-window-vertically: Window height 2 too small (after
splitting)
Here is a backtrace:
ad-Orig-split-window-vertically: Window height 2 too small (after splitting)
Debugger entered--Lisp error: (error "Window height 2 too small (after splitting)")
split-window(nil 10)
ad-Orig-split-window-vertically(-2)
split-window-vertically(-2)
ad-Orig-calculator()
calculator()
call-interactively(calculator)
execute-extended-command(nil)
call-interactively(execute-extended-command)
In GNU Emacs 23.0.50.26 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
of 2007-09-27 on labrador
configured using `configure '--prefix=/usr/local' '--with-gtk' '--with-gpm' '--with-rsvg' '--with-png' '--with-jpeg' '--with-gif''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: nil
Major mode: VM
Minor modes in effect:
erc-menu-mode: t
erc-autojoin-mode: t
erc-ring-mode: t
erc-pcomplete-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-netsplit-mode: t
erc-track-mode: t
erc-track-minor-mode: t
erc-match-mode: t
jabber-activity-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-readonly-mode: t
dynamic-completion-mode: t
dired-omit-mode: t
shell-dirtrack-mode: t
savehist-mode: t
display-time-mode: t
desktop-save-mode: t
auto-insert-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
Recent input:
RET c d SPC a f g h a n RET w g e t SPC C-y RET m v
SPC b o TAB m o n . r a m RET C-x C-f m o RET ESC <
ESC [ [ D ESC > c u r l SPC C-y C-e e ESC b ESC b C-d
C-d C-d t u e C-e C-e SPC > SPC t u e . r a m RET ESC
p C-e e ESC b ESC b C-k ESC b ESC b C-k w e d . r p
m SPC > SPC w e d . r a m RET ESC p C-e C-e ESC b ESC
b ESC b ESC b C-k t h u . r p m SPC > SPC t h u . r
a m RET ESC p ESC p C-e C-e ESC b ESC b ESC b ESC b
C-k f r i . r p m SPC > SPC f r i . r a m RET f o r
SPC i SPC i n SPC * . r a m RET d o SPC RET r a m p
3 DEL DEL DEL m 2 p m DEL DEL m p 3 SPC $ i RET d o
n e RET C-e m C-x @ h m ESC C-s q C-e x m ESC m SPC
ESC g RET 1 RET N k k k k k k ' V S C-e m N n P j '
n j ' n j ' ESC c q n k k k ESC x c a l c u l TAB RET
C-e a ESC x r e o DEL DEL DEL r e p o r t SPC e m TAB
b TAB RET
Recent messages:
Decoding MIME message...
Decoding quoted-printable... done
Wrote /tmp/vm-pgg-signature5850T9K
Decoding MIME message... done
Hid 17 citation lines
All messages have been marked as deleted.
Expunging...
Decoding MIME message... done
Deleted messages expunged.
nil
ad-Orig-split-window-vertically: Window height 2 too small (after splitting)
--
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
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
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
0 siblings, 1 reply; 19+ messages in thread
From: martin rudalics @ 2007-10-01 6:16 UTC (permalink / raw)
To: T. V. Raman; +Cc: emacs-pretest-bug
> I can no longer run M-x calculator with emacs running on the
> Linux console (outside X).
> Error I get is:
> ad-Orig-split-window-vertically: Window height 2 too small (after
> splitting)
>
> Here is a backtrace:
> ad-Orig-split-window-vertically: Window height 2 too small (after splitting)
>
> Debugger entered--Lisp error: (error "Window height 2 too small (after splitting)")
> split-window(nil 10)
> ad-Orig-split-window-vertically(-2)
> split-window-vertically(-2)
> ad-Orig-calculator()
> calculator()
> call-interactively(calculator)
> execute-extended-command(nil)
> call-interactively(execute-extended-command)
What do the "ad-Orig-..." do? What is the value of `window-min-height'
when they attempt to split the window?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-01 6:16 ` martin rudalics
@ 2007-10-01 13:17 ` T. V. Raman
2007-10-01 15:41 ` martin rudalics
0 siblings, 1 reply; 19+ messages in thread
From: T. V. Raman @ 2007-10-01 13:17 UTC (permalink / raw)
To: rudalics; +Cc: emacs-pretest-bug, raman
Apologies about the Ad-orig -- that's because everything has been
advised by Emacspeak.
window-min-height is 4 -- I've not changed it.
>>>>> "martin" == martin rudalics <rudalics@gmx.at> writes:
>> I can no longer run M-x calculator with emacs running on
>> the Linux console (outside X). Error I get is:
>> ad-Orig-split-window-vertically: Window height 2 too small
>> (after splitting)
>>
>> Here is a backtrace: ad-Orig-split-window-vertically:
>> Window height 2 too small (after splitting)
>>
>> Debugger entered--Lisp error: (error "Window height 2 too
>> small (after splitting)") split-window(nil 10)
>> ad-Orig-split-window-vertically(-2)
>> split-window-vertically(-2) ad-Orig-calculator()
>> calculator() call-interactively(calculator)
>> execute-extended-command(nil)
>> call-interactively(execute-extended-command)
martin>
martin> What do the "ad-Orig-..." do? What is the value of
martin> `window-min-height' when they attempt to split the
martin> window?
--
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
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-01 13:17 ` T. V. Raman
@ 2007-10-01 15:41 ` martin rudalics
2007-10-02 3:13 ` T. V. Raman
0 siblings, 1 reply; 19+ messages in thread
From: martin rudalics @ 2007-10-01 15:41 UTC (permalink / raw)
To: raman; +Cc: emacs-pretest-bug
> Apologies about the Ad-orig -- that's because everything has been
> advised by Emacspeak.
I understand. The problem is that apparently
ad-Orig-calculator()
wants to do
split-window-vertically(-2)
which eventually has `split-window' complain. If you bind
`window-min-height' to 2 around this the complaints should go away,
hopefully.
> window-min-height is 4 -- I've not changed it.
Did you change it earlier?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-01 15:41 ` martin rudalics
@ 2007-10-02 3:13 ` T. V. Raman
2007-10-02 7:32 ` martin rudalics
0 siblings, 1 reply; 19+ messages in thread
From: T. V. Raman @ 2007-10-02 3:13 UTC (permalink / raw)
To: rudalics; +Cc: emacs-pretest-bug, raman
>>>>> "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
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-02 3:13 ` T. V. Raman
@ 2007-10-02 7:32 ` martin rudalics
2007-10-02 13:23 ` T. V. Raman
0 siblings, 1 reply; 19+ messages in thread
From: martin rudalics @ 2007-10-02 7:32 UTC (permalink / raw)
To: raman; +Cc: emacs-pretest-bug
> 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.
-2 is not bizarre. It's purpose is to give the calculator window 2
lines.
> 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
The binding of `window-min-height' is here to avoid that `split-window'
complains about too small windows.
> ;; If the modeline might interfere with the calculator buffer,
> ;; use 3 lines instead.
> (if (and (fboundp 'face-attr-construct)
...
All this shouldn't bother us since we already know that we get the
standard value -2 here.
...
> -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.
Hence we seem to be left with the fact that your configuration has
(let ((split-window-keep-point nil)
(window-min-height 2))
(split-window-vertically -2))
fail for some reason. Could you please verify by evaluating that form?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-02 7:32 ` martin rudalics
@ 2007-10-02 13:23 ` T. V. Raman
2007-10-02 17:51 ` martin rudalics
0 siblings, 1 reply; 19+ messages in thread
From: T. V. Raman @ 2007-10-02 13:23 UTC (permalink / raw)
To: rudalics; +Cc: emacs-pretest-bug, raman
martin> Hence we seem to be left with the fact that your
martin> configuration has
martin>
martin> (let ((split-window-keep-point nil)
martin> (window-min-height 2)) (split-window-vertically -2))
martin>
martin> fail for some reason. Could you please verify by
martin> evaluating that form?
The form that computes the argument to split-window-vertically
martin> (shown below)
evaluates to -2 in my environment.
(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)
--
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
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-02 13:23 ` T. V. Raman
@ 2007-10-02 17:51 ` martin rudalics
2007-10-03 1:49 ` T. V. Raman
0 siblings, 1 reply; 19+ messages in thread
From: martin rudalics @ 2007-10-02 17:51 UTC (permalink / raw)
To: raman; +Cc: emacs-pretest-bug
> The form that computes the argument to split-window-vertically
> martin> (shown below)
> evaluates to -2 in my environment.
Sorry, my question was formulated badly. I wanted to know what happens
when you evaluate the form below in your environment:
(let ((split-window-keep-point nil)
(window-min-height 2))
(split-window-vertically -2))
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-02 17:51 ` martin rudalics
@ 2007-10-03 1:49 ` T. V. Raman
2007-10-03 6:21 ` martin rudalics
0 siblings, 1 reply; 19+ messages in thread
From: T. V. Raman @ 2007-10-03 1:49 UTC (permalink / raw)
To: rudalics; +Cc: emacs-pretest-bug, raman
>>>>> "martin" == martin rudalics <rudalics@gmx.at> writes:
martin> Sorry, my question was formulated badly. I wanted to
martin> know what happens when you evaluate the form below in
martin> your environment:
martin>
martin> (let ((split-window-keep-point nil)
martin> (window-min-height 2)) (split-window-vertically -2))
Raises the same error as raised by calling M-x calculator shown
martin> earlier, so we've narrowed it down.
I also get the same error if I just evaluate
(split-window-vertically -2) in my environment.
Works if I pass -3
--
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
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 23.0.50; Cannot run calculator on TTY
2007-10-03 1:49 ` T. V. Raman
@ 2007-10-03 6:21 ` martin rudalics
[not found] ` <18179.41840.532732.664369@gargle.gargle.HOWL>
0 siblings, 1 reply; 19+ messages in thread
From: martin rudalics @ 2007-10-03 6:21 UTC (permalink / raw)
To: raman; +Cc: emacs-pretest-bug
> martin> Sorry, my question was formulated badly. I wanted to
> martin> know what happens when you evaluate the form below in
> martin> your environment:
> martin>
> martin> (let ((split-window-keep-point nil)
> martin> (window-min-height 2)) (split-window-vertically -2))
> Raises the same error as raised by calling M-x calculator shown
> martin> earlier, so we've narrowed it down.
> I also get the same error if I just evaluate
> (split-window-vertically -2) in my environment.
> Works if I pass -3
>
This means something's wrong with your `split-window'. C-x C-e gets me
for
(let ((window-min-height 2))
(split-window-vertically -3))
=> Make a two lines window at bottom
(split-window-vertically -3)
=> Lisp error: (error "Window height 3 too small (after splitting)")
(let ((window-min-height 2))
(split-window-vertically -2))
=> Make a one line window at bottom
(split-window-vertically -2)
=> Lisp error: (error "Window height 2 too small (after splitting)")
which is the expected behavior. Your behavior is wrong because
(let ((window-min-height 2))
(split-window-vertically -2))
should not_raise an error while
(split-window-vertically -3)
should. My build is Emacs 22.1 with a few modifications. Maybe
something changed since then.
Can you run `split_window' with GDB and find out why it fails?
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2007-10-26 21:03 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).