GNU bug report logs - #4550
23.1; give users a choice for quitting backtrace buffer

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Thu, 24 Sep 2009 17:05:08 UTC

Severity: minor

Done: "Drew Adams" <drew.adams <at> oracle.com>

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 4550 in the body.
You can then email your comments to 4550 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#4550; Package emacs. (Thu, 24 Sep 2009 17:05:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 24 Sep 2009 17:05:08 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 23.1; give users a choice for quitting backtrace buffer
Date: Thu, 24 Sep 2009 10:00:57 -0700
emacs -Q
 
This change in debug.el is not good:
 
Revision 1.107 - (view) (download) (annotate) - [select for diffs] 
Fri Apr 18 01:29:23 2008 UTC (17 months, 1 week ago) by monnier 
Branch: MAIN 
CVS Tags: font-backend-base 
Branch point for: font-backend 
Changes since 1.106: +4 -3 lines 
Diff to previous 1.106 
(debug): Revert to bury-buffer since quit-window is not better anyway.
 
In my case, this change means that the debugger frame is iconified
each time, and this includes some times when the debugger is still
active, which makes it impossible to access/use. (*)
 
The point is that `bury-buffer' is unacceptable for my use - it is
practically impossible for me to use the debugger in Emacs 23.  I can
live with no action at all (which keeps the *Backtrace* frame around)
or with `quit-window' in place of `bury-buffer'. I cannot live with
`bury-buffer'.  So I redefine `debug', just to change that one silly
function call.
 
The solution is to call a function that is the value of a user option:
`debugger-quit-function'. I don't care what the default value is -
make it `bury-buffer' if you want.
 
The user option's value should have :type `function' or, better, a
`choice' between nil and `function', where nil would mean do nothing.
If the :type is just `function' a user can of course use function
`ignore' to do nothing, but that is not so obvious for some users, so
in that case, please call that out in the doc string.
 
The code would then do this, in place of calling (bury-buffer):
 
;; If the option can have value nil:
(when debugger-quit-function
  (funcall debugger-quit-function))
 
;; If the option value can only be a function:
(funcall debugger-quit-function)
 
I would then customize the option to `quit-window' (or nil or
`ignore').
 

---
(*) No, I'm not going to try to figure out what's happening in those
cases where it is iconified when still active; it's hard enough using
the debugger when broken like this, without trying to debug the
debugger.  In case it helps, I will say however that I don't remember
seeing that when `bury-buffer' was used briefly during Emacs 22
development - back then it was iconified only when empty (finished),
IIRC.
 

In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Wed, 13 Jul 2011 14:14:03 GMT) Full text and rfc822 format available.

Message #8 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 4550 <at> debbugs.gnu.org
Subject: Re: 23.1; give users a choice for quitting backtrace buffer
Date: Wed, 13 Jul 2011 15:54:41 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> In my case, this change means that the debugger frame is iconified
> each time, and this includes some times when the debugger is still
> active, which makes it impossible to access/use. (*)
>
> The point is that `bury-buffer' is unacceptable for my use - it is
> practically impossible for me to use the debugger in Emacs 23.  I can
> live with no action at all (which keeps the *Backtrace* frame around)
> or with `quit-window' in place of `bury-buffer'. I cannot live with
> `bury-buffer'.  So I redefine `debug', just to change that one silly
> function call.

That sounds annoying.  Do you have a recipe for how to reproduce this
bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Wed, 13 Jul 2011 15:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 4550 <at> debbugs.gnu.org
Subject: RE: 23.1; give users a choice for quitting backtrace buffer
Date: Wed, 13 Jul 2011 08:29:47 -0700
> That sounds annoying.  Do you have a recipe for how to reproduce this
> bug?

We've been through it all before.
Stefan understands the problem.

I provided a clean, simple solution: Add a user option that defines the
behavior.  Make the default value of the option be whatever you want, including
`bury-buffer' (which causes the annoyance for me).





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Wed, 13 Jul 2011 15:39:01 GMT) Full text and rfc822 format available.

Message #14 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 4550 <at> debbugs.gnu.org
Subject: Re: 23.1; give users a choice for quitting backtrace buffer
Date: Wed, 13 Jul 2011 17:35:25 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> We've been through it all before.
> Stefan understands the problem.
>
> I provided a clean, simple solution: Add a user option that defines the
> behavior.  Make the default value of the option be whatever you want, including
> `bury-buffer' (which causes the annoyance for me).

`q' is bound to `top-level' if I say `(debug)'.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Wed, 13 Jul 2011 15:53:01 GMT) Full text and rfc822 format available.

Message #17 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 4550 <at> debbugs.gnu.org
Subject: RE: 23.1; give users a choice for quitting backtrace buffer
Date: Wed, 13 Jul 2011 08:52:23 -0700
> `q' is bound to `top-level' if I say `(debug)'.

So what? It was in Emacs 22 also (and Emacs 21 and 20...).
The behavior is not the same.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Wed, 13 Jul 2011 16:24:02 GMT) Full text and rfc822 format available.

Message #20 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 4550 <at> debbugs.gnu.org
Subject: Re: 23.1; give users a choice for quitting backtrace buffer
Date: Wed, 13 Jul 2011 18:21:16 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

>> `q' is bound to `top-level' if I say `(debug)'.
>
> So what? It was in Emacs 22 also (and Emacs 21 and 20...).
> The behavior is not the same.

It means that I'm unable to reproduce the behaviour you're describing.
If you're still not willing to give a recipe for reproducing this error,
I have no other choice than to close it.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Wed, 13 Jul 2011 16:54:02 GMT) Full text and rfc822 format available.

Message #23 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 4550 <at> debbugs.gnu.org
Subject: RE: 23.1; give users a choice for quitting backtrace buffer
Date: Wed, 13 Jul 2011 09:53:14 -0700
> >> `q' is bound to `top-level' if I say `(debug)'.
> >
> > So what? It was in Emacs 22 also (and Emacs 21 and 20...).
> > The behavior is not the same.
> 
> It means that I'm unable to reproduce the behaviour you're describing.
> If you're still not willing to give a recipe for reproducing 
> this error, I have no other choice than to close it.

1. Download these two files and put them in your load-path:
http://www.emacswiki.org/emacs/download/hexrgb.el
http://www.emacswiki.org/emacs/download/oneonone.el

2. Start Emacs:

runemacs.exe -Q --debug-init -l "hexrgb.el" -l "oneonone.el" -f "1on1-emacs"

3. Make *Backtrace* be a special-display buffer:

M-: (setq special-display-regexps '("[ ]?[*][^*]+[*]"))

4: Enter the debugger for `describe-mode':

M-x debug-on-entry RET describe-mode RET

C-h m

5: You are now in the debugger.  Hit `q' to exit.
The *Backtrace* frame gets iconified.

I want the frame to either remain or be deleted, not iconified.
I want users to be able to specify the behavior they prefer.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Sun, 17 Jul 2011 01:45:02 GMT) Full text and rfc822 format available.

Message #26 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4550 <at> debbugs.gnu.org
Subject: Re: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Sat, 16 Jul 2011 13:41:40 -0400
> I want the frame to either remain or be deleted, not iconified.
> I want users to be able to specify the behavior they prefer.

Why don't you provide a patch for bury-buffer that adds the needed hook?
That would be easier than repeating your desire for such a feature.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Sun, 17 Jul 2011 09:40:03 GMT) Full text and rfc822 format available.

Message #29 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4550 <at> debbugs.gnu.org
Subject: Re: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Sun, 17 Jul 2011 11:39:40 +0200
> I want the frame to either remain or be deleted, not iconified.
> I want users to be able to specify the behavior they prefer.

We can add a buffer display specifier which tells a priori what to do
with the window/frame/buffer when the window is no more needed.  For
that I'd need a list of specification concepts for

- what to do with the window (delete it or keep it),

- what to do with the frame (iconfiy, delete, keep it, make it
  invisible),

- what to do with the buffer (kill it, bury it),

with an optional function that could be called for each of these.

If a consensus can be reached, this could be easily done.  The calling
application would propose the default behavior via an argument and the
user could override it.

martin




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Sun, 17 Jul 2011 10:24:02 GMT) Full text and rfc822 format available.

Message #32 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: Štěpán Němec <stepnem <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4550 <at> debbugs.gnu.org,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Sun, 17 Jul 2011 12:18:34 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>> I want the frame to either remain or be deleted, not iconified.
>> I want users to be able to specify the behavior they prefer.
>
> We can add a buffer display specifier which tells a priori what to do
> with the window/frame/buffer when the window is no more needed.  For
> that I'd need a list of specification concepts for
>
> - what to do with the window (delete it or keep it),
>
> - what to do with the frame (iconfiy, delete, keep it, make it
>   invisible),
>
> - what to do with the buffer (kill it, bury it),
>
> with an optional function that could be called for each of these.
>
> If a consensus can be reached, this could be easily done.  The calling
> application would propose the default behavior via an argument and the
> user could override it.

I think this would be great (with the options you listed). IMO the
possibility to customize the window quit/"undisplay" action is as
important as with the display action. I assume this customization would
be respected by `quit-window'?

  Štěpán




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Sun, 17 Jul 2011 12:07:02 GMT) Full text and rfc822 format available.

Message #35 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4550 <at> debbugs.gnu.org,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Sun, 17 Jul 2011 14:06:39 +0200
> I assume this customization would
> be respected by `quit-window'?

Conceptually, it would be respected by `switch-to-prev-buffer',
`replace-buffer-in-windows' and `quit-restore-window' (the buffer
killing aspect would be probably only handled by the latter).  IIUC
`quit-window' has a long history of its own and I'm not sure whether
people would like it to change behavior.

But the desired behavior would be stored in the `quit-restore' window
parameter, so any function could use that.  The default behavior would
be the one used by `quit-restore-window' now.

martin




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Sun, 17 Jul 2011 12:27:02 GMT) Full text and rfc822 format available.

Message #38 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: Štěpán Němec <stepnem <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4550 <at> debbugs.gnu.org,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Sun, 17 Jul 2011 14:21:58 +0200
On Sun, Jul 17, 2011 at 02:06:39PM +0200, martin rudalics wrote:
> > I assume this customization would
> > be respected by `quit-window'?
> 
> Conceptually, it would be respected by `switch-to-prev-buffer',
> `replace-buffer-in-windows' and `quit-restore-window' (the buffer
> killing aspect would be probably only handled by the latter).  IIUC
> `quit-window' has a long history of its own and I'm not sure whether
> people would like it to change behavior.

Yeah, but AIUI one of the points of the recent buffer display reform is
to provide a unified customization interface, so I think it would be a
shame to still leave cases which the user has to handle outside of it
(which in this case would be particularly ugly, as `quit-window' doesn't
seem to provide any means to hook into what it does other than the
prefix argument).

Perhaps `quit-window' could check if a relevant specification exists,
and default to the current behaviour if none is found?

  Štěpán




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Sun, 17 Jul 2011 13:01:02 GMT) Full text and rfc822 format available.

Message #41 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4550 <at> debbugs.gnu.org,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Sun, 17 Jul 2011 15:00:36 +0200
> Yeah, but AIUI one of the points of the recent buffer display reform is
> to provide a unified customization interface, so I think it would be a
> shame to still leave cases which the user has to handle outside of it
> (which in this case would be particularly ugly, as `quit-window' doesn't
> seem to provide any means to hook into what it does other than the
> prefix argument).

The "buffer display reform" doesn't cover the case where a window is
obtained "manually", for example, by C-x 2.  `quit-restore-window' does
hanlde that and `quit-window' too, both in their own ways.

> Perhaps `quit-window' could check if a relevant specification exists,
> and default to the current behaviour if none is found?

Perhaps.  `bury-buffer' is another function that could do that.  I once
thought of making `quit-restore-window' the only function to "quit" a
window but meanwhile I had to recognize that people have developed very
strict conceptions about how a window shall be quit.

martin




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Mon, 18 Jul 2011 13:50:03 GMT) Full text and rfc822 format available.

Message #44 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4550 <at> debbugs.gnu.org,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Mon, 18 Jul 2011 09:45:20 -0400
>> I want the frame to either remain or be deleted, not iconified.
>> I want users to be able to specify the behavior they prefer.

> We can add a buffer display specifier which tells a priori what to do
> with the window/frame/buffer when the window is no more needed.  For
> that I'd need a list of specification concepts for

> - what to do with the window (delete it or keep it),

> - what to do with the frame (iconfiy, delete, keep it, make it
>   invisible),

> - what to do with the buffer (kill it, bury it),

> with an optional function that could be called for each of these.

Sounds way overkill to me.
All Drew needs AFAIK is a bury-buffer-function that lets him change the
iconify-frame default to something else.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Mon, 08 Oct 2012 06:59:02 GMT) Full text and rfc822 format available.

Message #47 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 4550 <at> debbugs.gnu.org
Subject: Re: Bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Sat, 06 Oct 2012 19:37:32 +0200
> (debug): Revert to bury-buffer since quit-window is not better anyway.
>
> In my case, this change means that the debugger frame is iconified
> each time, and this includes some times when the debugger is still
> active, which makes it impossible to access/use. (*)

Is this still an issue?

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4550; Package emacs. (Mon, 08 Oct 2012 13:30:02 GMT) Full text and rfc822 format available.

Message #50 received at 4550 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'martin rudalics'" <rudalics <at> gmx.at>, <4550 <at> debbugs.gnu.org>
Subject: RE: bug#4550: 23.1; give users a choice for quitting backtrace buffer
Date: Mon, 8 Oct 2012 06:28:30 -0700
>  > (debug): Revert to bury-buffer since quit-window is not 
>  > better anyway.
>  >
>  > In my case, this change means that the debugger frame is iconified
>  > each time, and this includes some times when the debugger is still
>  > active, which makes it impossible to access/use. (*)
> 
> Is this still an issue?

No, I believe so it is fixed now.  Thx.  I will close it.





bug closed, send any further explanations to 4550 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from "Drew Adams" <drew.adams <at> oracle.com> to control <at> debbugs.gnu.org. (Mon, 08 Oct 2012 13:30:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 06 Nov 2012 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 286 days ago.

Previous Next


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