From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: [PATCH] contrib/lisp/org-velocity: Fix failure for big window Date: Tue, 14 Oct 2014 20:55:22 +0200 Message-ID: <84vbnm1nxh.fsf@tm6592.fritz.box> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe7G4-0007vA-Jo for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 14:55:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xe7Fy-0003l7-NP for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 14:55:44 -0400 Received: from plane.gmane.org ([80.91.229.3]:54565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xe7Fx-0003l0-Ku for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 14:55:37 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xe7Fw-0004dv-PP for emacs-orgmode@gnu.org; Tue, 14 Oct 2014 20:55:36 +0200 Received: from stgt-5f718203.pool.mediaways.net ([95.113.130.3]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Oct 2014 20:55:36 +0200 Received: from marcowahlsoft by stgt-5f718203.pool.mediaways.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Oct 2014 20:55:36 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: "Paul M. Rodriguez" --=-=-= Content-Type: text/plain Hi list, hi Paul, thanks for your org-velocity contribution! I just discovered org-velocity and immediately liked it. I found a bug which might not have occurred in the past since the monitors were smaller. The bug shows up when the number of lines of the match window exceeds the number of available indexes (which is 61). I think the patch (which is just a switch from 'greater than' to 'smaller than') in the attachment is a way to go. Please let me know what you think. Best regards, Marco -- http://www.wahlzone.de GPG: 0x0A3AE6F2 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-contrib-lisp-org-velocity-Fix-failure-for-big-window.patch Content-Description: contrib/lisp/org-velocity: Fix failure for big window >From c867eda9b60736b0d3ae50d5a5f889e80cf25a81 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Tue, 14 Oct 2014 20:07:31 +0200 Subject: [PATCH] contrib/lisp/org-velocity: Fix failure for big window * contrib/lisp/org-velocity.el (org-velocity-incremental-read): Reversed the estimation against window-height. --- contrib/lisp/org-velocity.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/lisp/org-velocity.el b/contrib/lisp/org-velocity.el index 3631a59..e6788c6 100644 --- a/contrib/lisp/org-velocity.el +++ b/contrib/lisp/org-velocity.el @@ -671,7 +671,7 @@ Stop searching once there are more matches than can be displayed." ;; Truncate the index to the size of the buffer to be ;; displayed. (with-selected-window match-window - (if (> (window-height) (length org-velocity-index)) + (if (< (window-height) (length org-velocity-index)) ;; (subseq org-velocity-index 0 (window-height)) (let ((hints (copy-sequence org-velocity-index))) (setcdr (nthcdr (window-height) hints) nil) -- 2.1.2 --=-=-=--