unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Iris García" <iris.garcia.desebastian@gmail.com>
Cc: 48674@debbugs.gnu.org, Alan Mackenzie <acm@muc.de>
Subject: bug#48674: Frames and minibuffer bug
Date: Fri, 28 May 2021 10:25:31 +0200	[thread overview]
Message-ID: <c18dbbaa-016b-953d-2415-9a1389a77f1b@gmx.at> (raw)
In-Reply-To: <CALBoQjpKJymwZVy=pTT-LD8V3JSLA8DzTt_k7GMCKryouMjT9A@mail.gmail.com>

 >> 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





  reply	other threads:[~2021-05-28  8:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 11:23 bug#48674: Frames and minibuffer bug Iris García
2021-05-26 17:45 ` martin rudalics
2021-05-27 10:34   ` Alan Mackenzie
2021-05-27 16:33     ` martin rudalics
2021-05-27 19:56       ` Iris García
2021-05-28  8:25         ` martin rudalics [this message]
2021-05-28  9:34           ` Iris García
2021-05-28  9:51             ` martin rudalics
2021-05-31 16:36         ` Alan Mackenzie
2021-06-01 11:29           ` Iris García
2021-05-27 20:01       ` Alan Mackenzie
2021-05-28  8:26         ` martin rudalics
2021-05-28 17:15           ` Alan Mackenzie
2021-05-28 20:14             ` Alan Mackenzie
2021-05-29  9:20               ` martin rudalics
2021-05-29 13:10                 ` Alan Mackenzie
2021-05-29 15:12                   ` martin rudalics
2021-05-29 15:24                     ` Eli Zaretskii
2021-05-29 17:00                     ` Alan Mackenzie
2021-05-30 13:58                       ` Alan Mackenzie
2021-05-31  7:55                         ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c18dbbaa-016b-953d-2415-9a1389a77f1b@gmx.at \
    --to=rudalics@gmx.at \
    --cc=48674@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=iris.garcia.desebastian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).