all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* display-buffer-alist simplifications
@ 2011-07-16 20:35 Chong Yidong
  2011-07-17  1:38 ` Juanma Barranquero
                   ` (2 more replies)
  0 siblings, 3 replies; 230+ messages in thread
From: Chong Yidong @ 2011-07-16 20:35 UTC (permalink / raw)
  To: Martin Rudalics; +Cc: emacs-devel

I am concerned that `display-buffer-alist' in its current form is still
too complicated, and needs more work.  I realize this is coming a bit
late in the day, but it's important to get it right.

Here are several suggestions, and one question.

 - Instead of allowing the car of each `display-buffer-alist' element to
   be a _list_ of matchers, let it just be a matcher.  This is
   semantically cleaner, and more consistent with other facilities in
   Emacs, e.g. font-lock-keywords.  Any caller desiring multiple
   matching conditions can just add multiple alist elements.

 - Instead of buffer matchers that are cons cells like (name . NAME),
   (regexp . REGEXP), and (label . LABEL), just use strings or symbols.
   Strings are to be treated as regexps (if an exact match is desired,
   the caller uses regexp-quote); symbols are treated as label matchers.

 - Some of the display specifiers seem to allow contradictory meanings,
   e.g.

      (reuse-window same nil other)

   means to reuse the selected window, provided the window is not on the
   selected frame.  What does this mean?  And what happens if it's
   impossible for Emacs to meet the requirements of the specifier?  This
   is not explained in the docstring.

 - I don't like the fact that different specifiers are set up in a way
   that the meaning of each specifier depends on the presence of other
   specifiers.  For example, in the spec list

   ((reuse-window same nil nil) (reuse-window-even-sizes . t))

   the second element only has a meaning if the first element is
   present---they are not independent.  It would be cleaner to use a
   plist, like this:

    (reuse-window :window same :reuse-window-even-sizes t)

   where ALL the behaviors are grouped together.

WDYT?



^ permalink raw reply	[flat|nested] 230+ messages in thread
* Re: display-buffer-alist simplifications
@ 2011-07-24 21:44 grischka
  2011-07-25  9:18 ` martin rudalics
  0 siblings, 1 reply; 230+ messages in thread
From: grischka @ 2011-07-24 21:44 UTC (permalink / raw)
  To: rudalics; +Cc: emacs-devel

> Please don't use the formulation "avoid" with `display-buffer-alist'.
> Try to formulate in a positive sense: Which window ... 

Right, I think too that it is very important have a positive approach
to window selection.

Then again the word "other" also rather expresses avoidance, that
is as soon as it does not mean "the other". Which was the case
only in the traditional two window design.  However with more
than two, the word other is not a specifier anymore.  It does not
specify a location.

Basically your problem is the way you count:  One, two, many.
Such the step into next UI layout generation was supposed to
happen by the silent redefinition of "the other" to "some other".

But this does not work in space.  In space, the divisions into
one, two, three or four parts are classes on their own, with a
rich typology of possible configurations each.  There is no spacial
class that would offer orientation in all divisions of "two or more"
by one common semantic.

What I'm trying to say:  After the two windows approach has worked
quite well for a while, what about now concerning yourself with say
three windows.  To begin with, THREE.  Three is not a just a number.
It is a world on its own.

--- grischka




^ permalink raw reply	[flat|nested] 230+ messages in thread
* Re: display-buffer-alist simplifications
@ 2011-08-04 19:59 grischka
  2011-08-04 21:01 ` Stefan Monnier
  0 siblings, 1 reply; 230+ messages in thread
From: grischka @ 2011-08-04 19:59 UTC (permalink / raw)
  To: monnier; +Cc: emacs-devel

Stefan Monnier wrote:
> It's also to force display-buffer (and switch-to-buffer when called
> from Lisp packages) to use some other window/frame.  I don't want any
> other buffer ever shown in my *Completions* window (which I carefully
> size and place next to my minibuffer-only frame), same for my other
> strongly-dedicated windows like *compilation*.

I'd actually like to have *compilation* and *grep* (alternatively)
use the same one window.  In that sense I always found that the
'dedicated' thing is too inflexible.

Btw. it is IMO wrong to cater for an unlimited number of (anonymous)
windows.  Basically, you want 'display-buffer-alist' do two things
at the same time:
   1) associate buffers to windows,
and also
   2) specify these windows and their behavior

Now, since there is no restriction as to what to buffers anyone
might want to show, this means with your design that you have to
deal with an equally possibly unlimited number of different
window behavior.

However that is completely unrealistic.  Nobody ever wants to
see as many windows behave differently from each other as there
are possible buffers.

So to begin with, I would maybe split that list into two lists,
one to map buffers to window _names_ and another one to map these
window _names_ to window behavior.  Like:

   (setq window-parameter-list '(
      (window-1 (spec . val) ....)
      (window-2 (spec . val) ....)
      (window-3 (spec . val) ....)
      ))

   (setq display-buffer-alist '(
      ((name . "*completions*) . window-2)
      ((name . "*Help*) . window-3)
      ((name . "*grep*) . window-2) ;; for me, as above ;)
      ((name . ".*") . window-1)
      ))

Such there is no need for duplications, less need for
'same/other/reuse' stuff, and it is still more powerful
because now the user can really start to organize things.

--- grischka




^ permalink raw reply	[flat|nested] 230+ messages in thread
* Re: display-buffer-alist simplifications
@ 2011-08-08 14:01 grischka
  0 siblings, 0 replies; 230+ messages in thread
From: grischka @ 2011-08-08 14:01 UTC (permalink / raw)
  To: theophilusx; +Cc: emacs-devel

Tim Cross wrote:
> However, I still think a doc string of over 280 lines
> is excessive and wonder if part of the reason people have trouble
> understanding it is that there are conflicting objectives in the
> string. On one hand, trying to be very concise and on the other,
> trying to explain something potentially complex.

It wants to look complex,  written with lot of redundancy for
people who can't understand concepts, and with lots of 'cons'
and 'car' for people who can't read lisp.

The message between the lines is clearly: "You don't want to
use this if you know what you're doing."

--- grischka




^ permalink raw reply	[flat|nested] 230+ messages in thread
* RE: display-buffer-alist simplifications
@ 2011-08-10 16:31 grischka
  2011-08-10 17:06 ` Drew Adams
  0 siblings, 1 reply; 230+ messages in thread
From: grischka @ 2011-08-10 16:31 UTC (permalink / raw)
  To: drew.adams; +Cc: emacs-devel

Drew Adams wrote:
> Attempts to order such things strictly are misguided.
> [and]
> Some default ordering is fine, but there should be no
> attempt to prevent code from overriding user settings etc.

Note that overriding is just that: an attempt to enforce strict
order.  Therefor "no attempt to prevent code from overriding"
means nothing else but to support misguided attempts to order.

> There is code and there is code.  Not all code that overrides a 
 > saved user setting is doing something the user does not want.

Which then would be code that overrides the user's settings in
order to do what the user wants, right?

--- grischka




^ permalink raw reply	[flat|nested] 230+ messages in thread

end of thread, other threads:[~2011-09-15  0:04 UTC | newest]

Thread overview: 230+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.