From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.emacs.help Subject: Python completion when using pdb (M-x pdb) Date: Tue, 23 May 2017 09:06:04 -0700 Message-ID: <87tw4bzhg3.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495555944 20960 195.159.176.226 (23 May 2017 16:12:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 May 2017 16:12:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 23 18:12:20 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDCPy-0005Hm-MZ for geh-help-gnu-emacs@m.gmane.org; Tue, 23 May 2017 18:12:18 +0200 Original-Received: from localhost ([::1]:50196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDCQ4-0005fl-AH for geh-help-gnu-emacs@m.gmane.org; Tue, 23 May 2017 12:12:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDCK1-00033o-2Y for help-gnu-emacs@gnu.org; Tue, 23 May 2017 12:06:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDCK0-0002eY-7G for help-gnu-emacs@gnu.org; Tue, 23 May 2017 12:06:09 -0400 Original-Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]:36682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dDCJz-0002e5-TY for help-gnu-emacs@gnu.org; Tue, 23 May 2017 12:06:08 -0400 Original-Received: by mail-pf0-x22f.google.com with SMTP id m17so119001824pfg.3 for ; Tue, 23 May 2017 09:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=v6Jy0C1jn55wZWRmQZQX2Riw9ptsufH6nAyXlBH1gUQ=; b=f6KGyx4vNhf9hsmxcdl7Fnpyf+JF9GaygfXkLHVbBVCTdv8TlSLZJyl5pjhg770BFI 7UCbo8b29XxHECG6JdV1NX4E6tmk/6cOelLWdRjMMkQTVlVBnuq1WQUkbCbS74xh3OEk r5C82Df3vYI/wEdWgu1qknQ/gEJVMGykfkh4C/fzchbW707BvGQE0WniQy4oOMBm822R VVGl29MkqJXpQL+xPj1ITgvesN0X+bHj8b8Yrl3w4OuCFbaq7y1JpFnGGLNi8DB7q3gr dIK0HnWeunW+uDCgDYKnuWiw639I2lGLKUAj1e1RzxfrvC64VDLw1uDFG0X6YOxZQapT +a7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=v6Jy0C1jn55wZWRmQZQX2Riw9ptsufH6nAyXlBH1gUQ=; b=ZiYvhRbQ7nHziL9O+etCMzfI7e1YDoHVNh9L+cI6+ss/y8GNr75/Jr4gcK+nkdUuXD 5lqhesJFYdiniRY5Y11VGZVStD9BPIo7Sg+vFEaQbOOh988lpoCb8nNrOWIbMrnGn46C K9O2C5JsbApHrThMeHCtbRix9QQKIv8fNhLSXjJ9Zv2zfoQBYfdGPjpSMfC0bFd63WGu N8fqfTLsFnxEfOxJiqP+s3OqUcn5pFHnrepVENg9N6HUBeldwG2WwZIe0dI3mCnPS/Cj RtzTU1FH+ho/5FBVJH7gkV7ku+xw7Yy8KOoBVGcObzAFjzS14Jzzj/9kncn/HAP6T0vm hv8g== X-Gm-Message-State: AODbwcBuTXObEnMSVh5jKP0mGS2RL0bqw9hhEzH+A3DphKpDJDds9iLo y02buMBfdj0hwveq X-Received: by 10.99.124.75 with SMTP id l11mr32953999pgn.211.1495555566355; Tue, 23 May 2017 09:06:06 -0700 (PDT) Original-Received: from apteryx ([2601:647:4a01:bacd:c2f8:daff:fe5d:2f2f]) by smtp.gmail.com with ESMTPSA id l67sm2704190pfk.73.2017.05.23.09.06.05 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2017 09:06:05 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22f X-Mailman-Approved-At: Tue, 23 May 2017 12:11:54 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113144 Archived-At: Hello Emacs! I've recently discovered that Emacs provides it's own completion mechanism, for example when running M-x run-python. This works even with the vanilla Python interpreter, which doesn't provide such completion out-of-the-box itself, which is nice! However, I couldn't make completion work in pdb. My understanding, when searching on the web, is that it *should* work in pdb too. For example, the commit a92066b (python.el: Fix completion for pdb interactions) made two years ago would suggest that it should work. Things I've tried: 1. Using M-x pdb: The buffer is not even set up for completion with python.el. C-h k reveals that it simply calls `indent-for-tab-command'. 2. Once debugging, I used 'M-x run-python'. The Python process "inherited" the already running pdb process and I could see the (Pdb) prompt from there. (The same could have been attained by M-x run-python at first, then execfile some/file (python 2) in wich "import pdb; pdb.set_trace()" is used. This time, C-h k revealed it was bound to `python-shell-completion-complete-or-indent', which is better. However, attempting to tab-complete any symbol at the pdb prompt returned 'No match' at the minibuffer. I also tested with realgud instead of gud, with the same result. Any pointers would be very appreciated :) Maxim