From drew.adams@oracle.com Mon Aug 24 15:14:58 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Aug 2009 22:14:58 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 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 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 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 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 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 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 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 Received: from dradamslap1 (/141.144.81.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Aug 2009 15:14:44 -0700 From: "Drew Adams" To: Subject: 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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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) 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)' From cyd@stupidchicken.com Sun Sep 13 15:20:35 2009 Received: (at 4250) by emacsbugs.donarmstrong.com; 13 Sep 2009 22:20:36 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8DMKY2H019595 for <4250@emacsbugs.donarmstrong.com>; Sun, 13 Sep 2009 15:20:35 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 8276C57E26C; Sun, 13 Sep 2009 18:22:01 -0400 (EDT) From: Chong Yidong To: kfogel@red-bean.com Cc: 4250@debbugs.gnu.org Subject: Re: 23.1; bookmark.el should raise reasonable error for empty filename entry Date: Sun, 13 Sep 2009 18:22:01 -0400 Message-ID: <87bplelc3a.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Karl, Could you take a look at bug#4250 for the bookmark package? Thanks. (Drew Adams has filed a few other bookmark.el bugs in the bug tracker, and if you could look at them as well, that would be good. Thanks.) From cyd@stupidchicken.com Sun Sep 13 15:19:02 2009 Received: (at control) by emacsbugs.donarmstrong.com; 13 Sep 2009 22:19:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.6 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8DMJ1VK019135 for ; Sun, 13 Sep 2009 15:19:02 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 8A5A357E26C; Sun, 13 Sep 2009 18:20:28 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: merge 4229 4250 Date: Sun, 13 Sep 2009 18:20:28 -0400 Message-ID: <87fxaqlc5v.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii merge 4229 4250 thanks From kfogel@red-bean.com Sun Sep 13 15:27:03 2009 Received: (at 4250) by emacsbugs.donarmstrong.com; 13 Sep 2009 22:27:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from sanpietro.red-bean.com (Debian-exim@sanpietro.red-bean.com [66.146.206.141]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8DMR2wF020672 for <4250@emacsbugs.donarmstrong.com>; Sun, 13 Sep 2009 15:27:03 -0700 Received: from localhost ([127.0.0.1]:38729 helo=kfogel-work ident=kfogel) by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from ) id 1MmxXB-0001yk-2f; Sun, 13 Sep 2009 17:27:01 -0500 From: Karl Fogel To: Chong Yidong Cc: 4250@debbugs.gnu.org Subject: Re: 23.1; bookmark.el should raise reasonable error for empty filename entry References: <87bplelc3a.fsf@cyd.mit.edu> Reply-To: Karl Fogel Date: Sun, 13 Sep 2009 18:26:55 -0400 In-Reply-To: <87bplelc3a.fsf@cyd.mit.edu> (Chong Yidong's message of "Sun, 13 Sep 2009 18:22:01 -0400") Message-ID: <87my4yo500.fsf@red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Chong Yidong writes: > Hi Karl, > > Could you take a look at bug#4250 for the bookmark package? Thanks. > > (Drew Adams has filed a few other bookmark.el bugs in the bug tracker, > and if you could look at them as well, that would be good. Thanks.) Yes, I will take a look. Thank you for bringing it to my attention. -Karl From drew.adams@oracle.com Mon Sep 14 13:29:12 2009 Received: (at 4250) by emacsbugs.donarmstrong.com; 14 Sep 2009 20:29:12 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from rgminet11.oracle.com (rcsinet11.oracle.com [148.87.113.123]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8EKTBEk009243 for <4250@emacsbugs.donarmstrong.com>; Mon, 14 Sep 2009 13:29:12 -0700 Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8EKTlgc013691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Sep 2009 20:29:48 GMT Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8EKTOGH002957; Mon, 14 Sep 2009 20:29:24 GMT Received: from dradamslap1 (/141.144.64.128) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 14 Sep 2009 13:29:00 -0700 From: "Drew Adams" To: "'Karl Fogel'" , <4250@debbugs.gnu.org>, "'Chong Yidong'" References: <87bplelc3a.fsf@cyd.mit.edu> <87my4yo500.fsf@red-bean.com> Subject: RE: bug#4250: 23.1;bookmark.el should raise reasonable error for empty filename entry Date: Mon, 14 Sep 2009 13:29:12 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Aco0xFZTAr6QF/rhQAiKdqZ7wkUFbwAtX8UQ In-Reply-To: <87my4yo500.fsf@red-bean.com> 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.0A090204.4AAEA78E.007B:SCFSTAT5015188,ss=1,fgs=0 > > Could you take a look at bug#4250 for the bookmark package? Thanks. > > > > (Drew Adams has filed a few other bookmark.el bugs in the > > bug tracker, and if you could look at them as well, that > > would be good. Thanks.) > > Yes, I will take a look. Thank you for bringing it to my attention. Thanks. When you can, please take a look also at the bookmark.el bugs filed by Thierry Volpiatto. Thx - Drew From kfogel@red-bean.com Sun Oct 4 21:26:55 2009 Received: (at 4250-close) by emacsbugs.donarmstrong.com; 5 Oct 2009 04:26:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from sanpietro.red-bean.com (Debian-exim@sanpietro.red-bean.com [66.146.206.141]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n954QrK3002225 for <4250-close@emacsbugs.donarmstrong.com>; Sun, 4 Oct 2009 21:26:54 -0700 Received: from localhost ([127.0.0.1]:52856 helo=floss ident=kfogel) by sanpietro.red-bean.com with esmtp (Exim 4.69) (envelope-from ) id 1Muf9x-0001DT-Dk for 4250-close@emacsbugs.donarmstrong.com; Sun, 04 Oct 2009 23:26:53 -0500 From: Karl Fogel To: 4250-close@debbugs.gnu.org Subject: Fix "bookmark.el should raise reasonable error for empty filename entry" Reply-To: Karl Fogel Date: Mon, 05 Oct 2009 00:26:53 -0400 Message-ID: <87d452mpo2.fsf@red-bean.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii fixed -- I think this is fixed now, though I'm not positive it was broken in the first place. I've made `bookmark-default-handler' raise a catchable error on entries that have no filename. But in general, if you're defining your own types of bookmarks, you should be defining custom handlers for them. So when you say "I have code that allows for bookmarks that have no filename", I'm curious to see that code. It's impossible, in the general case, for bookmark.el to tolerate all entries it does not recognize -- a sufficiently bizarre entry might not even have discernable boundaries, for example. We must depend on custom handlers to handle custom data. Anyway, here's the commit: $ cvs ci -F msg lisp/bookmark.el lisp/ChangeLog /sources/emacs/emacs/lisp/bookmark.el,v <-- lisp/bookmark.el new revision: 1.131; previous revision: 1.130 /sources/emacs/emacs/lisp/ChangeLog,v <-- lisp/ChangeLog new revision: 1.16357; previous revision: 1.16356 Mailing notification to emacs-diffs@gnu.org... sent. $ And this is the log message, so you can get an idea of what I did: (bookmark-handle-bookmark): If bookmark has no file, don't do anything related to relocating, just return nil. (bookmark-error-no-filename): New error. (bookmark-default-handler): Signal `bookmark-error-no-filename' if bookmark has no file. Don't even attempt to handle things that are not files; the whole point of custom handlers is to keep that knowledge elsewhere anyway. Tighten some comments. (bookmark-file-or-variation-thereof): Remove now-unused function. (bookmark-location): Doc string fix. From unknown Fri Sep 05 11:01:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 02 Nov 2009 15:24:12 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator