From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#21649: 25.0.50; [PATCH] Allow M-x man to reuse an existing window Date: Mon, 12 Oct 2015 15:06:31 +0000 Message-ID: References: <86r3l09t3u.fsf@members.fsf.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e011768733ae08d0521e9ad0f X-Trace: ger.gmane.org 1444662456 11958 80.91.229.3 (12 Oct 2015 15:07:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 15:07:36 +0000 (UTC) To: Nicolas Richard , "21649@debbugs.gnu.org" <21649@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 12 17:07:25 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZlehA-0000gA-CB for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 17:07:24 +0200 Original-Received: from localhost ([::1]:55968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlehA-0001M0-06 for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Oct 2015 11:07:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlegv-00018N-32 for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 11:07:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlego-0001RO-Mu for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 11:07:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlego-0001Qx-Ja for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 11:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zlego-0003ci-4r for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2015 11:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Oct 2015 15:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21649 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 21649-submit@debbugs.gnu.org id=B21649.144466240413898 (code B ref 21649); Mon, 12 Oct 2015 15:07:02 +0000 Original-Received: (at 21649) by debbugs.gnu.org; 12 Oct 2015 15:06:44 +0000 Original-Received: from localhost ([127.0.0.1]:37199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZlegV-0003c5-RQ for submit@debbugs.gnu.org; Mon, 12 Oct 2015 11:06:44 -0400 Original-Received: from mail-ob0-f179.google.com ([209.85.214.179]:34082) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZlegT-0003bw-Oa for 21649@debbugs.gnu.org; Mon, 12 Oct 2015 11:06:42 -0400 Original-Received: by obbda8 with SMTP id da8so108753881obb.1 for <21649@debbugs.gnu.org>; Mon, 12 Oct 2015 08:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=On8JwDz8jrvgebTzaMUlWfpQKJw3BqsNY5Kx8QqmPdc=; b=dQcMZ0XGxDHQxN8tp71ebbvwKmZXodSCzPyc/a9fySC8b2Lw2FpPYlNPdjXG7NF1r2 fszn+bcWqHSJ25i6/7a9Sxarpx50QfcYIjq4atGgqKpnghFpEMxczTFy/KpVHcxbEcYs DkbO+JUDLlmZh8ETzdzmbxgV0BLDBlWXdUs+O2kVEk7BvjG0uQjoKxXBtAxQrFoajBW7 3IurAHYANwSWtVpUPbCcRkVWdzwWyY0VL/Pn/R0XbrzWOLuvm0z1Yc90zl7Oj9n4z4+H FRvk46CulRLvpTHz5fhCr8GvvXip8oPCTwoHsQBML8SKTjhpE9B0gd0Vt8sbI19+PLv+ bTig== X-Received: by 10.60.84.132 with SMTP id z4mr10833999oey.50.1444662400963; Mon, 12 Oct 2015 08:06:40 -0700 (PDT) In-Reply-To: <86r3l09t3u.fsf@members.fsf.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107540 Archived-At: --089e011768733ae08d0521e9ad0f Content-Type: text/plain; charset=UTF-8 Here is the order in which the functions are called M-x man -> Man-getpage-in-background -> Man-notify-when-ready -> display-buffer (if Man-notify-method variable is set to 'friendly, which is its default value) You will get help about display-buffer-alist when you do `C-h f display-buffer`. You can also do `C-h v display-buffer-alist` and that will point you to the `display-buffer` function documentation. You can learn more about Display Action Functions by evaluating (info "(elisp) Display Action Functions") or doing `C-h i g (elisp) Display Action Functions`. Using the shackle package allows you to set the display actions from a higher level without having to customize the display-buffer-alist manually. If you are interested in customizing display-buffer-alist manually, there are few examples on emacs.stackexchange.com which might help you: - http://emacs.stackexchange.com/a/12757/115 - http://emacs.stackexchange.com/a/2195/115 - http://emacs.stackexchange.com/a/338/115 On Mon, Oct 12, 2015 at 8:19 AM Nicolas Richard wrote: > Hi, > > Thanks for the hint. I haven't looked into it yet, indeed. > display-buffer-alist is not very user-friendly (and isn't mentionned in > the docstring of `man'). Your shackle config file looks easier but I > don't see an obvious way to say "re use an existing window which > displays a buffer of the same mode". Maybe I should just try it and > see... > > Nicolas Richard. > > > Kaushal Modi writes: > > You can do the window control by customizing the `display-buffer-alist` > variable. That's a suggestion if you haven't > > yet looked at it. > > > > Personally, I use the shackle package which is an interface to > customization of that variable. I mention this because > > I control where the man/woman buffers open using this package ( > > > https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-shackle.el > ) > --089e011768733ae08d0521e9ad0f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here is the order in which the functions are called
M-x man -> Man-getpage-in-background -> Man-notify-when-= ready -> display-buffer (if Man-notify-method variable is set to 'fr= iendly, which is its default value)

You will get h= elp about display-buffer-alist when you do `C-h f display-buffer`.

You can also do `C-h v display-buffer-alist` and that will= point you to the `display-buffer` function documentation.

Yo= u can learn more about Display Action Functions by evaluating=C2=A0(info &q= uot;(elisp) Display Action Functions") or doing `C-h i g (elisp) Displ= ay Action Functions`.

Using the shackle package al= lows you to set the display actions from a higher level without having to c= ustomize the display-buffer-alist manually.

If you= are interested in customizing display-buffer-alist manually, there are few= examples on emacs.stackexchange= .com which might help you:

-=C2=A0<= a href=3D"http://emacs.stackexchange.com/a/338/115">http://emacs.stackexcha= nge.com/a/338/115


On Mon, Oct 12, 2015 at 8:19 AM Nicolas Richard <youngfrog@members.fsf.org>= wrote:
Hi,

Thanks for the hint. I haven't looked into it yet, indeed.
display-buffer-alist is not very user-friendly (and isn't mentionned in=
the docstring of `man'). Your shackle config file looks easier but I don't see an obvious way to say "re use an existing window which displays a buffer of the same mode". Maybe I should just try it and see...

Nicolas Richard.


Kaushal Modi <kaushal.modi@gmail.com> writes:
> You can do the window control by customizing the `display-buffer-alist= ` variable. That's a suggestion if you haven't
> yet looked at it.
>
> Personally, I use the shackle package which is an interface to customi= zation of that variable. I mention this because
> I control where the man/woman buffers open using this package (
> https://github.= com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-shackle.el )
--089e011768733ae08d0521e9ad0f--