all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Андрей Парамонов" <cmr.pent@gmail.com>
To: 7329@debbugs.gnu.org
Cc: fx@gnu.org
Subject: bug#7329: [Patch] Enable completion in inferior-python-mode
Date: Fri, 12 Nov 2010 23:08:19 +0300	[thread overview]
Message-ID: <AANLkTin8izchv00ti+pOi=7iA3uEnaGueD=ZqjTLnnaN@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=AFrwJtvBbBwO24LimuCXAC-yqhjZeD7=MRJxQ@mail.gmail.com>

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

Hello!

I've managed to enable completion in Python interpreter buffer, patch
attached. The change in python-check-comint-prompt also fixes
completion in Python buffer when prompt in interpreter buffer is not
clear (a command is entered but not yet executed).

I didn't notice any regressions yet, but maybe the "\\="-thingy was
actually meaning something :-)  Please review my patch, I'm ready to
improve it if needed.

Best wishes,
Andrey Paramonov

[-- Attachment #2: inferior-python-completion.patch --]
[-- Type: text/x-diff, Size: 1012 bytes --]

--- /home/pent/python.el.orig	2010-11-12 21:55:47.000000000 +0300
+++ /home/pent/python.el	2010-11-12 21:51:26.000000000 +0300
@@ -1412,6 +1412,8 @@
   (set (make-local-variable 'comint-input-filter) 'python-input-filter)
   (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter
 	    nil t)
+  (add-hook 'completion-at-point-functions
+            'python-completion-at-point nil 'local)
   ;; Still required by `comint-redirect-send-command', for instance
   ;; (and we need to match things like `>>> ... >>> '):
   (set (make-local-variable 'comint-prompt-regexp)
@@ -1814,7 +1816,7 @@
 information etc.  If PROC is non-nil, check the buffer for that process."
   (with-current-buffer (process-buffer (or proc (python-proc)))
     (save-excursion
-      (save-match-data (re-search-backward ">>> \\=" nil t)))))
+      (save-match-data (re-search-backward "^>>> " nil t)))))
 
 ;; Fixme:  Is there anything reasonable we can do with random methods?
 ;; (Currently only works with functions.)

  reply	other threads:[~2010-11-12 20:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87iq0dhwwd.fsf@neo.paramonovs>
2010-11-04 17:11 ` bug#7329: Fwd: 23.2; inferior-python-mode: completion does not work Андрей Парамонов
2010-11-12 20:08   ` Андрей Парамонов [this message]
2010-11-12 21:35     ` bug#7329: [Patch] Enable completion in inferior-python-mode Stefan Monnier
2010-11-16  8:41       ` Андрей Парамонов
2010-11-16  8:43         ` Андрей Парамонов
2010-11-17 13:14         ` Stefan Monnier
2010-11-19 20:33           ` Андрей Парамонов
2010-11-28 16:14             ` Dave Love
2012-04-11 11:31               ` Lars Magne Ingebrigtsen
2012-04-11 11:47                 ` Андрей Парамонов
2012-04-11 11:59                   ` Lars Magne Ingebrigtsen
2012-04-11 12:08                     ` Андрей Парамонов
2012-04-11 11:47                 ` Leo
2012-04-11 16:26                 ` Glenn Morris
2012-07-28 14:23   ` bug#7329: Fwd: 23.2; inferior-python-mode: completion does not work Chong Yidong
2012-07-28 15:10     ` Андрей Парамонов
2012-07-28 15:14       ` Chong Yidong
2012-07-28 15:35         ` Андрей Парамонов

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTin8izchv00ti+pOi=7iA3uEnaGueD=ZqjTLnnaN@mail.gmail.com' \
    --to=cmr.pent@gmail.com \
    --cc=7329@debbugs.gnu.org \
    --cc=fx@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.