From: Karl Fogel <kfogel@red-bean.com>
To: Sun Yijiang <sunyijiang@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: bookmark.el bug report
Date: Sat, 02 Jan 2010 00:05:46 -0500 [thread overview]
Message-ID: <87r5q99jv9.fsf@red-bean.com> (raw)
In-Reply-To: <5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com> (Sun Yijiang's message of "Mon, 28 Dec 2009 14:19:16 +0800")
Sun Yijiang <sunyijiang@gmail.com> 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 <kfogel@red-bean.com>
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: 5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com
------------------------------------------------------------
revno: 99229
revision-id: kfogel@red-bean.com-20100102043617-3bbh6lg62a8ycsa2
parent: lekktu@gmail.com-20100102010911-q2hnd1wl2vqgfgb0
committer: Karl Fogel <kfogel@red-bean.com>
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.
next prev parent reply other threads:[~2010-01-02 5:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-28 6:19 bookmark.el bug report Sun Yijiang
2009-12-28 6:48 ` Karl Fogel
2009-12-28 7:41 ` Thierry Volpiatto
2009-12-28 15:58 ` Drew Adams
2009-12-28 21:12 ` Karl Fogel
2009-12-29 18:22 ` Stefan Monnier
2009-12-30 13:37 ` Thierry Volpiatto
2009-12-30 15:28 ` Stefan Monnier
2009-12-30 15:57 ` Drew Adams
2009-12-30 16:26 ` Drew Adams
2009-12-30 17:43 ` Thierry Volpiatto
2009-12-30 18:32 ` Stefan Monnier
2010-01-02 5:05 ` Karl Fogel [this message]
2010-01-02 5:15 ` Karl Fogel
2010-01-02 7:03 ` Thierry Volpiatto
2010-01-02 7:26 ` Karl Fogel
2010-01-02 8:15 ` Thierry Volpiatto
2010-01-02 19:17 ` Karl Fogel
2010-01-02 7:51 ` Drew Adams
2010-01-02 8:16 ` Karl Fogel
2010-01-02 8:42 ` Drew Adams
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=87r5q99jv9.fsf@red-bean.com \
--to=kfogel@red-bean.com \
--cc=emacs-devel@gnu.org \
--cc=sunyijiang@gmail.com \
/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).