all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-devel@gnu.org>
Subject: RE: bookmark.el bug report
Date: Mon, 28 Dec 2009 07:58:29 -0800	[thread overview]
Message-ID: <72EB214F963A4550B9F1B0EBBCFB48F4@us.oracle.com> (raw)
In-Reply-To: <87my13lf3v.fsf@tux.homenetwork>

> (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)))





  reply	other threads:[~2009-12-28 15:58 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 [this message]
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
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72EB214F963A4550B9F1B0EBBCFB48F4@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.