From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#20148: 24.4: function `bookmark-get-bookmark' Date: Fri, 20 Mar 2015 00:42:21 -0400 Message-ID: <550BA52D.1080805@gmx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DVq2GgrEnOTF8rBBHJGUpJl3x7QxPDDs4" X-Trace: ger.gmane.org 1426826666 2851 80.91.229.3 (20 Mar 2015 04:44:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Mar 2015 04:44:26 +0000 (UTC) To: 20148@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 20 05:44:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YYon5-0004r7-DG for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Mar 2015 05:44:11 +0100 Original-Received: from localhost ([::1]:42324 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYon4-0006je-Gu for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Mar 2015 00:44:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYomz-0006jY-OY for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 00:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYomw-0003et-IM for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 00:44:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYomw-0003eo-Fd for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 00:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YYomw-0000Mk-8F for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 00:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Mar 2015 04:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20148 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14268265951332 (code B ref -1); Fri, 20 Mar 2015 04:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Mar 2015 04:43:15 +0000 Original-Received: from localhost ([127.0.0.1]:58717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYomA-0000LP-QT for submit@debbugs.gnu.org; Fri, 20 Mar 2015 00:43:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37522) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYom8-0000LC-Fd for submit@debbugs.gnu.org; Fri, 20 Mar 2015 00:43:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYom2-0003ar-3F for submit@debbugs.gnu.org; Fri, 20 Mar 2015 00:43:06 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYom2-0003an-07 for submit@debbugs.gnu.org; Fri, 20 Mar 2015 00:43:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYom0-0006ht-Qi for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 00:43:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYolx-0003a1-Lz for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 00:43:04 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:54946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYolx-0003Zr-D6 for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 00:43:01 -0400 Original-Received: from [192.168.1.12] ([96.232.130.59]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MFctN-1YmosA1d6j-00Eb0g for ; Fri, 20 Mar 2015 05:42:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 OpenPGP: url=hkp://keys.gnupg.net X-Provags-ID: V03:K0:RTOWU61eJSrU0afBi1yZpJsTsjNFyE0sBZxWmFdaS+9cZnFf8xm rWMZUK2ppfJMLMU/oZSgCT5fdgaJcw2O3YgI9FToUAn7T3elfKtYxaOhkcgkv5ZaGdhA25Y OFVnZFp2o3l/Xo3/CfD0xbXszN3G513rcfA4iLZ7y4KnLz34uQgldVJlS2IesooFJsHvJAz aSdCfwbairRJDFB8WE97Q== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100680 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DVq2GgrEnOTF8rBBHJGUpJl3x7QxPDDs4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. --=20 hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 --DVq2GgrEnOTF8rBBHJGUpJl3x7QxPDDs4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVC6UtAAoJEDvrUfDmCx9LCdcP/RL8JY2ZvDYlK3RmhVqXt8wS hEKoMH3v5mOUBnsEcxWcFZENNHSRPx2yYGNmnjgW/2kWuW/iS0g/1GsEhS5CdnC5 fqct8j0oYQK45y8TwBVZVJ0aevKlmb58Bh2taDemtOWWw05SauswHRi/8vrZTTnk 5/UFawUQGBSAzOBkPUCG0Tl+VItS5W6gXYvd40cv536atEljLC5GHgwKhxxfUsn/ 4nJT8XI3/I54jbyMtV8l5d+bVpbbUP2lOHzmifKkxCy1Lyq0UCOZveu0nA4/YvxS I9Ld7R7fG6OpAvhjyFsUgIErQk/AGNkrAVEVtrHsHGIRBU+0YJtMTR/DEqUoVsAL 55AENtIl7hhX6f97ftp9xiNcWstMiuFh7ehxzgFmE89PjC+k6m6FGdAgs56YdAbJ NMzECOmq2g44Du8XQrzbF4kbUhq4JqZfFt7Nv80OPX+UZ+72Qmj0RGVwP3pkvgN7 h+5BgEvkxfWSDQfahD1Y+tPe+qT9Q7LwSwLwlDHeJsy0nK0aJbXJxtGn9aI3ZFC+ vF5Dcp0oKbQWk4gLdkXevwIyftuSSPOdZa/32oKkwg+Q4OJnHTn78wJ2Zo1mnsvN uRYF1qAtvMmzzjN7sPPGN39WXXGPEvPYYx3he8mlydHJlHUrJe51J/5K18vucKib rPQEa+Qq8nfK+WIRxMlV =P86V -----END PGP SIGNATURE----- --DVq2GgrEnOTF8rBBHJGUpJl3x7QxPDDs4--