help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Question about display-buffer-overriding-action


From: Emanuel Berg
Subject: Re: Question about display-buffer-overriding-action
Date: Fri, 25 Mar 2022 18:59:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

dal-blazej wrote:

>> (setq display-buffer-alist '((".*" display-buffer-same-window)))
>
> It is bad practice to use `display-buffer-alist` with
> a catch-all regexp.

OK, maybe one should report a bug it should be noted in the
docstring ...

> Please use instead `display-buffer-base-action`

Alright, but how?

The docstring says

  It should be a cons cell (FUNCTIONS . ALIST), where
  FUNCTIONS is an action function or a list of action
  functions and ALIST is an action alist. Each such action
  function should accept two arguments: a buffer to display
  and an alist of the same form as ALIST.

So it should be

  ( (af_0 ... af_n) . ((k_0 . a_0) ... (k_m . a_m)) )

where

  af = action function
  k  = key
  a  = action

where each action function has the form

  af(buf, alist)

where alist has the form

  ( (k_0 . a_0) ... (k_m . a_m) )

Pretty simple, right?

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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