all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20148: 24.4: function `bookmark-get-bookmark'
@ 2015-03-20  4:42 Boruch Baum
  2015-03-20  5:04 ` Drew Adams
  2019-05-26 10:12 ` Stefan Kangas
  0 siblings, 2 replies; 7+ messages in thread
From: Boruch Baum @ 2015-03-20  4:42 UTC (permalink / raw
  To: 20148

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-30 12:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20  4:42 bug#20148: 24.4: function `bookmark-get-bookmark' Boruch Baum
2015-03-20  5:04 ` Drew Adams
2015-03-20 11:04   ` Boruch Baum
2015-03-20 14:31     ` Stefan Monnier
2015-03-20 14:44       ` Boruch Baum
2019-05-26 10:12 ` Stefan Kangas
2019-05-30 12:38   ` Basil L. Contovounesios

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.