From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: bookmark.el bug report Date: Mon, 28 Dec 2009 07:58:29 -0800 Message-ID: <72EB214F963A4550B9F1B0EBBCFB48F4@us.oracle.com> References: <5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com><87aax361bd.fsf@red-bean.com> <87my13lf3v.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262015928 18103 80.91.229.12 (28 Dec 2009 15:58:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2009 15:58:48 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 28 16:58:41 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 1NPHzM-0000Ft-LU for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2009 16:58:32 +0100 Original-Received: from localhost ([127.0.0.1]:56394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPHzM-00053V-Ck for ged-emacs-devel@m.gmane.org; Mon, 28 Dec 2009 10:58:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPHzF-00051x-Vi for emacs-devel@gnu.org; Mon, 28 Dec 2009 10:58:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPHzB-00050I-CA for emacs-devel@gnu.org; Mon, 28 Dec 2009 10:58:25 -0500 Original-Received: from [199.232.76.173] (port=60369 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPHzB-00050F-5r for emacs-devel@gnu.org; Mon, 28 Dec 2009 10:58:21 -0500 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:64152) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NPHzA-0005yW-Qy for emacs-devel@gnu.org; Mon, 28 Dec 2009 10:58:21 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id nBSFwF4p032400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 28 Dec 2009 15:58:17 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id nBSFG8pY030029 for ; Mon, 28 Dec 2009 15:58:15 GMT Original-Received: from abhmt009.oracle.com by acsmt358.oracle.com with ESMTP id 1250828991262015891; Mon, 28 Dec 2009 09:58:11 -0600 Original-Received: from dradamslap1 (/24.5.185.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 28 Dec 2009 07:58:11 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87my13lf3v.fsf@tux.homenetwork> Thread-Index: AcqHkhYlFGQICXccRsqY8AcZtLJ0OAAQn55Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt358.oracle.com [141.146.40.158] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4B38D597.0115:SCFMA4539814,ss=1,fgs=0 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:118872 Archived-At: > (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). 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)))