[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: q doesn't always quit *Help*

From: martin rudalics
Subject: Re: q doesn't always quit *Help*
Date: Thu, 27 Sep 2007 23:21:45 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> Thanks for working on this. I won't be able to spend a lot of time on this,
> but I'll try to help a bit. I guess you're saying that I should start with
> the source files that are in the distributed Emacs 22.1, and not with the
> source files in cvs - is that right?

The patch is against the latest CVS Emacs 22 aka EMACS_22_BASE.

> I assumed so, and I took a look wrt the bug I just reported. The problem is
> that the code seems complex, and there are apparently lots of different ways
> to interact with it. It's possible that a fix might take care of what I
> reported but either not fix other problems or even introduce new problems. I
> won't have the time to deal with all of that, but I will check whether your
> fix takes care of what I reported.

I haven't done anything on this for a month so _any_ feedback is mostly

> [BTW, the fact that a fix to something like this needs to touch eight (!)
> Lisp files is aa suggestion that the View code is too complex and poorly
> designed, IMO. It's not a sure indication of poor design, but it is a hint.
> A (superficially simple) UI fix such as this should ideally be a local fix.]

The View code is not bad (most of my changes regard doc-strings only).
There are two basic problems: (1) The `with-output-to-temp-buffer' /
`print-help-return-message' combination relies on the latter to
_anticipate_ what `display-buffer' is going to do in the current
frame+window configuration.  This is hardly feasible.  (2) The
`view-exit-action' hack is a pain because it overrides the carefully
laid out design of View mode.

> I patched the Emacs 22.1 sources I have (from the distrib), but faces.el
> does not seem right.

Ignore it for the moment, all but help.el, help-mode.el, and view.el are
here to show how this should be implemented.  One of them is sufficient
to demonstrate the behavior.

> The version in the distrib already has some of the
> changes your patch makes. For instance, it has no `face-normalize-spec', so
> that cannot be removed, and the later change that involves this has
> apparently already been applied in the distrib version. So the patch for
> faces.el confuses me. I applied the part of it that made sense. Similarly,
> there was a bit of view.el that had apparently already been changed before
> the distrib.
> [BTW, is there some way to apply a patch other than by hand (copy+paste)?
> I've been doing it by hand, and it takes quite a while (and is error
> prone).]

You don't use `ediff-patch-buffer/-file' e.g. from the Tools / Apply
Patch menu?

> I tried with the patched files: emacs -Q, then loaded each patched file. The
> bug is fixed. Thx.
> However, in my own Emacs environment, where I have pop-up-frames = t and
> where *Help* is a special-display frame, `q' iconifies the *Help* frame,
> which is awful. I want it to simply call `quit-window' (which in fact
> deletes the frame in my case).

`quit-window' deletes the frame iff it's a minibuffer-window - which
should not hold here - or it's a dedicated window - do you set that?
But I agree that the behavior you describe is logical and desirable (as
long as you never display anything else in that window).  Hence, I have
to invent something here.  Did you try this with `help-window-select'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]