all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: display-buffer-alist simplifications
Date: Mon, 25 Jul 2011 11:18:15 +0200	[thread overview]
Message-ID: <4E2D34D7.4040002@gmx.at> (raw)
In-Reply-To: <878vrnweju.fsf@stupidchicken.com>

 > The topic at hand is whether `display-buffer-alist' should "merge" into
 > the display specifier supplied to `display-buffer'.  Let's put aside the
 > question of whether the Emacs 23 system is or is not complicated.

The question whether and how to merge such a specifier is central to the
question whether we should change the semantics of the not-this-window
argument of `display-buffer' at all.  If we prefer to not do that, then
I should be able to provide a working version of `display-buffer' from
last autumn which might be quite usable as fallback.  Since most people
do find `display-buffer-alist' much too complicated and Stefan is
apparently opposed to almost all new features it provides, we should
seriously consider reverting the changes introduced by buffer display
specifiers.  In this context it makes also sense to discuss whether the
Emacs 23 system is or is not complicated.

 > So, IIUC, this converts the same-window specifier
 >
 >   ((reuse-window same nil nil))
 >
 > to
 >
 >   ((reuse-window other nil 0)
 >    (reuse-window same nil nil)
 >    (reuse-window same))
 >
 > Right?

Although I'd formulate it the other way round I can live with your
interpretation.

 > This form of "merging" can be eliminated by providing a
 > `display-buffer-fallback-alist', removing the need for (override . t)
 > and one source of unwanted interaction between specifiers.

First of all you would have to give me some idea of what
`display-buffer-fallback-alist' should look like.  Should it be
constructed from the same associations as `display-buffer-alist'?  If
so, then why do you think it's better to pay for removing the (override
. t) entries (which should be fairly rare BTW) with another variable and
a doc-string that would either have to refer to that of
`display-buffer-alist' or replicate most of the latter.

 > Here is the basic point.  You're arguing for a buffer display specifier
 > syntax that consists of interacting elements, because this syntax allows
 > `display-buffer-alist' to "merge with" or "influence" the specifiers
 > supplied to `display-buffer'.

Yes.  The design is still that of Emacs 23 where the `not-this-window'
argument gets interpreted by `display-buffer' as (1) reuse another
window with the value of `even-window-heights' merged in, (2) pop up a
new window with the values of `split-window-preferred-function' merged
in and that of `split-...-threshold' influencing it, or (3) pop up a
frame with the value of `pop-up-frame-alist' merged in.

 > Having gone through these examples, I am
 > convinced that the cost of this design outweighs the benefits.

Can you tell me what you mean by "cost of the design" and how exactly
you want to avoid that cost.  You cannot avoid merging specifiers unless
you duplicate each and every component like `even-sizes' in each and
every specifier.  In the latter case the cost of maintaining an option
like `display-buffer-alist' would clearly outweigh any benefits gained
by making the design less expensive.

 > It is far more important to use a syntax that is easy to understand.
 > If I have a list of specifiers
 >
 >   (A B C ...)
 >
 > that should mean "try A; if that fails, try B; if that fails, try C".

Nothing in the current design prevents you from writing precisely that.

 > And not a situation where certain B's are not things to try, but instead
 > are tags that modify how A behaves, or tags that say how to merge this
 > list with the argument to `display-buffer', etc.  This kind of
 > pseudo-programming language is not a good fit to the Emacs concept of
 > customizable options; the traditional way of providing customizable
 > programming logic is with hooks and abnormal hooks.

It's completely up to the users whether they want that or not.  Users
who don't want a certain B to modify how A behaves can include in A all
necessary ingredients to make sure that B never affects the behavior of
A.  But why should other users who do want B to affect the behavior of A
pay for that by being forced to replicate all these specifiers in A?

 > The point is that `info-other-window' can call display-buffer as
 >
 >   (display-buffer buf specifiers 'info-other-window)
 >
 > so the user could override this with
 >
 >   (setq display-buffer-alist
 >         '((info-other-window replacement-spec)))
 >
 > This obviates the need to provide the specifier merging functionality,
 > without forcing Lisp code like `info-other-window' to bind
 > display-buffer-alist to nil.

Sigh.  You wanted the specifiers of `display-buffer-alist' to always
override those provided by the application.  If a user's
`display-buffer-alist' contains a regexp entry for *info* buffers
telling to display them always in the same window, the label passed by
`info-other-window' won't have any effect and the buffer will be shown
in the same window.  So the user, in addition, has to provide a
`display-buffer-alist' entry based on the `info-other-window' label
which does nothing but replicate what is said in the argument, namely
"yes, please do display the buffer in another window".  Which means that
users who dare to specify a regexp entry for `display-buffer-alist' also
have to specify an entry for each and every `display-buffer' call with
an application provided argument.


Now shouldn't we rather back out all buffer display changes I've applied
recently and revert to using the old Emacs 23 options?  I could easily
incorporate the changes Stefan mentioned earlier and shortly sketched in

http://lists.gnu.org/archive/html/bug-gnu-emacs/2010-05/msg00461.html

and we'd forget about the whole new semantics of the second argument of
`display-buffer' and more sophisticated ways to tweak `display-buffer'.
Eventually somebody could quietly look into this and apply whatever
people find more suitable and you could quietly go on with the pretest.

martin, who begins feeling to weak to delve into this subject again.



  reply	other threads:[~2011-07-25  9:18 UTC|newest]

Thread overview: 230+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-16 20:35 display-buffer-alist simplifications Chong Yidong
2011-07-17  1:38 ` Juanma Barranquero
2011-07-17  9:41   ` martin rudalics
2011-07-17  9:40 ` martin rudalics
2011-07-18 15:15   ` Stefan Monnier
2011-07-18 18:52     ` martin rudalics
2011-07-18 20:34       ` Juanma Barranquero
2011-07-18 21:28         ` Drew Adams
2011-08-02  1:36       ` Stefan Monnier
2011-08-02 14:26         ` martin rudalics
2011-08-02 16:41           ` Drew Adams
2011-08-03 16:22             ` martin rudalics
2011-08-03 17:36               ` Drew Adams
2011-08-04 13:59                 ` martin rudalics
2011-08-04 15:48                   ` Drew Adams
2011-08-02 18:38           ` Stefan Monnier
2011-08-03 16:23             ` martin rudalics
2011-08-04 18:16               ` Stefan Monnier
2011-08-05 16:01                 ` martin rudalics
2011-08-05 17:45                   ` Drew Adams
2011-08-06 13:29                     ` martin rudalics
2011-08-06 15:33                       ` Drew Adams
2011-08-07  8:32                         ` martin rudalics
2011-08-05 19:22                   ` Stefan Monnier
2011-08-06 13:45                     ` martin rudalics
2011-08-08  2:41                       ` Stefan Monnier
2011-08-08  4:59                         ` Tim Cross
2011-08-08  9:12                         ` martin rudalics
2011-08-08 13:42                           ` Drew Adams
2011-08-08 19:14                           ` Stefan Monnier
2011-08-09 12:55                             ` martin rudalics
2011-08-09 18:26                               ` Stefan Monnier
2011-08-10  7:10                                 ` martin rudalics
2011-08-05 16:45                 ` Juri Linkov
2011-08-05 19:22                   ` Stefan Monnier
2011-08-07 18:17                     ` Juri Linkov
2011-08-08  0:54                       ` Stefan Monnier
2011-08-08  9:45                         ` Juri Linkov
2011-08-08 19:28                           ` Stefan Monnier
2011-08-09  9:08                             ` Juri Linkov
2011-08-09 18:14                               ` Stefan Monnier
2011-08-09 12:56                             ` martin rudalics
2011-08-09 18:27                               ` Stefan Monnier
2011-08-08 20:51                     ` Chong Yidong
2011-08-08 21:34                       ` Stefan Monnier
2011-08-09  9:11                         ` Juri Linkov
2011-07-23  7:56 ` martin rudalics
2011-07-23  8:26   ` Eli Zaretskii
2011-07-23 18:39     ` martin rudalics
2011-07-23 17:22   ` Chong Yidong
2011-07-23 18:40     ` martin rudalics
2011-07-23 19:26       ` Chong Yidong
2011-07-24 10:07         ` martin rudalics
2011-07-24 13:54           ` Chong Yidong
2011-07-24 17:05             ` martin rudalics
2011-07-24 17:11               ` martin rudalics
2011-07-24 21:32               ` Chong Yidong
2011-07-25  9:18                 ` martin rudalics [this message]
2011-07-25  9:29                   ` Štěpán Němec
2011-07-25 11:41                     ` Juanma Barranquero
2011-07-26  1:03                       ` Tim Cross
2011-07-25 11:15                   ` Juri Linkov
2011-07-26  1:15                     ` Stephen J. Turnbull
2011-07-26  5:21                       ` David Kastrup
2011-07-26  9:10                         ` Stephen J. Turnbull
2011-07-26 10:50                           ` David Kastrup
2011-07-26  6:15                       ` Juri Linkov
2011-07-31 13:47                         ` martin rudalics
2011-08-01  8:03                           ` Juri Linkov
2011-08-01 18:57                             ` martin rudalics
2011-07-31 13:49                     ` martin rudalics
2011-08-01  8:08                       ` Juri Linkov
2011-08-01 18:57                         ` martin rudalics
2011-07-27  2:43                   ` Chong Yidong
2011-07-27  4:59                     ` Eli Zaretskii
2011-07-27  8:08                       ` Tim Cross
2011-07-27 11:25                       ` Juanma Barranquero
2011-07-27 11:27                         ` Juanma Barranquero
2011-07-27 11:30                         ` Lars Magne Ingebrigtsen
2011-07-27 11:47                           ` David Kastrup
2011-07-27 12:04                             ` Juanma Barranquero
2011-07-27 12:02                           ` Juanma Barranquero
2011-07-27 16:16                             ` Eli Zaretskii
2011-07-27 15:52                       ` Drew Adams
2011-07-28 15:57                       ` Chong Yidong
2011-07-31 13:46                         ` martin rudalics
2011-07-27 16:10                     ` martin rudalics
2011-07-27 20:27                     ` Juri Linkov
2011-07-28  2:12                       ` Stephen J. Turnbull
2011-07-28  2:35                         ` Juanma Barranquero
2011-07-28  4:46                         ` Eli Zaretskii
2011-07-28  7:45                           ` Stephen J. Turnbull
2011-07-28  9:09                             ` Eli Zaretskii
2011-07-29  1:39                               ` Stephen J. Turnbull
2011-07-29  6:51                                 ` Eli Zaretskii
2011-07-29  7:44                                   ` Stephen J. Turnbull
2011-07-29  7:58                                     ` Eli Zaretskii
2011-07-30 16:08                                       ` Stephen J. Turnbull
2011-07-30 16:28                                         ` Eli Zaretskii
2011-07-30 16:45                                           ` David Kastrup
2011-07-30 17:12                                             ` Eli Zaretskii
2011-07-31  9:07                                           ` Stephen J. Turnbull
2011-07-29 11:09                                   ` Juanma Barranquero
2011-07-28 16:41                       ` Chong Yidong
2011-07-29 11:04                         ` Juri Linkov
2011-07-31 13:48                           ` martin rudalics
2011-08-01  8:12                             ` Juri Linkov
2011-07-31 13:48                         ` martin rudalics
2011-08-01  8:19                           ` Juri Linkov
2011-08-01 18:57                             ` martin rudalics
2011-07-31 13:48                       ` martin rudalics
2011-08-01  8:20                         ` Juri Linkov
2011-08-01 17:13                           ` Chong Yidong
2011-08-01 23:34                             ` Andy Moreton
2011-08-02 14:24                             ` martin rudalics
2011-08-02 16:41                               ` Stefan Monnier
2011-08-03 16:22                                 ` martin rudalics
2011-08-03 16:26                                   ` Nix
2011-08-03 16:40                                     ` martin rudalics
2011-08-04  2:27                                   ` Stefan Monnier
2011-08-04 14:00                                     ` martin rudalics
2011-08-04 20:07                                       ` Stefan Monnier
2011-08-03 20:29                               ` Chong Yidong
2011-08-04 13:59                                 ` martin rudalics
2011-08-05 17:48                                   ` Chong Yidong
2011-08-06 13:30                                     ` martin rudalics
2011-08-08  1:27                                       ` Stefan Monnier
2011-08-08  9:10                                         ` martin rudalics
2011-08-08  9:49                                           ` Andreas Röhler
2011-08-08  9:52                                           ` Juri Linkov
2011-08-08 12:26                                             ` martin rudalics
2011-08-08 18:51                                               ` Stefan Monnier
2011-08-09 12:55                                                 ` martin rudalics
2011-08-09 18:19                                                   ` Stefan Monnier
2011-08-10  7:10                                                     ` martin rudalics
2011-08-10 13:01                                                       ` Stefan Monnier
2011-08-11  9:35                                                         ` martin rudalics
2011-08-11 13:50                                                           ` Stefan Monnier
2011-08-12 14:05                                                             ` martin rudalics
2011-08-12 18:03                                                               ` Chong Yidong
2011-08-13  2:29                                                                 ` Stefan Monnier
2011-08-13 13:44                                                                   ` martin rudalics
2011-08-13 14:32                                                                     ` Stefan Monnier
2011-08-16  9:33                                                                       ` Juri Linkov
2011-08-16 15:37                                                                         ` martin rudalics
2011-08-17  9:27                                                                           ` Juri Linkov
2011-08-18  6:57                                                                             ` martin rudalics
2011-08-13 13:44                                                                 ` martin rudalics
2011-08-13  2:29                                                               ` Stefan Monnier
2011-08-13 13:44                                                                 ` martin rudalics
2011-08-13 14:30                                                                   ` Stefan Monnier
2011-08-28  8:05                                                             ` martin rudalics
2011-08-29  9:34                                                               ` martin rudalics
2011-08-29 15:17                                                                 ` Stefan Monnier
2011-08-29 15:07                                                               ` Stefan Monnier
2011-08-29 19:04                                                                 ` martin rudalics
2011-08-29 19:45                                                                   ` Juri Linkov
2011-08-30  4:10                                                                   ` Stefan Monnier
2011-08-31  1:43                                                                   ` Chong Yidong
2011-08-31  2:07                                                                     ` Drew Adams
2011-08-31  3:01                                                                       ` Chong Yidong
2011-08-31  9:33                                                                         ` martin rudalics
2011-08-31  9:57                                                                           ` Juri Linkov
2011-08-31 11:46                                                                             ` martin rudalics
2011-08-31 15:42                                                                             ` Chong Yidong
2011-08-31 16:59                                                                               ` Juri Linkov
2011-09-01  2:06                                                                                 ` Chong Yidong
2011-09-02  1:33                                                                               ` Stefan Monnier
2011-09-02 14:54                                                                                 ` Chong Yidong
     [not found]                                                                                   ` <jwvbouyxu1j.fsf-monnier+emacs@gnu.org>
     [not found]                                                                                     ` <87sjo9hfar.fsf@stupidchicken.com>
     [not found]                                                                                       ` <jwvy5y1a6n5.fsf-monnier+emacs@gnu.org>
     [not found]                                                                                         ` <874o0p8emk.fsf@stupidchicken.com>
     [not found]                                                                                           ` <jwv8vq1t8u8.fsf-monnier+emacs@gnu.org>
     [not found]                                                                                             ` <87ipp4webw.fsf@stupidchicken.com>
     [not found]                                                                                               ` <jwvvct3q0t8.fsf-monnier+emacs@gnu.org>
     [not found]                                                                                                 ` <87bouvniij.fsf@stupidchicken.com>
     [not found]                                                                                                   ` <jwv7h5i91qh.fsf-monnier+emacs@gnu.org>
     [not found]                                                                                                     ` <87aaaeikr6.fsf@stupidchicken.com>
     [not found]                                                                                                       ` <jwvsjo6v5l2.fsf-monnier+emacs@gnu.org>
     [not found]                                                                                                         ` <878vpx3g4d.fsf@stupidchicken.com>
     [not found]                                                                                                           ` <jwvfwk5h11g.fsf-monnier+emacs@gnu.org>
     [not found]                                                                                                             ` <87pqj9qqhp.fsf@stupidchicken.com>
     [not found]                                                                                                               ` <jwvmxedfbzo.fsf-monnier+emacs@gnu.org>
2011-09-11 20:40                                                                                                                 ` display-buffer-overriding-action Chong Yidong
2011-09-12  0:04                                                                                                                   ` display-buffer-overriding-action Juanma Barranquero
2011-09-13  0:55                                                                                                                   ` display-buffer-overriding-action Stefan Monnier
2011-09-13  2:39                                                                                                                     ` display-buffer-overriding-action Chong Yidong
2011-09-13 17:59                                                                                                                       ` display-buffer-overriding-action Stefan Monnier
2011-09-13 19:01                                                                                                                         ` display-buffer-overriding-action Chong Yidong
2011-09-13 19:28                                                                                                                           ` display-buffer-overriding-action Chong Yidong
2011-09-13 20:48                                                                                                                           ` display-buffer-overriding-action Stefan Monnier
2011-09-13 22:40                                                                                                                             ` display-buffer-overriding-action Chong Yidong
2011-09-14  0:53                                                                                                                               ` display-buffer-overriding-action Stefan Monnier
2011-09-14  2:13                                                                                                                                 ` display-buffer-overriding-action Chong Yidong
2011-09-14 18:33                                                                                                                                   ` display-buffer-overriding-action Stefan Monnier
2011-09-14 22:36                                                                                                                                     ` display-buffer-overriding-action Chong Yidong
2011-09-15  0:04                                                                                                                                       ` display-buffer-overriding-action Stefan Monnier
2011-08-31 15:56                                                                           ` display-buffer-alist simplifications Chong Yidong
2011-09-01  0:25                                                                             ` martin rudalics
2011-09-01  2:04                                                                               ` Chong Yidong
2011-09-01 15:35                                                                                 ` martin rudalics
2011-09-01 16:07                                                                                   ` Chong Yidong
2011-08-31 13:33                                                                         ` Drew Adams
2011-09-01  1:35                                                                           ` Stephen J. Turnbull
2011-08-09  4:41                                               ` John Yates
2011-08-08 18:43                                           ` Stefan Monnier
2011-08-09  0:47                                             ` Stephen J. Turnbull
2011-08-09 12:54                                             ` martin rudalics
2011-08-09 18:12                                               ` Stefan Monnier
2011-08-10  7:09                                                 ` martin rudalics
2011-08-10 10:42                                                   ` Štěpán Němec
2011-08-10 12:50                                                     ` Stefan Monnier
2011-08-10 14:26                                                     ` Drew Adams
2011-08-10  9:17                                               ` Juri Linkov
2011-08-10 13:11                                                 ` Stefan Monnier
2011-08-08  9:49                                         ` Juri Linkov
2011-08-08 19:31                                           ` Stefan Monnier
2011-08-07 18:12                                     ` Juri Linkov
2011-08-02 18:01                             ` Juri Linkov
2011-08-03 16:22                               ` martin rudalics
2011-08-01 18:57                           ` martin rudalics
2011-08-01 16:16                         ` Chong Yidong
2011-08-01 18:57                           ` martin rudalics
2011-08-02  2:36                             ` Chong Yidong
2011-08-03  6:39                             ` Stephen J. Turnbull
2011-07-23 19:42       ` Chong Yidong
2011-07-24 10:07         ` martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2011-07-24 21:44 grischka
2011-07-25  9:18 ` martin rudalics
2011-07-25 11:22   ` grischka
2011-07-26  6:18     ` Juri Linkov
2011-07-27 13:07       ` grischka
2011-07-30  8:40         ` Juri Linkov
2011-07-31 15:48           ` grischka
2011-08-01  8:23             ` Juri Linkov
2011-08-04 19:59 grischka
2011-08-04 21:01 ` Stefan Monnier
2011-08-05 20:33   ` grischka
2011-08-07 18:22     ` Juri Linkov
2011-08-08  0:59       ` Stefan Monnier
2011-08-08  9:07         ` martin rudalics
2011-08-08 14:01 grischka
2011-08-10 16:31 grischka
2011-08-10 17:06 ` Drew Adams

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=4E2D34D7.4040002@gmx.at \
    --to=rudalics@gmx.at \
    --cc=cyd@stupidchicken.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 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.