GNU bug report logs - #48674
Frames and minibuffer bug

Previous Next

Package: emacs;

Reported by: Iris García <iris.garcia.desebastian <at> gmail.com>

Date: Wed, 26 May 2021 14:42:04 UTC

Severity: normal

Merged with 48675

Found in version 28.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 48674 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Iris García <iris.garcia.desebastian <at> gmail.com>
Cc: 48674 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>
Subject: Re: bug#48674: Frames and minibuffer bug
Date: Fri, 28 May 2021 10:25:31 +0200
>> The only difference is the add-hook, this time using
>> window-state-change-hook instead of minibuffer-...
>> This leads to the same bug.

It's still the same bug.  No matter what happens, evaluating

(let ((window (selected-window)))
  (dolist (frame (frame-list))
    (with-selected-frame frame))
  (eq window (selected-window)))

must always yield t.

Note, however, that the `with-selected-frame' in your function is not
needed.  `modify-frame-parameters' works without selecting the frame
whose parameter you want to modify.  Also I do not understand why you
want to modify the cursor in all windows when you enter the minibuffer.

Consider the following snippet to set the background of the minibuffer
window when it is active (hopefully `active-minibuffer-window' always
returns the right value when exiting the minibuffer).


(defun foo ()
  (with-current-buffer (window-buffer (active-minibuffer-window))
    (set (make-local-variable 'face-remapping-alist)
	 '((default (:background "yellow") default)))))

(defun bar ()
  (with-current-buffer (window-buffer (active-minibuffer-window))
    (set (make-local-variable 'face-remapping-alist) nil)))

(add-hook 'minibuffer-setup-hook #'foo)
(add-hook 'minibuffer-exit-hook #'bar)


I never tried to remap the cursor color in a buffer-local way, but I
think you can figure out how to do that in a similar fashion.

martin




This bug report was last modified 3 years and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.