Skip to content

Commit

Permalink
transient-display-buffer-action: Discourage dropping alist elements
Browse files Browse the repository at this point in the history
Re #358, but others have made the same mistake before.
  • Loading branch information
tarsius committed Feb 15, 2025
1 parent 73178e0 commit 04dab99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/transient.org
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04dab99

Please sign in to comment.