emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bookmark.el bug report


From: Karl Fogel
Subject: Re: bookmark.el bug report
Date: Sat, 02 Jan 2010 00:05:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Sun Yijiang <address@hidden> 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: address@hidden
parent: address@hidden
committer: Karl Fogel <address@hidden>
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 <sunyijiang {_AT_} gmail.com>
    To: emacs-devel {_AT_} gnu.org
    Subject: bookmark.el bug report
    Date: Mon, 28 Dec 2009 14:19:16 +0800
    Message-ID: address@hidden
------------------------------------------------------------
revno: 99229
revision-id: address@hidden
parent: address@hidden
committer: Karl Fogel <address@hidden>
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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]