From: Konrad Podczeck <konrad.podczeck@univie.ac.at>
To: martin rudalics <rudalics@gmx.at>
Cc: 37840@debbugs.gnu.org
Subject: bug#37840: Missing in the Emacs manuals:
Date: Wed, 23 Oct 2019 09:25:00 +0200 [thread overview]
Message-ID: <81790531-20E9-4919-A485-0D8FE6F60CE1@univie.ac.at> (raw)
In-Reply-To: <5440997d-8f3f-12f9-ae9e-c0caadde4a01@gmx.at>
[-- Attachment #1: Type: text/plain, Size: 4619 bytes --]
Thanks for your reply. Working on the stuff, I encountered the following problem: If, in “ display-buffer-alist”, I have the entry:
("[ ]?Packages[ ]?" (display-buffer-reuse-window display-buffer-pop-up-frame)
(pop-up-frame-parameters
(tool-bar-lines . 1)
(left . 1)
(left-fringe . 2)
(top . 0)
(height . 65)
(width . 149)
(font . "SF MONO-18")
(line-spacing . 3)
))
then, contrary to what is promised, this does not pop up a new frame. I figured out that the problem goes away if, in “packages.el”, I replace in the defun “list-packages” the code (switch-to-buffer buf) by (pop-to-buffer buf). My question is how to do this on the level of customizing “display-buffer-alist”. I didn’t find anything in this regard in the manuals.
> Am 22.10.2019 um 10:43 schrieb martin rudalics <rudalics@gmx.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
[-- Attachment #2: Type: text/html, Size: 88213 bytes --]
next prev parent reply other threads:[~2019-10-23 7:25 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 0:39 bug#37840: Missing in the Emacs manuals: Konrad Podczeck
2019-10-22 8:43 ` martin rudalics
2019-10-23 7:25 ` Konrad Podczeck [this message]
2019-10-23 7:46 ` martin rudalics
2019-10-28 17:37 ` Konrad Podczeck
2019-10-28 18:13 ` martin rudalics
2019-10-28 19:04 ` Konrad Podczeck
2019-10-29 9:28 ` martin rudalics
2019-10-30 0:56 ` Konrad Podczeck
2019-10-30 8:14 ` martin rudalics
2019-10-30 20:37 ` Konrad Podczeck
2019-10-31 7:59 ` martin rudalics
2019-11-02 21:47 ` Konrad Podczeck
2019-11-04 9:06 ` martin rudalics
2019-11-04 11:20 ` Konrad Podczeck
2019-11-04 18:27 ` martin rudalics
[not found] ` <A8BBF7A4-BFE0-44BB-BCB3-B26477FFC946@univie.ac.at>
2019-11-04 19:10 ` martin rudalics
2019-11-06 22:41 ` Juri Linkov
2019-11-07 8:39 ` martin rudalics
2019-11-07 21:58 ` Juri Linkov
2019-11-08 9:20 ` martin rudalics
2019-11-08 11:04 ` Konrad Podczeck
2019-11-08 18:27 ` martin rudalics
2019-11-08 21:12 ` Konrad Podczeck
2019-11-09 9:01 ` martin rudalics
2019-11-10 16:44 ` Konrad Podczeck
2019-11-10 18:33 ` martin rudalics
2019-11-14 10:03 ` Eli Zaretskii
2019-11-14 18:18 ` martin rudalics
2019-11-14 18:35 ` Eli Zaretskii
2019-11-15 8:50 ` martin rudalics
2019-11-22 13:09 ` Konrad Podczeck
2019-11-22 17:49 ` martin rudalics
2019-11-22 19:22 ` Eli Zaretskii
2019-11-23 1:42 ` Konrad Podczeck
2019-11-23 8:16 ` martin rudalics
2019-11-25 23:47 ` Konrad Podczeck
2019-11-26 9:32 ` martin rudalics
2019-12-02 1:35 ` Konrad Podczeck
2019-12-02 9:41 ` martin rudalics
2019-11-23 8:15 ` martin rudalics
2019-11-23 9:49 ` Eli Zaretskii
2019-11-26 9:31 ` martin rudalics
2019-11-26 9:42 ` martin rudalics
2020-09-20 11:12 ` Lars Ingebrigtsen
2019-11-10 20:11 ` Juri Linkov
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=81790531-20E9-4919-A485-0D8FE6F60CE1@univie.ac.at \
--to=konrad.podczeck@univie.ac.at \
--cc=37840@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/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.