From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16661: 24.3.50; standalone minibuffer frame gets renamed with name of aother frame Date: Mon, 24 Feb 2014 15:14:44 -0500 Message-ID: References: <97c44b41-de36-472b-833d-3b0d1ac4c912@default>> > <831tzgypbp.fsf@gnu.org>> > <83zjm3xuu8.fsf@gnu.org>> > > <83vbwhblkp.fsf@gnu.org>> <3febc9ab-b7b2-443c-8ec8-eaaf28ace468@default>> > <8338jd693l.fsf@gnu.org>> <16fff663-6320-4d96-a575-e3c368472a0a@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393272916 21272 80.91.229.3 (24 Feb 2014 20:15:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Feb 2014 20:15:16 +0000 (UTC) Cc: 16661@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 24 21:15:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WI1vs-0001aD-Np for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Feb 2014 21:15:20 +0100 Original-Received: from localhost ([::1]:59587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI1vs-0001Va-7M for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Feb 2014 15:15:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI1vi-0001VN-Vm for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 15:15:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WI1vb-0007N6-44 for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 15:15:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI1vb-0007Mt-0X for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 15:15:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WI1va-0003Ve-2y for bug-gnu-emacs@gnu.org; Mon, 24 Feb 2014 15:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Feb 2014 20:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16661 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16661-submit@debbugs.gnu.org id=B16661.139327289413463 (code B ref 16661); Mon, 24 Feb 2014 20:15:01 +0000 Original-Received: (at 16661) by debbugs.gnu.org; 24 Feb 2014 20:14:54 +0000 Original-Received: from localhost ([127.0.0.1]:38210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WI1vR-0003V4-2O for submit@debbugs.gnu.org; Mon, 24 Feb 2014 15:14:53 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38365) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WI1vO-0003Ul-Va for 16661@debbugs.gnu.org; Mon, 24 Feb 2014 15:14:51 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXjX/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFsoXjX/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48638818" Original-Received: from 108-161-120-215.dsl.teksavvy.com (HELO pastel.home) ([108.161.120.215]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Feb 2014 15:14:45 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id CC10560054; Mon, 24 Feb 2014 15:14:44 -0500 (EST) In-Reply-To: <16fff663-6320-4d96-a575-e3c368472a0a@default> (Drew Adams's message of "Fri, 21 Feb 2014 20:23:47 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86154 Archived-At: > rename-frame() > run-hooks(window-setup-hook) [...] > (defun rename-frame (&optional old-name new-name all-named) > "Rename a frame named OLD-NAME to NEW-NAME. > Prefix arg non-nil means rename all frames named OLD-NAME to NEWNAME. > OLD-NAME may be a frame, its name, or nil. Default is `selected-frame'. > NEW-NAME is a string or nil. Default NEW-NAME is current `buffer-name'." > (interactive > (list (read-frame > (concat "Rename " (and current-prefix-arg "all ") > "frame" (and current-prefix-arg "s named") ": ") > nil t) ; Default = selected. Must exist. > (read-from-minibuffer "Rename to (new name): " > (cons (buffer-name) 1)) > current-prefix-arg)) > (setq old-name (or old-name (get-frame-name)) ; Batch default: current. > new-name (or new-name (buffer-name))) ; Batch default: buf name. When called from window-setup-hook, you have no guarantee about what is the current buffer. It may be a buffer that's not even displayed. So you want to use (window-buffer (frame-selected-window)) rather than current-buffer, here. Not sure if it's related to your actual bug, tho, since window-setup-hook is only run once at startup and your problem seems to happen later. Stefan