unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: 20212@debbugs.gnu.org
Subject: bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark)
Date: Fri, 27 Mar 2015 05:42:52 -0400	[thread overview]
Message-ID: <5515261C.1000904@gmx.com> (raw)


[-- 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 --]

             reply	other threads:[~2015-03-27  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27  9:42 Boruch Baum [this message]
2015-03-27 16:16 ` bug#20212: 24.4: bookmark.el: function hangs on EOF (FIX INCLUDED) (bookmark-bmenu-goto-bookmark) Drew Adams
2015-04-09 15:07 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5515261C.1000904@gmx.com \
    --to=boruch_baum@gmx.com \
    --cc=20212@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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