unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1061: pop-up-frames does not work on a tty
@ 2008-10-09  0:51 Chong Yidong
  2008-10-09  1:59 ` Stefan Monnier
  2008-10-09  8:33 ` martin rudalics
  0 siblings, 2 replies; 21+ messages in thread
From: Chong Yidong @ 2008-10-09  0:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 1061, Dan Nicolaescu

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






^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2008-10-09  8:45 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <48EDC1F2.4050305@gmx.at>
2008-10-01  8:40 ` bug#1061: pop-up-frames does not work on a tty Dan Nicolaescu
2008-10-01 13:05   ` martin rudalics
2008-10-01 15:57     ` Dan Nicolaescu
2008-10-01 13:26   ` martin rudalics
2008-10-01 15:20     ` Dan Nicolaescu
2008-10-01 15:20     ` Dan Nicolaescu
2008-10-01 18:20       ` martin rudalics
2008-10-01 18:56         ` Dan Nicolaescu
2008-10-02  9:33           ` martin rudalics
2008-10-02 12:45             ` Stefan Monnier
2008-10-03 11:51               ` martin rudalics
2008-10-03 13:09                 ` Stefan Monnier
2008-10-03 13:41                   ` martin rudalics
2008-10-06 14:02                     ` Stefan Monnier
2008-10-06 16:31                       ` martin rudalics
2008-10-03 17:06                   ` Eli Zaretskii
2008-10-06 14:06                     ` Stefan Monnier
2008-10-09  8:45   ` bug#1061: marked as done (pop-up-frames does not work on a tty) Emacs bug Tracking System
2008-10-09  0:51 bug#1061: pop-up-frames does not work on a tty Chong Yidong
2008-10-09  1:59 ` Stefan Monnier
2008-10-09  8:33 ` martin rudalics

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