GNU bug report logs -
#13777
[patch] Add toolbars for Edebug and debugger-mode
Previous Next
Reported by: Xue Fuqiao <xfq.free <at> gmail.com>
Date: Thu, 21 Feb 2013 10:51:01 UTC
Severity: wishlist
Tags: patch
Done: Xue Fuqiao <xfq.free <at> gmail.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 13777 in the body.
You can then email your comments to 13777 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#13777; Package
emacs.
(Thu, 21 Feb 2013 10:51:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Xue Fuqiao <xfq.free <at> gmail.com>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Thu, 21 Feb 2013 10:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The following patch adds toolbars for Edebug and debugger-mode:
*** trunk/etc/TODO.orig 2013-02-10 19:50:32.740492000 +0800
--- trunk/etc/TODO 2013-02-21 18:37:30.696132043 +0800
*************** not have one at the moment and probably
*** 52,60 ****
** Check if all items on the mode-line have a suitable tooltip for
all modes.
- ** edebug and debugger-mode should have a toolbar.
- It can use the same icons as gud.
-
** Check what minor modes don't use define-minor-mode and convert them
to use it.
--- 52,57 ----
*** trunk/lisp/emacs-lisp/edebug.el.orig 2013-02-03
09:46:50.383143000 +0800
--- trunk/lisp/emacs-lisp/edebug.el 2013-02-21
18:10:30.220096536 +0800 *************** be installed in
`emacs-lisp-mode-map'.") *** 3727,3732 ****
--- 3727,3745 ----
(define-key map "\C-c\C-l" 'edebug-where)
map))
+ (defvar edebug-tool-bar-map
+ (let ((map (make-sparse-keymap)))
+ (dolist (x '((edebug-set-breakpoint . "gud/break")
+ (edebug-unset-breakpoint . "gud/remove")
+ (edebug-go-mode . "gud/go")
+ (edebug-stop . "gud/stop")
+ (edebug-continue-mode . "gud/cont")
+ (edebug-next-mode . "gud/next")
+ (edebug-step-mode . "gud/step"))
+ map)
+ (tool-bar-local-item-from-menu
+ (car x) (cdr x) map edebug-mode-map))))
+
;; Autoloading these global bindings doesn't make sense because
;; they cannot be used anyway unless Edebug is already loaded and
active.
*************** Options:
*** 3811,3817 ****
;; exit to top level, because the edebug command loop can't usefully
;; continue running in such a case.
(add-hook 'kill-buffer-hook 'edebug-kill-buffer nil t)
! (use-local-map edebug-mode-map))
(defun edebug-kill-buffer ()
"Used on `kill-buffer-hook' when Edebug is operating in a buffer of
Lisp code."
--- 3824,3831 ----
;; exit to top level, because the edebug command loop can't usefully
;; continue running in such a case.
(add-hook 'kill-buffer-hook 'edebug-kill-buffer nil t)
! (use-local-map edebug-mode-map)
! (set (make-local-variable 'tool-bar-map) edebug-tool-bar-map))
(defun edebug-kill-buffer ()
"Used on `kill-buffer-hook' when Edebug is operating in a buffer of
Lisp code."
*** trunk/lisp/emacs-lisp/debug.el.orig 2013-02-21
18:46:46.462887964 +0800
--- trunk/lisp/emacs-lisp/debug.el 2013-02-21 18:32:39.786689513
+0800 *************** Applies to the frame whose line point is
*** 702,707 ****
--- 702,715 ----
:help "Proceed, stepping through subexpressions of this
expression")) map))
+ (defvar debugger-tool-bar-map
+ (let ((map (make-sparse-keymap)))
+ (dolist (x '((debugger-continue . "gud/cont")
+ (debugger-step-through . "gud/step"))
+ map)
+ (tool-bar-local-item-from-menu
+ (car x) (cdr x) map debugger-mode-map))))
+
(put 'debugger-mode 'mode-class 'special)
(defun debugger-mode ()
*************** Complete list of commands:
*** 725,730 ****
--- 733,739 ----
(setq truncate-lines t)
(set-syntax-table emacs-lisp-mode-syntax-table)
(use-local-map debugger-mode-map)
+ (set (make-local-variable 'tool-bar-map) debugger-tool-bar-map)
(run-mode-hooks 'debugger-mode-hook))
(defcustom debugger-record-buffer "*Debugger-record*"
*** trunk/lisp/ChangeLog.orig 2013-02-17 22:42:17.309803000 +0800
--- trunk/lisp/ChangeLog 2013-02-21 18:36:47.851919598 +0800
***************
*** 1,3 ****
--- 1,9 ----
+ 2013-02-21 Xue Fuqiao <xfq.free <at> gmail.com>
+
+ * emacs-lisp/debug.el: Add a toolbar for debugger-mode.
+
+ * emacs-lisp/edebug.el (edebug-mode): Add a toolbar.
+
2013-02-17 Glenn Morris <rgm <at> gnu.org>
* menu-bar.el (menu-bar-tools-menu): Fix case of EDE entry.
--
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#13777; Package
emacs.
(Wed, 08 May 2013 07:52:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 13777 <at> debbugs.gnu.org (full text, mbox):
Thanks for the patches.
Xue Fuqiao wrote:
> *** trunk/lisp/emacs-lisp/edebug.el.orig 2013-02-03
> 09:46:50.383143000 +0800
> --- trunk/lisp/emacs-lisp/edebug.el 2013-02-21
> 18:10:30.220096536 +0800 *************** be installed in
> `emacs-lisp-mode-map'.") *** 3727,3732 ****
> --- 3727,3745 ----
(These patches seem mangled somehow?)
> + (defvar edebug-tool-bar-map
> + (let ((map (make-sparse-keymap)))
> + (dolist (x '((edebug-set-breakpoint . "gud/break")
> + (edebug-unset-breakpoint . "gud/remove")
> + (edebug-go-mode . "gud/go")
> + (edebug-stop . "gud/stop")
> + (edebug-continue-mode . "gud/cont")
> + (edebug-next-mode . "gud/next")
> + (edebug-step-mode . "gud/step"))
> + map)
> + (tool-bar-local-item-from-menu
> + (car x) (cdr x) map edebug-mode-map))))
Looks alright but:
i) I think this needs to be moved after the easy-menu-define call.
ii) You need to find a way to restore the normal tool-bar after edebug
exits (for whatever reason).
> + (defvar debugger-tool-bar-map
> + (let ((map (make-sparse-keymap)))
> + (dolist (x '((debugger-continue . "gud/cont")
> + (debugger-step-through . "gud/step"))
> + map)
> + (tool-bar-local-item-from-menu
> + (car x) (cdr x) map debugger-mode-map))))
Looks ok, but it's a very sparse tool-bar. Is there nothing more that
can go in it? It looks a bit silly with just 2 items...
Maybe keep some of the standard ones?
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#13777; Package
emacs.
(Wed, 08 May 2013 09:42:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 13777 <at> debbugs.gnu.org (full text, mbox):
On Wed, May 8, 2013 at 3:50 PM, Glenn Morris <rgm <at> gnu.org> wrote:
>> + (defvar edebug-tool-bar-map
>> + (let ((map (make-sparse-keymap)))
>> + (dolist (x '((edebug-set-breakpoint . "gud/break")
>> + (edebug-unset-breakpoint . "gud/remove")
>> + (edebug-go-mode . "gud/go")
>> + (edebug-stop . "gud/stop")
>> + (edebug-continue-mode . "gud/cont")
>> + (edebug-next-mode . "gud/next")
>> + (edebug-step-mode . "gud/step"))
>> + map)
>> + (tool-bar-local-item-from-menu
>> + (car x) (cdr x) map edebug-mode-map))))
>
> Looks alright but:
>
> i) I think this needs to be moved after the easy-menu-define call.
>
> ii) You need to find a way to restore the normal tool-bar after edebug
> exits (for whatever reason).
Agreed.
>> + (defvar debugger-tool-bar-map
>> + (let ((map (make-sparse-keymap)))
>> + (dolist (x '((debugger-continue . "gud/cont")
>> + (debugger-step-through . "gud/step"))
>> + map)
>> + (tool-bar-local-item-from-menu
>> + (car x) (cdr x) map debugger-mode-map))))
>
> Looks ok, but it's a very sparse tool-bar. Is there nothing more that
> can go in it?
There are some candidates, such as `backtrace', `cancel-debug-on-entry'.
But I haven't found suitable icons for them yet.
> It looks a bit silly with just 2 items... Maybe keep some of the
> standard ones?
Sounds like a good compromise.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#13777; Package
emacs.
(Wed, 08 May 2013 15:09:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 13777 <at> debbugs.gnu.org (full text, mbox):
>> ii) You need to find a way to restore the normal tool-bar after edebug
>> exits (for whatever reason).
> Agreed.
The code on trunk has changed, made edebug-mode into a "proper" minor
mode, and includes the necessary infrastructure to restore the old value
(it uses it for buffer-read-only).
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#13777; Package
emacs.
(Wed, 24 Feb 2016 05:46:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 13777 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> ii) You need to find a way to restore the normal tool-bar after edebug
>>> exits (for whatever reason).
>> Agreed.
>
> The code on trunk has changed, made edebug-mode into a "proper" minor
> mode, and includes the necessary infrastructure to restore the old value
> (it uses it for buffer-read-only).
Xue, could you respin the toolbar patches for the Emacs trunk?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Reply sent
to
Xue Fuqiao <xfq.free <at> gmail.com>:
You have taken responsibility.
(Thu, 25 Feb 2016 00:28:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Xue Fuqiao <xfq.free <at> gmail.com>:
bug acknowledged by developer.
(Thu, 25 Feb 2016 00:28:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 13777-done <at> debbugs.gnu.org (full text, mbox):
On Wed, Feb 24, 2016 at 1:45 PM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> Xue, could you respin the toolbar patches for the Emacs trunk?
Sorry, I've been too busy these days. I'll close this bug for now. I
will submit a new bug report or reopen this bug when I have time.
Thanks for working on these old bugs, Lars!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Thu, 24 Mar 2016 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 150 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.