Skip to content

Commit fb60856

Browse files
taquangtrungmanateelazycat
authored andcommitted
get buffer by buffer-id
1 parent 1c02034 commit fb60856

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

eaf.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,14 @@ of `eaf--buffer-app-name' inside the EAF buffer."
10911091
(select-window buffer-window)))
10921092
(throw 'found-eaf t)))))
10931093

1094+
(defun eaf-get-buffer (buffer-id)
1095+
"Find the buffer given the BUFFER-ID."
1096+
(catch 'found-eaf
1097+
(eaf-for-each-eaf-buffer
1098+
(when (string= eaf--buffer-id buffer-id)
1099+
(throw 'found-eaf buffer))
1100+
nil)))
1101+
10941102
(defun eaf--show-message (format-string)
10951103
"A wrapper around `message' that prepend [EAF/app-name] before FORMAT-STRING."
10961104
(let ((fmt (if eaf--buffer-app-name

0 commit comments

Comments
 (0)