emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

display-buffer-alist simplifications


From: Chong Yidong
Subject: display-buffer-alist simplifications
Date: Sat, 16 Jul 2011 16:35:51 -0400

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]