From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#20148: 24.4: function `bookmark-get-bookmark' Date: Fri, 20 Mar 2015 10:31:51 -0400 Message-ID: References: <550BA52D.1080805@gmx.com> <1c3990cf-d1db-45e5-8b31-9055cdab20bd@default> <550BFEA1.8080100@gmx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426861944 14605 80.91.229.3 (20 Mar 2015 14:32:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Mar 2015 14:32:24 +0000 (UTC) Cc: 20148@debbugs.gnu.org To: Boruch Baum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 20 15:32:12 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 1YYxy7-0003Xy-AK for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Mar 2015 15:32:11 +0100 Original-Received: from localhost ([::1]:44128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYxy6-0001sU-Mc for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Mar 2015 10:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYxy2-0001qE-Io for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 10:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYxxy-0003Q0-If for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 10:32:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYxxy-0003Pw-FO for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 10:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YYxxx-0007Rs-Rd for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2015 10:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Mar 2015 14:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20148 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20148-submit@debbugs.gnu.org id=B20148.142686191628620 (code B ref 20148); Fri, 20 Mar 2015 14:32:01 +0000 Original-Received: (at 20148) by debbugs.gnu.org; 20 Mar 2015 14:31:56 +0000 Original-Received: from localhost ([127.0.0.1]:59227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYxxs-0007RY-2O for submit@debbugs.gnu.org; Fri, 20 Mar 2015 10:31:56 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:41226) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYxxp-0007RO-PA for 20148@debbugs.gnu.org; Fri, 20 Mar 2015 10:31:54 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t2KEVpMi031750; Fri, 20 Mar 2015 10:31:52 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C0462F63; Fri, 20 Mar 2015 10:31:51 -0400 (EDT) In-Reply-To: <550BFEA1.8080100@gmx.com> (Boruch Baum's message of "Fri, 20 Mar 2015 07:04:01 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5251=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5251> : inlines <2452> : streams <1408631> : uri <1885575> 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:100697 Archived-At: Does that mean the bug can be closed? Stefan >>>>> "Boruch" == Boruch Baum writes: > Hello Drew. Apology for the inconvenience. > On 03/20/2015 01:04 AM, Drew Adams wrote: >>> 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). >> >> See the actual code. > You're right. You could have just said 'line 336, not 335'. >> >>> 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. >> >> See the actual code. >> >> The doc string neglects to mention the optional argument. It should >> say something like this (taken from Bookmark+): >> >> Non-nil optional arg NOERROR means return nil if BOOKMARK is not a >> valid bookmark. If NOERROR is nil then raise an error in this case. > Missed that also. > -- > hkp://keys.gnupg.net > CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0