From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#3413: 23.0.94; ispell choices buffer display problem Date: Fri, 29 May 2009 16:43:25 +0200 Message-ID: <4A1FF48D.5020909@gmx.at> References: <87octcj1i4.fsf@escher.local.home> Reply-To: martin rudalics , 3413@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243609909 12473 80.91.229.12 (29 May 2009 15:11:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2009 15:11:49 +0000 (UTC) To: Stephen Berman , 3413@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 29 17:11:45 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MA3kE-0004P1-7C for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 May 2009 17:11:42 +0200 Original-Received: from localhost ([127.0.0.1]:42577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MA3kD-0006NH-Iv for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 May 2009 11:11:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MA3WT-00014Z-Uw for bug-gnu-emacs@gnu.org; Fri, 29 May 2009 10:57:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MA3WN-000127-GH for bug-gnu-emacs@gnu.org; Fri, 29 May 2009 10:57:28 -0400 Original-Received: from [199.232.76.173] (port=32811 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MA3WL-00011f-M3 for bug-gnu-emacs@gnu.org; Fri, 29 May 2009 10:57:21 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:48985) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MA3WK-00045d-7s for bug-gnu-emacs@gnu.org; Fri, 29 May 2009 10:57:20 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4TEvHv5006816; Fri, 29 May 2009 07:57:18 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n4TEo5U9005366; Fri, 29 May 2009 07:50:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 29 May 2009 14:50:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3413 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3413-submit@emacsbugs.donarmstrong.com id=B3413.12436082204488 (code B ref 3413); Fri, 29 May 2009 14:50:05 +0000 Original-Received: (at 3413) by emacsbugs.donarmstrong.com; 29 May 2009 14:43:40 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id n4TEhYdd004473 for <3413@emacsbugs.donarmstrong.com>; Fri, 29 May 2009 07:43:36 -0700 Original-Received: (qmail invoked by alias); 29 May 2009 14:43:28 -0000 Original-Received: from 62-47-37-185.adsl.highway.telekom.at (EHLO [62.47.37.185]) [62.47.37.185] by mail.gmx.net (mp054) with SMTP; 29 May 2009 16:43:28 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+F2fw3r9GF8dS0x/wt7r7QuqkxgC6n0nwylJLYbe +EE+CFr27pI7wj User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <87octcj1i4.fsf@escher.local.home> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 29 May 2009 10:57:28 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28289 Archived-At: > 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