From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: Configuring Anaconda-Mode and Company-Mode with IPython Date: Fri, 17 Apr 2015 23:41:31 +0300 Message-ID: <55316FFB.8040407@yandex.ru> References: <8c1de894-22ab-46fb-89e4-22e158f85c21@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1429303330 31494 80.91.229.3 (17 Apr 2015 20:42:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Apr 2015 20:42:10 +0000 (UTC) To: Daniel Galtieri , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 17 22:41:58 2015 Return-path: Envelope-to: geh-help-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 1YjD5G-0008S4-6P for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2015 22:41:54 +0200 Original-Received: from localhost ([::1]:43450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjD5F-0006EH-LK for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2015 16:41:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjD54-0006Ci-RQ for help-gnu-emacs@gnu.org; Fri, 17 Apr 2015 16:41:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjD4z-0004rm-RM for help-gnu-emacs@gnu.org; Fri, 17 Apr 2015 16:41:42 -0400 Original-Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:36993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjD4z-0004rc-KR for help-gnu-emacs@gnu.org; Fri, 17 Apr 2015 16:41:37 -0400 Original-Received: by widdi4 with SMTP id di4so33154723wid.0 for ; Fri, 17 Apr 2015 13:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=BdRb0+w5sU9rc8xxI/7yxJAQWwJcZeL1N+bUjy2NlVw=; b=FYB0YjmS0BeSlC5jQPD23ju5g/cRL3mv/ol5X+9Xzo4SwJ7dbxFPYBNQIgKHWlK6wr ZJTp36L2luE2gvNpLE5Gapaupm3ZjFNxhd0LNCdoYOyjxKEBhRyyWSSbH6SYjt/EVWHT TCzAFnDZ43+A+J1fhTKQKDb1mkNxIYYCPcHvYWkuQtcsxYYZ9xPKJ357s/JS+rvCpy3+ M59M5h23h+KHsP6F8NOWwo5EHLKN9RI0p+GEdBFzUTqluuoCjPeQ2P3kCgLmeAiDxzS9 0pIAQXqsCHy55yErNTewBlqAXH5di0ab3tB/qlQP1AdAf5suWM4kiLrL1veu58Sz9Pf8 m6Vw== X-Received: by 10.180.186.99 with SMTP id fj3mr1851046wic.10.1429303296825; Fri, 17 Apr 2015 13:41:36 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id z12sm16108050wjq.12.2015.04.17.13.41.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 13:41:35 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 In-Reply-To: <8c1de894-22ab-46fb-89e4-22e158f85c21@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::232 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103780 Archived-At: On 04/17/2015 05:48 AM, Daniel Galtieri wrote: > C-M-i provides all the correct completion options. The issue seems to be with whatever mechanism is behind generating the autocomplete tooltips. I'm not entirely sure what I changed, or if this never worked to begin with and I was mistaken in the first place, but if I do the following, for example: Thanks for checking. Looking into this, seems like it never worked in the Python REPL buffers (or at least hasn't for a long while). The `company-capf' backend wasn't used, you were simply getting completions from `company-dabbrev'. > sys.p M-x company-complete to manually start completion I get "No completion found". But if I type C-M-i I get a completions buffer with the appropriate methods. I've pushed a fix below to the master repo. It should work now. > Oddly, if I type sys.p and then change my focus to another application (e.g. I click inside of firefox) and then switch my focus back to Emacs, typing "a" (for example) results in the autocompletion tooltip to pop up. Sounds odd, but you probably weren't getting the right completions in this scenario, too. > There seems to be something funky going on, but I'm not entirely sure where to direct my questions. The company-mode issue tracker is an okay venue for this kind of questions, too. diff --git a/company-capf.el b/company-capf.el index 4962a26..17b739b 100644 --- a/company-capf.el +++ b/company-capf.el @@ -1,6 +1,6 @@ ;;; company-capf.el --- company-mode completion-at-point-functions back-end -*- lexical-binding: t -*- -;; Copyright (C) 2013-2014 Free Software Foundation, Inc. +;; Copyright (C) 2013-2015 Free Software Foundation, Inc. ;; Author: Stefan Monnier @@ -51,7 +51,7 @@ (data (run-hook-wrapped 'completion-at-point-functions ;; Ignore misbehaving functions. #'completion--capf-wrapper 'optimist))) - (when (and (consp (cdr data)) (numberp (nth 1 data))) data))) + (when (and (consp (cdr data)) (integer-or-marker-p (nth 1 data))) data))) (defun company-capf (command &optional arg &rest _args) "`company-mode' back-end using `completion-at-point-functions'."