From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: auto-insert help-buffer Date: Thu, 08 Mar 2007 11:23:12 -0500 Message-ID: <87fy8fu2kv.fsf@stupidchicken.com> References: <45D967C4.5060104@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173371036 19170 80.91.229.12 (8 Mar 2007 16:23:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2007 16:23:56 +0000 (UTC) Cc: Andreas Roehler To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 08 17:23:50 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HPLPA-0006hV-M0 for ged-emacs-devel@m.gmane.org; Thu, 08 Mar 2007 17:23:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPLPO-0005rx-0l for ged-emacs-devel@m.gmane.org; Thu, 08 Mar 2007 11:24:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HPLP7-0005ml-Uz for emacs-devel@gnu.org; Thu, 08 Mar 2007 11:23:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPLP7-0005lE-69 for emacs-devel@gnu.org; Thu, 08 Mar 2007 11:23:45 -0500 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HPLOs-0003t9-Ul for emacs-devel@gnu.org; Thu, 08 Mar 2007 11:23:31 -0500 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l28GNQWm028142; Thu, 8 Mar 2007 11:23:26 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l28GNDL6008707; Thu, 8 Mar 2007 11:23:17 -0500 (EST) Original-Received: from localhost (MAIN-TWELVE-TWO-FIFTY-SIX.MIT.EDU [18.19.6.1]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l28GNCZ1028852; Thu, 8 Mar 2007 11:23:12 -0500 (EST) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HPLOa-00011f-00; Thu, 08 Mar 2007 11:23:12 -0500 In-Reply-To: <45D967C4.5060104@easy-emacs.de> (Andreas Roehler's message of "Mon\, 19 Feb 2007 10\:03\:00 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67574 Archived-At: > emacs -q > M-x auto-insert > Prompt for keyword > C-h > > opens a help-buffer with descriptions, but without the > corresponding keywords visible. > > This buffer vanishes, when clicked by mouse. > > => > > scroll-bar-toolkit-scroll: Wrong type argument An easier way is to evaluate (let ((minibuffer-help-form "You are inserting a skeleton.")) (read-string "Foo: " "Bar")) type C-h, click on the help window, and observe the error. This seems to be the result of the following code in keyboard.c:3316. Basically, we record-unwind-protect the current window configuration before launching the help form, which creates a new window. Therefore, when the mouse click on the temporary window comes through, the unbind_to first removes the window, then runs the mouse bindings, which fail because the window is no longer live. One possibility is to remove the unwind protect; the other is to check in the mouse-click functions whether the desired window is live or not. Which solution is preferable? /* Process the help character specially if enabled */ if (!NILP (Vhelp_form) && help_char_p (c)) { Lisp_Object tem0; count = SPECPDL_INDEX (); record_unwind_protect (Fset_window_configuration, Fcurrent_window_configuration (Qnil)); tem0 = Feval (Vhelp_form); if (STRINGP (tem0)) internal_with_output_to_temp_buffer ("*Help*", print_help, tem0); cancel_echoing (); do c = read_char (0, 0, 0, Qnil, 0, NULL); while (BUFFERP (c)); /* Remove the help from the frame */ unbind_to (count, Qnil);