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#3862: 23.1.50; error calling `documentation' on calendar-mode Date: Wed, 15 Jul 2009 21:40:18 -0400 Message-ID: References: <87tz1da4kx.fsf@blah.blah> Reply-To: Stefan Monnier , 3862@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247709471 20040 80.91.229.12 (16 Jul 2009 01:57:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2009 01:57:51 +0000 (UTC) Cc: 3862@emacsbugs.donarmstrong.com To: Kevin Ryde Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 16 03:57:43 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 1MRGEA-0002WN-Qh for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Jul 2009 03:57:43 +0200 Original-Received: from localhost ([127.0.0.1]:38387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRGEA-0001xD-DR for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Jul 2009 21:57:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRGE4-0001uP-8f for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 21:57:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRGDz-0001r4-QU for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 21:57:36 -0400 Original-Received: from [199.232.76.173] (port=48750 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRGDz-0001r1-Km for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 21:57:31 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42099) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MRGDz-00084D-5p for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 21:57:31 -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 n6G1vSkI022078; Wed, 15 Jul 2009 18:57:28 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6G1j4gA019992; Wed, 15 Jul 2009 18:45:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 01:45:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3862 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3862-submit@emacsbugs.donarmstrong.com id=B3862.124770843119513 (code B ref 3862); Thu, 16 Jul 2009 01:45:04 +0000 Original-Received: (at 3862) by emacsbugs.donarmstrong.com; 16 Jul 2009 01:40:31 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6G1eO7U019504 for <3862@emacsbugs.donarmstrong.com>; Wed, 15 Jul 2009 18:40:26 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlwFAM8hXkrO+KNz/2dsb2JhbACBUdBIhAsFgh2EVw X-IronPort-AV: E=Sophos;i="4.42,408,1243828800"; d="scan'208";a="41702465" Original-Received: from 206-248-163-115.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.115]) by ironport2-out.teksavvy.com with ESMTP; 15 Jul 2009 21:40:18 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5A14380B0; Wed, 15 Jul 2009 21:40:18 -0400 (EDT) In-Reply-To: <87tz1da4kx.fsf@blah.blah> (Kevin Ryde's message of "Thu, 16 Jul 2009 09:50:38 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 15 Jul 2009 21:57:36 -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:29459 Archived-At: > (progn > (require 'calendar) > (documentation 'calendar-mode)) > gets the error and backtrace below. The docstring gets passed through substitute-command-keys which can run arbitrary code via menu-item :filters (as well as via autoloaded keymaps, actually). > For what it's worth it works fine from the actual calendar buffer, but I > was trying in some program code where that wasn't the case. I hoped I > could generally get the docs for any function from anywhere. In the present case, there's a subtle bug in the :filter of the calendar-mode-map (more specially in the menu-bar part of the map). > Also incidentally I tried a condition-case around it like > (condition-case nil > (documentation 'calendar-mode) > (error nil)) > and was surprised it still went to the debugger. But maybe that's a > separate problem. Indeed it's a separate problem: when the filter is run, it is presumed it is "at top level" and so the error gets turned into a backtrace without paying attention to surrounding condition-cases. It's clearly a bug, but it might be delicate to fix without introducing risks of nasty crashes. Stefan