emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] contrib/lisp/org-velocity: Fix failure for big window
@ 2014-10-14 18:55 Marco Wahl
  2014-10-20 13:33 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Wahl @ 2014-10-14 18:55 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Paul M. Rodriguez

[-- Attachment #1: Type: text/plain, Size: 546 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: contrib/lisp/org-velocity: Fix failure for big window --]
[-- Type: text/x-diff, Size: 1247 bytes --]

From c867eda9b60736b0d3ae50d5a5f889e80cf25a81 Mon Sep 17 00:00:00 2001
From: Marco Wahl <marcowahlsoft@gmail.com>
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


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

* Re: [PATCH] contrib/lisp/org-velocity: Fix failure for big window
  2014-10-14 18:55 [PATCH] contrib/lisp/org-velocity: Fix failure for big window Marco Wahl
@ 2014-10-20 13:33 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-10-20 13:33 UTC (permalink / raw)
  To: Marco Wahl; +Cc: Paul M. Rodriguez, emacs-orgmode

Hi Marco,

Marco Wahl <marcowahlsoft@gmail.com> writes:

> 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.

applied, thanks,

-- 
 Bastien

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

end of thread, other threads:[~2014-10-20 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-14 18:55 [PATCH] contrib/lisp/org-velocity: Fix failure for big window Marco Wahl
2014-10-20 13:33 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).