commit 129755d2ec5717bc4f240e2c13660b673c45022e
parent 17dee8f70d4340aa6e1c17a77ee5acf11713d600
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Mon, 27 Apr 2020 03:14:56 +0530
Disable `buffer-list-update-hook` in emojify-string
Since the function creates a temporary buffer, the hook gets invoked
unnecessarily confusing EXWM's focus tracking code, which makes it impossible to
switch between X11 frames
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/emojify.el b/emojify.el
@@ -1300,7 +1300,14 @@ TARGET can either be a buffer object or a special value mode-line. It is used
to indicate where EMOJI would be displayed, properties like font-height are
inherited from TARGET if provided. See also `emojify--get-text-display-props'."
(emojify-create-emojify-emojis)
- (let ((emojify-emoji-styles (or styles emojify-emoji-styles)))
+ (let ((emojify-emoji-styles (or styles emojify-emoji-styles))
+ ;; Temporarily disable all `buffer-list-update-hook's, with-temp-buffer
+ ;; internally calls `get-buffer-create' (and `kill-buffer'), which cause
+ ;; this hook to be run. This is problematic because EXWM uses
+ ;; `buffer-list-update-hook' and this temporary buffer confuses EXWM's
+ ;; tracking code leading to
+ ;; https://github.com/iqbalansari/emacs-emojify/issues/64
+ buffer-list-update-hook)
(with-temp-buffer
(insert string)
(emojify-display-emojis-in-region (point-min) (point-max) target)