Closed ChanderG closed 9 months ago
The forth argument is optional, INHIBIT-BUFFER-HOOKS
. In what way wasn't it working without the fourth argument for you?
Hmm, from my Emacs help, there are only 3 args, the 3rd being optional.
make-indirect-buffer is an interactive built-in function in ‘C source
code’.
(make-indirect-buffer BASE-BUFFER NAME &optional CLONE)
Probably introduced at or before Emacs version 19.29.
Create and return an indirect buffer for buffer BASE-BUFFER, named NAME.
BASE-BUFFER should be a live buffer, or the name of an existing buffer.
NAME should be a string which is not the name of an existing buffer.
Optional argument CLONE non-nil means preserve BASE-BUFFER’s state,
such as major and minor modes, in the indirect buffer.
CLONE nil means the indirect buffer’s state is reset to default values.
I see:
(make-indirect-buffer BASE-BUFFER NAME &optional CLONE INHIBIT-BUFFER-HOOKS)
Documentation
Create and return an indirect buffer for buffer BASE-BUFFER, named NAME.
BASE-BUFFER should be a live buffer, or the name of an existing buffer.
NAME should be a string which is not the name of an existing buffer.
Optional argument CLONE non-nil means preserve BASE-BUFFER's state,
such as major and minor modes, in the indirect buffer.
CLONE nil means the indirect buffer's state is reset to default values.
If optional argument INHIBIT-BUFFER-HOOKS is non-nil, the new buffer
does not run the hooks kill-buffer-hook,
kill-buffer-query-functions, and buffer-list-update-hook.
So, I'm guessing what's actually needed here is an Emacs version guard.
Try 5a1905d2a7304740972bb099e78309a0d6445b1f (just pushed)
Works now. Thanks.
I am on Emacs 27.2 and had to make this change to get it working. I assume
make-indirect-buffer
is a core function, so this discrepancy is a bit surprising...Great package btw.