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: Sat, 02 Jan 2010 00:05:46 -0500 Message-ID: <87r5q99jv9.fsf@red-bean.com> References: <5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.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 1262408765 21433 80.91.229.12 (2 Jan 2010 05:06:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Jan 2010 05:06:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sun Yijiang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 02 06:05:58 2010 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 1NQwBY-0003fw-Mh for ged-emacs-devel@m.gmane.org; Sat, 02 Jan 2010 06:05:56 +0100 Original-Received: from localhost ([127.0.0.1]:40217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQwBZ-00015Q-0o for ged-emacs-devel@m.gmane.org; Sat, 02 Jan 2010 00:05:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQwBU-00015L-NK for emacs-devel@gnu.org; Sat, 02 Jan 2010 00:05:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQwBQ-00014s-8r for emacs-devel@gnu.org; Sat, 02 Jan 2010 00:05:52 -0500 Original-Received: from [199.232.76.173] (port=56663 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQwBQ-00014m-5l for emacs-devel@gnu.org; Sat, 02 Jan 2010 00:05:48 -0500 Original-Received: from sanpietro.red-bean.com ([66.146.206.141]:45440) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NQwBP-0004Ez-Te for emacs-devel@gnu.org; Sat, 02 Jan 2010 00:05:48 -0500 Original-Received: from localhost ([127.0.0.1]:56709 helo=floss ident=kfogel) by sanpietro.red-bean.com with esmtp (Exim 4.71) (envelope-from ) id 1NQwBO-0002oz-Fw; Fri, 01 Jan 2010 23:05:46 -0600 In-Reply-To: <5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com> (Sun Yijiang's message of "Mon, 28 Dec 2009 14:19:16 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (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:119254 Archived-At: Sun Yijiang writes: >`bookmark-bmenu-execute-deletions' is broken for quite some time. I >think I've found the problem. When it calls >`bookmark-bmenu-bookmark', the callee gets text property at >`(line-begging-position)', which is incorrect in this context. Below >is the patched code of `bookmark-bmenu-bookmark' that works for me: > >(defun bookmark-bmenu-bookmark () > "Return the bookmark for this line in an interactive bookmark list buffer." > (when (bookmark-bmenu-check-position) > (let ((pos (line-beginning-position))) > (when (looking-back "^[^ ]") > (setq pos (+ 1 pos))) > (get-text-property pos 'bookmark-name-prop)))) Okay, this is fixed in the two revisions named below. Thank you for the bug report, Yijiang. Note to Drew Adams: I took your suggestions about new constants. However, I did not wrap the new `save-excursion' in `ignore-errors' or `condition-case', because we should never be at eob right after calling `bookmark-bmenu-ensure-position' (and if we are, I want to know). -Karl ------------------------------------------------------------ revno: 99230 revision-id: kfogel@red-bean.com-20100102050055-3fnwh3oam9gwoc1i parent: kfogel@red-bean.com-20100102043617-3bbh6lg62a8ycsa2 committer: Karl Fogel branch nick: trunk timestamp: Sat 2010-01-02 00:00:55 -0500 message: * lisp/bookmark.el (bookmark-bmenu-marks-width): Define to 1, not 2. (bookmark-bmenu-list, bookmark-bmenu-bookmark): Calculate property positions by using `bookmark-bmenu-marks-width', instead of hardcoding. This fixes the `bookmark-bmenu-execute-deletions' bug reported here: http://lists.gnu.org/archive/html/emacs-devel/2009-12/msg00819.html From: Sun Yijiang To: emacs-devel {_AT_} gnu.org Subject: bookmark.el bug report Date: Mon, 28 Dec 2009 14:19:16 +0800 Message-ID: 5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com ------------------------------------------------------------ revno: 99229 revision-id: kfogel@red-bean.com-20100102043617-3bbh6lg62a8ycsa2 parent: lekktu@gmail.com-20100102010911-q2hnd1wl2vqgfgb0 committer: Karl Fogel branch nick: trunk timestamp: Fri 2010-01-01 23:36:17 -0500 message: * lisp/bookmark.el: Improvements suggested by Drew Adams: (bookmark-bmenu-ensure-position): New name for `bookmark-bmenu-check-position'. Just ensure the position; don't return any meaningful value. (bookmark-bmenu-header-height, bookmark-bmenu-marks-width): New constants.