emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp with GUD broken on trunk?


From: Nick Roberts
Subject: Re: Tramp with GUD broken on trunk?
Date: Wed, 11 Jul 2007 10:27:18 +1200

 > Done.
 > 
 > Nick, if you like you could check what's left to do for gud.

OK, I'm playing catch up at the moment.  I made the same change to
comint-exec-1 that you had made to compilation-start (below).  That meant that
if I started with a remote default-directory, M-x gdb would execute remotely
but GUD wouldn't put the source in a buffer when execution stopped, as
gud-find-file only used the local filename.

-- 
Nick                                           http://www.inet.net.nz/~nickrob



*** comint.el   03 Apr 2007 02:01:02 +1200      1.361
--- comint.el   11 Jul 2007 01:17:50 +1200      
*************** buffer.  The hook `comint-exec-hook' is 
*** 780,788 ****
      (let ((exec-path (if (file-name-directory command)
                         ;; If the command has slashes, make sure we
                         ;; first look relative to the current directory.
!                        (cons default-directory exec-path) exec-path)))
!       (setq proc (apply 'start-process name buffer command switches)))
!     (let ((coding-systems (process-coding-system proc)))
        (setq decoding (car coding-systems)
            encoding (cdr coding-systems)))
      ;; If start-process decided to use some coding system for decoding
--- 780,801 ----
      (let ((exec-path (if (file-name-directory command)
                         ;; If the command has slashes, make sure we
                         ;; first look relative to the current directory.
!                        (cons default-directory exec-path) exec-path))
!         (start-process (symbol-function 'start-process)))
!       ;; Redefine temporarily `start-process' in order to handle
!       ;; remote processes.
!       (fset 'start-process
!           (lambda (name buffer program &rest program-args)
!             (apply
!              (if (file-remote-p default-directory)
!                  'start-file-process
!                start-process)
!              name buffer program program-args)))
!       (unwind-protect
!         (setq proc (apply 'start-process name buffer command switches))
!       ;; Unwindform: Reset original definition of `start-process'
!       (fset 'start-process start-process)))
!      (let ((coding-systems (process-coding-system proc)))
        (setq decoding (car coding-systems)
            encoding (cdr coding-systems)))
      ;; If start-process decided to use some coding system for decoding




reply via email to

[Prev in Thread] Current Thread [Next in Thread]