unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* GDS Result Display Bug
@ 2007-01-31 21:43 Clinton Ebadi
  2007-01-31 21:53 ` Clinton Ebadi
  0 siblings, 1 reply; 3+ messages in thread
From: Clinton Ebadi @ 2007-01-31 21:43 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

Currently guile-debugging uses other-window to switch back to the
buffer an expression was evaluated in, but this fails to work properly
when the frame has more than two window. Wrapping the results display
in save-selected-window properly restores the selected window no
matter how many windows exist.

2007-01-31  Clinton Ebadi  <clinton@unknownlamer.org>

	* gds-scheme.el (gds-display-results): Use save-selected-window
	instead of switching to other-window in order to return to the
	proper window in frames with more than two windows



[-- Attachment #2: gds-scheme.el --]
[-- Type: application/emacs-lisp, Size: 39884 bytes --]

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]


-- 
http://unknownlamer.org
Jabber:clinton@hcoop.net
I'm just thinking aloud; isn't thinking allowed?
443E 4F1A E213 7C54 A306  E328 7601 A1F0 F403 574B

[-- Attachment #4: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

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

* Re: GDS Result Display Bug
  2007-01-31 21:43 GDS Result Display Bug Clinton Ebadi
@ 2007-01-31 21:53 ` Clinton Ebadi
  2007-02-06 23:33   ` Neil Jerram
  0 siblings, 1 reply; 3+ messages in thread
From: Clinton Ebadi @ 2007-01-31 21:53 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 20 bytes --]

Oops, forgot .diff


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gds-scheme.el.diff --]
[-- Type: text/x-diff, Size: 2824 bytes --]

Index: gds-scheme.el
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/emacs/gds-scheme.el,v
retrieving revision 1.4
diff -u -r1.4 gds-scheme.el
--- gds-scheme.el	17 Jan 2007 13:38:17 -0000	1.4
+++ gds-scheme.el	31 Jan 2007 21:37:45 -0000
@@ -382,39 +382,39 @@
                                '(nil . "*Guile Evaluation*"))))
          (helpp (car helpp+bufname)))
     (let ((buf (get-buffer-create (cdr helpp+bufname))))
-      (save-excursion
-        (set-buffer buf)
-	(gds-dissociate-buffer)
-        (erase-buffer)
-        (scheme-mode)
-        (insert (cdr correlator) "\n\n")
-        (while results
-          (insert (car results))
-          (or (bolp) (insert "\\\n"))
-          (if helpp
-              nil
-            (if (cadr results)
-                (mapcar (function (lambda (value)
-                                    (insert " => " value "\n")))
-                        (cadr results))
-              (insert " => no (or unspecified) value\n"))
-            (insert "\n"))
-          (setq results (cddr results)))
-        (if stack-available
-            (let ((beg (point))
-                  (map (make-sparse-keymap)))
-              (define-key map [mouse-1] 'gds-show-last-stack)
-              (define-key map "\C-m" 'gds-show-last-stack)
-              (insert "[click here to show error stack]")
-              (add-text-properties beg (point)
-                                   (list 'keymap map
-                                         'mouse-face 'highlight))
-              (insert "\n")))
-        (goto-char (point-min))
-        (gds-associate-buffer client))
-      (pop-to-buffer buf)
-      (run-hooks 'temp-buffer-show-hook)
-      (other-window 1))))
+      (save-selected-window
+	(save-excursion
+	  (set-buffer buf)
+	  (gds-dissociate-buffer)
+	  (erase-buffer)
+	  (scheme-mode)
+	  (insert (cdr correlator) "\n\n")
+	  (while results
+	    (insert (car results))
+	    (or (bolp) (insert "\\\n"))
+	    (if helpp
+		nil
+	      (if (cadr results)
+		  (mapcar (function (lambda (value)
+				      (insert " => " value "\n")))
+			  (cadr results))
+		(insert " => no (or unspecified) value\n"))
+	      (insert "\n"))
+	    (setq results (cddr results)))
+	  (if stack-available
+	      (let ((beg (point))
+		    (map (make-sparse-keymap)))
+		(define-key map [mouse-1] 'gds-show-last-stack)
+		(define-key map "\C-m" 'gds-show-last-stack)
+		(insert "[click here to show error stack]")
+		(add-text-properties beg (point)
+				     (list 'keymap map
+					   'mouse-face 'highlight))
+		(insert "\n")))
+	  (goto-char (point-min))
+	  (gds-associate-buffer client))
+	(pop-to-buffer buf)
+	(run-hooks 'temp-buffer-show-hook)))))
 
 (defun gds-show-last-stack ()
   "Show stack of the most recent error."

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]


-- 
http://unknownlamer.org
Jabber:clinton@hcoop.net
I'm just thinking aloud; isn't thinking allowed?
443E 4F1A E213 7C54 A306  E328 7601 A1F0 F403 574B

[-- Attachment #4: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

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

* Re: GDS Result Display Bug
  2007-01-31 21:53 ` Clinton Ebadi
@ 2007-02-06 23:33   ` Neil Jerram
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2007-02-06 23:33 UTC (permalink / raw)
  To: Clinton Ebadi; +Cc: guile-devel

Clinton Ebadi <clinton@unknownlamer.org> writes:

> Oops, forgot .diff [...]

Many thanks, I've applied this change.  (Thanks also for the clear
explanation.  It's slightly surprising that pop-to-buffer doesn't have
an arg we could use meaning "don't change the selected window" - but I
guess that's what save-selected-window is for.)

Regards,
     Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


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

end of thread, other threads:[~2007-02-06 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-31 21:43 GDS Result Display Bug Clinton Ebadi
2007-01-31 21:53 ` Clinton Ebadi
2007-02-06 23:33   ` Neil Jerram

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