all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark)
@ 2015-03-27  9:42 Boruch Baum
  2015-03-27 16:16 ` Drew Adams
  2015-04-09 15:07 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Boruch Baum @ 2015-03-27  9:42 UTC (permalink / raw)
  To: 20212


[-- Attachment #1.1: Type: text/plain, Size: 326 bytes --]

While looking to address Stefan Monnier's comments to bug #20150, I
encountered this bug in function bookmark-bmenu-goto-bookmark. If the
function does not find the requested bookmark before EOF, it continues
endlessly.

patch attached.

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 2015-03-27_001.patch --]
[-- Type: text/x-patch; name="2015-03-27_001.patch", Size: 468 bytes --]

--- bookmark.el	2015-03-23 04:52:30.503739608 -0400
+++ bookmark-new.el	2015-03-27 05:32:00.390173984 -0400
@@ -2064,7 +2064,8 @@
 (defun bookmark-bmenu-goto-bookmark (name)
   "Move point to bookmark with name NAME."
   (goto-char (point-min))
-  (while (not (equal name (bookmark-bmenu-bookmark)))
+  (while (and (not (equal name (bookmark-bmenu-bookmark)))
+              (not (equal (point) (point-max))))
     (forward-line 1))
   (forward-line 0))
 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark)
  2015-03-27  9:42 bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark) Boruch Baum
@ 2015-03-27 16:16 ` Drew Adams
  2015-04-09 15:07 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2015-03-27 16:16 UTC (permalink / raw)
  To: Boruch Baum, 20212

> If the function does not find the requested bookmark before EOF,
> it continues endlessly.  patch attached.

Yes, good catch.  FWIW - This is fixed in Bookmark+ (5 years ago).
I use `(eobp)', and I put that test first, before the test for the
bookmark name: (while (and (not (eobp)) ...) ...)





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

* bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark)
  2015-03-27  9:42 bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark) Boruch Baum
  2015-03-27 16:16 ` Drew Adams
@ 2015-04-09 15:07 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2015-04-09 15:07 UTC (permalink / raw)
  To: Boruch Baum; +Cc: 20212

> While looking to address Stefan Monnier's comments to bug #20150, I
> encountered this bug in function bookmark-bmenu-goto-bookmark. If the
> function does not find the requested bookmark before EOF, it continues
> endlessly.

Thanks, installed,


        Stefan





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

end of thread, other threads:[~2015-04-09 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-27  9:42 bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark) Boruch Baum
2015-03-27 16:16 ` Drew Adams
2015-04-09 15:07 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.