GNU bug report logs - #69983
Use category for display-buffer-alist

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 24 Mar 2024 17:22:01 UTC

Severity: normal

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 69983 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 69983 <at> debbugs.gnu.org
Subject: Re: bug#69983: Use category for display-buffer-alist
Date: Mon, 25 Mar 2024 19:12:45 +0200
>> What these variables are trying to achieve is already possible
>> to do by using a 'category' in 'display-buffer-alist'.
>
> Please proceed as carefully as possible, here might be dragons.

Ok, but before proceeding I propose the following change.
To simplify a complicated lambda condition in

(add-to-list 'display-buffer-alist
             `(,(lambda (_buffer-name action)
                  (eq (alist-get 'category action) 'comint))
               (display-buffer-in-direction)
	       (direction . top)))

let's use a symbol instead of the lambda:

(add-to-list 'display-buffer-alist
             `(comint
               (display-buffer-in-direction)
	       (direction . top)))

Then like strings are used as regexp to match a buffer name
symbols will match a category.




This bug report was last modified 1 year and 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.