all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Alekseyev <dnquark@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to make display-buffer automatically focus (e.g. for help  buffers)
Date: Mon, 13 Jul 2009 21:36:36 -0400	[thread overview]
Message-ID: <14cd9a5d0907131836o52f663bej99efb2a5b2727e51@mail.gmail.com> (raw)
In-Reply-To: <4A5B6F8E.9080601@gmx.at>

this is going in the right direction, but isn't working
First, the comparison should be
(when (member (buffer-name buffer-or-name) my-display-buffer-list)

and the function should return a window

However, even so it doesn't work: because the buffer is supposed to
display a message, you can't enable the view mode right after spawning
it -- because then you can't write to it.  I actually don't see how
you can get around this.

But even without the view mode, the (select-window window) doesn't
appear to focus the buffer...
>
> (defun my-display-buffer (buffer-or-name flag)
>  (let (display-buffer-function window)
>    (setq window (display-buffer buffer-or-name flag))
>    (when (memq buffer-or-name my-display-buffer-list)
>      (select-window window)
>      (view-mode 1))))
>
> customize `display-buffer-function' to `my-display-buffer' and tell me
> whether it does what you want.
>
> martin
>




  reply	other threads:[~2009-07-14  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 15:10 How to make display-buffer automatically focus (e.g. for help buffers) martin rudalics
2009-07-13 16:02 ` Leo Alekseyev
2009-07-13 17:31   ` martin rudalics
2009-07-14  1:36     ` Leo Alekseyev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-13 11:12 dnquark

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=14cd9a5d0907131836o52f663bej99efb2a5b2727e51@mail.gmail.com \
    --to=dnquark@gmail.com \
    --cc=help-gnu-emacs@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.