all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: emacs-devel@gnu.org
Cc: Andreas Roehler <andreas.roehler@easy-emacs.de>
Subject: Re: auto-insert help-buffer
Date: Thu, 08 Mar 2007 11:23:12 -0500	[thread overview]
Message-ID: <87fy8fu2kv.fsf@stupidchicken.com> (raw)
In-Reply-To: <45D967C4.5060104@easy-emacs.de> (Andreas Roehler's message of "Mon\, 19 Feb 2007 10\:03\:00 +0100")

> 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);

       reply	other threads:[~2007-03-08 16:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <45D967C4.5060104@easy-emacs.de>
2007-03-08 16:23 ` Chong Yidong [this message]
2007-03-08 21:48   ` auto-insert help-buffer Richard Stallman
2007-03-09  2:06     ` Chong Yidong
2007-03-09 21:27       ` Richard Stallman
2007-03-10  4:48         ` Chong Yidong
2007-03-11  4:23           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fy8fu2kv.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.