From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: bookmark.el bug report Date: Mon, 28 Dec 2009 16:12:30 -0500 Message-ID: <87eimehkg1.fsf@red-bean.com> References: <5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com> <87aax361bd.fsf@red-bean.com> <87my13lf3v.fsf@tux.homenetwork> <72EB214F963A4550B9F1B0EBBCFB48F4@us.oracle.com> Reply-To: Karl Fogel NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262034776 10424 80.91.229.12 (28 Dec 2009 21:12:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2009 21:12:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 28 22:12:49 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NPMtQ-0007J6-Hr for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2009 22:12:44 +0100 Original-Received: from localhost ([127.0.0.1]:60361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPMtQ-0002YI-Rd for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2009 16:12:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPMtL-0002Y4-Gb for emacs-devel@gnu.org; Mon, 28 Dec 2009 16:12:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPMtG-0002XB-Pe for emacs-devel@gnu.org; Mon, 28 Dec 2009 16:12:38 -0500 Original-Received: from [199.232.76.173] (port=41663 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPMtG-0002X8-LT for emacs-devel@gnu.org; Mon, 28 Dec 2009 16:12:34 -0500 Original-Received: from sanpietro.red-bean.com ([66.146.206.141]:46303) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NPMtG-00046s-EG for emacs-devel@gnu.org; Mon, 28 Dec 2009 16:12:34 -0500 Original-Received: from localhost ([127.0.0.1]:33731 helo=kfogel-work ident=kfogel) by sanpietro.red-bean.com with esmtp (Exim 4.71) (envelope-from ) id 1NPMtD-0005k6-Cx; Mon, 28 Dec 2009 15:12:31 -0600 In-Reply-To: <72EB214F963A4550B9F1B0EBBCFB48F4@us.oracle.com> (Drew Adams's message of "Mon, 28 Dec 2009 07:58:29 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118883 Archived-At: "Drew Adams" writes: >> (defun bookmark-bmenu-bookmark () >> "Return the name of the bookmark on this line." >> (when (bookmark-bmenu-check-position) >> (save-excursion >> (forward-line 0) (forward-char 3) >> (get-text-property (point) 'bmkext-bookmark-name)))) > > 1. There is no need for the `bookmark-bmenu-check-position' test. All such > pseudotests can be removed - that function always returns non-nil (unless the > `bookmark-alist' is nil). I have a pending change for that (in my CVS working copy -- need to port it over to Bzr). I want to make absolutely sure there wasn't some edge case about when bookmark-alist is nil, but I strongly suspect you're right, Drew. > 2. Wrap the `save-excursion' in `ignore-errors' or a `condition-case', > for the `forward-char' at eob. E.g., this is the definition in > bookmark+.el: > > (defun bookmark-bmenu-bookmark () > "Return the name of the bookmark on this line." > (condition-case nil > (save-excursion > (forward-line 0) (forward-char 3) > (get-text-property (point) 'bookmarkp-bookmark-name)) > (error nil))) Will take into account. Thanks, -K