Subject: Re: bug#69983: Use category for display-buffer-alist

From: Juri Linkov <[email-masked]>
Date: Fri, 29 Mar 2024 18:30:23 +0200

>> But only 'display-buffer' provides a category.
>> We can't suggest to use it for other purposes.
>
> I don't understand why.

None of other callers supplies its action list to 'buffer-match-p'.

> But if so, you should say that this works only
> when called from 'display-buffer'.

This already says so:

diff --git a/lisp/subr.el b/lisp/subr.el
index b68aa073ba0..da57f917da8 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -7474,6 +7474,9 @@ buffer-match-p
   * `major-mode': the buffer matches if the buffer's major mode
     is eq to the cons-cell's cdr.  Prefer using `derived-mode'
     instead when both can work.
+  * `category': the buffer matches a category as a symbol if
+    the caller of `display-buffer' provides `(category . symbol)'
+    in its action argument.
   * `not': the cadr is interpreted as a negation of a condition.
   * `and': the cdr is a list of recursive conditions, that all have
     to be met.