From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#4250: 23.1; bookmark.el should raise reasonable error for empty filename entry Date: Mon, 24 Aug 2009 15:14:50 -0700 Message-ID: <2AB5A2C17C4C41FA8ED68F391075B631@us.oracle.com> Reply-To: Drew Adams , 4250@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251152838 10749 80.91.229.12 (24 Aug 2009 22:27:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Aug 2009 22:27:18 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 25 00:27:11 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mfi0G-0006Ol-8E for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Aug 2009 00:27:04 +0200 Original-Received: from localhost ([127.0.0.1]:44410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mfi0F-0008Fx-J1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Aug 2009 18:27:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mfi0B-0008FN-Qk for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:26:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mfi07-0008EJ-9D for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:26:59 -0400 Original-Received: from [199.232.76.173] (port=42233 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mfi07-0008EF-4X for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:26:55 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46856) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mfi06-00074a-Hv for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:26:54 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7OMQqSJ010298; Mon, 24 Aug 2009 15:26:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7OMK3Zi009032; Mon, 24 Aug 2009 15:20:03 -0700 Resent-Date: Mon, 24 Aug 2009 15:20:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 24 Aug 2009 22:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4250 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12511520988164 (code B ref -1); Mon, 24 Aug 2009 22:20:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 24 Aug 2009 22:14:58 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7OMEupq008161 for ; Mon, 24 Aug 2009 15:14:58 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfhoW-0008UH-C4 for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:14:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfhoS-0008RJ-Pj for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:14:56 -0400 Original-Received: from [199.232.76.173] (port=58389 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfhoS-0008Qz-Fz for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:14:52 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:24898) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MfhoR-0005TD-TZ for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2009 18:14:52 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7OMFWmn014396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Aug 2009 22:15:34 GMT Original-Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n7OMEiNu028405 for ; Mon, 24 Aug 2009 22:14:44 GMT Original-Received: from dradamslap1 (/141.144.81.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Aug 2009 15:14:44 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcolCEyNK1GT4hgJTyWV/7xOtWhjzA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt004.oracle.com [141.146.116.13] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4A9310D4.0196:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 24 Aug 2009 18:26:59 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30529 Archived-At: I have code that allows for bookmarks that have no filename, that is, where the `filename' entry in `bookmark-alist' is `(filename)'. It would be ideal and most reasonable if vanilla Emacs simply ignored such a bookmark - tolerance. More generally, it would be great if it would tolerate any bookmark in `bookmark-alist' that it doesn't recognize. If that is not something you agree about, then at least it should raise a reasonable error - not just "wrong-type-arg stringp, nil", whenever a "malformed" bookmark is encountered. The code in `bookmark-default-handler' is an example of the problem. The local variable `file' is bound to (bookmark-get-filename bmk) - which returns nil if there is no `filename' entry or the `filename' entry is `(filename)'. The code then simply calls (file-exists-p nil), via (bookmark-file-or-variation-thereof nil), raising the wrong-type-arg error. In the alternative `if' branch, the code calls (find-file-noselect nil), which has the same problem. In general, it would be great if places where `bookmark-get-filename' is called tested the result and treated nil by raising a bookmark-level error. As I said, it would be even better if the bookmark.el code could be made tolerant of any bookmark whose format it does not recognize. bookmark.el already allows for applications and users to add new, addtional entries. The problem is that it doesn't allow for unexpected forms of the entries it predefines. It would be nice if it were tolerant, and simply ignored any such bookmark (no error). In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-29 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)'