From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: help needed with gnus mode-line
Date: Fri, 01 Jul 2011 12:23:51 -0400 [thread overview]
Message-ID: <jwvy60igeoj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87y60ixy1u.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 01 Jul 2011 09:25:17 +0200")
> (with-current-buffer (with-selected-window
> (minibuffer-selected-window)
> (current-buffer))
Try (window-buffer (minibuffer-selected-window)) ;-)
Of course, minibuffer-selected-window is not quite right either: you
don't want to modify the mode-line of the buffer from where the M-: was
typed, but the mode-line that's right above the minibuffer (which
doesn't even exist in minibuffer-only frames).
> Which use the minibuffer only with gnus buffers.
> In other place in emacs it use the current-buffer of the selected window
> before entering the minibuffer.
No, the problem is that if you don't switch to the other buffer, your
let binding will change the mode-line-format value in the minibuffer and
since the minibuffer basically never sets this value buffer-locally it
means it changes (temporarily) the default value of mode-line-format,
i.e. it changes the value of mode-line-format for all buffers that
haven't set it buffer-locally (i.e. all buffers except Gnus buffers and
a few other ones).
If you have several windows, you should see that your mode-line message
appears in pretty much all mode lines rather than only the one next to
the minibuffer (tho calling force-mode-line-update with a nil may be
sufficient to restrict the change to the window(s) that show this buffer
in many cases).
Stefan
next prev parent reply other threads:[~2011-07-01 16:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 11:52 help needed with gnus mode-line Thierry Volpiatto
2011-06-30 12:20 ` Andreas Schwab
2011-06-30 12:35 ` Thierry Volpiatto
2011-06-30 13:15 ` Antoine Levitt
2011-06-30 15:01 ` Thierry Volpiatto
2011-06-30 20:57 ` Stefan Monnier
2011-07-01 7:25 ` Thierry Volpiatto
2011-07-01 16:23 ` Stefan Monnier [this message]
2011-07-01 19:23 ` Thierry Volpiatto
2011-07-04 15:58 ` Stefan Monnier
2011-07-04 19:00 ` Thierry Volpiatto
2011-07-01 19:23 ` Thierry Volpiatto
-- strict thread matches above, loose matches on Subject: below --
2011-06-30 11:52 Thierry Volpiatto
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=jwvy60igeoj.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=thierry.volpiatto@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).