Subject: Re: bug#13594: 24.2.92; [PATCH] compilation-start doesn't consider nil OUTWIN

From: Juri Linkov <[email-masked]>
Date: Thu, 07 Feb 2013 01:40:47 +0200

>> (add-to-list 'display-buffer-alist '("\\*compilation\\*" ignore-t (nil)))
>> where `ignore-t' is like existing `ignore' but returns t instead of nil:
>> (defun ignore-t (&rest _) t)
>
> Problem is that the functions in display-buffer-alist are supposed to
> return either the window they used or nil (to mean that display-buffer
> should try the next candidate function).
>
> So returning t is incorrect and can/will lead to bugs further down where
> the caller does not expect a t value (most callers of display-buffer
> don't expect a nil return value either).

Since there are more buffer names that users might want to not display
(e.g. "*Async Shell Command*") it makes sense to improve the
buffer-displaying framework with a new feature that would allow the user
to associate a buffer name with an inaction for which `display-buffer'
will return nil (since nil is a valid return value it's a bug when callers
of `display-buffer' don't check for nil, these callers should be fixed).