unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: help-window-select and info-lookup-symbol
Date: Mon, 20 Jul 2009 11:32:25 +0200	[thread overview]
Message-ID: <4A6439A9.6080406@gmx.at> (raw)
In-Reply-To: <m28wiktzc5.fsf@gmail.com>

 > It seems to me that C-h S and C-h f are so similar that both commands
 > should honor the value of help-window-select.  In fact, there are a lot
 > of (third party) packages with a display-documentation-in-other-window
 > command but there seems to be no agreement whether the window should be
 > selected or not.  Especially annoying is the fact that XEmacs usually
 > selects the other window while Emacs usually does not.

C-h f is a self-contained function while C-h S falls back on `info' for
displaying its findings.  Obviously, a common approach to handle these
and similar cases would be desirable.

 > It would be very nice if you, the Emacs maintainers, could make a rule
 > or style-guide how this should be done.  E.g. should other packages look
 > at help-window-select or is that an "internal" variable of help-mode?

Currently `help-window-select' is an "internal" variable of help-mode.

 > I understand that restoring the window configuration after pressing q in
 > the help window (or info window, or w3m buffer) is sort of tricky and it
 > gets very complex if multiple frames are involved, yet selecting the
 > help window is what many users expect.  Since restoring is so tricky it
 > would also be helpful if there were some general functions to do it
 > properly.

Restoring an old window configuration is awfully tricky.  Let W1 denote
the window configuration before invoking help, W2 the configuration
after invoking help (and after any `fit-window-to-buffer' and balancing
stuff), and W3 the configuration when you press `q'.  A brute force
approach (currently used by info or backtrace) simply restores W1 whe
you press `q' which all so often drives me mad because it destroys the
windows and window-buffer associations I have created in between.

Now theoretically, I could restore W1 if and only if the configurations
W2 and W3 are equal.  In practice, however, this approach often failed
here.  Hence, I tried to base the comparison on a weaker predicate of
equality which ignored the identities of buffers displayed in other
windows and the relative sizes of windows.  I got it to work for help
buffers but was not able to make it work realiably with info buffers.

martin




  reply	other threads:[~2009-07-20  9:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19 16:24 help-window-select and info-lookup-symbol Helmut Eller
2009-07-20  9:32 ` martin rudalics [this message]
2009-07-21 12:33   ` Helmut Eller
2009-07-21 13:27     ` martin rudalics
2009-07-21 13:51       ` Helmut Eller
2009-07-21 14:12         ` martin rudalics
2009-07-21 15:07           ` Helmut Eller
2009-07-22 10:11             ` martin rudalics
2009-07-22 10:28               ` Helmut Eller
2009-07-26 10:01                 ` martin rudalics
2009-07-26 10:39                   ` Helmut Eller
2009-07-26 11:00                     ` martin rudalics
2009-07-26 12:30                       ` Helmut Eller

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4A6439A9.6080406@gmx.at \
    --to=rudalics@gmx.at \
    --cc=eller.helmut@gmail.com \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).