bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20148: 24.4: function `bookmark-get-bookmark'


From: Boruch Baum
Subject: bug#20148: 24.4: function `bookmark-get-bookmark'
Date: Fri, 20 Mar 2015 00:42:21 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0

Function `bookmark-get-bookmark' ...

1] tests for the existence of a bookmark by checking whether the input
string matches a cons cell. This casts a net much wider than desirable,
and might better be (assoc bookmark-name-or-record bookmark-alist).

2] returns only a string value on error, without passing nil back to the
calling function.

My usage case is that I was scripting a function to find org-mode files
in a directory tree, and add them to a bookmark list if they aren't
already bookmarked according to my naming convention. Originally, I had
tried checking for the existence of a bookmark using a few of the
bookmark.el functions, such as bookmark-get-bookmark, but that looked
inconvenient because they returned string values on failure.

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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