From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#1061: pop-up-frames does not work on a tty Date: Wed, 08 Oct 2008 20:51:31 -0400 Message-ID: <87iqs2mvzg.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 1061@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223514622 3255 80.91.229.12 (9 Oct 2008 01:10:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2008 01:10:22 +0000 (UTC) Cc: 1061@emacsbugs.donarmstrong.com, Dan Nicolaescu To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 03:11:18 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Knk3i-0004Yh-8p for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2008 03:11:18 +0200 Original-Received: from localhost ([127.0.0.1]:37584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knk2e-0005o7-ET for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 21:10:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Knk2T-0005j5-8h for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 21:10:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Knk2S-0005iO-MC for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 21:10:00 -0400 Original-Received: from [199.232.76.173] (port=41539 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knk2S-0005i8-BX for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 21:10:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46523) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Knk2S-0003Zu-JK for bug-gnu-emacs@gnu.org; Wed, 08 Oct 2008 21:10:00 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9919vW3016948; Wed, 8 Oct 2008 18:09:58 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m990t4gg012760; Wed, 8 Oct 2008 17:55:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 09 Oct 2008 00:55:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1061 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1061-submit@emacsbugs.donarmstrong.com id=B1061.122351339011447 (code B ref 1061); Thu, 09 Oct 2008 00:55:04 +0000 Original-Received: (at 1061) by emacsbugs.donarmstrong.com; 9 Oct 2008 00:49:50 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m990nlGa011441 for <1061@emacsbugs.donarmstrong.com>; Wed, 8 Oct 2008 17:49:48 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 32B2557E218; Wed, 8 Oct 2008 20:51:31 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 08 Oct 2008 21:10:00 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21307 Archived-At: It may not be wise to change the behavior of pop-up-frames so radically right now. How bout the following change, which allows a `on-graphic-displays' value of pop-up-frames to restrict pop-up-frames to graphic displays? Martin's patch can go on top of this, for those people who do want to use pop-up-frames on ttys (who knows, frame manipulation on ttys might improve in the future). diff -c /home/cyd/trunk/lisp/window.el.\~1.154.\~ /home/cyd/trunk/lisp/window.el *** trunk/lisp/window.el.~1.154.~ 2008-10-05 14:13:01.000000000 -0400 --- trunk/lisp/window.el 2008-10-08 20:46:19.000000000 -0400 *************** *** 710,717 **** :group 'windows) (defcustom pop-up-frames nil ! "Non-nil means `display-buffer' should make a separate frame." ! :type 'boolean :group 'windows) (defcustom display-buffer-reuse-frames nil --- 710,723 ---- :group 'windows) (defcustom pop-up-frames nil ! "Whether `display-buffer' should make a separate frame. ! If nil, never make a seperate frame. ! If the value is `on-graphic-displays', make a separate frame only ! if the selected frame is on a graphic display. ! Any other non-nil value means to make a separate frame." ! :type '(choice (const :tag "Never" nil) ! (const :tag "On graphic displays" on-graphic-displays) ! (const :tag "Always" t)) :group 'windows) (defcustom display-buffer-reuse-frames nil *************** *** 941,946 **** --- 947,957 ---- (not (or not-this-window (window-dedicated-p (selected-window)) (window-minibuffer-p)))) + (use-pop-up-frame + (cond ((null pop-up-frames) nil) + ((eq pop-up-frames 'on-graphic-displays) + (display-graphic-p)) + (t t))) (buffer (if (bufferp buffer-or-name) buffer-or-name (get-buffer buffer-or-name))) *************** *** 967,973 **** ;; If the buffer's name tells us to use the selected window do so. (window--display-buffer-2 buffer (selected-window))) ((let ((frames (or frame ! (and (or pop-up-frames display-buffer-reuse-frames (not (last-nonminibuffer-frame))) 0) (last-nonminibuffer-frame)))) --- 978,985 ---- ;; If the buffer's name tells us to use the selected window do so. (window--display-buffer-2 buffer (selected-window))) ((let ((frames (or frame ! (and (or use-pop-up-frame ! display-buffer-reuse-frames (not (last-nonminibuffer-frame))) 0) (last-nonminibuffer-frame)))) *************** *** 983,989 **** (when pars (funcall special-display-function buffer (if (listp pars) pars)))))) ! ((or pop-up-frames (not frame-to-use)) ;; We want or need a new frame. (window--display-buffer-2 buffer (frame-selected-window (funcall pop-up-frame-function)))) --- 995,1001 ---- (when pars (funcall special-display-function buffer (if (listp pars) pars)))))) ! ((or use-pop-up-frame (not frame-to-use)) ;; We want or need a new frame. (window--display-buffer-2 buffer (frame-selected-window (funcall pop-up-frame-function)))) Diff finished. Wed Oct 8 20:46:21 2008