[Top][All Lists]
[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: |
Mon, 28 Dec 2009 16:12:30 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
"Drew Adams" <address@hidden> 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
- bookmark.el bug report, Sun Yijiang, 2009/12/28
- Re: bookmark.el bug report, Karl Fogel, 2009/12/28
- Re: bookmark.el bug report, Thierry Volpiatto, 2009/12/28
- RE: bookmark.el bug report, Drew Adams, 2009/12/28
- Re: bookmark.el bug report,
Karl Fogel <=
- Re: bookmark.el bug report, Stefan Monnier, 2009/12/30
- Re: bookmark.el bug report, Thierry Volpiatto, 2009/12/30
- Re: bookmark.el bug report, Stefan Monnier, 2009/12/30
- RE: bookmark.el bug report, Drew Adams, 2009/12/30
- RE: bookmark.el bug report, Drew Adams, 2009/12/30
- Re: bookmark.el bug report, Thierry Volpiatto, 2009/12/30
- Re: bookmark.el bug report, Stefan Monnier, 2009/12/30