unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3413: 23.0.94; ispell choices buffer display problem
@ 2009-05-28 22:39 Stephen Berman
  2009-05-29 14:43 ` martin rudalics
  2014-12-25 10:36 ` martin rudalics
  0 siblings, 2 replies; 6+ messages in thread
From: Stephen Berman @ 2009-05-28 22:39 UTC (permalink / raw)
  To: emacs-pretest-bug

1. emacs -Q
2. Type `thre threee'
3. Type `C-x 2' twice.  Now the frame has three windows stacked
   vertically, in the lowest window (window-height) returns 18, in each
   of the two upper windows (window-height) returns 9.
4. Make either of the two upper windows the selected window, and in that
   window make the text typed in step 2 an "active region" (select with
   the mouse or type `C-a C-SPC C-e').
5. Type `M-$' 
=> The selected window splits vertically, in the lower one of these,
   `thre' is highlighted, the upper window contains a two-line high
   *Choices* buffer displaying 10 corrections for `thre'.
6. Type `SPC'
=> In the lower window now `threee' is highlighted, the *Choices*
   buffer in the upper window displays one empty line, and is
   unscrollable.
   
If at step 4 the window with (window-height) 18 is selected, then step 5
is the same, but in step 6, the *Choices* buffer is five lines high and
shows 28 alternatives for `threee'.

In GNU Emacs 23.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-05-28 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
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
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3413: 23.0.94; ispell choices buffer display problem
  2009-05-28 22:39 bug#3413: 23.0.94; ispell choices buffer display problem Stephen Berman
@ 2009-05-29 14:43 ` martin rudalics
  2014-12-25 10:36 ` martin rudalics
  1 sibling, 0 replies; 6+ messages in thread
From: martin rudalics @ 2009-05-29 14:43 UTC (permalink / raw)
  To: Stephen Berman, 3413

 > 1. emacs -Q
 > 2. Type `thre threee'
 > 3. Type `C-x 2' twice.  Now the frame has three windows stacked
 >    vertically, in the lowest window (window-height) returns 18, in each
 >    of the two upper windows (window-height) returns 9.
 > 4. Make either of the two upper windows the selected window, and in that
 >    window make the text typed in step 2 an "active region" (select with
 >    the mouse or type `C-a C-SPC C-e').
 > 5. Type `M-$'
 > => The selected window splits vertically, in the lower one of these,
 >    `thre' is highlighted, the upper window contains a two-line high
 >    *Choices* buffer displaying 10 corrections for `thre'.
 > 6. Type `SPC'
 > => In the lower window now `threee' is highlighted, the *Choices*
 >    buffer in the upper window displays one empty line, and is
 >    unscrollable.
 >
 > If at step 4 the window with (window-height) 18 is selected, then step 5
 > is the same, but in step 6, the *Choices* buffer is five lines high and
 > shows 28 alternatives for `threee'.

It's because of the obscure construct below from `ispell-command-loop'
which has max-lines equal 0 in the small window case and 11 in the large
window case.  So choices simply don't get inserted into the buffer in
the small window case.

(defun ispell-command-loop (miss guess word start end)
[...]
	;; ensure 4 context lines.
	(max-lines (- (ispell-adjusted-window-height) 4))
[...]
       (while (and choices
		  (< (if (> (+ 7 (current-column) (length (car choices))
			       (if (> count ?~) 3 0))
			    (window-width))
			 (progn
			   (insert "\n")
			   (setq line (1+ line)))
		       line)
		     max-lines))

I don't have the slightest idea what this is necessary for and suppose
that the calculations are off by one or two anyway.  Maybe the reason is
that choices buffers can't (or shouldn't) be scrolled.  You can try to
replace the binding by something like

	(max-lines (- (ispell-adjusted-window-height) (if guess 4 0)))

but this just slightly improves things.

martin





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3413: 23.0.94; ispell choices buffer display problem
  2009-05-28 22:39 bug#3413: 23.0.94; ispell choices buffer display problem Stephen Berman
  2009-05-29 14:43 ` martin rudalics
@ 2014-12-25 10:36 ` martin rudalics
  2015-01-02 16:21   ` Stephen Berman
  1 sibling, 1 reply; 6+ messages in thread
From: martin rudalics @ 2014-12-25 10:36 UTC (permalink / raw)
  To: 3413@debbugs.gnu.org; +Cc: Stephen Berman

 > 1. emacs -Q
 > 2. Type `thre threee'
 > 3. Type `C-x 2' twice.  Now the frame has three windows stacked
 >    vertically, in the lowest window (window-height) returns 18, in each
 >    of the two upper windows (window-height) returns 9.
 > 4. Make either of the two upper windows the selected window, and in that
 >    window make the text typed in step 2 an "active region" (select with
 >    the mouse or type `C-a C-SPC C-e').
 > 5. Type `M-$'
 > => The selected window splits vertically, in the lower one of these,
 >    `thre' is highlighted, the upper window contains a two-line high
 >    *Choices* buffer displaying 10 corrections for `thre'.
 > 6. Type `SPC'
 > => In the lower window now `threee' is highlighted, the *Choices*
 >    buffer in the upper window displays one empty line, and is
 >    unscrollable.

This should work now with trunk/master.  Please have a look.

Thanks, martin





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3413: 23.0.94; ispell choices buffer display problem
  2014-12-25 10:36 ` martin rudalics
@ 2015-01-02 16:21   ` Stephen Berman
  2015-01-03 17:17     ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Berman @ 2015-01-02 16:21 UTC (permalink / raw)
  To: martin rudalics; +Cc: 3413@debbugs.gnu.org

On Thu, 25 Dec 2014 11:36:53 +0100 martin rudalics <rudalics@gmx.at> wrote:

>> 1. emacs -Q
>> 2. Type `thre threee'
>> 3. Type `C-x 2' twice.  Now the frame has three windows stacked
>>    vertically, in the lowest window (window-height) returns 18, in each
>>    of the two upper windows (window-height) returns 9.
>> 4. Make either of the two upper windows the selected window, and in that
>>    window make the text typed in step 2 an "active region" (select with
>>    the mouse or type `C-a C-SPC C-e').
>> 5. Type `M-$'
>> => The selected window splits vertically, in the lower one of these,
>>    `thre' is highlighted, the upper window contains a two-line high
>>    *Choices* buffer displaying 10 corrections for `thre'.
>> 6. Type `SPC'
>> => In the lower window now `threee' is highlighted, the *Choices*
>>    buffer in the upper window displays one empty line, and is
>>    unscrollable.
>
> This should work now with trunk/master.  Please have a look.

Sorry for the late reply, I was away.  I just rebuilt from latest master
(emacs-repository-version "d0ca1148fe2d1e72e86f0197731071f139c143e3")
and cannot reproduce the problem, so it appears to be fixed; thanks.

Steve Berman





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3413: 23.0.94; ispell choices buffer display problem
  2015-01-02 16:21   ` Stephen Berman
@ 2015-01-03 17:17     ` martin rudalics
  2015-01-03 18:20       ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2015-01-03 17:17 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 3413-done@debbugs.gnu.org

 >> This should work now with trunk/master.  Please have a look.
 >
 > Sorry for the late reply, I was away.  I just rebuilt from latest master
 > (emacs-repository-version "d0ca1148fe2d1e72e86f0197731071f139c143e3")
 > and cannot reproduce the problem, so it appears to be fixed; thanks.

Bug closed.

Thanks, martin





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3413: 23.0.94; ispell choices buffer display problem
  2015-01-03 17:17     ` martin rudalics
@ 2015-01-03 18:20       ` martin rudalics
  0 siblings, 0 replies; 6+ messages in thread
From: martin rudalics @ 2015-01-03 18:20 UTC (permalink / raw)
  To: 3413-done

> Bug closed.

Once more.

martin







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-03 18:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 22:39 bug#3413: 23.0.94; ispell choices buffer display problem Stephen Berman
2009-05-29 14:43 ` martin rudalics
2014-12-25 10:36 ` martin rudalics
2015-01-02 16:21   ` Stephen Berman
2015-01-03 17:17     ` martin rudalics
2015-01-03 18:20       ` 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).