GNU bug report logs - #3413
23.0.94; ispell choices buffer display problem

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Thu, 28 May 2009 22:45:04 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3413 in the body.
You can then email your comments to 3413 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3413; Package emacs. (Thu, 28 May 2009 22:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 28 May 2009 22:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.94; ispell choices buffer display problem
Date: Fri, 29 May 2009 00:39:31 +0200
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



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3413; Package emacs. (Fri, 29 May 2009 14:50:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 29 May 2009 14:50:05 GMT) Full text and rfc822 format available.

Message #10 received at 3413 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Stephen Berman <stephen.berman <at> gmx.net>, 3413 <at> debbugs.gnu.org
Subject: Re: bug#3413: 23.0.94; ispell choices buffer display problem
Date: Fri, 29 May 2009 16:43:25 +0200
> 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



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3413; Package emacs. (Thu, 25 Dec 2014 10:38:02 GMT) Full text and rfc822 format available.

Message #13 received at 3413 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: "3413 <at> debbugs.gnu.org" <3413 <at> debbugs.gnu.org>
Cc: Stephen Berman <stephen.berman <at> gmx.net>
Subject: Re: bug#3413: 23.0.94; ispell choices buffer display problem
Date: Thu, 25 Dec 2014 11:36:53 +0100
> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3413; Package emacs. (Fri, 02 Jan 2015 16:22:02 GMT) Full text and rfc822 format available.

Message #16 received at 3413 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: "3413 <at> debbugs.gnu.org" <3413 <at> debbugs.gnu.org>
Subject: Re: bug#3413: 23.0.94; ispell choices buffer display problem
Date: Fri, 02 Jan 2015 17:21:29 +0100
On Thu, 25 Dec 2014 11:36:53 +0100 martin rudalics <rudalics <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3413; Package emacs. (Sat, 03 Jan 2015 17:18:04 GMT) Full text and rfc822 format available.

Message #19 received at 3413 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: "3413-done <at> debbugs.gnu.org" <3413 <at> debbugs.gnu.org>
Subject: Re: bug#3413: 23.0.94; ispell choices buffer display problem
Date: Sat, 03 Jan 2015 18:17:32 +0100
>> 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




Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Sat, 03 Jan 2015 18:21:03 GMT) Full text and rfc822 format available.

Notification sent to Stephen Berman <stephen.berman <at> gmx.net>:
bug acknowledged by developer. (Sat, 03 Jan 2015 18:21:03 GMT) Full text and rfc822 format available.

Message #24 received at 3413-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 3413-done <at> debbugs.gnu.org
Subject: Re: bug#3413: 23.0.94; ispell choices buffer display problem
Date: Sat, 03 Jan 2015 19:20:31 +0100
> Bug closed.

Once more.

martin






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Feb 2015 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.