From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#37840: Missing in the Emacs manuals: Date: Tue, 22 Oct 2019 10:43:14 +0200 Message-ID: <5440997d-8f3f-12f9-ae9e-c0caadde4a01@gmx.at> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="98954"; mail-complaints-to="usenet@blaine.gmane.org" To: Konrad Podczeck , 37840@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 22 10:44:38 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMpmP-000Pe4-P4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2019 10:44:37 +0200 Original-Received: from localhost ([::1]:51724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMpmO-0004hr-3d for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2019 04:44:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48091) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMplr-0004gp-PX for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 04:44:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMplq-0003YB-Kt for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 04:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMplq-0003Y1-Gk for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 04:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMplq-0000SC-Cm for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 04:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2019 08:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37840 X-GNU-PR-Package: emacs Original-Received: via spool by 37840-submit@debbugs.gnu.org id=B37840.15717338091694 (code B ref 37840); Tue, 22 Oct 2019 08:44:02 +0000 Original-Received: (at 37840) by debbugs.gnu.org; 22 Oct 2019 08:43:29 +0000 Original-Received: from localhost ([127.0.0.1]:58211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMplI-0000RF-UT for submit@debbugs.gnu.org; Tue, 22 Oct 2019 04:43:29 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:56969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMplF-0000R1-TS for 37840@debbugs.gnu.org; Tue, 22 Oct 2019 04:43:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1571733795; bh=dOfBrYeqEOjwqeVCiYLgHzShbjbk8i5x6muVy+5BIQ0=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=CJr7UpSv168XwWX7KZp8H+O3vNF/dt53YDUNQ4Ezb0kBdudmnCTyMlsyOIJXpIZ8J DtOOH/pWd/lysPqcl93o5nx1wWJgbQ2XFOXgT68cWtpQ/kBLMabIUEe3mvfJjD77xm Ns2rJrMVmyBIReQ6rryvIlDHuq/Azdn76lhaNfEI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.6]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBlxM-1iAmX12HfA-00CCAV; Tue, 22 Oct 2019 10:43:15 +0200 In-Reply-To: Content-Language: de-AT X-Provags-ID: V03:K1:bxMKYz16iPhDEQzTWDRLAXoZVRUAs1lRHKu2aXINsdE44UX/JqO DX0yhwWYVvOK9KT62usgYhEH72dvJIW6XdcddQ1r49d/ZJ9OF4OO7rpd6YHW4cW9k46yqgo SRhAq3QmDMR6vaPK7N6kZm1zYBGpSWru378nakFBW8oRYjDx9WqaM81r8TltU2895sKpWCp v2bOPjrzzJAdHv70Rlehw== X-UI-Out-Filterresults: notjunk:1;V03:K0:7eJC89cS++M=:jn1VZPsHwdiYrvpzr6LyIp QcKTFSgK9WwdQU/rKlRYIGY7zvl5LARdAAj7oJUCi+7srIY8jnnYfntNt5cKe+pECshHnp9yA +ToTXWszKC4K5Dd+WUIwhHqGW5Mh3z/HTtNfsnl8kEFIxPek4zhwkMlSBNkVTb/VHefhnLPnF ZTRy/sqt4mffWWgfunou/7W9gcp3f39ZBePHCAGk0jb1Mt7P8juCIKwCeq96M2ltVz579sN1n CfWnpda9MI82RLKxQ9fzHZ7EOX+1b/TiUp8wpb2fcO10rV9+jq+2lCPX+A7ikN7ac24EFrGk+ kI+eRS1xdpn6+1d9paU0mEE6Wl188hGYKpRIaJbedsVWQIWngMnGKjI5t2wwV+e34nVIp7hnY LDAX2nNBao7XVMqzUtD+VPdK3ISE9n6NmPgCWcPjGfqUaUY8uB37+YkbnYJYdVC/Gay3lIqT8 Z5y9dOtu68qHKJpHOCL2wQdyq2f2A3Iivm7us3TTPMawkNp0I03NWQaF/8LbIInAY/tUBg/5q Asg88tGEmSMWb3XyHWG53uK3Hp3srvaHwuHKl3ow3fSu0hDJjwCQyQOqMyy6FuVJyROjNCmSc 93xNdQSObXuEK6spdw+s5ZoVIP3DTh+ZnLQRfG8XPH1/DqKGJ0MocgMtvSf8t4KJ3mYE5Sx2c Wr9xS4HpHlKggBcFzX8htQPhFPj9zK6BiR0RKQSWSDuDz3uXlrq1kaNtbWitUyjmuq7kXyc4v LA9NqGWlWcW+whpzifI/Bt7e0OIzrBfQprZB0oIGuuhpY+ZveXiwhRCOB9wNj69W4ydIIRP5 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:169973 Archived-At: > There is no detailed example in the emacs manuals on how to migrate > from using "special-display-frame-alist" and > "special-display-regexps" to "display-buffer-alist." I'm not sure whether I'll be able to come up with something reasonable in this regard, mainly because I've never been able to understand the special display function mechanism. > E.g., how to migrate from > > (setq special-display-frame-alist > (quote > ((height . 42) > (width . 83) > (left . 770) > (unsplittable) > (tool-bar-lines . 0) > (left-fringe . 0) > (right-fringe . 0) > (line-spacing . 0) > (font . "Monaco-12") > (top . 110)))) > > and > > (setq special-display-regexps '((".*output*" (right-fringe . 0) (left-fringe . 0) (top . 330) (left . 152) > (width . 86) (height . 32) > (tool-bar-lines . 0) (font . "Menlo-10") (menu-bar-lines . 0))) You can try the following untested snippet (your regxp looks a bit odd, BTW): (setq my-special-display-frame-alist (quote ((height . 42) (width . 83) (left . 770) (unsplittable) (tool-bar-lines . 0) (left-fringe . 0) (right-fringe . 0) (line-spacing . 0) (font . "Monaco-12") (top . 110)))) (setq my-special-display-regexps '((".*output*" (right-fringe . 0) (left-fringe . 0) (top . 330) (left . 152) (width . 86) (height . 32) (tool-bar-lines . 0) (font . "Menlo-10") (menu-bar-lines . 0)))) (setq display-buffer-alist `((".*output*" (display-buffer-reuse-window ; display-buffer-same-window ; display-buffer-pop-up-window display-buffer-pop-up-frame) (reusable-frames . 0) (inhibit-switch-frame . nil) (pop-up-frame-parameters . ,(append (cdr my-special-display-regexps) special-display-frame-alist))))) where you have to comment-in the respective alist functions when you use 'same-window' or 'same-frame' in your 'special-display-regexps' settings (apparently you don't). I can put a similar example into the Elisp manual (Eli would have to figure out the details to omit or add) but note the following two not entirely negligible differences: 'special-display-popup-frame' (the default for 'special-display-function') uses (when (cdr (assq 'same-window args)) (condition-case nil (progn (switch-to-buffer buffer nil t) (selected-window)) (error nil))) which has no direct equivalent in the 'display-buffer-alist' ecosystem. I used 'display-buffer-same-window' instead but that does not obey options like 'switch-to-buffer-in-dedicated-window' or 'switch-to-buffer-preserve-window-point'. Which means that for a faithful migration you would have to write your own action function here. The second difference derives from the fact that 'special-display-popup-frame' marks the window on a new frame as dedicated to its buffer. This is no more needed in the 'display-buffer-alist' world because there the 'quit-restore' window parameter takes care of the problem the former tries to solve. Still this means a behavioral difference that should be mentioned. I _cannot_ add a non-nil 'dedicated' alist entry because that would be applied by any other action function ('display-buffer-pop-up-window' foremost) too. Also I have left out details like the function to be called when the car of the ARGS argument of 'special-display-popup-frame' is a symbol or how to treat 'special-display-buffer-names' ... martin