From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: Tramp with GUD broken on trunk? Date: Wed, 11 Jul 2007 10:27:18 +1200 Message-ID: <18068.1990.632676.410797@kahikatea.snap.net.nz> References: <18065.63231.612402.142669@kahikatea.snap.net.nz> <18066.3981.316891.841594@kahikatea.snap.net.nz> <18066.59645.564793.472461@kahikatea.snap.net.nz> <87k5t88258.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184106522 24641 80.91.229.12 (10 Jul 2007 22:28:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Jul 2007 22:28:42 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 11 00:28:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I8OCF-0006d2-Fk for ged-emacs-devel@m.gmane.org; Wed, 11 Jul 2007 00:28:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I8OCE-0004uC-RC for ged-emacs-devel@m.gmane.org; Tue, 10 Jul 2007 18:28:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I8OB4-0003J5-FI for emacs-devel@gnu.org; Tue, 10 Jul 2007 18:27:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I8OB3-0003Id-T9 for emacs-devel@gnu.org; Tue, 10 Jul 2007 18:27:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I8OB3-0003Ia-P9 for emacs-devel@gnu.org; Tue, 10 Jul 2007 18:27:25 -0400 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I8OB2-0004po-VP for emacs-devel@gnu.org; Tue, 10 Jul 2007 18:27:25 -0400 Original-Received: from kahikatea.snap.net.nz (41.60.255.123.dynamic.snap.net.nz [123.255.60.41]) by viper.snap.net.nz (Postfix) with ESMTP id 9F0673D9FEF; Wed, 11 Jul 2007 10:27:21 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id D2F9C8FBF6; Wed, 11 Jul 2007 10:27:19 +1200 (NZST) In-Reply-To: <87k5t88258.fsf@gmx.de> X-Mailer: VM 7.19 under Emacs 22.1.50.12 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74598 Archived-At: > 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