From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#13304: [PATCH] full-path gud breakpoints now don't get confused by tramp Date: Mon, 31 Dec 2012 11:53:13 -0800 Message-ID: <20121231115313.3be6b7ea@fatty> References: <87sj6p86o4.fsf@secretsauce.net> <87mwwup6tl.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/IHbZdcb/pAOU6qX2zIfWH2x" X-Trace: ger.gmane.org 1356983761 9796 80.91.229.3 (31 Dec 2012 19:56:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Dec 2012 19:56:01 +0000 (UTC) Cc: 13304@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 31 20:56:16 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TplT4-000107-LN for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Dec 2012 20:56:14 +0100 Original-Received: from localhost ([::1]:53416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TplSp-0007H0-S2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Dec 2012 14:55:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TplSl-0007Gd-AO for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2012 14:55:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TplSh-0008FH-3m for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2012 14:55:55 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TplSg-0008FC-Qd for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2012 14:55:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TplTp-0000ug-KA for bug-gnu-emacs@gnu.org; Mon, 31 Dec 2012 14:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Dec 2012 19:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13304 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13304-submit@debbugs.gnu.org id=B13304.13569837833461 (code B ref 13304); Mon, 31 Dec 2012 19:57:01 +0000 Original-Received: (at 13304) by debbugs.gnu.org; 31 Dec 2012 19:56:23 +0000 Original-Received: from localhost ([127.0.0.1]:38339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TplTC-0000tl-6z for submit@debbugs.gnu.org; Mon, 31 Dec 2012 14:56:23 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57473) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TplT8-0000tZ-QL for 13304@debbugs.gnu.org; Mon, 31 Dec 2012 14:56:20 -0500 Original-Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 2111B209AE; Mon, 31 Dec 2012 14:55:07 -0500 (EST) Original-Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute3.internal (MEProxy); Mon, 31 Dec 2012 14:55:07 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; s=mesmtp; bh=9nB6HjTddP8pfOjdimvzA9C ivI0=; b=HlM510mZ8JZT7j7aE2lh3oiXnWwpa9gVDFy7ccwxzpkhir/GzDkd7oO XkVvaO+i6MESeTjTLCZi3klqNXG2GIiXbgS884YdlafuyRW+yPet/M1v01D4OCDw y9TtscpRB1Fx44tP+9X6WXoW4O0F3lPUSHnOKf2mUKSGjs7GHQ0w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-type; s=smtpout; bh=9nB6HjTddP8pfOjdimvzA9CivI0=; b=CwJ5U+SG55SCufn3O8A4LMM9k1EV bzMoizxe3JNzbDdIBj5U4YX5sJXQyzFaAiHSJzx4vVHSP8o1jnyk6H8ra2lMvH+j c9cDik55BvJQQFnxGlOHO9yCIWte89ftzB35fOzUXGntKK1da8l1uSFmhvCQ02SQ JibfEwyYvdS1Qho= X-Sasl-enc: b6ULrnEb9scp2smzpvfpsSiC6PY+LMYhdF2YLSJFX82O 1356983706 Original-Received: from fatty (unknown [204.154.109.20]) by mail.messagingengine.com (Postfix) with ESMTPA id 9881A4827CE; Mon, 31 Dec 2012 14:55:06 -0500 (EST) In-Reply-To: <87mwwup6tl.fsf@gmx.de> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69252 Archived-At: --MP_/IHbZdcb/pAOU6qX2zIfWH2x Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline > On Mon, 31 Dec 2012 16:41:42 +0100 > Michael Albinus wrote: > > Dima Kogan writes: > > > + (tramp-file-name-localname (tramp-dissect-file-name > > + (buffer-file-name) t)) > > Don't use Tramp internal functions, they are not documented by > intention. You could use instead > > (file-remote-p (buffer-file-name) 'localname) Great point; this is really much better. I'm attaching an updated patch. --MP_/IHbZdcb/pAOU6qX2zIfWH2x Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-full-path-gud-breakpoints-now-don-t-get-confused-by-.patch >From f27e176b58dc9fd813ad5f9228066d3fcc2c226c Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 29 Dec 2012 02:54:40 -0800 Subject: [PATCH] full-path gud breakpoints now don't get confused by tramp prior to this patch if gud used a path to set a breakpoint, the FULL path would be sent to the backend debugger, including the tramp pieces. The backends don't know anything about tramp, so they were naturally confused by this. Most notably, it was impossible to set from-source breakpoints in pdb, the python debugger. --- lisp/progmodes/gud.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 13eac83..c178a53 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2743,6 +2743,9 @@ Obeying it means displaying in another window the specified file and line." (defun gud-format-command (str arg) (let ((insource (not (eq (current-buffer) gud-comint-buffer))) (frame (or gud-last-frame gud-last-last-frame)) + (buffer-file-name-localized + (and (buffer-file-name) (or (file-remote-p (buffer-file-name) 'localname) + (buffer-file-name)))) result) (while (and str (let ((case-fold-search nil)) @@ -2752,15 +2755,15 @@ Obeying it means displaying in another window the specified file and line." (cond ((eq key ?f) (setq subst (file-name-nondirectory (if insource - (buffer-file-name) + buffer-file-name-localized (car frame))))) ((eq key ?F) (setq subst (file-name-base (if insource - (buffer-file-name) + buffer-file-name-localized (car frame))))) ((eq key ?d) (setq subst (file-name-directory (if insource - (buffer-file-name) + buffer-file-name-localized (car frame))))) ((eq key ?l) (setq subst (int-to-string -- 1.7.10.4 --MP_/IHbZdcb/pAOU6qX2zIfWH2x--