GNU bug report logs - #1061
pop-up-frames does not work on a tty

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Wed, 1 Oct 2008 08:50:03 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1061 in the body.
You can then email your comments to 1061 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: pop-up-frames does not work on a tty
Date: Wed, 1 Oct 2008 01:40:23 -0700 (PDT)
With the current CVS HEAD:

emacs -Q -nw
M-: (setq pop-up-frames t) RET
C-h f ding RET

The *Help* buffer does not appear at this point, a new frame is created,
but the current frame does not show the help buffer.

with emacs-22.2 the *Help* buffer is displayed.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 01 Oct 2008 15:05:28 +0200
[Message part 1 (text/plain, inline)]
> With the current CVS HEAD:
>
> emacs -Q -nw
> M-: (setq pop-up-frames t) RET
> C-h f ding RET
>
> The *Help* buffer does not appear at this point, a new frame is created,
> but the current frame does not show the help buffer.

I'm aware of this problem.  Does the attached patch fix it?

> with emacs-22.2 the *Help* buffer is displayed.

Not here on Windows.  And I wonder how this could work on your system.
FWIW, the underlying logic did not change.

Does `pop-to-buffer' for some arbitrary, non-visible buffer work with
-nw?  What happens with `display-buffer'?

martin
[1061.diff (text/plain, inline)]
*** window.el.~1.153.~	2008-09-13 10:14:15.250000000 +0200
--- window.el	2008-10-01 14:51:12.437500000 +0200
***************
*** 987,994 ****
  			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))))
       ((and pop-up-windows
  	   ;; Make a new window.
  	   (or (not (frame-parameter frame-to-use 'unsplittable))
--- 987,997 ----
  			buffer (if (listp pars) pars))))))
       ((or pop-up-frames (not frame-to-use))
        ;; We want or need a new frame.
!       (setq frame-to-use (funcall pop-up-frame-function))
!       (prog1
! 	  (window--display-buffer-2
! 	   buffer (frame-selected-window frame-to-use))
! 	(select-frame-set-input-focus frame-to-use)))
       ((and pop-up-windows
  	   ;; Make a new window.
  	   (or (not (frame-parameter frame-to-use 'unsplittable))

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 01 Oct 2008 15:26:16 +0200
[Message part 1 (text/plain, inline)]
The previous patch was probably too drastic.  Let's try
the attached one.

martin

[1061.diff (text/plain, inline)]
*** help.el.~1.342.~	2008-08-14 07:46:20.718750000 +0200
--- help.el	2008-10-01 15:19:23.250000000 +0200
***************
*** 1056,1062 ****
  	 "Type \"q\" to quit") window))
       ((= number-of-windows 1)
        ;; The help window is alone on a frame and not the selected
!       ;; window, could be the `pop-up-frames' t case.
        (help-window-display-message
         (cond
  	(keep-frame "Type \"q\" to delete this window")
--- 1056,1063 ----
  	 "Type \"q\" to quit") window))
       ((= number-of-windows 1)
        ;; The help window is alone on a frame and not the selected
!       ;; window, probably the `pop-up-frames' t case.
!       (select-frame-set-input-focus (window-frame window))
        (help-window-display-message
         (cond
  	(keep-frame "Type \"q\" to delete this window")

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #20 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 1 Oct 2008 08:20:39 -0700 (PDT)
martin rudalics <rudalics <at> gmx.at> writes:

  > The previous patch was probably too drastic.  Let's try
  > the attached one.

Thanks.
This might fix the *Help* case, but other functions are not
working either:
C-x C-b
M-x grep

  > martin
  > 
  > *** help.el.~1.342.~	2008-08-14 07:46:20.718750000 +0200
  > --- help.el	2008-10-01 15:19:23.250000000 +0200
  > ***************
  > *** 1056,1062 ****
  >   	 "Type \"q\" to quit") window))
  >        ((= number-of-windows 1)
  >         ;; The help window is alone on a frame and not the selected
  > !       ;; window, could be the `pop-up-frames' t case.
  >         (help-window-display-message
  >          (cond
  >   	(keep-frame "Type \"q\" to delete this window")
  > --- 1056,1063 ----
  >   	 "Type \"q\" to quit") window))
  >        ((= number-of-windows 1)
  >         ;; The help window is alone on a frame and not the selected
  > !       ;; window, probably the `pop-up-frames' t case.
  > !       (select-frame-set-input-focus (window-frame window))
  >         (help-window-display-message
  >          (cond
  >   	(keep-frame "Type \"q\" to delete this window")




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #25 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 1 Oct 2008 08:20:26 -0700 (PDT)
martin rudalics <rudalics <at> gmx.at> writes:

  > The previous patch was probably too drastic.  Let's try
  > the attached one.

Thanks.
This might fix the *Help* case, but other function are not
working either:
C-x C-b
M-x grep

  > martin
  > 
  > *** help.el.~1.342.~	2008-08-14 07:46:20.718750000 +0200
  > --- help.el	2008-10-01 15:19:23.250000000 +0200
  > ***************
  > *** 1056,1062 ****
  >   	 "Type \"q\" to quit") window))
  >        ((= number-of-windows 1)
  >         ;; The help window is alone on a frame and not the selected
  > !       ;; window, could be the `pop-up-frames' t case.
  >         (help-window-display-message
  >          (cond
  >   	(keep-frame "Type \"q\" to delete this window")
  > --- 1056,1063 ----
  >   	 "Type \"q\" to quit") window))
  >        ((= number-of-windows 1)
  >         ;; The help window is alone on a frame and not the selected
  > !       ;; window, probably the `pop-up-frames' t case.
  > !       (select-frame-set-input-focus (window-frame window))
  >         (help-window-display-message
  >          (cond
  >   	(keep-frame "Type \"q\" to delete this window")




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #30 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 1 Oct 2008 08:57:28 -0700 (PDT)
martin rudalics <rudalics <at> gmx.at> writes:

  > > with emacs-22.2 the *Help* buffer is displayed.
  > 
  > Not here on Windows.  And I wonder how this could work on your system.
  > FWIW, the underlying logic did not change.

Hmm, it does not work for me either, I probably had a typo in the
variable name when evaluating the `setq' on emacs-22.2... Sorry for the
false alarm.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #35 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 01 Oct 2008 20:20:26 +0200
> This might fix the *Help* case, but other functions are not
> working either:
> C-x C-b

`list-buffers' should use `pop-to-buffer' in the first place.

> M-x grep

Sorry, I don't understand how this is supposed to work.

You can observe similar behavior with emacs -Q and `pop-up-frames'
non-nil: Type C-h C-h b and watch Emacs iconify the *Help* buffer.

Often `display-buffer' seem to DTRT because most window managers
automatically raise a new frame behind Emacs' back.  Hence working on a
tty seems one of the rare cases where the fact that `display-buffer'
does not raise a frame really bites.

martin




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #40 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 1 Oct 2008 11:56:25 -0700 (PDT)
martin rudalics <rudalics <at> gmx.at> writes:

  > > M-x grep
  > 
  > Sorry, I don't understand how this is supposed to work.

Show the *grep* buffer?

I run into these when I was asked to test the --daemon patch with
pop-to-frames, I personally don't know much about pop-to-frames.  I
thought these things worked in emacs-22, but that turned out not to be
the case.  Maybe nobody cares about this stuff anyway, in which case
closing the bug seems appropriate.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #45 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: 1061 <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Thu, 02 Oct 2008 11:33:27 +0200
>   > > M-x grep
>   >
>   > Sorry, I don't understand how this is supposed to work.
>
> Show the *grep* buffer?

What I meant is that `grep' uses `compilation-start' which uses
`display-buffer' and I don't understand how this is supposed to show the
buffer on ttys.  Juri Linkov noted

http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01832.html

but I'm not sure whether the subsequent fix has done any good or harm.

> I run into these when I was asked to test the --daemon patch with
> pop-to-frames, I personally don't know much about pop-to-frames.

pop-"up"-frames I presume.

> I
> thought these things worked in emacs-22, but that turned out not to be
> the case.  Maybe nobody cares about this stuff anyway, in which case
> closing the bug seems appropriate.

`display-buffer' with `pop-up-frames' was and is broken on ttys: Take
`display-warning' or `display-buffer-other-frame'.  `select-frame' based
commands like `info-lookup' are broken on graphical _and_ text-only
terminals.

martin




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #50 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1061 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Thu, 02 Oct 2008 08:45:02 -0400
> `display-buffer' with `pop-up-frames' was and is broken on ttys: Take
> `display-warning' or `display-buffer-other-frame'.

Yes, the more I think of it, the more I feel like pop-up-frames) should
be ignored on ttys (and maybe special-display-buffers as well).


        Stefan






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #55 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 1061 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Fri, 03 Oct 2008 13:51:04 +0200
[Message part 1 (text/plain, inline)]
> Yes, the more I think of it, the more I feel like pop-up-frames) should
> be ignored on ttys (and maybe special-display-buffers as well).

Why throw out the child with the bathwater?  We could have `raise-frame'
simply select its argument on text-only terminals.

martin
[1061.diff (text/plain, inline)]
*** frame.c.~1.394.~	2008-09-30 19:36:42.968750000 +0200
--- frame.c	2008-10-03 13:47:18.171875000 +0200
***************
*** 2004,2010 ****
  If FRAME is invisible or iconified, make it visible.
  If you don't specify a frame, the selected frame is used.
  If Emacs is displaying on an ordinary terminal or some other device which
! doesn't support multiple overlapping frames, this function does nothing.  */)
       (frame)
       Lisp_Object frame;
  {
--- 2004,2010 ----
  If FRAME is invisible or iconified, make it visible.
  If you don't specify a frame, the selected frame is used.
  If Emacs is displaying on an ordinary terminal or some other device which
! doesn't support multiple overlapping frames, this function selects FRAME.  */)
       (frame)
       Lisp_Object frame;
  {
***************
*** 2016,2023 ****
  
    f = XFRAME (frame);
  
!   /* Do like the documentation says. */
!   Fmake_frame_visible (frame);
  
    if (FRAME_TERMINAL (f)->frame_raise_lower_hook)
      (*FRAME_TERMINAL (f)->frame_raise_lower_hook) (f, 1);
--- 2016,2027 ----
  
    f = XFRAME (frame);
  
!   if (FRAME_TERMCAP_P (f))
!     /* On a text-only terminal select FRAME.  */
!     Fselect_frame (frame);
!   else
!     /* Do like the documentation says. */
!     Fmake_frame_visible (frame);
  
    if (FRAME_TERMINAL (f)->frame_raise_lower_hook)
      (*FRAME_TERMINAL (f)->frame_raise_lower_hook) (f, 1);

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #60 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1061 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Fri, 03 Oct 2008 09:09:17 -0400
>> Yes, the more I think of it, the more I feel like pop-up-frames) should
>> be ignored on ttys (and maybe special-display-buffers as well).

> Why throw out the child with the bathwater?

I love pop-up-frames, but I only set it in X11 sessions.  Now with
multi-tty I often find myself doing M-: (setq pop-up-frames nil) RET
because my tty sessions (within X11 sessions) are simply unbearable.

> We could have `raise-frame' simply select its argument on
> text-only terminals.

Not good enough.  The support for frames under ttys is not sufficiently
good for that: there are *very* few ways for the user to manage his
frames and go from one to another.  Also under ttys, having many
different frames all showing a single buffer in a single window is
pretty dumb: you may as well use a single frame with a single window and
switch buffers in there.  Yet, pop-up-frames tends to put you in
such situations.  I think that under a tty, frames only really make
sense when the user sets them up explicitly, not implicitly as part of
calls to display-buffer.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #65 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 1061 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Fri, 03 Oct 2008 15:41:44 +0200
> Not good enough.  The support for frames under ttys is not sufficiently
> good for that: there are *very* few ways for the user to manage his
> frames and go from one to another.  Also under ttys, having many
> different frames all showing a single buffer in a single window is
> pretty dumb: you may as well use a single frame with a single window and
> switch buffers in there.  Yet, pop-up-frames tends to put you in
> such situations.  I think that under a tty, frames only really make
> sense when the user sets them up explicitly, not implicitly as part of
> calls to display-buffer.

OK.  But `display-buffer' and `raise-frame' seem _both_ broken on a tty.
Fixing the former won't fix the latter.

martin




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #70 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, 1061 <at> debbugs.gnu.org
Cc: rudalics <at> gmx.at, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Fri, 03 Oct 2008 20:06:51 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Fri, 03 Oct 2008 09:09:17 -0400
> Cc: 1061 <at> emacsbugs.donarmstrong.com, Dan Nicolaescu <dann <at> ics.uci.edu>
> 
> The support for frames under ttys is not sufficiently good for that:
> there are *very* few ways for the user to manage his frames and go
> from one to another.

What's wrong with select-frame-by-name?

> I think that under a tty, frames only really make sense when the
> user sets them up explicitly, not implicitly as part of calls to
> display-buffer.

As someone who uses frames a lot on a tty, I agree.  Usually, each
my frame is set to do some specific set of related activities.  For
example, I'd typically have a frame for reading mail, another one for
whatever current programming project I'm busy with, yet another for
reading Info manuals, etc.  The names of the frames would be set
accordingly: "Mail", "Prog", "Docs", etc.  select-frame-by-name comes
very handy to switch between frames with mnemonic frame names.







Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #80 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 1061 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Mon, 06 Oct 2008 10:02:14 -0400
> OK.  But `display-buffer' and `raise-frame' seem _both_ broken on a tty.
> Fixing the former won't fix the latter.

Yes, indeed.  And fixing raise-frame won't fix display-buffer.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #85 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 1061 <at> debbugs.gnu.org, rudalics <at> gmx.at, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Mon, 06 Oct 2008 10:06:06 -0400
>> The support for frames under ttys is not sufficiently good for that:
>> there are *very* few ways for the user to manage his frames and go
>> from one to another.
> What's wrong with select-frame-by-name?

That and C-x 5 o are the only ways I know.  2 is "very few".

And if you use pop-up-frames, you'll see that select-frame-by-name is
not good enough, because the names are chosen automatically for you and
you get name clashes, etc...

>> I think that under a tty, frames only really make sense when the
>> user sets them up explicitly, not implicitly as part of calls to
>> display-buffer.

> As someone who uses frames a lot on a tty, I agree.  Usually, each
> my frame is set to do some specific set of related activities.  For
> example, I'd typically have a frame for reading mail, another one for
> whatever current programming project I'm busy with, yet another for
> reading Info manuals, etc.  The names of the frames would be set
> accordingly: "Mail", "Prog", "Docs", etc.  select-frame-by-name comes
> very handy to switch between frames with mnemonic frame names.

Exactly: this use was the intended one, and it works well for that case,
but pop-up-frames is a whole other game.


        Stefan





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #95 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 1061 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Mon, 06 Oct 2008 18:31:36 +0200
> Yes, indeed.  And fixing raise-frame won't fix display-buffer.

Not in your sense, I know.

It will fix `display-buffer-reuse-frames' though.

martin




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #100 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: martin rudalics <rudalics <at> gmx.at>, 1061 <at> debbugs.gnu.org,
        Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 08 Oct 2008 20:51:31 -0400
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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #105 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 1061 <at> debbugs.gnu.org,
        Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Wed, 08 Oct 2008 21:59:53 -0400
> 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?

I was thinking of using a `tty' value to say "even on ttys" (which would
have changed the behavior for t along the lines of what I suggest), but
your suggestion is OK as well.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1061; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #110 received at 1061 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Stefan Monnier <monnier <at> IRO.UMontreal.CA>, 1061 <at> debbugs.gnu.org,
        Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Thu, 09 Oct 2008 10:33:50 +0200
> 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?

I checked in a slightly modified version.

Thanks for coming to an agreement on this, martin.





Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Dan Nicolaescu <dann <at> ics.uci.edu>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #115 received at 1061-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 1061-done <at> debbugs.gnu.org
Subject: Re: bug#1061: pop-up-frames does not work on a tty
Date: Thu, 09 Oct 2008 10:33:54 +0200
Fixed as

	* window.el (pop-up-frames): Add choice graphic-only.
	(display-buffer): When pop-up-frames equals graphic-only do
	not pop up new frame on text-only terminals.  (Bug#1061)

	* frame.c (Fraise_frame): On text-only terminals select frame in
	order to make it visible.  (Bug#1061)

martin





bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Thu, 06 Nov 2008 15:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.