From 04dab99dc9bc8788ed17473118421e6ee291091d Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Sat, 15 Feb 2025 23:57:48 +0100 Subject: transient-display-buffer-action: Discourage dropping alist elements Re #358, but others have made the same mistake before. --- docs/transient.org | 5 +++++ lisp/transient.el | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docs/transient.org b/docs/transient.org index 64e546d..5eba758 100644 --- a/docs/transient.org +++ b/docs/transient.org @@ -621,6 +621,11 @@ Also see [[* Common Suffix Commands]]. For alternatives see [[info:elisp#Buffer Display Action Functions]], and [[info:elisp#Buffer Display Action Alists]]. + When you switch to a different ACTION, you should keep the ALIST + entries for ~dedicated~ and ~inhibit-same-window~ in most cases. + Do not drop them because you are unsure whether they are needed; + if you are unsure, then keep them. + Note that the buffer that was current before the transient buffer is shown should remain the current buffer. Many suffix commands act on the thing at point, if appropriate, and if the transient diff --git a/lisp/transient.el b/lisp/transient.el index d368c8b..cc46851 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -213,6 +213,11 @@ This displays the window at the bottom of the selected frame. For alternatives see info node `(elisp)Display Action Functions' and info node `(elisp)Buffer Display Action Alists'. +When you switch to a different ACTION, you should keep the ALIST +entries for `dedicated' and `inhibit-same-window' in most cases. +Do not drop them because you are unsure whether they are needed; +if you are unsure, then keep them. + Note that the buffer that was current before the transient buffer is shown should remain the current buffer. Many suffix commands act on the thing at point, if appropriate, and if the transient -- cgit v1.0